- luainstance: add offsets to lua; set Lua api version to 1.70

This commit is contained in:
svenhoefer
2017-03-02 23:00:49 +01:00
parent 00d2d557c2
commit 6eb1bb1ea4
2 changed files with 15 additions and 1 deletions

View File

@@ -4,4 +4,4 @@
* to luainstance.h changes
*/
#define LUA_API_VERSION_MAJOR 1
#define LUA_API_VERSION_MINOR 69
#define LUA_API_VERSION_MINOR 70

View File

@@ -273,6 +273,19 @@ static void set_lua_variables(lua_State *L)
{ NULL, 0 }
};
/* offsets, exported as e.g. OFFSET['SHADOW'] */
table_key offsets[] =
{
{ "SHADOW", OFFSET_SHADOW },
{ "INTER", OFFSET_INTER },
{ "INNER_LARGE", OFFSET_INNER_LARGE },
{ "INNER_MID", OFFSET_INNER_MID },
{ "INNER_SMALL", OFFSET_INNER_SMALL },
{ "INNER_MIN", OFFSET_INNER_MIN },
{ "INNER_NONE", OFFSET_INNER_NONE },
{ NULL, 0 }
};
/* screen offsets, exported as e.g. SCREEN['END_Y'] */
lua_Integer xRes = (lua_Integer)CFrameBuffer::getInstance()->getScreenWidth(true);
lua_Integer yRes = (lua_Integer)CFrameBuffer::getInstance()->getScreenHeight(true);
@@ -375,6 +388,7 @@ static void set_lua_variables(lua_State *L)
{ "SCREEN", screenopts },
{ "FONT", fontlist },
{ "CORNER", corners },
{ "OFFSET", offsets },
{ "MENU_RETURN", menureturn },
{ "APIVERSION", apiversion },
{ "PLAYSTATE", playstate },