From d34e5c9d7c6135e805f2cc231411cdcc9910190c Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 8 Dec 2018 11:53:02 +0800 Subject: *misc --- src/lua/embed/embed.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/lua/embed/embed.h') diff --git a/src/lua/embed/embed.h b/src/lua/embed/embed.h index 4b1c6d9..b5e1334 100644 --- a/src/lua/embed/embed.h +++ b/src/lua/embed/embed.h @@ -24,12 +24,11 @@ namespace JinEngine { "graphics.lua", graphics_lua }, { "keyboard.lua", keyboard_lua }, { "mouse.lua", mouse_lua }, + { "boot.lua", boot_lua }, { 0, 0 } }; - static const jin_Embed boot_script = { "boot", boot_lua }; - - static void load(lua_State* L) + static void run(lua_State* L) { for (int i = 0; modules[i].file; ++i) { @@ -39,13 +38,6 @@ namespace JinEngine } } - static void run(lua_State* L) - { - const char* file = boot_script.file, *source = boot_script.source; - if (luax_loadbuffer(L, source, strlen(source), file) == 0) - lua_call(L, 0, 0); - } - } // namespace Embed } // namespace JinEngine -- cgit v1.1-26-g67d0