diff options
Diffstat (limited to 'src/libjin-lua/embed/embed.h')
-rw-r--r-- | src/libjin-lua/embed/embed.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/libjin-lua/embed/embed.h b/src/libjin-lua/embed/embed.h index 1928dd5..c1d1ef5 100644 --- a/src/libjin-lua/embed/embed.h +++ b/src/libjin-lua/embed/embed.h @@ -10,14 +10,15 @@ namespace JinEngine // Embed structure. struct jin_Embed { - const char* file, *source; + const char* file; + const unsigned char* source; }; // Embed scripts. - #include "scripts/graphics.lua.h" - #include "scripts/keyboard.lua.h" - #include "scripts/mouse.lua.h" - #include "scripts/boot.lua.h" + #include "graphics.lua.h" + #include "keyboard.lua.h" + #include "mouse.lua.h" + #include "boot.lua.h" // In order. static const jin_Embed modules[] = { @@ -31,13 +32,17 @@ namespace JinEngine static void run(lua_State* L) { + const char* file, *source; for (int i = 0; modules[i].file; ++i) { - const char* file = modules[i].file, *source = modules[i].source; + file = (const char*)modules[i].file; + source = (const char*)modules[i].source; if (luax_loadbuffer(L, source, strlen(source), file) == 0) luax_call(L, 0, 0); } - if (luax_loadbuffer(L, bootscript.source, strlen(bootscript.source), bootscript.file) == 0) + file = (const char*)bootscript.source; + source = (const char*)bootscript.source; + if (luax_loadbuffer(L, source, strlen(source), file) == 0) luax_call(L, 0, 0); } |