diff options
| author | Alexander Pickering <alex@cogarr.net> | 2018-09-10 23:11:08 -0400 |
|---|---|---|
| committer | Alexander Pickering <alex@cogarr.net> | 2018-09-10 23:11:08 -0400 |
| commit | c38d5eca7091fc7f0206ed0c746622022b2ae508 (patch) | |
| tree | 8c01d4a941b4152675354b8b7a46c0906e9fb40c /src/server/main.cpp | |
| parent | b3c0d2ead1f384b35615be562c5f06804e8990cb (diff) | |
| download | brokengine-c38d5eca7091fc7f0206ed0c746622022b2ae508.tar.gz brokengine-c38d5eca7091fc7f0206ed0c746622022b2ae508.tar.bz2 brokengine-c38d5eca7091fc7f0206ed0c746622022b2ae508.zip | |
Added documentation
Also added treeview guielemnt
Also added ifilesystem guielement
Also added io library
Diffstat (limited to 'src/server/main.cpp')
| -rw-r--r-- | src/server/main.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/server/main.cpp b/src/server/main.cpp index bd731c2..9fb28c8 100644 --- a/src/server/main.cpp +++ b/src/server/main.cpp @@ -29,7 +29,9 @@ using namespace chrono; lua_State* L; void gameloop(){ gameloop_phys(NULL); + //printf("done physics\n"); gameloop_net(L); + //printf("done net\n"); } int main (){ @@ -38,10 +40,11 @@ int main (){ putenv("LUA_PATH=../data/?.lua"); L = luaL_newstate(); - lua_newtable(L); - lua_setglobal(L,"GAME"); + lua_newtable(L);//{} + lua_setglobal(L,"GAME");// phys_genesis(); + luaL_openlibs(L); loadLLibs(L); loadNetLibs(L); loadPhysLibs(L); @@ -51,16 +54,21 @@ int main (){ lua_error(L); } do{ + printf("Start of server gameloop\n"); gameloop(); + printf("Gameloop\n"); std::this_thread::yield(); + printf("Thread yeild\n"); lua_getglobal(L,"GAME");//{} lua_getfield(L,-1,"tick");//{},function_tick() + printf("Found game tick\n"); if(!lua_isnil(L,-1)){ lua_call(L,0,0); lua_pop(L,1); }else{ lua_pop(L,2); } + printf("End of server gameloop\n"); }while(true); phys_shutdown(NULL); |
