From ed58795eaf03bdee0b1fae8d05ce5b86d17549f7 Mon Sep 17 00:00:00 2001 From: Alexander Pickering Date: Sat, 30 Jun 2018 16:15:05 -0600 Subject: Warning-less build All compile warning for -Wall have been fixed --- src/client/lua_api/load_gui.cpp | 47 ++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 22 deletions(-) (limited to 'src/client/lua_api/load_gui.cpp') diff --git a/src/client/lua_api/load_gui.cpp b/src/client/lua_api/load_gui.cpp index c90c8f5..598f842 100644 --- a/src/client/lua_api/load_gui.cpp +++ b/src/client/lua_api/load_gui.cpp @@ -27,38 +27,41 @@ extern IrrlichtDevice* device; //Things from guiparts.hpp std::map iguielements; IrrlichtDevice* guidevice; -long gui_elenum; -std::vector guielements(1); +//long gui_elenum; +//std::vector guielements(1); lua_State* tL; int screenwidth(lua_State* L); int screenheight(lua_State* L); void load_guifuncs(lua_State* L){ - tL = L; - guidevice = device; - gui_elenum = 0; - guielements[0] = NULL; + printf("Started loading gui...\n"); + tL = L; + guidevice = device; + //gui_elenum = 0; + //guielements[0] = NULL; - iguilabel_register(L,device); - lua_pop(L, 1); - - //Various enums - register_skin(L); + //Various enums + register_skin(L); - lua_newtable(L); - lua_setglobal(L,"gui"); - iguicheckbox_register(L); - iguiwindow_register(L,device); - iguiimage_register(L); - iguibutton_register(L); - - lua_pushcfunction(L,screenwidth); - lua_setglobal(L,"scrw"); + lua_newtable(L); + lua_setglobal(L,"gui"); + //printf("Registering label...\n"); + iguilabel_register(L); + //printf("Registering checkbox...\n"); + iguicheckbox_register(L); + //printf("Registering window...\n"); + iguiwindow_register(L,device); + //printf("Registering guiimage\n"); + iguiimage_register(L); + //printf("Registering button\n"); + iguibutton_register(L); - lua_pushcfunction(L,screenheight); - lua_setglobal(L,"scrh"); + lua_pushcfunction(L,screenwidth); + lua_setglobal(L,"scrw"); + lua_pushcfunction(L,screenheight); + lua_setglobal(L,"scrh"); } -- cgit v1.2.3-70-g09d2