|
|
@@ -28,8 +28,6 @@ void luaRegister_Scene()
|
|
|
{"getAmbientColor", lua_Scene_getAmbientColor},
|
|
|
{"getFirstNode", lua_Scene_getFirstNode},
|
|
|
{"getId", lua_Scene_getId},
|
|
|
- {"getLightColor", lua_Scene_getLightColor},
|
|
|
- {"getLightDirection", lua_Scene_getLightDirection},
|
|
|
{"getNodeCount", lua_Scene_getNodeCount},
|
|
|
{"getRefCount", lua_Scene_getRefCount},
|
|
|
{"release", lua_Scene_release},
|
|
|
@@ -38,8 +36,6 @@ void luaRegister_Scene()
|
|
|
{"setActiveCamera", lua_Scene_setActiveCamera},
|
|
|
{"setAmbientColor", lua_Scene_setAmbientColor},
|
|
|
{"setId", lua_Scene_setId},
|
|
|
- {"setLightColor", lua_Scene_setLightColor},
|
|
|
- {"setLightDirection", lua_Scene_setLightDirection},
|
|
|
{"visit", lua_Scene_visit},
|
|
|
{NULL, NULL}
|
|
|
};
|
|
|
@@ -589,94 +585,6 @@ int lua_Scene_getId(lua_State* state)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-int lua_Scene_getLightColor(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 1:
|
|
|
- {
|
|
|
- if ((lua_type(state, 1) == LUA_TUSERDATA))
|
|
|
- {
|
|
|
- Scene* instance = getInstance(state);
|
|
|
- void* returnPtr = (void*)&(instance->getLightColor());
|
|
|
- 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, "Vector3");
|
|
|
- lua_setmetatable(state, -2);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- lua_pushnil(state);
|
|
|
- }
|
|
|
-
|
|
|
- return 1;
|
|
|
- }
|
|
|
-
|
|
|
- lua_pushstring(state, "lua_Scene_getLightColor - Failed to match the given parameters to a valid function signature.");
|
|
|
- lua_error(state);
|
|
|
- break;
|
|
|
- }
|
|
|
- default:
|
|
|
- {
|
|
|
- lua_pushstring(state, "Invalid number of parameters (expected 1).");
|
|
|
- lua_error(state);
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
-int lua_Scene_getLightDirection(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 1:
|
|
|
- {
|
|
|
- if ((lua_type(state, 1) == LUA_TUSERDATA))
|
|
|
- {
|
|
|
- Scene* instance = getInstance(state);
|
|
|
- void* returnPtr = (void*)&(instance->getLightDirection());
|
|
|
- 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, "Vector3");
|
|
|
- lua_setmetatable(state, -2);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- lua_pushnil(state);
|
|
|
- }
|
|
|
-
|
|
|
- return 1;
|
|
|
- }
|
|
|
-
|
|
|
- lua_pushstring(state, "lua_Scene_getLightDirection - Failed to match the given parameters to a valid function signature.");
|
|
|
- lua_error(state);
|
|
|
- break;
|
|
|
- }
|
|
|
- default:
|
|
|
- {
|
|
|
- lua_pushstring(state, "Invalid number of parameters (expected 1).");
|
|
|
- lua_error(state);
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
int lua_Scene_getNodeCount(lua_State* state)
|
|
|
{
|
|
|
// Get the number of parameters.
|
|
|
@@ -975,92 +883,6 @@ int lua_Scene_setId(lua_State* state)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-int lua_Scene_setLightColor(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 4:
|
|
|
- {
|
|
|
- if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
- lua_type(state, 2) == LUA_TNUMBER &&
|
|
|
- lua_type(state, 3) == LUA_TNUMBER &&
|
|
|
- lua_type(state, 4) == LUA_TNUMBER)
|
|
|
- {
|
|
|
- // Get parameter 1 off the stack.
|
|
|
- float param1 = (float)luaL_checknumber(state, 2);
|
|
|
-
|
|
|
- // Get parameter 2 off the stack.
|
|
|
- float param2 = (float)luaL_checknumber(state, 3);
|
|
|
-
|
|
|
- // Get parameter 3 off the stack.
|
|
|
- float param3 = (float)luaL_checknumber(state, 4);
|
|
|
-
|
|
|
- Scene* instance = getInstance(state);
|
|
|
- instance->setLightColor(param1, param2, param3);
|
|
|
-
|
|
|
- return 0;
|
|
|
- }
|
|
|
-
|
|
|
- lua_pushstring(state, "lua_Scene_setLightColor - Failed to match the given parameters to a valid function signature.");
|
|
|
- lua_error(state);
|
|
|
- break;
|
|
|
- }
|
|
|
- default:
|
|
|
- {
|
|
|
- lua_pushstring(state, "Invalid number of parameters (expected 4).");
|
|
|
- lua_error(state);
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
-int lua_Scene_setLightDirection(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 2:
|
|
|
- {
|
|
|
- if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
- (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL))
|
|
|
- {
|
|
|
- // Get parameter 1 off the stack.
|
|
|
- bool param1Valid;
|
|
|
- gameplay::ScriptUtil::LuaArray<Vector3> param1 = gameplay::ScriptUtil::getObjectPointer<Vector3>(2, "Vector3", true, ¶m1Valid);
|
|
|
- if (!param1Valid)
|
|
|
- {
|
|
|
- lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector3'.");
|
|
|
- lua_error(state);
|
|
|
- }
|
|
|
-
|
|
|
- Scene* instance = getInstance(state);
|
|
|
- instance->setLightDirection(*param1);
|
|
|
-
|
|
|
- return 0;
|
|
|
- }
|
|
|
-
|
|
|
- lua_pushstring(state, "lua_Scene_setLightDirection - Failed to match the given parameters to a valid function signature.");
|
|
|
- lua_error(state);
|
|
|
- break;
|
|
|
- }
|
|
|
- default:
|
|
|
- {
|
|
|
- lua_pushstring(state, "Invalid number of parameters (expected 2).");
|
|
|
- lua_error(state);
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
int lua_Scene_static_create(lua_State* state)
|
|
|
{
|
|
|
// Get the number of parameters.
|