int lua_Curve_setTangent(lua_State* state) { // Get the number of parameters. int paramCount = lua_gettop(state); // Attempt to match the parameters to a valid binding. switch (paramCount) { case 5: { if ((lua_type(state, 1) == LUA_TUSERDATA) && lua_type(state, 2) == LUA_TNUMBER && (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL) && (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) && (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA)) { // Get parameter 1 off the stack. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2); // Get parameter 2 off the stack. Curve::InterpolationType param2 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 3)); // Get parameter 3 off the stack. float* param3 = ScriptUtil::getFloatPointer(4); // Get parameter 4 off the stack. float* param4 = ScriptUtil::getFloatPointer(5); Curve* instance = getInstance(state); instance->setTangent(param1, param2, param3, param4); return 0; } else { lua_pushstring(state, "lua_Curve_setTangent - Failed to match the given parameters to a valid function signature."); lua_error(state); } break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 5)."); lua_error(state); break; } } return 0; }
int lua_Curve_setPoint(lua_State* state) { // Get the number of parameters. int paramCount = lua_gettop(state); // Attempt to match the parameters to a valid binding. switch (paramCount) { case 5: { do { if ((lua_type(state, 1) == LUA_TUSERDATA) && lua_type(state, 2) == LUA_TNUMBER && lua_type(state, 3) == LUA_TNUMBER && (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) && (lua_type(state, 5) == LUA_TSTRING || lua_type(state, 5) == LUA_TNIL)) { // Get parameter 1 off the stack. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2); // Get parameter 2 off the stack. float param2 = (float)luaL_checknumber(state, 3); // Get parameter 3 off the stack. gameplay::ScriptUtil::LuaArray<float> param3 = gameplay::ScriptUtil::getFloatPointer(4); // Get parameter 4 off the stack. Curve::InterpolationType param4 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 5)); Curve* instance = getInstance(state); instance->setPoint(param1, param2, param3, param4); return 0; } } while (0); lua_pushstring(state, "lua_Curve_setPoint - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 7: { do { if ((lua_type(state, 1) == LUA_TUSERDATA) && lua_type(state, 2) == LUA_TNUMBER && lua_type(state, 3) == LUA_TNUMBER && (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) && (lua_type(state, 5) == LUA_TSTRING || lua_type(state, 5) == LUA_TNIL) && (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) && (lua_type(state, 7) == LUA_TTABLE || lua_type(state, 7) == LUA_TLIGHTUSERDATA)) { // Get parameter 1 off the stack. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2); // Get parameter 2 off the stack. float param2 = (float)luaL_checknumber(state, 3); // Get parameter 3 off the stack. gameplay::ScriptUtil::LuaArray<float> param3 = gameplay::ScriptUtil::getFloatPointer(4); // Get parameter 4 off the stack. Curve::InterpolationType param4 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 5)); // Get parameter 5 off the stack. gameplay::ScriptUtil::LuaArray<float> param5 = gameplay::ScriptUtil::getFloatPointer(6); // Get parameter 6 off the stack. gameplay::ScriptUtil::LuaArray<float> param6 = gameplay::ScriptUtil::getFloatPointer(7); Curve* instance = getInstance(state); instance->setPoint(param1, param2, param3, param4, param5, param6); return 0; } } while (0); lua_pushstring(state, "lua_Curve_setPoint - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 5 or 7)."); lua_error(state); break; } } return 0; }
int lua_AnimationTarget_createAnimation(lua_State* state) { // Get the number of parameters. int paramCount = lua_gettop(state); // Attempt to match the parameters to a valid binding. switch (paramCount) { case 3: { do { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL)) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); // Get parameter 2 off the stack. const char* param2 = gameplay::ScriptUtil::getString(3, false); AnimationTarget* instance = getInstance(state); void* returnPtr = (void*)instance->createAnimation(param1, param2); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Animation"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } } while (0); do { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL)) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); // Get parameter 2 off the stack. bool param2Valid; gameplay::ScriptUtil::LuaArray<Properties> param2 = gameplay::ScriptUtil::getObjectPointer<Properties>(3, "Properties", false, ¶m2Valid); if (!param2Valid) break; AnimationTarget* instance = getInstance(state); void* returnPtr = (void*)instance->createAnimation(param1, param2); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Animation"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } } while (0); lua_pushstring(state, "lua_AnimationTarget_createAnimation - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 7: { do { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && lua_type(state, 3) == LUA_TNUMBER && lua_type(state, 4) == LUA_TNUMBER && (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) && (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) && (lua_type(state, 7) == LUA_TSTRING || lua_type(state, 7) == LUA_TNIL)) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); // Get parameter 2 off the stack. int param2 = (int)luaL_checkint(state, 3); // Get parameter 3 off the stack. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4); // Get parameter 4 off the stack. gameplay::ScriptUtil::LuaArray<unsigned int> param4 = gameplay::ScriptUtil::getUnsignedIntPointer(5); // Get parameter 5 off the stack. gameplay::ScriptUtil::LuaArray<float> param5 = gameplay::ScriptUtil::getFloatPointer(6); // Get parameter 6 off the stack. Curve::InterpolationType param6 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 7)); AnimationTarget* instance = getInstance(state); void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Animation"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } } while (0); lua_pushstring(state, "lua_AnimationTarget_createAnimation - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 9: { do { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && lua_type(state, 3) == LUA_TNUMBER && lua_type(state, 4) == LUA_TNUMBER && (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) && (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) && (lua_type(state, 7) == LUA_TTABLE || lua_type(state, 7) == LUA_TLIGHTUSERDATA) && (lua_type(state, 8) == LUA_TTABLE || lua_type(state, 8) == LUA_TLIGHTUSERDATA) && (lua_type(state, 9) == LUA_TSTRING || lua_type(state, 9) == LUA_TNIL)) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); // Get parameter 2 off the stack. int param2 = (int)luaL_checkint(state, 3); // Get parameter 3 off the stack. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4); // Get parameter 4 off the stack. gameplay::ScriptUtil::LuaArray<unsigned int> param4 = gameplay::ScriptUtil::getUnsignedIntPointer(5); // Get parameter 5 off the stack. gameplay::ScriptUtil::LuaArray<float> param5 = gameplay::ScriptUtil::getFloatPointer(6); // Get parameter 6 off the stack. gameplay::ScriptUtil::LuaArray<float> param6 = gameplay::ScriptUtil::getFloatPointer(7); // Get parameter 7 off the stack. gameplay::ScriptUtil::LuaArray<float> param7 = gameplay::ScriptUtil::getFloatPointer(8); // Get parameter 8 off the stack. Curve::InterpolationType param8 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 9)); AnimationTarget* instance = getInstance(state); void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6, param7, param8); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Animation"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } } while (0); lua_pushstring(state, "lua_AnimationTarget_createAnimation - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 3, 7 or 9)."); lua_error(state); break; } } return 0; }
int lua_AnimationTarget_createAnimationFromTo(lua_State* state) { // Get the number of parameters. int paramCount = lua_gettop(state); // Attempt to match the parameters to a valid binding. switch (paramCount) { case 7: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && lua_type(state, 3) == LUA_TNUMBER && (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) && (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) && (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) && lua_type(state, 7) == LUA_TNUMBER) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); // Get parameter 2 off the stack. int param2 = (int)luaL_checkint(state, 3); // Get parameter 3 off the stack. gameplay::ScriptUtil::LuaArray<float> param3 = gameplay::ScriptUtil::getFloatPointer(4); // Get parameter 4 off the stack. gameplay::ScriptUtil::LuaArray<float> param4 = gameplay::ScriptUtil::getFloatPointer(5); // Get parameter 5 off the stack. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6)); // Get parameter 6 off the stack. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7); AnimationTarget* instance = getInstance(state); void* returnPtr = (void*)instance->createAnimationFromTo(param1, param2, param3, param4, param5, param6); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Animation"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_AnimationTarget_createAnimationFromTo - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 7)."); lua_error(state); break; } } return 0; }