diff options
Diffstat (limited to 'src/client/main.cpp')
| -rw-r--r-- | src/client/main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/main.cpp b/src/client/main.cpp index 4e284c5..71a51c6 100644 --- a/src/client/main.cpp +++ b/src/client/main.cpp @@ -14,6 +14,7 @@ extern "C" { #include "menuhandeler.hpp" #include "lua_api/load_gui.hpp" #include "lua_api/load_game.hpp" +#include "lua_api/load_core.hpp" #include "callbackhandeler.hpp" using namespace irr; @@ -31,15 +32,19 @@ void loadLLibs(lua_State* L){ luaopen_math(L); } +lua_State* L; + void loadIrrLibs(lua_State* L, IrrlichtDevice* device){ printf("Loading guifuncs...\n"); load_guifuncs(L,device); load_gamefuncs(L,device); + load_corefuncs(L,device); } int main(int argc, char *argv[]){ //Create a new lua state, this gets shared everywhere lua_State *state = luaL_newstate(); + L = state; //Load the lua libraries loadLLibs(state); //Defined in initdevice.cpp, creates the irrlicht device @@ -89,5 +94,6 @@ int main(int argc, char *argv[]){ lua_call(state,0,0); } lua_close(state); + device->drop(); return 0; } |
