diff --git a/autogen/lua_definitions/functions.lua b/autogen/lua_definitions/functions.lua index 50a2330f..af7a8f1d 100644 --- a/autogen/lua_definitions/functions.lua +++ b/autogen/lua_definitions/functions.lua @@ -8418,12 +8418,6 @@ function set_override_near(near) -- ... end ---- @param str string ---- @return nil -function smlua_exec_str(str) - -- ... -end - --- @param name string --- @return integer function smlua_model_util_get_id(name) diff --git a/docs/lua/functions-4.md b/docs/lua/functions-4.md index 3ff0ece0..ffe2aaa1 100644 --- a/docs/lua/functions-4.md +++ b/docs/lua/functions-4.md @@ -8658,26 +8658,6 @@
-## [smlua_exec_str](#smlua_exec_str) - -### Lua Example -`smlua_exec_str(str)` - -### Parameters -| Field | Type | -| ----- | ---- | -| str | `string` | - -### Returns -- None - -### C Prototype -`void smlua_exec_str(const char* str);` - -[:arrow_up_small:](#) - -
- --- # functions from smlua_model_utils.h diff --git a/docs/lua/functions.md b/docs/lua/functions.md index 200fe568..7e9ae5ca 100644 --- a/docs/lua/functions.md +++ b/docs/lua/functions.md @@ -1560,7 +1560,6 @@ - [set_override_far](functions-4.md#set_override_far) - [set_override_fov](functions-4.md#set_override_fov) - [set_override_near](functions-4.md#set_override_near) - - [smlua_exec_str](functions-4.md#smlua_exec_str)
diff --git a/src/pc/lua/smlua.c b/src/pc/lua/smlua.c index f13c1fb8..f8abc897 100644 --- a/src/pc/lua/smlua.c +++ b/src/pc/lua/smlua.c @@ -7,7 +7,6 @@ #include "pc/lua/utils/smlua_audio_utils.h" #include "pc/lua/utils/smlua_model_utils.h" #include "pc/lua/utils/smlua_level_utils.h" -#include "pc/lua/utils/smlua_misc_utils.h" #include "pc/djui/djui.h" lua_State* gLuaState = NULL; @@ -53,7 +52,7 @@ static void smlua_exec_file(char* path) { lua_pop(L, lua_gettop(L)); } -void smlua_exec_str(const char* str) { +static void smlua_exec_str(char* str) { lua_State* L = gLuaState; if (luaL_dostring(L, str) != LUA_OK) { LOG_LUA("Failed to load lua string."); diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c index 2427181f..9cb90305 100644 --- a/src/pc/lua/smlua_functions_autogen.c +++ b/src/pc/lua/smlua_functions_autogen.c @@ -27411,23 +27411,6 @@ int smlua_func_set_override_near(lua_State* L) { return 1; } -int smlua_func_smlua_exec_str(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 1) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "smlua_exec_str", 1, top); - return 0; - } - - const char* str = smlua_to_string(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_exec_str"); return 0; } - - smlua_exec_str(str); - - return 1; -} - ///////////////////////// // smlua_model_utils.h // ///////////////////////// @@ -30387,7 +30370,6 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "set_override_far", smlua_func_set_override_far); smlua_bind_function(L, "set_override_fov", smlua_func_set_override_fov); smlua_bind_function(L, "set_override_near", smlua_func_set_override_near); - smlua_bind_function(L, "smlua_exec_str", smlua_func_smlua_exec_str); // smlua_model_utils.h smlua_bind_function(L, "smlua_model_util_get_id", smlua_func_smlua_model_util_get_id); diff --git a/src/pc/lua/utils/smlua_misc_utils.h b/src/pc/lua/utils/smlua_misc_utils.h index b157f01d..42537f40 100644 --- a/src/pc/lua/utils/smlua_misc_utils.h +++ b/src/pc/lua/utils/smlua_misc_utils.h @@ -96,6 +96,4 @@ void play_transition(s16 transType, s16 time, u8 red, u8 green, u8 blue); bool course_is_main_course(u16 levelNum); -void smlua_exec_str(const char* str); - #endif