diff options
Diffstat (limited to 'src/client/main.cpp')
| -rw-r--r-- | src/client/main.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/client/main.cpp b/src/client/main.cpp index f764fe9..1fcc65d 100644 --- a/src/client/main.cpp +++ b/src/client/main.cpp @@ -117,6 +117,7 @@ int main(int argc, char *argv[]){ //Create a new lua state, this gets shared everywhere lua_State *state = luaL_newstate(); L = state; + printf("Created lua state at %p\n",L); //Load the lua libraries loadLLibs(state); //Defined in initdevice.cpp, creates the irrlicht device @@ -133,12 +134,14 @@ int main(int argc, char *argv[]){ luaL_openlibs(state); printf("Loadded irr libs...\n"); //Sets the global event handeler + printf("Creating event receiver\n"); GlobalEventReceiver ger = GlobalEventReceiver(device); + printf("Created event receiver\n"); device->setEventReceiver(&ger); int iErr = luaL_dofile(state,"../data/init.lua"); if(iErr != 0){ + printf("Failed to open lua file:../data/init.lua\n"); lua_error(state); - printf("Failed to open lua file:../data/guitest.lua\n"); } //Load some bullet physics stuff @@ -160,6 +163,8 @@ int main(int argc, char *argv[]){ lua_pushcfunction(L,setbackgroundcolor); lua_setfield(L,-2,"setbackgroundcolor"); lua_pop(L,1); + printf("About to check if device run\n"); + printf("Device is %p\n",device); while(device->run()){ gameloop_net(L); gameloop_phys(UpdateElement); @@ -192,6 +197,7 @@ int main(int argc, char *argv[]){ lua_call(state,0,0); lua_pop(state,1); }else{ + printf("Tick was nil...\n"); lua_pop(state,2); } //lua_pop(state,2); |
