From ade3e7b887bb51b225b593dea00728dd71de7a9a Mon Sep 17 00:00:00 2001
From: Emerald Lockdown <86802223+EmeraldLoc@users.noreply.github.com>
Date: Mon, 19 Sep 2022 21:33:43 -0500
Subject: [PATCH] Remove save_file_erase function (#195)
---
autogen/convert_functions.py | 2 +-
autogen/lua_definitions/functions.lua | 6 ------
docs/lua/functions-4.md | 20 --------------------
docs/lua/functions.md | 1 -
src/pc/lua/smlua_functions_autogen.c | 12 ------------
5 files changed, 1 insertion(+), 40 deletions(-)
diff --git a/autogen/convert_functions.py b/autogen/convert_functions.py
index cf98b7486..7054bed05 100644
--- a/autogen/convert_functions.py
+++ b/autogen/convert_functions.py
@@ -58,7 +58,7 @@ override_allowed_functions = {
"src/audio/external.h": [ " play_", "fade", "current_background", "stop_" ],
"src/game/rumble_init.c": [ "queue_rumble_", "reset_rumble_timers" ],
"src/pc/djui/djui_popup.h" : [ "create" ],
- "src/game/save_file.h": [ "save_file_get_", "save_file_set_flags", "save_file_clear_flags", "save_file_erase", "save_file_reload", "save_file_set_star_flags" ],
+ "src/game/save_file.h": [ "save_file_get_", "save_file_set_flags", "save_file_clear_flags", "save_file_reload", "save_file_set_star_flags" ],
"src/pc/lua/utils/smlua_model_utils.h": [ "smlua_model_util_get_id" ],
"src/game/object_list_processor.h": [ "set_object_respawn_info_bits" ],
"src/game/mario_misc.h": [ "bhv_toad.*", "bhv_unlock_door.*" ],
diff --git a/autogen/lua_definitions/functions.lua b/autogen/lua_definitions/functions.lua
index d4ab82b34..bd5178cff 100644
--- a/autogen/lua_definitions/functions.lua
+++ b/autogen/lua_definitions/functions.lua
@@ -7248,12 +7248,6 @@ function save_file_clear_flags(flags)
-- ...
end
---- @param fileIndex integer
---- @return nil
-function save_file_erase(fileIndex)
- -- ...
-end
-
--- @param capPos Vec3s
--- @return integer
function save_file_get_cap_pos(capPos)
diff --git a/docs/lua/functions-4.md b/docs/lua/functions-4.md
index 9d7937aa4..f7caf398f 100644
--- a/docs/lua/functions-4.md
+++ b/docs/lua/functions-4.md
@@ -5364,26 +5364,6 @@
-## [save_file_erase](#save_file_erase)
-
-### Lua Example
-`save_file_erase(fileIndex)`
-
-### Parameters
-| Field | Type |
-| ----- | ---- |
-| fileIndex | `integer` |
-
-### Returns
-- None
-
-### C Prototype
-`void save_file_erase(s32 fileIndex);`
-
-[:arrow_up_small:](#)
-
-
-
## [save_file_get_cap_pos](#save_file_get_cap_pos)
### Lua Example
diff --git a/docs/lua/functions.md b/docs/lua/functions.md
index ccb04ddaf..8830f570b 100644
--- a/docs/lua/functions.md
+++ b/docs/lua/functions.md
@@ -1347,7 +1347,6 @@
- save_file.h
- [save_file_clear_flags](functions-4.md#save_file_clear_flags)
- - [save_file_erase](functions-4.md#save_file_erase)
- [save_file_get_cap_pos](functions-4.md#save_file_get_cap_pos)
- [save_file_get_course_coin_score](functions-4.md#save_file_get_course_coin_score)
- [save_file_get_course_star_count](functions-4.md#save_file_get_course_star_count)
diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c
index 7583b8a3b..bf45d55af 100644
--- a/src/pc/lua/smlua_functions_autogen.c
+++ b/src/pc/lua/smlua_functions_autogen.c
@@ -16090,17 +16090,6 @@ int smlua_func_save_file_clear_flags(lua_State* L) {
return 1;
}
-int smlua_func_save_file_erase(lua_State* L) {
- if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
-
- s32 fileIndex = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1 for function 'save_file_erase'"); return 0; }
-
- save_file_erase(fileIndex);
-
- return 1;
-}
-
int smlua_func_save_file_get_cap_pos(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
@@ -19461,7 +19450,6 @@ void smlua_bind_functions_autogen(void) {
// save_file.h
smlua_bind_function(L, "save_file_clear_flags", smlua_func_save_file_clear_flags);
- smlua_bind_function(L, "save_file_erase", smlua_func_save_file_erase);
smlua_bind_function(L, "save_file_get_cap_pos", smlua_func_save_file_get_cap_pos);
smlua_bind_function(L, "save_file_get_course_coin_score", smlua_func_save_file_get_course_coin_score);
smlua_bind_function(L, "save_file_get_course_star_count", smlua_func_save_file_get_course_star_count);