|
|
@@ -27,6 +27,7 @@ void luaRegister_Game()
|
|
|
{
|
|
|
{"canExit", lua_Game_canExit},
|
|
|
{"clear", lua_Game_clear},
|
|
|
+ {"clearSchedule", lua_Game_clearSchedule},
|
|
|
{"displayKeyboard", lua_Game_displayKeyboard},
|
|
|
{"exit", lua_Game_exit},
|
|
|
{"frame", lua_Game_frame},
|
|
|
@@ -274,6 +275,38 @@ int lua_Game_clear(lua_State* state)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+int lua_Game_clearSchedule(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);
|
|
|
+ instance->clearSchedule();
|
|
|
+
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ lua_pushstring(state, "lua_Game_clearSchedule - 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_displayKeyboard(lua_State* state)
|
|
|
{
|
|
|
// Get the number of parameters.
|