CLuaInstance: Add constants from CComponents as CC.xxx

- Set Lua api version to 1.10
This commit is contained in:
M. Liebmann
2015-11-16 13:14:29 +01:00
parent 35c6121780
commit 755e4d965c
2 changed files with 13 additions and 1 deletions

View File

@@ -299,6 +299,17 @@ static void set_lua_variables(lua_State *L)
{ NULL, 0 }
};
table_key ccomponents[] =
{
{ "SHADOW_OFF", CC_SHADOW_OFF },
{ "SHADOW_ON", CC_SHADOW_ON },
{ "SHADOW_RIGHT", CC_SHADOW_RIGHT },
{ "SHADOW_BOTTOM", CC_SHADOW_BOTTOM },
{ "SAVE_SCREEN_YES", CC_SAVE_SCREEN_YES },
{ "SAVE_SCREEN_NO", CC_SAVE_SCREEN_NO },
{ NULL, 0 }
};
/* list of environment variable arrays to be exported */
lua_envexport e[] =
{
@@ -309,6 +320,7 @@ static void set_lua_variables(lua_State *L)
{ "MENU_RETURN", menureturn },
{ "APIVERSION", apiversion },
{ "PLAYSTATE", playstate },
{ "CC", ccomponents },
{ NULL, NULL }
};

View File

@@ -34,7 +34,7 @@ extern "C" {
#include <vector>
#define LUA_API_VERSION_MAJOR 1
#define LUA_API_VERSION_MINOR 9
#define LUA_API_VERSION_MINOR 10
/* this is stored as userdata in the lua_State */
struct CLuaData