aboutsummaryrefslogtreecommitdiff
path: root/src/lua/embed/embed.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/embed/embed.h')
-rw-r--r--src/lua/embed/embed.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lua/embed/embed.h b/src/lua/embed/embed.h
index 2ef8b75..33620b0 100644
--- a/src/lua/embed/embed.h
+++ b/src/lua/embed/embed.h
@@ -10,8 +10,8 @@ namespace embed
/**
* embed lua script to context.
*/
-#define embed(L, script, name) \
- if(luaL_loadbuffer(L, script, strlen(script), name) == 0)\
+#define embed(L, script, name)\
+ if(luax_loadbuffer(L, script, strlen(script), name) == 0)\
lua_call(L, 0, 0);
/**
@@ -33,14 +33,14 @@ namespace embed
// embed scripts
const jin_Embed scripts[] = {
- {"graphics.lua", graphics_lua},
- {"keyboard.lua", keyboard_lua},
- {"mouse.lua", mouse_lua},
- {"debug.lua", debug_lua},
- {"boot.lua", boot_lua},
- {0, 0}
+ { "graphics.lua", graphics_lua },
+ { "keyboard.lua", keyboard_lua },
+ { "mouse.lua", mouse_lua },
+ { "debug.lua", debug_lua },
+ { "boot.lua", boot_lua },
+ { 0, 0 }
};
-
+
// load all emebd lua scripts
for (int i = 0; scripts[i].fname; ++i)
embed(L, scripts[i].source, scripts[i].fname);