diff options
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/audio/luaopen_audio.cpp | 2 | ||||
-rw-r--r-- | src/lua/core/luaopen_core.cpp | 14 | ||||
-rw-r--r-- | src/lua/embed/boot.lua.h | 4 | ||||
-rw-r--r-- | src/lua/graphics/luaopen_graphics.cpp | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/lua/audio/luaopen_audio.cpp b/src/lua/audio/luaopen_audio.cpp index 73c5bea..9a6bade 100644 --- a/src/lua/audio/luaopen_audio.cpp +++ b/src/lua/audio/luaopen_audio.cpp @@ -9,7 +9,7 @@ namespace lua static int l_init(lua_State* L) { - SDLAudioSetting setting; + SDLAudio::Setting setting; if (! SDLAudio::get()->init(&setting)) { luax_error(L, "could not init audio"); diff --git a/src/lua/core/luaopen_core.cpp b/src/lua/core/luaopen_core.cpp index 0e79ff5..d20a3bc 100644 --- a/src/lua/core/luaopen_core.cpp +++ b/src/lua/core/luaopen_core.cpp @@ -15,22 +15,22 @@ namespace lua return 1; } - static int l_quit(lua_State* L) + static int l_stop(lua_State* L) { - Game::get()->quit(); + Game::get()->stop(); return 0; } - static int l_exit(lua_State* L) + static int l_quit(lua_State* L) { - Game::get()->exit(); + Game::get()->quit(); return 0; } - + static const luaL_Reg f[] = { {"running", l_running}, - {"quit", l_quit}, // for end game loop - {"exit", l_exit}, // for exit whole game + {"stop", l_stop}, // for end game loop + {"quit", l_quit}, // for exit whole game {0, 0} }; diff --git a/src/lua/embed/boot.lua.h b/src/lua/embed/boot.lua.h index 2a9cfc5..c1d22a3 100644 --- a/src/lua/embed/boot.lua.h +++ b/src/lua/embed/boot.lua.h @@ -117,7 +117,7 @@ local function onError(msg) print("Error:\n" .. msg) function jin.core.onEvent(e) if e.type == 'quit' then - jin.core.quit() + jin.core.stop() end end local ww, wh = jin.graphics.size() @@ -150,7 +150,7 @@ local function main() -- quit subsystems jin.graphics.destroy() -- exit whole game - jin.core.exit() + jin.core.quit() end main() diff --git a/src/lua/graphics/luaopen_graphics.cpp b/src/lua/graphics/luaopen_graphics.cpp index 42586a5..2d1ff57 100644 --- a/src/lua/graphics/luaopen_graphics.cpp +++ b/src/lua/graphics/luaopen_graphics.cpp @@ -28,7 +28,7 @@ namespace lua static int l_init(lua_State* L) { WindowSystem* wnd = WindowSystem::get(); - WindowSetting setting; + WindowSystem::Setting setting; setting.width = luax_getfield_integer(L, 1, "width"); setting.height = luax_getfield_integer(L, 1, "height"); setting.title = luax_getfield_string(L, 1, "title"); |