[Moeng-cvs] BBRpg/src script.cpp,1.16,1.17
Status: Alpha
Brought to you by:
b_lindeijer
From: Bjørn L. <b_l...@us...> - 2007-01-27 02:14:50
|
Update of /cvsroot/moeng/BBRpg/src In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13247/src Modified Files: script.cpp Log Message: Upgraded BBRpg to work with Lua 5.1. Index: script.cpp =================================================================== RCS file: /cvsroot/moeng/BBRpg/src/script.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** script.cpp 23 Oct 2004 11:54:18 -0000 1.16 --- script.cpp 27 Jan 2007 02:14:47 -0000 1.17 *************** *** 62,73 **** { // Create Lua state ! L = lua_open(); // Enable these Lua libraries to the script ! luaopen_base(L); ! luaopen_string(L); ! luaopen_math(L); ! luaopen_table(L); ! luaopen_io(L); // Add the Object type to Lua --- 62,73 ---- { // Create Lua state ! L = luaL_newstate(); // Enable these Lua libraries to the script ! lua_pushcfunction(L, luaopen_base); lua_call(L, 0, 0); ! lua_pushcfunction(L, luaopen_string); lua_call(L, 0, 0); ! lua_pushcfunction(L, luaopen_math); lua_call(L, 0, 0); ! lua_pushcfunction(L, luaopen_table); lua_call(L, 0, 0); ! lua_pushcfunction(L, luaopen_io); lua_call(L, 0, 0); // Add the Object type to Lua *************** *** 152,156 **** lua_register(L, "m_get_shift", l_get_shift); ! handleLuaError(lua_dostring(L, lua_include), "lua_include"); --- 152,156 ---- lua_register(L, "m_get_shift", l_get_shift); ! handleLuaError(luaL_dostring(L, lua_include), "lua_include"); |