From e7ebce5207c287f3a7dc229156f07cc25bb146aa Mon Sep 17 00:00:00 2001 From: MysterD Date: Mon, 3 Apr 2023 21:56:52 -0700 Subject: [PATCH] Removed lag compensation functions that shouldn't be added to the Lua API --- autogen/convert_functions.py | 1 + autogen/lua_definitions/functions.lua | 10 -------- docs/lua/functions-3.md | 36 --------------------------- docs/lua/functions.md | 2 -- src/pc/lua/smlua_functions_autogen.c | 32 ------------------------ 5 files changed, 1 insertion(+), 80 deletions(-) diff --git a/autogen/convert_functions.py b/autogen/convert_functions.py index 9dad9bcf..0a932250 100644 --- a/autogen/convert_functions.py +++ b/autogen/convert_functions.py @@ -103,6 +103,7 @@ override_disallowed_functions = { "src/pc/lua/utils/smlua_audio_utils.h": [ "smlua_audio_utils_override", "audio_custom_shutdown"], "src/pc/djui/djui_hud_utils.h": [ "djui_hud_render_texture", "djui_hud_render_texture_raw", "djui_hud_render_texture_tile", "djui_hud_render_texture_tile_raw" ], "src/pc/lua/utils/smlua_level_utils.h": [ "smlua_level_util_reset" ], + "src/pc/network/lag_compensation.h": [ "lag_compensation_clear", "lag_compensation_store" ], } lua_function_params = { diff --git a/autogen/lua_definitions/functions.lua b/autogen/lua_definitions/functions.lua index da8319cc..6b5ec6b5 100644 --- a/autogen/lua_definitions/functions.lua +++ b/autogen/lua_definitions/functions.lua @@ -4010,22 +4010,12 @@ function take_damage_and_knock_back(m, o) -- ... end ---- @return nil -function lag_compensation_clear() - -- ... -end - --- @param otherNp NetworkPlayer --- @return MarioState function lag_compensation_get_local_state(otherNp) -- ... end ---- @return nil -function lag_compensation_store() - -- ... -end - --- @param courseNum integer --- @param levelNum integer --- @param areaIndex integer diff --git a/docs/lua/functions-3.md b/docs/lua/functions-3.md index 1cc88f38..8d664456 100644 --- a/docs/lua/functions-3.md +++ b/docs/lua/functions-3.md @@ -3305,24 +3305,6 @@
-## [lag_compensation_clear](#lag_compensation_clear) - -### Lua Example -`lag_compensation_clear()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void lag_compensation_clear(void);` - -[:arrow_up_small:](#) - -
- ## [lag_compensation_get_local_state](#lag_compensation_get_local_state) ### Lua Example @@ -3343,24 +3325,6 @@
-## [lag_compensation_store](#lag_compensation_store) - -### Lua Example -`lag_compensation_store()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void lag_compensation_store(void);` - -[:arrow_up_small:](#) - -
- --- # functions from level_info.h diff --git a/docs/lua/functions.md b/docs/lua/functions.md index c057ee85..bbd7050d 100644 --- a/docs/lua/functions.md +++ b/docs/lua/functions.md @@ -793,9 +793,7 @@
- lag_compensation.h - - [lag_compensation_clear](functions-3.md#lag_compensation_clear) - [lag_compensation_get_local_state](functions-3.md#lag_compensation_get_local_state) - - [lag_compensation_store](functions-3.md#lag_compensation_store)
diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c index 4ee608e5..52d72794 100644 --- a/src/pc/lua/smlua_functions_autogen.c +++ b/src/pc/lua/smlua_functions_autogen.c @@ -12648,21 +12648,6 @@ int smlua_func_take_damage_and_knock_back(lua_State* L) { // lag_compensation.h // //////////////////////// -int smlua_func_lag_compensation_clear(UNUSED lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 0) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "lag_compensation_clear", 0, top); - return 0; - } - - - lag_compensation_clear(); - - return 1; -} - int smlua_func_lag_compensation_get_local_state(lua_State* L) { if (L == NULL) { return 0; } @@ -12680,21 +12665,6 @@ int smlua_func_lag_compensation_get_local_state(lua_State* L) { return 1; } -int smlua_func_lag_compensation_store(UNUSED lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 0) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "lag_compensation_store", 0, top); - return 0; - } - - - lag_compensation_store(); - - return 1; -} - ////////////////// // level_info.h // ////////////////// @@ -29931,9 +29901,7 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "take_damage_and_knock_back", smlua_func_take_damage_and_knock_back); // lag_compensation.h - smlua_bind_function(L, "lag_compensation_clear", smlua_func_lag_compensation_clear); smlua_bind_function(L, "lag_compensation_get_local_state", smlua_func_lag_compensation_get_local_state); - smlua_bind_function(L, "lag_compensation_store", smlua_func_lag_compensation_store); // level_info.h smlua_bind_function(L, "get_level_name", smlua_func_get_level_name);