|
|
@@ -54,6 +54,7 @@ void luaRegister_Game()
|
|
|
{"isGestureSupported", lua_Game_isGestureSupported},
|
|
|
{"isInitialized", lua_Game_isInitialized},
|
|
|
{"isMouseCaptured", lua_Game_isMouseCaptured},
|
|
|
+ {"isMultiSampling", lua_Game_isMultiSampling},
|
|
|
{"isMultiTouch", lua_Game_isMultiTouch},
|
|
|
{"keyEvent", lua_Game_keyEvent},
|
|
|
{"launchURL", lua_Game_launchURL},
|
|
|
@@ -66,6 +67,7 @@ void luaRegister_Game()
|
|
|
{"schedule", lua_Game_schedule},
|
|
|
{"setCursorVisible", lua_Game_setCursorVisible},
|
|
|
{"setMouseCaptured", lua_Game_setMouseCaptured},
|
|
|
+ {"setMultiSampling", lua_Game_setMultiSampling},
|
|
|
{"setMultiTouch", lua_Game_setMultiTouch},
|
|
|
{"setViewport", lua_Game_setViewport},
|
|
|
{"touchEvent", lua_Game_touchEvent},
|
|
|
@@ -1441,6 +1443,41 @@ int lua_Game_isMouseCaptured(lua_State* state)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+int lua_Game_isMultiSampling(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))
|
|
|
+ {
|
|
|
+ Game* instance = getInstance(state);
|
|
|
+ bool result = instance->isMultiSampling();
|
|
|
+
|
|
|
+ // Push the return value onto the stack.
|
|
|
+ lua_pushboolean(state, result);
|
|
|
+
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ lua_pushstring(state, "lua_Game_isMultiSampling - 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_Game_isMultiTouch(lua_State* state)
|
|
|
{
|
|
|
// Get the number of parameters.
|
|
|
@@ -1885,6 +1922,42 @@ int lua_Game_setMouseCaptured(lua_State* state)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+int lua_Game_setMultiSampling(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_TBOOLEAN)
|
|
|
+ {
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
+ bool param1 = ScriptUtil::luaCheckBool(state, 2);
|
|
|
+
|
|
|
+ Game* instance = getInstance(state);
|
|
|
+ instance->setMultiSampling(param1);
|
|
|
+
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ lua_pushstring(state, "lua_Game_setMultiSampling - 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_Game_setMultiTouch(lua_State* state)
|
|
|
{
|
|
|
// Get the number of parameters.
|