diff --git a/autogen/convert_functions.py b/autogen/convert_functions.py
index 5a12779b7..5f2cb8aea 100644
--- a/autogen/convert_functions.py
+++ b/autogen/convert_functions.py
@@ -120,14 +120,14 @@ override_disallowed_functions = {
"src/game/sound_init.h": [ "_loop_", "thread4_", "set_sound_mode" ],
"src/pc/network/network_utils.h": [ "network_get_player_text_color[^_]" ],
"src/pc/network/network_player.h": [ "_init", "_connected[^_]", "_shutdown", "_disconnected", "_update", "construct_player_popup", "network_player_name_valid" ],
- "src/game/object_helpers.c": [ "spawn_obj", "^bhv_", "abs[fi]", "^bit_shift", "_debug$", "^stub_", "_set_model", "cur_obj_set_direction_table", "cur_obj_progress_direction_table" ],
- "src/game/obj_behaviors.c": [ "debug_", "turn_obj_away_from_surface" ],
+ "src/game/object_helpers.c": [ "spawn_obj", "^bhv_", "geo_", "abs[fi]", "^bit_shift", "_debug$", "^stub_", "_set_model", "cur_obj_set_direction_table", "cur_obj_progress_direction_table" ],
+ "src/game/obj_behaviors.c": [ "debug_", "geo_", "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", "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" ],
+ "src/game/camera.h": [ "geo_", "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", "geo_" ],
"src/pc/lua/utils/smlua_audio_utils.h": [ "smlua_audio_utils_override", "audio_custom_shutdown", "smlua_audio_custom_deinit", "audio_sample_destroy_pending_copies", "audio_custom_update_volume" ],
"src/pc/lua/utils/smlua_level_utils.h": [ "smlua_level_util_reset" ],
"src/pc/lua/utils/smlua_text_utils.h": [ "smlua_text_utils_init", "smlua_text_utils_shutdown", "smlua_text_utils_dialog_get_unmodified"],
@@ -825,7 +825,7 @@ def build_param(fid, param, i):
lot = translate_type_to_lot(ptype)
s = ' %s %s = (%s)smlua_to_cobject(L, %d, %s);' % (ptype, pid, ptype, i, lot)
- if '???' in lot or "GRAPHNODE" in lot:
+ if '???' in lot:
s = '//' + s + ' <--- UNIMPLEMENTED'
else:
s = ' ' + s
diff --git a/autogen/lua_definitions/functions.lua b/autogen/lua_definitions/functions.lua
index 816cc8018..cc10149fe 100644
--- a/autogen/lua_definitions/functions.lua
+++ b/autogen/lua_definitions/functions.lua
@@ -11516,6 +11516,12 @@ function get_dialog_response()
-- ...
end
+--- @return integer
+--- Gets the active time stop flags, used to freeze specific objects during cutscenes
+function get_time_stop_flags()
+ -- ...
+end
+
--- @return string
--- Gets the local discord ID if it isn't disabled, otherwise "0" is returned
function get_local_discord_id()
@@ -11622,35 +11628,42 @@ function get_os_name()
end
--- @return GraphNodeRoot
---- Gets the current GraphNodeRoot
+--- Gets the current root node being processed
function geo_get_current_root()
-- ...
end
--- @return GraphNodeMasterList
---- Gets the current GraphNodeMasterList
+--- Gets the current master list node being processed
function geo_get_current_master_list()
-- ...
end
--- @return GraphNodePerspective
---- Gets the current GraphNodePerspective
+--- Gets the current perspective node being processed
function geo_get_current_perspective()
-- ...
end
--- @return GraphNodeCamera
---- Gets the current GraphNodeCamera
+--- Gets the current camera node being processed
function geo_get_current_camera()
-- ...
end
--- @return GraphNodeHeldObject
---- Gets the current GraphNodeHeldObject
+--- Gets the current held object node being processed
function geo_get_current_held_object()
-- ...
end
+--- @param node GraphNode
+--- @param obj GraphNodeObject
+--- Skips graph node interpolation for a frame
+function geo_skip_interpolation(node, obj)
+ -- ...
+end
+
--- @param tex Pointer_Texture
--- @return table
--- Converts a texture's pixels to a Lua table. Returns nil if failed. Otherwise, returns a 1-indexed table of RGBA pixels
@@ -12062,6 +12075,18 @@ function set_whirlpools(x, y, z, strength, area, index)
-- ...
end
+--- @param o Object
+--- Skips object interpolation for a frame
+function obj_skip_interpolation(o)
+ -- ...
+end
+
+--- @param o Object
+--- Skips animation interpolation for a frame
+function obj_anim_skip_interpolation(o)
+ -- ...
+end
+
--- Resets every modified dialog back to vanilla
function smlua_text_utils_reset_all()
-- ...
diff --git a/docs/lua/functions-7.md b/docs/lua/functions-7.md
index 3373d70ee..207edbb6f 100644
--- a/docs/lua/functions-7.md
+++ b/docs/lua/functions-7.md
@@ -1775,6 +1775,27 @@ Gets the choice selected inside of a dialog box (0-1)
+## [get_time_stop_flags](#get_time_stop_flags)
+
+### Description
+Gets the active time stop flags, used to freeze specific objects during cutscenes
+
+### Lua Example
+`local integerValue = get_time_stop_flags()`
+
+### Parameters
+- None
+
+### Returns
+- `integer`
+
+### C Prototype
+`u32 get_time_stop_flags(void);`
+
+[:arrow_up_small:](#)
+
+
+
## [get_local_discord_id](#get_local_discord_id)
### Description
@@ -2154,7 +2175,7 @@ Gets the name of the operating system the game is running on
## [geo_get_current_root](#geo_get_current_root)
### Description
-Gets the current GraphNodeRoot
+Gets the current root node being processed
### Lua Example
`local graphNodeRootValue = geo_get_current_root()`
@@ -2175,7 +2196,7 @@ Gets the current GraphNodeRoot
## [geo_get_current_master_list](#geo_get_current_master_list)
### Description
-Gets the current GraphNodeMasterList
+Gets the current master list node being processed
### Lua Example
`local graphNodeMasterListValue = geo_get_current_master_list()`
@@ -2196,7 +2217,7 @@ Gets the current GraphNodeMasterList
## [geo_get_current_perspective](#geo_get_current_perspective)
### Description
-Gets the current GraphNodePerspective
+Gets the current perspective node being processed
### Lua Example
`local graphNodePerspectiveValue = geo_get_current_perspective()`
@@ -2217,7 +2238,7 @@ Gets the current GraphNodePerspective
## [geo_get_current_camera](#geo_get_current_camera)
### Description
-Gets the current GraphNodeCamera
+Gets the current camera node being processed
### Lua Example
`local graphNodeCameraValue = geo_get_current_camera()`
@@ -2238,7 +2259,7 @@ Gets the current GraphNodeCamera
## [geo_get_current_held_object](#geo_get_current_held_object)
### Description
-Gets the current GraphNodeHeldObject
+Gets the current held object node being processed
### Lua Example
`local graphNodeHeldObjectValue = geo_get_current_held_object()`
@@ -2256,6 +2277,30 @@ Gets the current GraphNodeHeldObject
+## [geo_skip_interpolation](#geo_skip_interpolation)
+
+### Description
+Skips graph node interpolation for a frame
+
+### Lua Example
+`geo_skip_interpolation(node, obj)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| node | [GraphNode](structs.md#GraphNode) |
+| obj | [GraphNodeObject](structs.md#GraphNodeObject) |
+
+### Returns
+- None
+
+### C Prototype
+`void geo_skip_interpolation(struct GraphNode *node, struct GraphNodeObject *obj);`
+
+[:arrow_up_small:](#)
+
+
+
## [texture_to_lua_table](#texture_to_lua_table)
### Description
@@ -3531,6 +3576,52 @@ Sets the parameters of one of the two whirlpools (0-indexed) in an area
+## [obj_skip_interpolation](#obj_skip_interpolation)
+
+### Description
+Skips object interpolation for a frame
+
+### Lua Example
+`obj_skip_interpolation(o)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| o | [Object](structs.md#Object) |
+
+### Returns
+- None
+
+### C Prototype
+`void obj_skip_interpolation(struct Object *o);`
+
+[:arrow_up_small:](#)
+
+
+
+## [obj_anim_skip_interpolation](#obj_anim_skip_interpolation)
+
+### Description
+Skips animation interpolation for a frame
+
+### Lua Example
+`obj_anim_skip_interpolation(o)`
+
+### Parameters
+| Field | Type |
+| ----- | ---- |
+| o | [Object](structs.md#Object) |
+
+### Returns
+- None
+
+### C Prototype
+`void obj_anim_skip_interpolation(struct Object *o);`
+
+[:arrow_up_small:](#)
+
+
+
---
# functions from smlua_text_utils.h
diff --git a/docs/lua/functions.md b/docs/lua/functions.md
index e2cff77bf..ef8fb4125 100644
--- a/docs/lua/functions.md
+++ b/docs/lua/functions.md
@@ -2047,6 +2047,7 @@
- [set_override_envfx](functions-7.md#set_override_envfx)
- [get_global_timer](functions-7.md#get_global_timer)
- [get_dialog_response](functions-7.md#get_dialog_response)
+ - [get_time_stop_flags](functions-7.md#get_time_stop_flags)
- [get_local_discord_id](functions-7.md#get_local_discord_id)
- [get_coopnet_id](functions-7.md#get_coopnet_id)
- [get_volume_master](functions-7.md#get_volume_master)
@@ -2069,6 +2070,7 @@
- [geo_get_current_perspective](functions-7.md#geo_get_current_perspective)
- [geo_get_current_camera](functions-7.md#geo_get_current_camera)
- [geo_get_current_held_object](functions-7.md#geo_get_current_held_object)
+ - [geo_skip_interpolation](functions-7.md#geo_skip_interpolation)
- [texture_to_lua_table](functions-7.md#texture_to_lua_table)
- [get_texture_name](functions-7.md#get_texture_name)
@@ -2130,6 +2132,8 @@
- [obj_set_vel](functions-7.md#obj_set_vel)
- [obj_move_xyz](functions-7.md#obj_move_xyz)
- [set_whirlpools](functions-7.md#set_whirlpools)
+ - [obj_skip_interpolation](functions-7.md#obj_skip_interpolation)
+ - [obj_anim_skip_interpolation](functions-7.md#obj_anim_skip_interpolation)
diff --git a/src/game/rendering_graph_node.c b/src/game/rendering_graph_node.c
index e68cb7c66..43c3c1f0e 100644
--- a/src/game/rendering_graph_node.c
+++ b/src/game/rendering_graph_node.c
@@ -384,16 +384,9 @@ void patch_mtx_interpolated(f32 delta) {
* Graph node interpolation
*/
-struct GraphNodeInterpData {
- Vec3s translation;
- Vec3s rotation;
- Vec3f scale;
- u32 timestamp;
-};
-
static void *sGraphNodeInterpDataMap = NULL;
-static struct GraphNodeInterpData *geo_get_interp_data(void *node, struct GraphNodeObject *obj) {
+struct GraphNodeInterpData *geo_get_interp_data(void *node, struct GraphNodeObject *obj) {
// Map for nodes
if (!sGraphNodeInterpDataMap) {
diff --git a/src/game/rendering_graph_node.h b/src/game/rendering_graph_node.h
index c345c9e34..f30ea4a5d 100644
--- a/src/game/rendering_graph_node.h
+++ b/src/game/rendering_graph_node.h
@@ -43,6 +43,15 @@ extern f32 gOverrideFar;
void geo_process_node_and_siblings(struct GraphNode *firstNode);
void geo_process_root(struct GraphNodeRoot *node, Vp *b, Vp *c, s32 clearColor);
+
+struct GraphNodeInterpData {
+ Vec3s translation;
+ Vec3s rotation;
+ Vec3f scale;
+ u32 timestamp;
+};
+
+struct GraphNodeInterpData *geo_get_interp_data(void *node, struct GraphNodeObject *obj);
void geo_clear_interp_data();
struct ShadowInterp {
diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c
index 60ced0477..5ed2cd525 100644
--- a/src/pc/lua/smlua_functions_autogen.c
+++ b/src/pc/lua/smlua_functions_autogen.c
@@ -9729,219 +9729,6 @@ int smlua_func_bhv_point_light_loop(UNUSED lua_State* L) {
return 1;
}
-/*
-int smlua_func_geo_move_mario_part_from_parent(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", "geo_move_mario_part_from_parent", 3, top);
- return 0;
- }
-
- s32 run = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_move_mario_part_from_parent"); return 0; }
-// struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_move_mario_part_from_parent"); return 0; }
-
- Mat4 mtx;
- smlua_get_mat4(mtx, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_move_mario_part_from_parent"); return 0; }
-
- smlua_push_object(L, LOT_GFX, geo_move_mario_part_from_parent(run, node, mtx), NULL);
-
- return 1;
-}
-*/
-
-/*
-int smlua_func_geo_bits_bowser_coloring(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", "geo_bits_bowser_coloring", 3, top);
- return 0;
- }
-
- s32 run = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_bits_bowser_coloring"); return 0; }
-// struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_bits_bowser_coloring"); return 0; }
- s32 a2 = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_bits_bowser_coloring"); return 0; }
-
- smlua_push_object(L, LOT_GFX, geo_bits_bowser_coloring(run, node, a2), NULL);
-
- return 1;
-}
-*/
-
-/*
-int smlua_func_geo_update_body_rot_from_parent(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", "geo_update_body_rot_from_parent", 3, top);
- return 0;
- }
-
- s32 run = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_update_body_rot_from_parent"); return 0; }
-// struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_update_body_rot_from_parent"); return 0; }
-
- Mat4 mtx;
- smlua_get_mat4(mtx, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_update_body_rot_from_parent"); return 0; }
-
- smlua_push_object(L, LOT_GFX, geo_update_body_rot_from_parent(run, node, mtx), NULL);
-
- return 1;
-}
-*/
-
-/*
-int smlua_func_geo_switch_bowser_eyes(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", "geo_switch_bowser_eyes", 3, top);
- return 0;
- }
-
- s32 run = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_switch_bowser_eyes"); return 0; }
-// struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_switch_bowser_eyes"); return 0; }
- Mat4 * mtx = (Mat4 *)smlua_to_cobject(L, 3, LOT_MAT4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_switch_bowser_eyes"); return 0; }
-
- smlua_push_object(L, LOT_GFX, geo_switch_bowser_eyes(run, node, mtx), NULL);
-
- return 1;
-}
-*/
-
-/*
-int smlua_func_geo_switch_tuxie_mother_eyes(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", "geo_switch_tuxie_mother_eyes", 3, top);
- return 0;
- }
-
- s32 run = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_switch_tuxie_mother_eyes"); return 0; }
-// struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_switch_tuxie_mother_eyes"); return 0; }
- Mat4 * mtx = (Mat4 *)smlua_to_cobject(L, 3, LOT_MAT4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_switch_tuxie_mother_eyes"); return 0; }
-
- smlua_push_object(L, LOT_GFX, geo_switch_tuxie_mother_eyes(run, node, mtx), NULL);
-
- return 1;
-}
-*/
-
-/*
-int smlua_func_geo_update_held_mario_pos(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", "geo_update_held_mario_pos", 3, top);
- return 0;
- }
-
- s32 run = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_update_held_mario_pos"); return 0; }
-// struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_update_held_mario_pos"); return 0; }
-
- Mat4 mtx;
- smlua_get_mat4(mtx, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_update_held_mario_pos"); return 0; }
-
- smlua_push_object(L, LOT_GFX, geo_update_held_mario_pos(run, node, mtx), NULL);
-
- return 1;
-}
-*/
-
-/*
-int smlua_func_geo_snufit_move_mask(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", "geo_snufit_move_mask", 3, top);
- return 0;
- }
-
- s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_snufit_move_mask"); return 0; }
-// struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_snufit_move_mask"); return 0; }
- Mat4 * c = (Mat4 *)smlua_to_cobject(L, 3, LOT_MAT4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_snufit_move_mask"); return 0; }
-
- smlua_push_object(L, LOT_GFX, geo_snufit_move_mask(callContext, node, c), NULL);
-
- return 1;
-}
-*/
-
-/*
-int smlua_func_geo_snufit_scale_body(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", "geo_snufit_scale_body", 3, top);
- return 0;
- }
-
- s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_snufit_scale_body"); return 0; }
-// struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_snufit_scale_body"); return 0; }
- Mat4 * c = (Mat4 *)smlua_to_cobject(L, 3, LOT_MAT4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_snufit_scale_body"); return 0; }
-
- smlua_push_object(L, LOT_GFX, geo_snufit_scale_body(callContext, node, c), NULL);
-
- return 1;
-}
-*/
-
-/*
-int smlua_func_geo_scale_bowser_key(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", "geo_scale_bowser_key", 3, top);
- return 0;
- }
-
- s32 run = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_scale_bowser_key"); return 0; }
-// struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_scale_bowser_key"); return 0; }
- f32 mtx[4][4] = smlua_to_number(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_scale_bowser_key"); return 0; }
-
- smlua_push_object(L, LOT_GFX, geo_scale_bowser_key(run, node, mtx[4][4]), NULL);
-
- return 1;
-}
-*/
-
int smlua_func_spawn_default_star(lua_State* L) {
if (L == NULL) { return 0; }
@@ -10387,29 +10174,6 @@ int smlua_func_select_mario_cam_mode(UNUSED lua_State* L) {
return 1;
}
-/*
-int smlua_func_geo_camera_main(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", "geo_camera_main", 3, top);
- return 0;
- }
-
- s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_camera_main"); return 0; }
-// struct GraphNode* g = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_camera_main"); return 0; }
-// void * context = (void *)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_camera_main"); return 0; }
-
- smlua_push_object(L, LOT_GFX, geo_camera_main(callContext, g, context), NULL);
-
- return 1;
-}
-*/
-
int smlua_func_object_pos_to_vec3f(lua_State* L) {
if (L == NULL) { return 0; }
@@ -12153,29 +11917,6 @@ int smlua_func_obj_rotate_towards_point(lua_State* L) {
return 1;
}
-/*
-int smlua_func_geo_camera_fov(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", "geo_camera_fov", 3, top);
- return 0;
- }
-
- s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_camera_fov"); return 0; }
-// struct GraphNode* g = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_camera_fov"); return 0; }
-// void * context = (void *)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_camera_fov"); return 0; }
-
- smlua_push_object(L, LOT_GFX, geo_camera_fov(callContext, g, context), NULL);
-
- return 1;
-}
-*/
-
int smlua_func_set_camera_mode_fixed(lua_State* L) {
if (L == NULL) { return 0; }
@@ -23724,30 +23465,6 @@ int smlua_func_set_yoshi_as_not_dead(UNUSED lua_State* L) {
return 1;
}
-/*
-int smlua_func_geo_obj_transparency_something(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", "geo_obj_transparency_something", 3, top);
- return 0;
- }
-
- s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_obj_transparency_something"); return 0; }
-// struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_obj_transparency_something"); return 0; }
- Mat4 * mtx = (Mat4 *)smlua_to_cobject(L, 3, LOT_MAT4);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_obj_transparency_something"); return 0; }
-
- extern Gfx UNUSED *geo_obj_transparency_something(s32 callContext, struct GraphNode *node, UNUSED Mat4 *mtx);
- smlua_push_object(L, LOT_GFX, geo_obj_transparency_something(callContext, node, mtx), NULL);
-
- return 1;
-}
-*/
-
int smlua_func_absf_2(lua_State* L) {
if (L == NULL) { return 0; }
@@ -25474,78 +25191,6 @@ int smlua_func_clear_move_flag(lua_State* L) {
return 2;
}
-/*
-int smlua_func_geo_update_projectile_pos_from_parent(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", "geo_update_projectile_pos_from_parent", 3, top);
- return 0;
- }
-
- s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_update_projectile_pos_from_parent"); return 0; }
-// struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_update_projectile_pos_from_parent"); return 0; }
-
- Mat4 mtx;
- smlua_get_mat4(mtx, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_update_projectile_pos_from_parent"); return 0; }
-
- extern Gfx *geo_update_projectile_pos_from_parent(s32 callContext, UNUSED struct GraphNode *node, Mat4 mtx);
- smlua_push_object(L, LOT_GFX, geo_update_projectile_pos_from_parent(callContext, node, mtx), NULL);
-
- return 1;
-}
-*/
-
-/*
-int smlua_func_geo_update_layer_transparency(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", "geo_update_layer_transparency", 3, top);
- return 0;
- }
-
- s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_update_layer_transparency"); return 0; }
-// struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_update_layer_transparency"); return 0; }
-// void * context = (void *)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_update_layer_transparency"); return 0; }
-
- extern Gfx *geo_update_layer_transparency(s32 callContext, struct GraphNode *node, UNUSED void *context);
- smlua_push_object(L, LOT_GFX, geo_update_layer_transparency(callContext, node, context), NULL);
-
- return 1;
-}
-*/
-
-/*
-int smlua_func_geo_switch_anim_state(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", "geo_switch_anim_state", 2, top);
- return 0;
- }
-
- s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_switch_anim_state"); return 0; }
-// struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_switch_anim_state"); return 0; }
-
- extern Gfx *geo_switch_anim_state(s32 callContext, struct GraphNode *node);
- smlua_push_object(L, LOT_GFX, geo_switch_anim_state(callContext, node), NULL);
-
- return 1;
-}
-*/
-
int smlua_func_set_room_override(lua_State* L) {
if (L == NULL) { return 0; }
@@ -25564,54 +25209,6 @@ int smlua_func_set_room_override(lua_State* L) {
return 1;
}
-/*
-int smlua_func_geo_switch_area(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", "geo_switch_area", 2, top);
- return 0;
- }
-
- s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_switch_area"); return 0; }
-// struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_switch_area"); return 0; }
-
- extern Gfx *geo_switch_area(s32 callContext, struct GraphNode *node);
- smlua_push_object(L, LOT_GFX, geo_switch_area(callContext, node), NULL);
-
- return 1;
-}
-*/
-
-/*
-int smlua_func_geo_choose_area_ext(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", "geo_choose_area_ext", 3, top);
- return 0;
- }
-
- s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_choose_area_ext"); return 0; }
-// struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_choose_area_ext"); return 0; }
-
- Mat4 mtx;
- smlua_get_mat4(mtx, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_choose_area_ext"); return 0; }
-
- extern Gfx *geo_choose_area_ext(UNUSED s32 callContext, struct GraphNode *node, UNUSED Mat4 mtx);
- smlua_push_object(L, LOT_GFX, geo_choose_area_ext(callContext, node, mtx), NULL);
-
- return 1;
-}
-*/
-
int smlua_func_obj_update_pos_from_parent_transformation(lua_State* L) {
if (L == NULL) { return 0; }
@@ -29354,56 +28951,6 @@ int smlua_func_cur_obj_hide_if_mario_far_away_y(lua_State* L) {
return 1;
}
-/*
-int smlua_func_geo_offset_klepto_held_object(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", "geo_offset_klepto_held_object", 3, top);
- return 0;
- }
-
- s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_offset_klepto_held_object"); return 0; }
-// struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_offset_klepto_held_object"); return 0; }
-
- Mat4 mtx;
- smlua_get_mat4(mtx, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_offset_klepto_held_object"); return 0; }
-
- extern Gfx *geo_offset_klepto_held_object(s32 callContext, struct GraphNode *node, UNUSED Mat4 mtx);
- smlua_push_object(L, LOT_GFX, geo_offset_klepto_held_object(callContext, node, mtx), NULL);
-
- return 1;
-}
-*/
-
-/*
-int smlua_func_geo_offset_klepto_debug(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", "geo_offset_klepto_debug", 3, top);
- return 0;
- }
-
- s32 callContext = smlua_to_integer(L, 1);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_offset_klepto_debug"); return 0; }
-// struct GraphNode* a1 = (struct GraphNode*)smlua_to_cobject(L, 2, LOT_GRAPHNODE); <--- UNIMPLEMENTED
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_offset_klepto_debug"); return 0; }
- s32 sp8 = smlua_to_integer(L, 3);
- if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "geo_offset_klepto_debug"); return 0; }
-
- extern s32 geo_offset_klepto_debug(s32 callContext, struct GraphNode *a1, UNUSED s32 sp8);
- lua_pushinteger(L, geo_offset_klepto_debug(callContext, a1, sp8));
-
- return 1;
-}
-*/
-
int smlua_func_obj_is_hidden(lua_State* L) {
if (L == NULL) { return 0; }
@@ -34401,6 +33948,21 @@ int smlua_func_get_dialog_response(UNUSED lua_State* L) {
return 1;
}
+int smlua_func_get_time_stop_flags(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", "get_time_stop_flags", 0, top);
+ return 0;
+ }
+
+
+ lua_pushinteger(L, get_time_stop_flags());
+
+ return 1;
+}
+
int smlua_func_get_local_discord_id(UNUSED lua_State* L) {
if (L == NULL) { return 0; }
@@ -34751,6 +34313,25 @@ int smlua_func_geo_get_current_held_object(UNUSED lua_State* L) {
return 1;
}
+int smlua_func_geo_skip_interpolation(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", "geo_skip_interpolation", 2, top);
+ return 0;
+ }
+
+ struct GraphNode* node = (struct GraphNode*)smlua_to_cobject(L, 1, LOT_GRAPHNODE);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_skip_interpolation"); return 0; }
+ struct GraphNodeObject* obj = (struct GraphNodeObject*)smlua_to_cobject(L, 2, LOT_GRAPHNODEOBJECT);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_skip_interpolation"); return 0; }
+
+ geo_skip_interpolation(node, obj);
+
+ return 1;
+}
+
int smlua_func_texture_to_lua_table(lua_State* L) {
if (L == NULL) { return 0; }
@@ -35760,6 +35341,40 @@ int smlua_func_set_whirlpools(lua_State* L) {
return 1;
}
+int smlua_func_obj_skip_interpolation(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", "obj_skip_interpolation", 1, top);
+ return 0;
+ }
+
+ struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_skip_interpolation"); return 0; }
+
+ obj_skip_interpolation(o);
+
+ return 1;
+}
+
+int smlua_func_obj_anim_skip_interpolation(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", "obj_anim_skip_interpolation", 1, top);
+ return 0;
+ }
+
+ struct Object* o = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT);
+ if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_anim_skip_interpolation"); return 0; }
+
+ obj_anim_skip_interpolation(o);
+
+ return 1;
+}
+
////////////////////////
// smlua_text_utils.h //
////////////////////////
@@ -37592,15 +37207,6 @@ void smlua_bind_functions_autogen(void) {
smlua_bind_function(L, "bhv_ambient_light_update", smlua_func_bhv_ambient_light_update);
smlua_bind_function(L, "bhv_point_light_init", smlua_func_bhv_point_light_init);
smlua_bind_function(L, "bhv_point_light_loop", smlua_func_bhv_point_light_loop);
- //smlua_bind_function(L, "geo_move_mario_part_from_parent", smlua_func_geo_move_mario_part_from_parent); <--- UNIMPLEMENTED
- //smlua_bind_function(L, "geo_bits_bowser_coloring", smlua_func_geo_bits_bowser_coloring); <--- UNIMPLEMENTED
- //smlua_bind_function(L, "geo_update_body_rot_from_parent", smlua_func_geo_update_body_rot_from_parent); <--- UNIMPLEMENTED
- //smlua_bind_function(L, "geo_switch_bowser_eyes", smlua_func_geo_switch_bowser_eyes); <--- UNIMPLEMENTED
- //smlua_bind_function(L, "geo_switch_tuxie_mother_eyes", smlua_func_geo_switch_tuxie_mother_eyes); <--- UNIMPLEMENTED
- //smlua_bind_function(L, "geo_update_held_mario_pos", smlua_func_geo_update_held_mario_pos); <--- UNIMPLEMENTED
- //smlua_bind_function(L, "geo_snufit_move_mask", smlua_func_geo_snufit_move_mask); <--- UNIMPLEMENTED
- //smlua_bind_function(L, "geo_snufit_scale_body", smlua_func_geo_snufit_scale_body); <--- UNIMPLEMENTED
- //smlua_bind_function(L, "geo_scale_bowser_key", smlua_func_geo_scale_bowser_key); <--- UNIMPLEMENTED
smlua_bind_function(L, "spawn_default_star", smlua_func_spawn_default_star);
smlua_bind_function(L, "spawn_red_coin_cutscene_star", smlua_func_spawn_red_coin_cutscene_star);
smlua_bind_function(L, "spawn_no_exit_star", smlua_func_spawn_no_exit_star);
@@ -37632,7 +37238,6 @@ void smlua_bind_functions_autogen(void) {
smlua_bind_function(L, "soft_reset_camera", smlua_func_soft_reset_camera);
smlua_bind_function(L, "reset_camera", smlua_func_reset_camera);
smlua_bind_function(L, "select_mario_cam_mode", smlua_func_select_mario_cam_mode);
- //smlua_bind_function(L, "geo_camera_main", smlua_func_geo_camera_main); <--- UNIMPLEMENTED
smlua_bind_function(L, "object_pos_to_vec3f", smlua_func_object_pos_to_vec3f);
smlua_bind_function(L, "vec3f_to_object_pos", smlua_func_vec3f_to_object_pos);
smlua_bind_function(L, "object_face_angle_to_vec3s", smlua_func_object_face_angle_to_vec3s);
@@ -37712,7 +37317,6 @@ void smlua_bind_functions_autogen(void) {
smlua_bind_function(L, "cutscene_set_fov_shake_preset", smlua_func_cutscene_set_fov_shake_preset);
smlua_bind_function(L, "set_fov_shake_from_point_preset", smlua_func_set_fov_shake_from_point_preset);
smlua_bind_function(L, "obj_rotate_towards_point", smlua_func_obj_rotate_towards_point);
- //smlua_bind_function(L, "geo_camera_fov", smlua_func_geo_camera_fov); <--- UNIMPLEMENTED
smlua_bind_function(L, "set_camera_mode_fixed", smlua_func_set_camera_mode_fixed);
smlua_bind_function(L, "snap_to_45_degrees", smlua_func_snap_to_45_degrees);
smlua_bind_function(L, "camera_set_use_course_specific_settings", smlua_func_camera_set_use_course_specific_settings);
@@ -38355,7 +37959,6 @@ void smlua_bind_functions_autogen(void) {
// obj_behaviors.c
smlua_bind_function(L, "set_yoshi_as_not_dead", smlua_func_set_yoshi_as_not_dead);
- //smlua_bind_function(L, "geo_obj_transparency_something", smlua_func_geo_obj_transparency_something); <--- UNIMPLEMENTED
smlua_bind_function(L, "absf_2", smlua_func_absf_2);
smlua_bind_function(L, "obj_find_wall", smlua_func_obj_find_wall);
smlua_bind_function(L, "turn_obj_away_from_steep_floor", smlua_func_turn_obj_away_from_steep_floor);
@@ -38443,12 +38046,7 @@ void smlua_bind_functions_autogen(void) {
// object_helpers.c
smlua_bind_function(L, "clear_move_flag", smlua_func_clear_move_flag);
- //smlua_bind_function(L, "geo_update_projectile_pos_from_parent", smlua_func_geo_update_projectile_pos_from_parent); <--- UNIMPLEMENTED
- //smlua_bind_function(L, "geo_update_layer_transparency", smlua_func_geo_update_layer_transparency); <--- UNIMPLEMENTED
- //smlua_bind_function(L, "geo_switch_anim_state", smlua_func_geo_switch_anim_state); <--- UNIMPLEMENTED
smlua_bind_function(L, "set_room_override", smlua_func_set_room_override);
- //smlua_bind_function(L, "geo_switch_area", smlua_func_geo_switch_area); <--- UNIMPLEMENTED
- //smlua_bind_function(L, "geo_choose_area_ext", smlua_func_geo_choose_area_ext); <--- UNIMPLEMENTED
smlua_bind_function(L, "obj_update_pos_from_parent_transformation", smlua_func_obj_update_pos_from_parent_transformation);
smlua_bind_function(L, "obj_apply_scale_to_matrix", smlua_func_obj_apply_scale_to_matrix);
smlua_bind_function(L, "create_transformation_from_matrices", smlua_func_create_transformation_from_matrices);
@@ -38644,8 +38242,6 @@ void smlua_bind_functions_autogen(void) {
//smlua_bind_function(L, "obj_set_collision_data", smlua_func_obj_set_collision_data); <--- UNIMPLEMENTED
smlua_bind_function(L, "cur_obj_if_hit_wall_bounce_away", smlua_func_cur_obj_if_hit_wall_bounce_away);
smlua_bind_function(L, "cur_obj_hide_if_mario_far_away_y", smlua_func_cur_obj_hide_if_mario_far_away_y);
- //smlua_bind_function(L, "geo_offset_klepto_held_object", smlua_func_geo_offset_klepto_held_object); <--- UNIMPLEMENTED
- //smlua_bind_function(L, "geo_offset_klepto_debug", smlua_func_geo_offset_klepto_debug); <--- UNIMPLEMENTED
smlua_bind_function(L, "obj_is_hidden", smlua_func_obj_is_hidden);
smlua_bind_function(L, "enable_time_stop", smlua_func_enable_time_stop);
smlua_bind_function(L, "enable_time_stop_if_alone", smlua_func_enable_time_stop_if_alone);
@@ -38957,6 +38553,7 @@ void smlua_bind_functions_autogen(void) {
smlua_bind_function(L, "set_override_envfx", smlua_func_set_override_envfx);
smlua_bind_function(L, "get_global_timer", smlua_func_get_global_timer);
smlua_bind_function(L, "get_dialog_response", smlua_func_get_dialog_response);
+ smlua_bind_function(L, "get_time_stop_flags", smlua_func_get_time_stop_flags);
smlua_bind_function(L, "get_local_discord_id", smlua_func_get_local_discord_id);
smlua_bind_function(L, "get_coopnet_id", smlua_func_get_coopnet_id);
smlua_bind_function(L, "get_volume_master", smlua_func_get_volume_master);
@@ -38979,6 +38576,7 @@ void smlua_bind_functions_autogen(void) {
smlua_bind_function(L, "geo_get_current_perspective", smlua_func_geo_get_current_perspective);
smlua_bind_function(L, "geo_get_current_camera", smlua_func_geo_get_current_camera);
smlua_bind_function(L, "geo_get_current_held_object", smlua_func_geo_get_current_held_object);
+ smlua_bind_function(L, "geo_skip_interpolation", smlua_func_geo_skip_interpolation);
smlua_bind_function(L, "texture_to_lua_table", smlua_func_texture_to_lua_table);
smlua_bind_function(L, "get_texture_name", smlua_func_get_texture_name);
@@ -39036,6 +38634,8 @@ void smlua_bind_functions_autogen(void) {
smlua_bind_function(L, "obj_set_vel", smlua_func_obj_set_vel);
smlua_bind_function(L, "obj_move_xyz", smlua_func_obj_move_xyz);
smlua_bind_function(L, "set_whirlpools", smlua_func_set_whirlpools);
+ smlua_bind_function(L, "obj_skip_interpolation", smlua_func_obj_skip_interpolation);
+ smlua_bind_function(L, "obj_anim_skip_interpolation", smlua_func_obj_anim_skip_interpolation);
// smlua_text_utils.h
smlua_bind_function(L, "smlua_text_utils_reset_all", smlua_func_smlua_text_utils_reset_all);
diff --git a/src/pc/lua/utils/smlua_misc_utils.c b/src/pc/lua/utils/smlua_misc_utils.c
index bff36cbbf..de447b3d1 100644
--- a/src/pc/lua/utils/smlua_misc_utils.c
+++ b/src/pc/lua/utils/smlua_misc_utils.c
@@ -490,6 +490,12 @@ s32 get_dialog_response(void) {
///
+u32 get_time_stop_flags(void) {
+ return gTimeStopState;
+}
+
+///
+
const char* get_local_discord_id(void) {
#ifdef DISCORD_SDK
if (gDiscordInitialized) {
@@ -651,6 +657,13 @@ struct GraphNodeHeldObject* geo_get_current_held_object(void) {
return gCurGraphNodeHeldObject;
}
+void geo_skip_interpolation(struct GraphNode *node, struct GraphNodeObject *obj) {
+ struct GraphNodeInterpData *interp = geo_get_interp_data(node, obj);
+ if (interp) { interp->timestamp = 0; }
+}
+
+///
+
LuaTable texture_to_lua_table(const Texture *tex) {
lua_State *L = gLuaState;
if (!L) { return 0; }
diff --git a/src/pc/lua/utils/smlua_misc_utils.h b/src/pc/lua/utils/smlua_misc_utils.h
index 5171af3ee..e4bb3c1eb 100644
--- a/src/pc/lua/utils/smlua_misc_utils.h
+++ b/src/pc/lua/utils/smlua_misc_utils.h
@@ -212,6 +212,9 @@ u32 get_global_timer(void);
/* |description|Gets the choice selected inside of a dialog box (0-1)|descriptionEnd| */
s32 get_dialog_response(void);
+/* |description|Gets the active time stop flags, used to freeze specific objects during cutscenes|descriptionEnd| */
+u32 get_time_stop_flags(void);
+
/* |description|Gets the local discord ID if it isn't disabled, otherwise "0" is returned|descriptionEnd| */
const char* get_local_discord_id(void);
/* |description|Gets the CoopNet ID of a player with `localIndex` if CoopNet is being used and the player is connected, otherwise "-1" is returned|descriptionEnd| */
@@ -252,24 +255,21 @@ void reset_window_title(void);
/* |description|Gets the name of the operating system the game is running on|descriptionEnd| */
const char* get_os_name(void);
-/* |description|Gets the current GraphNodeRoot|descriptionEnd|*/
+/* |description|Gets the current root node being processed|descriptionEnd|*/
struct GraphNodeRoot* geo_get_current_root(void);
-
-/* |description|Gets the current GraphNodeMasterList|descriptionEnd|*/
+/* |description|Gets the current master list node being processed|descriptionEnd|*/
struct GraphNodeMasterList* geo_get_current_master_list(void);
-
-/* |description|Gets the current GraphNodePerspective|descriptionEnd|*/
+/* |description|Gets the current perspective node being processed|descriptionEnd|*/
struct GraphNodePerspective* geo_get_current_perspective(void);
-
-/* |description|Gets the current GraphNodeCamera|descriptionEnd|*/
+/* |description|Gets the current camera node being processed|descriptionEnd|*/
struct GraphNodeCamera* geo_get_current_camera(void);
-
-/* |description|Gets the current GraphNodeHeldObject|descriptionEnd|*/
+/* |description|Gets the current held object node being processed|descriptionEnd|*/
struct GraphNodeHeldObject* geo_get_current_held_object(void);
+/* |description|Skips graph node interpolation for a frame|descriptionEnd|*/
+void geo_skip_interpolation(struct GraphNode *node, struct GraphNodeObject *obj);
/* |description|Converts a texture's pixels to a Lua table. Returns nil if failed. Otherwise, returns a 1-indexed table of RGBA pixels|descriptionEnd|*/
LuaTable texture_to_lua_table(const Texture *tex);
-
/* |description|Gets the name of the provided texture pointer `tex`|descriptionEnd|*/
const char *get_texture_name(const Texture *tex);
diff --git a/src/pc/lua/utils/smlua_obj_utils.c b/src/pc/lua/utils/smlua_obj_utils.c
index 6ddc020f8..aa71c422d 100644
--- a/src/pc/lua/utils/smlua_obj_utils.c
+++ b/src/pc/lua/utils/smlua_obj_utils.c
@@ -522,6 +522,14 @@ void set_whirlpools(f32 x, f32 y, f32 z, s16 strength, s16 area, s32 index) {
gAreas[area].whirlpools[index]->strength = strength;
}
+void obj_skip_interpolation(struct Object *o) {
+ if (o) { o->header.gfx.skipInterpolationTimestamp = gGlobalTimer + 1; }
+}
+
+void obj_anim_skip_interpolation(struct Object *o) {
+ if (o) { o->header.gfx.animInfo.prevAnimFrameTimestamp = 0; }
+}
+
#ifdef DEVELOPMENT
void obj_randomize(struct Object* o) {
if (!o) { return; }
diff --git a/src/pc/lua/utils/smlua_obj_utils.h b/src/pc/lua/utils/smlua_obj_utils.h
index b0e75fbb0..518e3b193 100644
--- a/src/pc/lua/utils/smlua_obj_utils.h
+++ b/src/pc/lua/utils/smlua_obj_utils.h
@@ -155,4 +155,9 @@ void obj_move_xyz(struct Object *o, f32 dx, f32 dy, f32 dz);
/* |description|Sets the parameters of one of the two whirlpools (0-indexed) in an area|descriptionEnd| */
void set_whirlpools(f32 x, f32 y, f32 z, s16 strength, s16 area, s32 index);
+/* |description|Skips object interpolation for a frame|descriptionEnd|*/
+void obj_skip_interpolation(struct Object *o);
+/* |description|Skips animation interpolation for a frame|descriptionEnd| */
+void obj_anim_skip_interpolation(struct Object *o);
+
#endif