From 755e4d965c3e400f9b0762f3fa6363f3a933ecc8 Mon Sep 17 00:00:00 2001 From: "M. Liebmann" Date: Mon, 16 Nov 2015 13:14:29 +0100 Subject: [PATCH] CLuaInstance: Add constants from CComponents as CC.xxx - Set Lua api version to 1.10 --- src/gui/luainstance.cpp | 12 ++++++++++++ src/gui/luainstance.h | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index 8255491b7..b24f022a6 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -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 } }; diff --git a/src/gui/luainstance.h b/src/gui/luainstance.h index f0983d96a..346177367 100644 --- a/src/gui/luainstance.h +++ b/src/gui/luainstance.h @@ -34,7 +34,7 @@ extern "C" { #include #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