diff --git a/autogen/lua_constants/deprecated.lua b/autogen/lua_constants/deprecated.lua index 1ea4e98b2..5d11959af 100644 --- a/autogen/lua_constants/deprecated.lua +++ b/autogen/lua_constants/deprecated.lua @@ -5,6 +5,13 @@ FONT_TINY = -1 ANIM_FLAG_FORWARD = (1 << 1) +----------------------- +-- Renamed functions -- +----------------------- + +rom_hack_cam_set_collisions = camera_romhack_set_collisions + + -------------------- -- Math functions -- -------------------- diff --git a/autogen/lua_definitions/functions.lua b/autogen/lua_definitions/functions.lua index adb750035..676240c49 100644 --- a/autogen/lua_definitions/functions.lua +++ b/autogen/lua_definitions/functions.lua @@ -10301,7 +10301,7 @@ end --- @param enable integer --- Toggles collision settings for the ROM hack camera. This enables or disables specific collision behaviors in modded levels -function rom_hack_cam_set_collisions(enable) +function camera_romhack_set_collisions(enable) -- ... end diff --git a/docs/lua/functions-6.md b/docs/lua/functions-6.md index 925d9c5d3..4a9c4010f 100644 --- a/docs/lua/functions-6.md +++ b/docs/lua/functions-6.md @@ -6240,13 +6240,13 @@ Sets if the romhack camera should allow D-Pad movement
-## [rom_hack_cam_set_collisions](#rom_hack_cam_set_collisions) +## [camera_romhack_set_collisions](#camera_romhack_set_collisions) ### Description Toggles collision settings for the ROM hack camera. This enables or disables specific collision behaviors in modded levels ### Lua Example -`rom_hack_cam_set_collisions(enable)` +`camera_romhack_set_collisions(enable)` ### Parameters | Field | Type | @@ -6257,7 +6257,7 @@ Toggles collision settings for the ROM hack camera. This enables or disables spe - None ### C Prototype -`void rom_hack_cam_set_collisions(u8 enable);` +`void camera_romhack_set_collisions(u8 enable);` [:arrow_up_small:](#) diff --git a/docs/lua/functions.md b/docs/lua/functions.md index 672af20ac..0236b2dbf 100644 --- a/docs/lua/functions.md +++ b/docs/lua/functions.md @@ -1847,7 +1847,7 @@ - [camera_romhack_allow_centering](functions-6.md#camera_romhack_allow_centering) - [camera_allow_toxic_gas_camera](functions-6.md#camera_allow_toxic_gas_camera) - [camera_romhack_allow_dpad_usage](functions-6.md#camera_romhack_allow_dpad_usage) - - [rom_hack_cam_set_collisions](functions-6.md#rom_hack_cam_set_collisions) + - [camera_romhack_set_collisions](functions-6.md#camera_romhack_set_collisions) - [camera_romhack_set_zoomed_in_dist](functions-6.md#camera_romhack_set_zoomed_in_dist) - [camera_romhack_set_zoomed_out_dist](functions-6.md#camera_romhack_set_zoomed_out_dist) - [camera_romhack_set_zoomed_in_height](functions-6.md#camera_romhack_set_zoomed_in_height) diff --git a/src/pc/lua/smlua_constants_autogen.c b/src/pc/lua/smlua_constants_autogen.c index f94175f1c..89677170f 100644 --- a/src/pc/lua/smlua_constants_autogen.c +++ b/src/pc/lua/smlua_constants_autogen.c @@ -425,6 +425,10 @@ char gSmluaConstants[] = "" "FONT_TINY = -1\n" "--- @type integer\n" "ANIM_FLAG_FORWARD = (1 << 1)\n" +"-----------------------\n" +"-- Renamed functions --\n" +"-----------------------\n" +"rom_hack_cam_set_collisions = camera_romhack_set_collisions\n" "--------------------\n" "-- Math functions --\n" "--------------------\n" diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c index 8c88e94d6..3a08fe7b7 100644 --- a/src/pc/lua/smlua_functions_autogen.c +++ b/src/pc/lua/smlua_functions_autogen.c @@ -31154,19 +31154,19 @@ int smlua_func_camera_romhack_allow_dpad_usage(lua_State* L) { return 1; } -int smlua_func_rom_hack_cam_set_collisions(lua_State* L) { +int smlua_func_camera_romhack_set_collisions(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", "rom_hack_cam_set_collisions", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_romhack_set_collisions", 1, top); return 0; } u8 enable = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "rom_hack_cam_set_collisions"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_romhack_set_collisions"); return 0; } - rom_hack_cam_set_collisions(enable); + camera_romhack_set_collisions(enable); return 1; } @@ -38606,7 +38606,7 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "camera_romhack_allow_centering", smlua_func_camera_romhack_allow_centering); smlua_bind_function(L, "camera_allow_toxic_gas_camera", smlua_func_camera_allow_toxic_gas_camera); smlua_bind_function(L, "camera_romhack_allow_dpad_usage", smlua_func_camera_romhack_allow_dpad_usage); - smlua_bind_function(L, "rom_hack_cam_set_collisions", smlua_func_rom_hack_cam_set_collisions); + smlua_bind_function(L, "camera_romhack_set_collisions", smlua_func_camera_romhack_set_collisions); smlua_bind_function(L, "camera_romhack_set_zoomed_in_dist", smlua_func_camera_romhack_set_zoomed_in_dist); smlua_bind_function(L, "camera_romhack_set_zoomed_out_dist", smlua_func_camera_romhack_set_zoomed_out_dist); smlua_bind_function(L, "camera_romhack_set_zoomed_in_height", smlua_func_camera_romhack_set_zoomed_in_height); diff --git a/src/pc/lua/utils/smlua_camera_utils.c b/src/pc/lua/utils/smlua_camera_utils.c index b7022a270..ff7177e41 100644 --- a/src/pc/lua/utils/smlua_camera_utils.c +++ b/src/pc/lua/utils/smlua_camera_utils.c @@ -69,7 +69,7 @@ void camera_romhack_allow_dpad_usage(u8 allow) { gRomhackCameraSettings.dpad = allow; } -void rom_hack_cam_set_collisions(u8 enable) { +void camera_romhack_set_collisions(u8 enable) { gRomhackCameraSettings.collisions = enable; } diff --git a/src/pc/lua/utils/smlua_camera_utils.h b/src/pc/lua/utils/smlua_camera_utils.h index b9090568b..717f850a5 100644 --- a/src/pc/lua/utils/smlua_camera_utils.h +++ b/src/pc/lua/utils/smlua_camera_utils.h @@ -27,7 +27,7 @@ void camera_romhack_allow_dpad_usage(u8 allow); Toggles collision settings for the ROM hack camera. This enables or disables specific collision behaviors in modded levels |descriptionEnd| */ -void rom_hack_cam_set_collisions(u8 enable); +void camera_romhack_set_collisions(u8 enable); /* |description|Sets the romhack camera's zoomed in distance (Default: 900)|descriptionEnd| */ void camera_romhack_set_zoomed_in_dist(u32 val);