diff --git a/autogen/convert_functions.py b/autogen/convert_functions.py index 1b36400c7..9e8ef5368 100644 --- a/autogen/convert_functions.py +++ b/autogen/convert_functions.py @@ -124,7 +124,7 @@ override_disallowed_functions = { "src/game/obj_behaviors.c": [ "debug_", "turn_obj_away_from_surface" ], "src/game/obj_behaviors_2.c": [ "wiggler_jumped_on_attack_handler", "huge_goomba_weakly_attacked" ], "src/game/spawn_sound.h": [ "exec_anim_sound_state" ], - "src/game/level_info.h": [ "_name_table" ], + "src/game/level_info.h": [ "_name_table", "convert_string_" ], "src/pc/lua/utils/smlua_obj_utils.h": [ "spawn_object_remember_field" ], "src/game/camera.h": [ "update_camera", "init_camera", "stub_camera", "^reset_camera", "move_point_along_spline", "romhack_camera_init_settings", "romhack_camera_reset_settings" ], "src/game/behavior_actions.h": [ "bhv_dust_smoke_loop", "bhv_init_room" ], diff --git a/autogen/lua_definitions/functions.lua b/autogen/lua_definitions/functions.lua index e40b88fc4..937a787c2 100644 --- a/autogen/lua_definitions/functions.lua +++ b/autogen/lua_definitions/functions.lua @@ -4876,19 +4876,6 @@ function lag_compensation_get_local_state_index() -- ... end ---- @param str64 Pointer_integer ---- @param strAscii string ---- @param menu boolean -function convert_string_ascii_to_sm64(str64, strAscii, menu) - -- ... -end - ---- @param strAscii Pointer_integer ---- @param str64 Pointer_integer -function convert_string_sm64_to_ascii(strAscii, str64) - -- ... -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 a1ea838c5..1839566f6 100644 --- a/docs/lua/functions-3.md +++ b/docs/lua/functions-3.md @@ -6253,49 +6253,6 @@ Gets the local Mario's state index
-## [convert_string_ascii_to_sm64](#convert_string_ascii_to_sm64) - -### Lua Example -`convert_string_ascii_to_sm64(str64, strAscii, menu)` - -### Parameters -| Field | Type | -| ----- | ---- | -| str64 | `Pointer` <`integer`> | -| strAscii | `string` | -| menu | `boolean` | - -### Returns -- None - -### C Prototype -`void convert_string_ascii_to_sm64(u8 *str64, const char *strAscii, bool menu);` - -[:arrow_up_small:](#) - -
- -## [convert_string_sm64_to_ascii](#convert_string_sm64_to_ascii) - -### Lua Example -`convert_string_sm64_to_ascii(strAscii, str64)` - -### Parameters -| Field | Type | -| ----- | ---- | -| strAscii | `Pointer` <`integer`> | -| str64 | `Pointer` <`integer`> | - -### Returns -- None - -### C Prototype -`void convert_string_sm64_to_ascii(char *strAscii, const u8 *str64);` - -[:arrow_up_small:](#) - -
- ## [get_level_name_ascii](#get_level_name_ascii) ### Description diff --git a/docs/lua/functions.md b/docs/lua/functions.md index 3ab7c2ae7..8656b5289 100644 --- a/docs/lua/functions.md +++ b/docs/lua/functions.md @@ -935,8 +935,6 @@
- level_info.h - - [convert_string_ascii_to_sm64](functions-3.md#convert_string_ascii_to_sm64) - - [convert_string_sm64_to_ascii](functions-3.md#convert_string_sm64_to_ascii) - [get_level_name_ascii](functions-3.md#get_level_name_ascii) - [get_level_name_sm64](functions-3.md#get_level_name_sm64) - [get_level_name](functions-3.md#get_level_name) diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c index 069586574..885815bc9 100644 --- a/src/pc/lua/smlua_functions_autogen.c +++ b/src/pc/lua/smlua_functions_autogen.c @@ -15155,46 +15155,6 @@ int smlua_func_lag_compensation_get_local_state_index(UNUSED lua_State* L) { // level_info.h // ////////////////// -int smlua_func_convert_string_ascii_to_sm64(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 3) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "convert_string_ascii_to_sm64", 3, top); - return 0; - } - - u8 * str64 = (u8 *)smlua_to_cpointer(L, 1, LVT_U8_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "convert_string_ascii_to_sm64"); return 0; } - const char* strAscii = smlua_to_string(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "convert_string_ascii_to_sm64"); return 0; } - bool menu = smlua_to_boolean(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "convert_string_ascii_to_sm64"); return 0; } - - convert_string_ascii_to_sm64(str64, strAscii, menu); - - return 1; -} - -int smlua_func_convert_string_sm64_to_ascii(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 2) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "convert_string_sm64_to_ascii", 2, top); - return 0; - } - - char * strAscii = (char *)smlua_to_cpointer(L, 1, LVT_STRING_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "convert_string_sm64_to_ascii"); return 0; } - u8 * str64 = (u8 *)smlua_to_cpointer(L, 2, LVT_U8_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "convert_string_sm64_to_ascii"); return 0; } - - convert_string_sm64_to_ascii(strAscii, str64); - - return 1; -} - int smlua_func_get_level_name_ascii(lua_State* L) { if (L == NULL) { return 0; } @@ -37304,8 +37264,6 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "lag_compensation_get_local_state_index", smlua_func_lag_compensation_get_local_state_index); // level_info.h - smlua_bind_function(L, "convert_string_ascii_to_sm64", smlua_func_convert_string_ascii_to_sm64); - smlua_bind_function(L, "convert_string_sm64_to_ascii", smlua_func_convert_string_sm64_to_ascii); smlua_bind_function(L, "get_level_name_ascii", smlua_func_get_level_name_ascii); smlua_bind_function(L, "get_level_name_sm64", smlua_func_get_level_name_sm64); smlua_bind_function(L, "get_level_name", smlua_func_get_level_name);