|
@@ -15,8 +15,6 @@ namespace gameplay
|
|
|
|
|
|
|
|
void luaRegister_Font()
|
|
void luaRegister_Font()
|
|
|
{
|
|
{
|
|
|
- ScriptController* sc = ScriptController::getInstance();
|
|
|
|
|
-
|
|
|
|
|
const luaL_Reg lua_members[] =
|
|
const luaL_Reg lua_members[] =
|
|
|
{
|
|
{
|
|
|
{"addRef", lua_Font_addRef},
|
|
{"addRef", lua_Font_addRef},
|
|
@@ -41,14 +39,14 @@ void luaRegister_Font()
|
|
|
};
|
|
};
|
|
|
std::vector<std::string> scopePath;
|
|
std::vector<std::string> scopePath;
|
|
|
|
|
|
|
|
- sc->registerClass("Font", lua_members, NULL, lua_Font__gc, lua_statics, scopePath);
|
|
|
|
|
|
|
+ ScriptUtil::registerClass("Font", lua_members, NULL, lua_Font__gc, lua_statics, scopePath);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static Font* getInstance(lua_State* state)
|
|
static Font* getInstance(lua_State* state)
|
|
|
{
|
|
{
|
|
|
void* userdata = luaL_checkudata(state, 1, "Font");
|
|
void* userdata = luaL_checkudata(state, 1, "Font");
|
|
|
luaL_argcheck(state, userdata != NULL, 1, "'Font' expected.");
|
|
luaL_argcheck(state, userdata != NULL, 1, "'Font' expected.");
|
|
|
- return (Font*)((ScriptController::LuaObject*)userdata)->instance;
|
|
|
|
|
|
|
+ return (Font*)((ScriptUtil::LuaObject*)userdata)->instance;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
int lua_Font__gc(lua_State* state)
|
|
int lua_Font__gc(lua_State* state)
|
|
@@ -65,7 +63,7 @@ int lua_Font__gc(lua_State* state)
|
|
|
{
|
|
{
|
|
|
void* userdata = luaL_checkudata(state, 1, "Font");
|
|
void* userdata = luaL_checkudata(state, 1, "Font");
|
|
|
luaL_argcheck(state, userdata != NULL, 1, "'Font' expected.");
|
|
luaL_argcheck(state, userdata != NULL, 1, "'Font' expected.");
|
|
|
- ScriptController::LuaObject* object = (ScriptController::LuaObject*)userdata;
|
|
|
|
|
|
|
+ ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)userdata;
|
|
|
if (object->owns)
|
|
if (object->owns)
|
|
|
{
|
|
{
|
|
|
Font* instance = (Font*)object->instance;
|
|
Font* instance = (Font*)object->instance;
|
|
@@ -175,19 +173,19 @@ int lua_Font_createText(lua_State* state)
|
|
|
(lua_type(state, 4) == LUA_TUSERDATA || lua_type(state, 4) == LUA_TNIL))
|
|
(lua_type(state, 4) == LUA_TUSERDATA || lua_type(state, 4) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
- Vector4* param3 = ScriptController::getInstance()->getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
+ Vector4* param3 = ScriptUtil::getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
void* returnPtr = (void*)instance->createText(param1, *param2, *param3);
|
|
void* returnPtr = (void*)instance->createText(param1, *param2, *param3);
|
|
|
if (returnPtr)
|
|
if (returnPtr)
|
|
|
{
|
|
{
|
|
|
- ScriptController::LuaObject* object = (ScriptController::LuaObject*)lua_newuserdata(state, sizeof(ScriptController::LuaObject));
|
|
|
|
|
|
|
+ ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
object->instance = returnPtr;
|
|
object->instance = returnPtr;
|
|
|
object->owns = false;
|
|
object->owns = false;
|
|
|
luaL_getmetatable(state, "FontText");
|
|
luaL_getmetatable(state, "FontText");
|
|
@@ -216,13 +214,13 @@ int lua_Font_createText(lua_State* state)
|
|
|
lua_type(state, 5) == LUA_TNUMBER)
|
|
lua_type(state, 5) == LUA_TNUMBER)
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
- Vector4* param3 = ScriptController::getInstance()->getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
+ Vector4* param3 = ScriptUtil::getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
@@ -231,7 +229,7 @@ int lua_Font_createText(lua_State* state)
|
|
|
void* returnPtr = (void*)instance->createText(param1, *param2, *param3, param4);
|
|
void* returnPtr = (void*)instance->createText(param1, *param2, *param3, param4);
|
|
|
if (returnPtr)
|
|
if (returnPtr)
|
|
|
{
|
|
{
|
|
|
- ScriptController::LuaObject* object = (ScriptController::LuaObject*)lua_newuserdata(state, sizeof(ScriptController::LuaObject));
|
|
|
|
|
|
|
+ ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
object->instance = returnPtr;
|
|
object->instance = returnPtr;
|
|
|
object->owns = false;
|
|
object->owns = false;
|
|
|
luaL_getmetatable(state, "FontText");
|
|
luaL_getmetatable(state, "FontText");
|
|
@@ -261,13 +259,13 @@ int lua_Font_createText(lua_State* state)
|
|
|
(lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL))
|
|
(lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
- Vector4* param3 = ScriptController::getInstance()->getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
+ Vector4* param3 = ScriptUtil::getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
@@ -279,7 +277,7 @@ int lua_Font_createText(lua_State* state)
|
|
|
void* returnPtr = (void*)instance->createText(param1, *param2, *param3, param4, param5);
|
|
void* returnPtr = (void*)instance->createText(param1, *param2, *param3, param4, param5);
|
|
|
if (returnPtr)
|
|
if (returnPtr)
|
|
|
{
|
|
{
|
|
|
- ScriptController::LuaObject* object = (ScriptController::LuaObject*)lua_newuserdata(state, sizeof(ScriptController::LuaObject));
|
|
|
|
|
|
|
+ ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
object->instance = returnPtr;
|
|
object->instance = returnPtr;
|
|
|
object->owns = false;
|
|
object->owns = false;
|
|
|
luaL_getmetatable(state, "FontText");
|
|
luaL_getmetatable(state, "FontText");
|
|
@@ -310,13 +308,13 @@ int lua_Font_createText(lua_State* state)
|
|
|
lua_type(state, 7) == LUA_TBOOLEAN)
|
|
lua_type(state, 7) == LUA_TBOOLEAN)
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
- Vector4* param3 = ScriptController::getInstance()->getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
+ Vector4* param3 = ScriptUtil::getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
@@ -325,13 +323,13 @@ int lua_Font_createText(lua_State* state)
|
|
|
Font::Justify param5 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 6));
|
|
Font::Justify param5 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 6));
|
|
|
|
|
|
|
|
// Get parameter 6 off the stack.
|
|
// Get parameter 6 off the stack.
|
|
|
- bool param6 = ScriptController::luaCheckBool(state, 7);
|
|
|
|
|
|
|
+ bool param6 = ScriptUtil::luaCheckBool(state, 7);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
void* returnPtr = (void*)instance->createText(param1, *param2, *param3, param4, param5, param6);
|
|
void* returnPtr = (void*)instance->createText(param1, *param2, *param3, param4, param5, param6);
|
|
|
if (returnPtr)
|
|
if (returnPtr)
|
|
|
{
|
|
{
|
|
|
- ScriptController::LuaObject* object = (ScriptController::LuaObject*)lua_newuserdata(state, sizeof(ScriptController::LuaObject));
|
|
|
|
|
|
|
+ ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
object->instance = returnPtr;
|
|
object->instance = returnPtr;
|
|
|
object->owns = false;
|
|
object->owns = false;
|
|
|
luaL_getmetatable(state, "FontText");
|
|
luaL_getmetatable(state, "FontText");
|
|
@@ -363,13 +361,13 @@ int lua_Font_createText(lua_State* state)
|
|
|
lua_type(state, 8) == LUA_TBOOLEAN)
|
|
lua_type(state, 8) == LUA_TBOOLEAN)
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
- Vector4* param3 = ScriptController::getInstance()->getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
+ Vector4* param3 = ScriptUtil::getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
@@ -378,16 +376,16 @@ int lua_Font_createText(lua_State* state)
|
|
|
Font::Justify param5 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 6));
|
|
Font::Justify param5 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 6));
|
|
|
|
|
|
|
|
// Get parameter 6 off the stack.
|
|
// Get parameter 6 off the stack.
|
|
|
- bool param6 = ScriptController::luaCheckBool(state, 7);
|
|
|
|
|
|
|
+ bool param6 = ScriptUtil::luaCheckBool(state, 7);
|
|
|
|
|
|
|
|
// Get parameter 7 off the stack.
|
|
// Get parameter 7 off the stack.
|
|
|
- bool param7 = ScriptController::luaCheckBool(state, 8);
|
|
|
|
|
|
|
+ bool param7 = ScriptUtil::luaCheckBool(state, 8);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
void* returnPtr = (void*)instance->createText(param1, *param2, *param3, param4, param5, param6, param7);
|
|
void* returnPtr = (void*)instance->createText(param1, *param2, *param3, param4, param5, param6, param7);
|
|
|
if (returnPtr)
|
|
if (returnPtr)
|
|
|
{
|
|
{
|
|
|
- ScriptController::LuaObject* object = (ScriptController::LuaObject*)lua_newuserdata(state, sizeof(ScriptController::LuaObject));
|
|
|
|
|
|
|
+ ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
object->instance = returnPtr;
|
|
object->instance = returnPtr;
|
|
|
object->owns = false;
|
|
object->owns = false;
|
|
|
luaL_getmetatable(state, "FontText");
|
|
luaL_getmetatable(state, "FontText");
|
|
@@ -420,13 +418,13 @@ int lua_Font_createText(lua_State* state)
|
|
|
(lua_type(state, 9) == LUA_TUSERDATA || lua_type(state, 9) == LUA_TTABLE || lua_type(state, 9) == LUA_TNIL))
|
|
(lua_type(state, 9) == LUA_TUSERDATA || lua_type(state, 9) == LUA_TTABLE || lua_type(state, 9) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
- Vector4* param3 = ScriptController::getInstance()->getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
+ Vector4* param3 = ScriptUtil::getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
@@ -435,19 +433,19 @@ int lua_Font_createText(lua_State* state)
|
|
|
Font::Justify param5 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 6));
|
|
Font::Justify param5 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 6));
|
|
|
|
|
|
|
|
// Get parameter 6 off the stack.
|
|
// Get parameter 6 off the stack.
|
|
|
- bool param6 = ScriptController::luaCheckBool(state, 7);
|
|
|
|
|
|
|
+ bool param6 = ScriptUtil::luaCheckBool(state, 7);
|
|
|
|
|
|
|
|
// Get parameter 7 off the stack.
|
|
// Get parameter 7 off the stack.
|
|
|
- bool param7 = ScriptController::luaCheckBool(state, 8);
|
|
|
|
|
|
|
+ bool param7 = ScriptUtil::luaCheckBool(state, 8);
|
|
|
|
|
|
|
|
// Get parameter 8 off the stack.
|
|
// Get parameter 8 off the stack.
|
|
|
- Rectangle* param8 = ScriptController::getInstance()->getObjectPointer<Rectangle>(9, "Rectangle", false);
|
|
|
|
|
|
|
+ Rectangle* param8 = ScriptUtil::getObjectPointer<Rectangle>(9, "Rectangle", false);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
void* returnPtr = (void*)instance->createText(param1, *param2, *param3, param4, param5, param6, param7, param8);
|
|
void* returnPtr = (void*)instance->createText(param1, *param2, *param3, param4, param5, param6, param7, param8);
|
|
|
if (returnPtr)
|
|
if (returnPtr)
|
|
|
{
|
|
{
|
|
|
- ScriptController::LuaObject* object = (ScriptController::LuaObject*)lua_newuserdata(state, sizeof(ScriptController::LuaObject));
|
|
|
|
|
|
|
+ ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
object->instance = returnPtr;
|
|
object->instance = returnPtr;
|
|
|
object->owns = false;
|
|
object->owns = false;
|
|
|
luaL_getmetatable(state, "FontText");
|
|
luaL_getmetatable(state, "FontText");
|
|
@@ -491,7 +489,7 @@ int lua_Font_drawText(lua_State* state)
|
|
|
(lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
|
|
(lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- Font::Text* param1 = ScriptController::getInstance()->getObjectPointer<Font::Text>(2, "FontText", false);
|
|
|
|
|
|
|
+ Font::Text* param1 = ScriptUtil::getObjectPointer<Font::Text>(2, "FontText", false);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
instance->drawText(param1);
|
|
instance->drawText(param1);
|
|
@@ -513,13 +511,13 @@ int lua_Font_drawText(lua_State* state)
|
|
|
(lua_type(state, 4) == LUA_TUSERDATA || lua_type(state, 4) == LUA_TNIL))
|
|
(lua_type(state, 4) == LUA_TUSERDATA || lua_type(state, 4) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
- Vector4* param3 = ScriptController::getInstance()->getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
+ Vector4* param3 = ScriptUtil::getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
instance->drawText(param1, *param2, *param3);
|
|
instance->drawText(param1, *param2, *param3);
|
|
@@ -542,7 +540,7 @@ int lua_Font_drawText(lua_State* state)
|
|
|
(lua_type(state, 5) == LUA_TUSERDATA || lua_type(state, 5) == LUA_TNIL))
|
|
(lua_type(state, 5) == LUA_TUSERDATA || lua_type(state, 5) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
int param2 = (int)luaL_checkint(state, 3);
|
|
int param2 = (int)luaL_checkint(state, 3);
|
|
@@ -551,7 +549,7 @@ int lua_Font_drawText(lua_State* state)
|
|
|
int param3 = (int)luaL_checkint(state, 4);
|
|
int param3 = (int)luaL_checkint(state, 4);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
- Vector4* param4 = ScriptController::getInstance()->getObjectPointer<Vector4>(5, "Vector4", true);
|
|
|
|
|
|
|
+ Vector4* param4 = ScriptUtil::getObjectPointer<Vector4>(5, "Vector4", true);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
instance->drawText(param1, param2, param3, *param4);
|
|
instance->drawText(param1, param2, param3, *param4);
|
|
@@ -565,13 +563,13 @@ int lua_Font_drawText(lua_State* state)
|
|
|
lua_type(state, 5) == LUA_TNUMBER)
|
|
lua_type(state, 5) == LUA_TNUMBER)
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
- Vector4* param3 = ScriptController::getInstance()->getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
+ Vector4* param3 = ScriptUtil::getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
@@ -598,7 +596,7 @@ int lua_Font_drawText(lua_State* state)
|
|
|
lua_type(state, 6) == LUA_TNUMBER)
|
|
lua_type(state, 6) == LUA_TNUMBER)
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
int param2 = (int)luaL_checkint(state, 3);
|
|
int param2 = (int)luaL_checkint(state, 3);
|
|
@@ -607,7 +605,7 @@ int lua_Font_drawText(lua_State* state)
|
|
|
int param3 = (int)luaL_checkint(state, 4);
|
|
int param3 = (int)luaL_checkint(state, 4);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
- Vector4* param4 = ScriptController::getInstance()->getObjectPointer<Vector4>(5, "Vector4", true);
|
|
|
|
|
|
|
+ Vector4* param4 = ScriptUtil::getObjectPointer<Vector4>(5, "Vector4", true);
|
|
|
|
|
|
|
|
// Get parameter 5 off the stack.
|
|
// Get parameter 5 off the stack.
|
|
|
unsigned int param5 = (unsigned int)luaL_checkunsigned(state, 6);
|
|
unsigned int param5 = (unsigned int)luaL_checkunsigned(state, 6);
|
|
@@ -625,13 +623,13 @@ int lua_Font_drawText(lua_State* state)
|
|
|
(lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL))
|
|
(lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
- Vector4* param3 = ScriptController::getInstance()->getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
+ Vector4* param3 = ScriptUtil::getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
@@ -662,7 +660,7 @@ int lua_Font_drawText(lua_State* state)
|
|
|
lua_type(state, 7) == LUA_TBOOLEAN)
|
|
lua_type(state, 7) == LUA_TBOOLEAN)
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
int param2 = (int)luaL_checkint(state, 3);
|
|
int param2 = (int)luaL_checkint(state, 3);
|
|
@@ -671,13 +669,13 @@ int lua_Font_drawText(lua_State* state)
|
|
|
int param3 = (int)luaL_checkint(state, 4);
|
|
int param3 = (int)luaL_checkint(state, 4);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
- Vector4* param4 = ScriptController::getInstance()->getObjectPointer<Vector4>(5, "Vector4", true);
|
|
|
|
|
|
|
+ Vector4* param4 = ScriptUtil::getObjectPointer<Vector4>(5, "Vector4", true);
|
|
|
|
|
|
|
|
// Get parameter 5 off the stack.
|
|
// Get parameter 5 off the stack.
|
|
|
unsigned int param5 = (unsigned int)luaL_checkunsigned(state, 6);
|
|
unsigned int param5 = (unsigned int)luaL_checkunsigned(state, 6);
|
|
|
|
|
|
|
|
// Get parameter 6 off the stack.
|
|
// Get parameter 6 off the stack.
|
|
|
- bool param6 = ScriptController::luaCheckBool(state, 7);
|
|
|
|
|
|
|
+ bool param6 = ScriptUtil::luaCheckBool(state, 7);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
instance->drawText(param1, param2, param3, *param4, param5, param6);
|
|
instance->drawText(param1, param2, param3, *param4, param5, param6);
|
|
@@ -693,13 +691,13 @@ int lua_Font_drawText(lua_State* state)
|
|
|
lua_type(state, 7) == LUA_TBOOLEAN)
|
|
lua_type(state, 7) == LUA_TBOOLEAN)
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
- Vector4* param3 = ScriptController::getInstance()->getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
+ Vector4* param3 = ScriptUtil::getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
@@ -708,7 +706,7 @@ int lua_Font_drawText(lua_State* state)
|
|
|
Font::Justify param5 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 6));
|
|
Font::Justify param5 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 6));
|
|
|
|
|
|
|
|
// Get parameter 6 off the stack.
|
|
// Get parameter 6 off the stack.
|
|
|
- bool param6 = ScriptController::luaCheckBool(state, 7);
|
|
|
|
|
|
|
+ bool param6 = ScriptUtil::luaCheckBool(state, 7);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
instance->drawText(param1, *param2, *param3, param4, param5, param6);
|
|
instance->drawText(param1, *param2, *param3, param4, param5, param6);
|
|
@@ -734,13 +732,13 @@ int lua_Font_drawText(lua_State* state)
|
|
|
lua_type(state, 8) == LUA_TBOOLEAN)
|
|
lua_type(state, 8) == LUA_TBOOLEAN)
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
- Vector4* param3 = ScriptController::getInstance()->getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
+ Vector4* param3 = ScriptUtil::getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
@@ -749,10 +747,10 @@ int lua_Font_drawText(lua_State* state)
|
|
|
Font::Justify param5 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 6));
|
|
Font::Justify param5 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 6));
|
|
|
|
|
|
|
|
// Get parameter 6 off the stack.
|
|
// Get parameter 6 off the stack.
|
|
|
- bool param6 = ScriptController::luaCheckBool(state, 7);
|
|
|
|
|
|
|
+ bool param6 = ScriptUtil::luaCheckBool(state, 7);
|
|
|
|
|
|
|
|
// Get parameter 7 off the stack.
|
|
// Get parameter 7 off the stack.
|
|
|
- bool param7 = ScriptController::luaCheckBool(state, 8);
|
|
|
|
|
|
|
+ bool param7 = ScriptUtil::luaCheckBool(state, 8);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
instance->drawText(param1, *param2, *param3, param4, param5, param6, param7);
|
|
instance->drawText(param1, *param2, *param3, param4, param5, param6, param7);
|
|
@@ -779,13 +777,13 @@ int lua_Font_drawText(lua_State* state)
|
|
|
(lua_type(state, 9) == LUA_TUSERDATA || lua_type(state, 9) == LUA_TTABLE || lua_type(state, 9) == LUA_TNIL))
|
|
(lua_type(state, 9) == LUA_TUSERDATA || lua_type(state, 9) == LUA_TTABLE || lua_type(state, 9) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
- Vector4* param3 = ScriptController::getInstance()->getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
+ Vector4* param3 = ScriptUtil::getObjectPointer<Vector4>(4, "Vector4", true);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
unsigned int param4 = (unsigned int)luaL_checkunsigned(state, 5);
|
|
@@ -794,13 +792,13 @@ int lua_Font_drawText(lua_State* state)
|
|
|
Font::Justify param5 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 6));
|
|
Font::Justify param5 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 6));
|
|
|
|
|
|
|
|
// Get parameter 6 off the stack.
|
|
// Get parameter 6 off the stack.
|
|
|
- bool param6 = ScriptController::luaCheckBool(state, 7);
|
|
|
|
|
|
|
+ bool param6 = ScriptUtil::luaCheckBool(state, 7);
|
|
|
|
|
|
|
|
// Get parameter 7 off the stack.
|
|
// Get parameter 7 off the stack.
|
|
|
- bool param7 = ScriptController::luaCheckBool(state, 8);
|
|
|
|
|
|
|
+ bool param7 = ScriptUtil::luaCheckBool(state, 8);
|
|
|
|
|
|
|
|
// Get parameter 8 off the stack.
|
|
// Get parameter 8 off the stack.
|
|
|
- Rectangle* param8 = ScriptController::getInstance()->getObjectPointer<Rectangle>(9, "Rectangle", false);
|
|
|
|
|
|
|
+ Rectangle* param8 = ScriptUtil::getObjectPointer<Rectangle>(9, "Rectangle", false);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
instance->drawText(param1, *param2, *param3, param4, param5, param6, param7, param8);
|
|
instance->drawText(param1, *param2, *param3, param4, param5, param6, param7, param8);
|
|
@@ -876,19 +874,19 @@ int lua_Font_getIndexAtLocation(lua_State* state)
|
|
|
(lua_type(state, 6) == LUA_TUSERDATA || lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TNIL))
|
|
(lua_type(state, 6) == LUA_TUSERDATA || lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
- Vector2* param4 = ScriptController::getInstance()->getObjectPointer<Vector2>(5, "Vector2", true);
|
|
|
|
|
|
|
+ Vector2* param4 = ScriptUtil::getObjectPointer<Vector2>(5, "Vector2", true);
|
|
|
|
|
|
|
|
// Get parameter 5 off the stack.
|
|
// Get parameter 5 off the stack.
|
|
|
- Vector2* param5 = ScriptController::getInstance()->getObjectPointer<Vector2>(6, "Vector2", false);
|
|
|
|
|
|
|
+ Vector2* param5 = ScriptUtil::getObjectPointer<Vector2>(6, "Vector2", false);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
int result = instance->getIndexAtLocation(param1, *param2, param3, *param4, param5);
|
|
int result = instance->getIndexAtLocation(param1, *param2, param3, *param4, param5);
|
|
@@ -916,19 +914,19 @@ int lua_Font_getIndexAtLocation(lua_State* state)
|
|
|
(lua_type(state, 7) == LUA_TSTRING || lua_type(state, 7) == LUA_TNIL))
|
|
(lua_type(state, 7) == LUA_TSTRING || lua_type(state, 7) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
- Vector2* param4 = ScriptController::getInstance()->getObjectPointer<Vector2>(5, "Vector2", true);
|
|
|
|
|
|
|
+ Vector2* param4 = ScriptUtil::getObjectPointer<Vector2>(5, "Vector2", true);
|
|
|
|
|
|
|
|
// Get parameter 5 off the stack.
|
|
// Get parameter 5 off the stack.
|
|
|
- Vector2* param5 = ScriptController::getInstance()->getObjectPointer<Vector2>(6, "Vector2", false);
|
|
|
|
|
|
|
+ Vector2* param5 = ScriptUtil::getObjectPointer<Vector2>(6, "Vector2", false);
|
|
|
|
|
|
|
|
// Get parameter 6 off the stack.
|
|
// Get parameter 6 off the stack.
|
|
|
Font::Justify param6 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 7));
|
|
Font::Justify param6 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 7));
|
|
@@ -960,25 +958,25 @@ int lua_Font_getIndexAtLocation(lua_State* state)
|
|
|
lua_type(state, 8) == LUA_TBOOLEAN)
|
|
lua_type(state, 8) == LUA_TBOOLEAN)
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
- Vector2* param4 = ScriptController::getInstance()->getObjectPointer<Vector2>(5, "Vector2", true);
|
|
|
|
|
|
|
+ Vector2* param4 = ScriptUtil::getObjectPointer<Vector2>(5, "Vector2", true);
|
|
|
|
|
|
|
|
// Get parameter 5 off the stack.
|
|
// Get parameter 5 off the stack.
|
|
|
- Vector2* param5 = ScriptController::getInstance()->getObjectPointer<Vector2>(6, "Vector2", false);
|
|
|
|
|
|
|
+ Vector2* param5 = ScriptUtil::getObjectPointer<Vector2>(6, "Vector2", false);
|
|
|
|
|
|
|
|
// Get parameter 6 off the stack.
|
|
// Get parameter 6 off the stack.
|
|
|
Font::Justify param6 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 7));
|
|
Font::Justify param6 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 7));
|
|
|
|
|
|
|
|
// Get parameter 7 off the stack.
|
|
// Get parameter 7 off the stack.
|
|
|
- bool param7 = ScriptController::luaCheckBool(state, 8);
|
|
|
|
|
|
|
+ bool param7 = ScriptUtil::luaCheckBool(state, 8);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
int result = instance->getIndexAtLocation(param1, *param2, param3, *param4, param5, param6, param7);
|
|
int result = instance->getIndexAtLocation(param1, *param2, param3, *param4, param5, param6, param7);
|
|
@@ -1008,28 +1006,28 @@ int lua_Font_getIndexAtLocation(lua_State* state)
|
|
|
lua_type(state, 9) == LUA_TBOOLEAN)
|
|
lua_type(state, 9) == LUA_TBOOLEAN)
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
- Vector2* param4 = ScriptController::getInstance()->getObjectPointer<Vector2>(5, "Vector2", true);
|
|
|
|
|
|
|
+ Vector2* param4 = ScriptUtil::getObjectPointer<Vector2>(5, "Vector2", true);
|
|
|
|
|
|
|
|
// Get parameter 5 off the stack.
|
|
// Get parameter 5 off the stack.
|
|
|
- Vector2* param5 = ScriptController::getInstance()->getObjectPointer<Vector2>(6, "Vector2", false);
|
|
|
|
|
|
|
+ Vector2* param5 = ScriptUtil::getObjectPointer<Vector2>(6, "Vector2", false);
|
|
|
|
|
|
|
|
// Get parameter 6 off the stack.
|
|
// Get parameter 6 off the stack.
|
|
|
Font::Justify param6 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 7));
|
|
Font::Justify param6 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 7));
|
|
|
|
|
|
|
|
// Get parameter 7 off the stack.
|
|
// Get parameter 7 off the stack.
|
|
|
- bool param7 = ScriptController::luaCheckBool(state, 8);
|
|
|
|
|
|
|
+ bool param7 = ScriptUtil::luaCheckBool(state, 8);
|
|
|
|
|
|
|
|
// Get parameter 8 off the stack.
|
|
// Get parameter 8 off the stack.
|
|
|
- bool param8 = ScriptController::luaCheckBool(state, 9);
|
|
|
|
|
|
|
+ bool param8 = ScriptUtil::luaCheckBool(state, 9);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
int result = instance->getIndexAtLocation(param1, *param2, param3, *param4, param5, param6, param7, param8);
|
|
int result = instance->getIndexAtLocation(param1, *param2, param3, *param4, param5, param6, param7, param8);
|
|
@@ -1074,16 +1072,16 @@ int lua_Font_getLocationAtIndex(lua_State* state)
|
|
|
lua_type(state, 6) == LUA_TNUMBER)
|
|
lua_type(state, 6) == LUA_TNUMBER)
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
- Vector2* param4 = ScriptController::getInstance()->getObjectPointer<Vector2>(5, "Vector2", false);
|
|
|
|
|
|
|
+ Vector2* param4 = ScriptUtil::getObjectPointer<Vector2>(5, "Vector2", false);
|
|
|
|
|
|
|
|
// Get parameter 5 off the stack.
|
|
// Get parameter 5 off the stack.
|
|
|
unsigned int param5 = (unsigned int)luaL_checkunsigned(state, 6);
|
|
unsigned int param5 = (unsigned int)luaL_checkunsigned(state, 6);
|
|
@@ -1111,16 +1109,16 @@ int lua_Font_getLocationAtIndex(lua_State* state)
|
|
|
(lua_type(state, 7) == LUA_TSTRING || lua_type(state, 7) == LUA_TNIL))
|
|
(lua_type(state, 7) == LUA_TSTRING || lua_type(state, 7) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
- Vector2* param4 = ScriptController::getInstance()->getObjectPointer<Vector2>(5, "Vector2", false);
|
|
|
|
|
|
|
+ Vector2* param4 = ScriptUtil::getObjectPointer<Vector2>(5, "Vector2", false);
|
|
|
|
|
|
|
|
// Get parameter 5 off the stack.
|
|
// Get parameter 5 off the stack.
|
|
|
unsigned int param5 = (unsigned int)luaL_checkunsigned(state, 6);
|
|
unsigned int param5 = (unsigned int)luaL_checkunsigned(state, 6);
|
|
@@ -1152,16 +1150,16 @@ int lua_Font_getLocationAtIndex(lua_State* state)
|
|
|
lua_type(state, 8) == LUA_TBOOLEAN)
|
|
lua_type(state, 8) == LUA_TBOOLEAN)
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
- Vector2* param4 = ScriptController::getInstance()->getObjectPointer<Vector2>(5, "Vector2", false);
|
|
|
|
|
|
|
+ Vector2* param4 = ScriptUtil::getObjectPointer<Vector2>(5, "Vector2", false);
|
|
|
|
|
|
|
|
// Get parameter 5 off the stack.
|
|
// Get parameter 5 off the stack.
|
|
|
unsigned int param5 = (unsigned int)luaL_checkunsigned(state, 6);
|
|
unsigned int param5 = (unsigned int)luaL_checkunsigned(state, 6);
|
|
@@ -1170,7 +1168,7 @@ int lua_Font_getLocationAtIndex(lua_State* state)
|
|
|
Font::Justify param6 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 7));
|
|
Font::Justify param6 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 7));
|
|
|
|
|
|
|
|
// Get parameter 7 off the stack.
|
|
// Get parameter 7 off the stack.
|
|
|
- bool param7 = ScriptController::luaCheckBool(state, 8);
|
|
|
|
|
|
|
+ bool param7 = ScriptUtil::luaCheckBool(state, 8);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
instance->getLocationAtIndex(param1, *param2, param3, param4, param5, param6, param7);
|
|
instance->getLocationAtIndex(param1, *param2, param3, param4, param5, param6, param7);
|
|
@@ -1197,16 +1195,16 @@ int lua_Font_getLocationAtIndex(lua_State* state)
|
|
|
lua_type(state, 9) == LUA_TBOOLEAN)
|
|
lua_type(state, 9) == LUA_TBOOLEAN)
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
- Vector2* param4 = ScriptController::getInstance()->getObjectPointer<Vector2>(5, "Vector2", false);
|
|
|
|
|
|
|
+ Vector2* param4 = ScriptUtil::getObjectPointer<Vector2>(5, "Vector2", false);
|
|
|
|
|
|
|
|
// Get parameter 5 off the stack.
|
|
// Get parameter 5 off the stack.
|
|
|
unsigned int param5 = (unsigned int)luaL_checkunsigned(state, 6);
|
|
unsigned int param5 = (unsigned int)luaL_checkunsigned(state, 6);
|
|
@@ -1215,10 +1213,10 @@ int lua_Font_getLocationAtIndex(lua_State* state)
|
|
|
Font::Justify param6 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 7));
|
|
Font::Justify param6 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 7));
|
|
|
|
|
|
|
|
// Get parameter 7 off the stack.
|
|
// Get parameter 7 off the stack.
|
|
|
- bool param7 = ScriptController::luaCheckBool(state, 8);
|
|
|
|
|
|
|
+ bool param7 = ScriptUtil::luaCheckBool(state, 8);
|
|
|
|
|
|
|
|
// Get parameter 8 off the stack.
|
|
// Get parameter 8 off the stack.
|
|
|
- bool param8 = ScriptController::luaCheckBool(state, 9);
|
|
|
|
|
|
|
+ bool param8 = ScriptUtil::luaCheckBool(state, 9);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
instance->getLocationAtIndex(param1, *param2, param3, param4, param5, param6, param7, param8);
|
|
instance->getLocationAtIndex(param1, *param2, param3, param4, param5, param6, param7, param8);
|
|
@@ -1332,7 +1330,7 @@ int lua_Font_getSpriteBatch(lua_State* state)
|
|
|
void* returnPtr = (void*)instance->getSpriteBatch();
|
|
void* returnPtr = (void*)instance->getSpriteBatch();
|
|
|
if (returnPtr)
|
|
if (returnPtr)
|
|
|
{
|
|
{
|
|
|
- ScriptController::LuaObject* object = (ScriptController::LuaObject*)lua_newuserdata(state, sizeof(ScriptController::LuaObject));
|
|
|
|
|
|
|
+ ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
object->instance = returnPtr;
|
|
object->instance = returnPtr;
|
|
|
object->owns = false;
|
|
object->owns = false;
|
|
|
luaL_getmetatable(state, "SpriteBatch");
|
|
luaL_getmetatable(state, "SpriteBatch");
|
|
@@ -1379,16 +1377,16 @@ int lua_Font_measureText(lua_State* state)
|
|
|
(lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA))
|
|
(lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
|
|
unsigned int param2 = (unsigned int)luaL_checkunsigned(state, 3);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
- unsigned int* param3 = ScriptController::getInstance()->getUnsignedIntPointer(4);
|
|
|
|
|
|
|
+ unsigned int* param3 = ScriptUtil::getUnsignedIntPointer(4);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
- unsigned int* param4 = ScriptController::getInstance()->getUnsignedIntPointer(5);
|
|
|
|
|
|
|
+ unsigned int* param4 = ScriptUtil::getUnsignedIntPointer(5);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
instance->measureText(param1, param2, param3, param4);
|
|
instance->measureText(param1, param2, param3, param4);
|
|
@@ -1402,16 +1400,16 @@ int lua_Font_measureText(lua_State* state)
|
|
|
(lua_type(state, 5) == LUA_TUSERDATA || lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TNIL))
|
|
(lua_type(state, 5) == LUA_TUSERDATA || lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
- Rectangle* param4 = ScriptController::getInstance()->getObjectPointer<Rectangle>(5, "Rectangle", false);
|
|
|
|
|
|
|
+ Rectangle* param4 = ScriptUtil::getObjectPointer<Rectangle>(5, "Rectangle", false);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
instance->measureText(param1, *param2, param3, param4);
|
|
instance->measureText(param1, *param2, param3, param4);
|
|
@@ -1435,16 +1433,16 @@ int lua_Font_measureText(lua_State* state)
|
|
|
(lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL))
|
|
(lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
- Rectangle* param4 = ScriptController::getInstance()->getObjectPointer<Rectangle>(5, "Rectangle", false);
|
|
|
|
|
|
|
+ Rectangle* param4 = ScriptUtil::getObjectPointer<Rectangle>(5, "Rectangle", false);
|
|
|
|
|
|
|
|
// Get parameter 5 off the stack.
|
|
// Get parameter 5 off the stack.
|
|
|
Font::Justify param5 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 6));
|
|
Font::Justify param5 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 6));
|
|
@@ -1472,22 +1470,22 @@ int lua_Font_measureText(lua_State* state)
|
|
|
lua_type(state, 7) == LUA_TBOOLEAN)
|
|
lua_type(state, 7) == LUA_TBOOLEAN)
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
- Rectangle* param4 = ScriptController::getInstance()->getObjectPointer<Rectangle>(5, "Rectangle", false);
|
|
|
|
|
|
|
+ Rectangle* param4 = ScriptUtil::getObjectPointer<Rectangle>(5, "Rectangle", false);
|
|
|
|
|
|
|
|
// Get parameter 5 off the stack.
|
|
// Get parameter 5 off the stack.
|
|
|
Font::Justify param5 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 6));
|
|
Font::Justify param5 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 6));
|
|
|
|
|
|
|
|
// Get parameter 6 off the stack.
|
|
// Get parameter 6 off the stack.
|
|
|
- bool param6 = ScriptController::luaCheckBool(state, 7);
|
|
|
|
|
|
|
+ bool param6 = ScriptUtil::luaCheckBool(state, 7);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
instance->measureText(param1, *param2, param3, param4, param5, param6);
|
|
instance->measureText(param1, *param2, param3, param4, param5, param6);
|
|
@@ -1513,25 +1511,25 @@ int lua_Font_measureText(lua_State* state)
|
|
|
lua_type(state, 8) == LUA_TBOOLEAN)
|
|
lua_type(state, 8) == LUA_TBOOLEAN)
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- Rectangle* param2 = ScriptController::getInstance()->getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
+ Rectangle* param2 = ScriptUtil::getObjectPointer<Rectangle>(3, "Rectangle", true);
|
|
|
|
|
|
|
|
// Get parameter 3 off the stack.
|
|
// Get parameter 3 off the stack.
|
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
- Rectangle* param4 = ScriptController::getInstance()->getObjectPointer<Rectangle>(5, "Rectangle", false);
|
|
|
|
|
|
|
+ Rectangle* param4 = ScriptUtil::getObjectPointer<Rectangle>(5, "Rectangle", false);
|
|
|
|
|
|
|
|
// Get parameter 5 off the stack.
|
|
// Get parameter 5 off the stack.
|
|
|
Font::Justify param5 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 6));
|
|
Font::Justify param5 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 6));
|
|
|
|
|
|
|
|
// Get parameter 6 off the stack.
|
|
// Get parameter 6 off the stack.
|
|
|
- bool param6 = ScriptController::luaCheckBool(state, 7);
|
|
|
|
|
|
|
+ bool param6 = ScriptUtil::luaCheckBool(state, 7);
|
|
|
|
|
|
|
|
// Get parameter 7 off the stack.
|
|
// Get parameter 7 off the stack.
|
|
|
- bool param7 = ScriptController::luaCheckBool(state, 8);
|
|
|
|
|
|
|
+ bool param7 = ScriptUtil::luaCheckBool(state, 8);
|
|
|
|
|
|
|
|
Font* instance = getInstance(state);
|
|
Font* instance = getInstance(state);
|
|
|
instance->measureText(param1, *param2, param3, param4, param5, param6, param7);
|
|
instance->measureText(param1, *param2, param3, param4, param5, param6, param7);
|
|
@@ -1602,12 +1600,12 @@ int lua_Font_static_create(lua_State* state)
|
|
|
if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL))
|
|
if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(1, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(1, false);
|
|
|
|
|
|
|
|
void* returnPtr = (void*)Font::create(param1);
|
|
void* returnPtr = (void*)Font::create(param1);
|
|
|
if (returnPtr)
|
|
if (returnPtr)
|
|
|
{
|
|
{
|
|
|
- ScriptController::LuaObject* object = (ScriptController::LuaObject*)lua_newuserdata(state, sizeof(ScriptController::LuaObject));
|
|
|
|
|
|
|
+ ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
object->instance = returnPtr;
|
|
object->instance = returnPtr;
|
|
|
object->owns = false;
|
|
object->owns = false;
|
|
|
luaL_getmetatable(state, "Font");
|
|
luaL_getmetatable(state, "Font");
|
|
@@ -1633,15 +1631,15 @@ int lua_Font_static_create(lua_State* state)
|
|
|
(lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
|
|
(lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(1, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(1, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
- const char* param2 = ScriptController::getInstance()->getString(2, false);
|
|
|
|
|
|
|
+ const char* param2 = ScriptUtil::getString(2, false);
|
|
|
|
|
|
|
|
void* returnPtr = (void*)Font::create(param1, param2);
|
|
void* returnPtr = (void*)Font::create(param1, param2);
|
|
|
if (returnPtr)
|
|
if (returnPtr)
|
|
|
{
|
|
{
|
|
|
- ScriptController::LuaObject* object = (ScriptController::LuaObject*)lua_newuserdata(state, sizeof(ScriptController::LuaObject));
|
|
|
|
|
|
|
+ ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
object->instance = returnPtr;
|
|
object->instance = returnPtr;
|
|
|
object->owns = false;
|
|
object->owns = false;
|
|
|
luaL_getmetatable(state, "Font");
|
|
luaL_getmetatable(state, "Font");
|
|
@@ -1671,7 +1669,7 @@ int lua_Font_static_create(lua_State* state)
|
|
|
(lua_type(state, 6) == LUA_TUSERDATA || lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TNIL))
|
|
(lua_type(state, 6) == LUA_TUSERDATA || lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(1, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(1, false);
|
|
|
|
|
|
|
|
// Get parameter 2 off the stack.
|
|
// Get parameter 2 off the stack.
|
|
|
Font::Style param2 = (Font::Style)lua_enumFromString_FontStyle(luaL_checkstring(state, 2));
|
|
Font::Style param2 = (Font::Style)lua_enumFromString_FontStyle(luaL_checkstring(state, 2));
|
|
@@ -1680,18 +1678,18 @@ int lua_Font_static_create(lua_State* state)
|
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 3);
|
|
unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 3);
|
|
|
|
|
|
|
|
// Get parameter 4 off the stack.
|
|
// Get parameter 4 off the stack.
|
|
|
- Font::Glyph* param4 = ScriptController::getInstance()->getObjectPointer<Font::Glyph>(4, "FontGlyph", false);
|
|
|
|
|
|
|
+ Font::Glyph* param4 = ScriptUtil::getObjectPointer<Font::Glyph>(4, "FontGlyph", false);
|
|
|
|
|
|
|
|
// Get parameter 5 off the stack.
|
|
// Get parameter 5 off the stack.
|
|
|
int param5 = (int)luaL_checkint(state, 5);
|
|
int param5 = (int)luaL_checkint(state, 5);
|
|
|
|
|
|
|
|
// Get parameter 6 off the stack.
|
|
// Get parameter 6 off the stack.
|
|
|
- Texture* param6 = ScriptController::getInstance()->getObjectPointer<Texture>(6, "Texture", false);
|
|
|
|
|
|
|
+ Texture* param6 = ScriptUtil::getObjectPointer<Texture>(6, "Texture", false);
|
|
|
|
|
|
|
|
void* returnPtr = (void*)Font::create(param1, param2, param3, param4, param5, param6);
|
|
void* returnPtr = (void*)Font::create(param1, param2, param3, param4, param5, param6);
|
|
|
if (returnPtr)
|
|
if (returnPtr)
|
|
|
{
|
|
{
|
|
|
- ScriptController::LuaObject* object = (ScriptController::LuaObject*)lua_newuserdata(state, sizeof(ScriptController::LuaObject));
|
|
|
|
|
|
|
+ ScriptUtil::LuaObject* object = (ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(ScriptUtil::LuaObject));
|
|
|
object->instance = returnPtr;
|
|
object->instance = returnPtr;
|
|
|
object->owns = false;
|
|
object->owns = false;
|
|
|
luaL_getmetatable(state, "Font");
|
|
luaL_getmetatable(state, "Font");
|
|
@@ -1734,7 +1732,7 @@ int lua_Font_static_getJustify(lua_State* state)
|
|
|
if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL))
|
|
if ((lua_type(state, 1) == LUA_TSTRING || lua_type(state, 1) == LUA_TNIL))
|
|
|
{
|
|
{
|
|
|
// Get parameter 1 off the stack.
|
|
// Get parameter 1 off the stack.
|
|
|
- const char* param1 = ScriptController::getInstance()->getString(1, false);
|
|
|
|
|
|
|
+ const char* param1 = ScriptUtil::getString(1, false);
|
|
|
|
|
|
|
|
Font::Justify result = Font::getJustify(param1);
|
|
Font::Justify result = Font::getJustify(param1);
|
|
|
|
|
|