From 3bfa75e32be309500b70ff63ce2dfa29740c8687 Mon Sep 17 00:00:00 2001 From: Cooliokid956 <68075390+Cooliokid956@users.noreply.github.com> Date: Sat, 5 Apr 2025 12:52:14 -0500 Subject: [PATCH] Miscellaneous Additions: Addendum (#723) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * More autogen work - made the `Pointer_` classes into aliases instead so that they're actually associated with their true type - "Total constants" metric is now accurate * High Quality Master Volume * Audio work it's 12:55am and there are some bright flashes outside (lightning) - cracked the code (interpreted the "Acc" in `tempoAcc`) - added several functions that will help greatly in the Streamed Music department (you can now match sequenced music fading (transitions, eepy, etc.)) - introducing `gMasterVolume`! a variable that is only updated when it needs to be, theoretically improving performance (by some amount). this variable is used in many places in place of recalculations of the same number - made it so that muting the game skips some audio processing (not the main process since that would linger after unmuting (not good)) - fixed an oversight where lua volumes were not taken into account when `audio_stream_set_volume` - it's its 😁 - removed additional `#include "audio/external.h"` it is 1:06am gn * Add mouse status functions you can now check if mouse buttons were held, clicked, or released * Sorting was a bad idea disabled sorting for constants so that they are represented more closely to their original defines * Expose playerlist page index also noticed that sorting still sucks * Minor (very important) detail lalette * Addressing the PeachyPeachSM64 reviews * Return of the Forced 4:3 Mode shoutouts to DISPLAY.FORCE_4BY3 for sticking through the toughest of times, waiting for this day to come * Added scroll support - Scrolling added to chat box (hold ctrl to scroll fewer lines, shift to scroll faster) - Scrolling functions added to smlua * Addressing the Isaac0-dev review + fixes - mouse scroll is now accumulated - djui_gfx_get_dimensions - forced 4:3 won't kick in if the window isn't wide enough - game now recognizes horizontal resizing when in 4:3 mode * Run autogen * gfx_get_dimensions works just as well --- autogen/convert_constants.py | 11 +- autogen/convert_functions.py | 5 +- autogen/convert_structs.py | 2 +- autogen/lua_definitions/constants.lua | 11698 +++---- autogen/lua_definitions/functions.lua | 14103 ++++---- autogen/lua_definitions/structs.lua | 18 +- docs/lua/constants.md | 5111 +-- docs/lua/functions-2.md | 14194 ++++---- docs/lua/functions-3.md | 7451 ++-- docs/lua/functions-4.md | 8080 ++--- docs/lua/functions-5.md | 11593 +++---- docs/lua/functions-6.md | 5767 ++-- docs/lua/functions.md | 2767 +- src/audio/seqplayer.c | 12 + src/audio/seqplayer.h | 10 +- src/game/game_init.c | 12 + src/game/player_palette.c | 30 +- src/pc/configfile.c | 5 + src/pc/configfile.h | 1 + src/pc/controller/controller_mouse.c | 25 +- src/pc/controller/controller_mouse.h | 18 + src/pc/crash_handler.c | 2 + src/pc/djui/djui_chat_box.c | 18 + src/pc/djui/djui_gfx.c | 8 +- src/pc/djui/djui_gfx.h | 2 + src/pc/djui/djui_hud_utils.c | 34 +- src/pc/djui/djui_hud_utils.h | 10 + src/pc/djui/djui_inputbox.c | 78 +- src/pc/djui/djui_inputbox.h | 4 + src/pc/djui/djui_interactable.c | 25 +- src/pc/djui/djui_interactable.h | 13 +- src/pc/djui/djui_panel_display.c | 1 + src/pc/djui/djui_root.c | 2 +- src/pc/gfx/gfx_dummy.c | 4 + src/pc/gfx/gfx_dxgi.cpp | 16 + src/pc/gfx/gfx_pc.c | 20 +- src/pc/gfx/gfx_pc.h | 1 + src/pc/gfx/gfx_sdl2.c | 15 + src/pc/gfx/gfx_window_manager_api.h | 1 + src/pc/loading.c | 2 +- src/pc/lua/smlua_constants_autogen.c | 8 + src/pc/lua/smlua_functions_autogen.c | 43858 ++++++++++++------------ src/pc/lua/utils/smlua_audio_utils.c | 22 +- src/pc/lua/utils/smlua_misc_utils.c | 5 + src/pc/lua/utils/smlua_misc_utils.h | 2 + src/pc/mumble/mumble.c | 7 +- src/pc/pc_main.c | 23 +- src/pc/pc_main.h | 2 + 48 files changed, 62880 insertions(+), 62216 deletions(-) diff --git a/autogen/convert_constants.py b/autogen/convert_constants.py index 5b337304c..5d1ab198c 100644 --- a/autogen/convert_constants.py +++ b/autogen/convert_constants.py @@ -22,6 +22,7 @@ in_files = [ "src/game/interaction.c", "src/game/interaction.h", "src/pc/djui/djui_hud_utils.h", + "src/pc/controller/controller_mouse.h", "include/behavior_table.h", "src/pc/lua/utils/smlua_model_utils.h", "src/pc/lua/utils/smlua_misc_utils.h", @@ -105,8 +106,6 @@ def saw_constant(identifier, inIfBlock): print("SAW DUPLICATE CONSTANT: " + identifier) return True else: - global totalConstants - totalConstants += 1 seen_constants.append(identifier) return False @@ -335,7 +334,6 @@ def doc_constant_index(processed_files): for processed_file in processed_files: s += '- [%s](#%s)\n' % (processed_file['filename'], processed_file['filename'].replace('.', '')) constants = [x for x in processed_file['constants'] if 'identifier' in x] - constants = sorted(constants, key=lambda d: d['identifier']) for c in constants: s += ' - [enum %s](#enum-%s)\n' % (c['identifier'], c['identifier']) s += '\n
\n\n' @@ -368,7 +366,7 @@ def doc_constant(processed_constant): def doc_file(processed_file): s = '## [%s](#%s)\n' % (processed_file['filename'], processed_file['filename']) - constants = sorted(processed_file['constants'], key=lambda d: 'zzz' + d['identifier'] if 'identifier' in d else d[0]) + constants = processed_file['constants'] for c in constants: s += doc_constant(c) @@ -387,6 +385,7 @@ def doc_files(processed_files): ############################################################################ def def_constant(processed_constant): + global totalConstants constants = processed_constant s = '' @@ -404,6 +403,7 @@ def def_constant(processed_constant): vlen = max(vlen, len(c[1])) for c in constants: s += c[0].ljust(klen) + ' = ' + c[1].rjust(vlen) + ' --- @type %s\n' % id + totalConstants += 1 s += '\n--- @alias %s\n' % id for c in constants: s += '--- | `%s`\n' % c[0] @@ -417,6 +417,7 @@ def def_constant(processed_constant): else: s += '\n--- @type integer\n' s += '%s = %s\n' % (c[0], c[1]) + totalConstants += 1 return s @@ -427,7 +428,7 @@ def build_to_def(processed_files): s += '\n' for file in processed_files: - constants = sorted(file['constants'], key=lambda d: 'zzz' + d['identifier'] if 'identifier' in d else d[0]) + constants = file['constants'] for c in constants: s += def_constant(c) diff --git a/autogen/convert_functions.py b/autogen/convert_functions.py index 56830e4b5..2273c2b5f 100644 --- a/autogen/convert_functions.py +++ b/autogen/convert_functions.py @@ -88,7 +88,7 @@ override_allowed_functions = { "src/game/area.h": [ "area_get_warp_node" ], "src/engine/level_script.h": [ "area_create_warp_node" ], "src/game/ingame_menu.h": [ "set_min_dialog_width", "set_dialog_override_pos", "reset_dialog_override_pos", "set_dialog_override_color", "reset_dialog_override_color", "set_menu_mode", "create_dialog_box", "create_dialog_box_with_var", "create_dialog_inverted_box", "create_dialog_box_with_response", "reset_dialog_render_state", "set_dialog_box_state", ], - "src/audio/seqplayer.h": [ "sequence_player_set_tempo", "sequence_player_set_tempo_acc", "sequence_player_set_transposition", "sequence_player_get_tempo", "sequence_player_get_tempo_acc", "sequence_player_get_transposition" ] + "src/audio/seqplayer.h": [ "sequence_player_set_tempo", "sequence_player_set_tempo_acc", "sequence_player_set_transposition", "sequence_player_get_tempo", "sequence_player_get_tempo_acc", "sequence_player_get_transposition", "sequence_player_get_volume", "sequence_player_get_fade_volume", "sequence_player_get_mute_volume_scale" ] } override_disallowed_functions = { @@ -1103,7 +1103,6 @@ def process_functions(fname, file_str, extracted_descriptions): if fn == None: continue functions.append(fn) - functions = sorted(functions, key=lambda d: d['identifier']) return functions def process_file(fname): @@ -1409,7 +1408,7 @@ def def_files(processed_files): s += def_function(function) for def_pointer in def_pointers: - s += '--- @class %s\n' % def_pointer + s += '--- @alias %s %s\n' % (def_pointer, def_pointer[8:]) with open(get_path(out_filename_defs), 'w', newline='\n') as out: out.write(s) diff --git a/autogen/convert_structs.py b/autogen/convert_structs.py index 486685d57..40e882c15 100644 --- a/autogen/convert_structs.py +++ b/autogen/convert_structs.py @@ -772,7 +772,7 @@ def def_structs(structs): s += '\n' for def_pointer in def_pointers: - s += '--- @class %s\n' % def_pointer + s += '--- @alias %s %s\n' % (def_pointer, def_pointer[8:]) with open(get_path(out_filename_defs), 'w', newline='\n') as out: out.write(s) diff --git a/autogen/lua_definitions/constants.lua b/autogen/lua_definitions/constants.lua index 4c063ed71..f06e52a0f 100644 --- a/autogen/lua_definitions/constants.lua +++ b/autogen/lua_definitions/constants.lua @@ -324,39 +324,39 @@ INSTANT_WARP_INDEX_STOP = 0x04 --- @type integer MAX_AREAS = 16 ---- @type string -VERSION_REGION = "US" - ---- @type integer -WARP_TRANSITION_FADE_FROM_BOWSER = 0x12 - ---- @type integer -WARP_TRANSITION_FADE_FROM_CIRCLE = 0x0A - --- @type integer WARP_TRANSITION_FADE_FROM_COLOR = 0x00 ---- @type integer -WARP_TRANSITION_FADE_FROM_MARIO = 0x10 - ---- @type integer -WARP_TRANSITION_FADE_FROM_STAR = 0x08 - ---- @type integer -WARP_TRANSITION_FADE_INTO_BOWSER = 0x13 - ---- @type integer -WARP_TRANSITION_FADE_INTO_CIRCLE = 0x0B - --- @type integer WARP_TRANSITION_FADE_INTO_COLOR = 0x01 --- @type integer -WARP_TRANSITION_FADE_INTO_MARIO = 0x11 +WARP_TRANSITION_FADE_FROM_STAR = 0x08 --- @type integer WARP_TRANSITION_FADE_INTO_STAR = 0x09 +--- @type integer +WARP_TRANSITION_FADE_FROM_CIRCLE = 0x0A + +--- @type integer +WARP_TRANSITION_FADE_INTO_CIRCLE = 0x0B + +--- @type integer +WARP_TRANSITION_FADE_FROM_MARIO = 0x10 + +--- @type integer +WARP_TRANSITION_FADE_INTO_MARIO = 0x11 + +--- @type integer +WARP_TRANSITION_FADE_FROM_BOWSER = 0x12 + +--- @type integer +WARP_TRANSITION_FADE_INTO_BOWSER = 0x13 + +--- @type string +VERSION_REGION = "US" + id_bhv1Up = 0 --- @type BehaviorId id_bhv1upJumpOnApproach = 1 --- @type BehaviorId id_bhv1upRunningAway = 2 --- @type BehaviorId @@ -1444,555 +1444,6 @@ id_bhv_max_count = 541 --- @type BehaviorId --- | `id_bhvPointLight` --- | `id_bhv_max_count` ---- @type integer -CAMERA_MODE_8_DIRECTIONS = 0x0E - ---- @type integer -CAMERA_MODE_BEHIND_MARIO = 0x03 - ---- @type integer -CAMERA_MODE_BOSS_FIGHT = 0x0B - ---- @type integer -CAMERA_MODE_CLOSE = 0x04 - ---- @type integer -CAMERA_MODE_C_UP = 0x06 - ---- @type integer -CAMERA_MODE_FIXED = 0x0D - ---- @type integer -CAMERA_MODE_FREE_ROAM = 0x10 - ---- @type integer -CAMERA_MODE_INSIDE_CANNON = 0x0A - ---- @type integer -CAMERA_MODE_NEWCAM = 0x12 - ---- @type integer -CAMERA_MODE_NONE = 0x00 - ---- @type integer -CAMERA_MODE_OUTWARD_RADIAL = 0x02 - ---- @type integer -CAMERA_MODE_PARALLEL_TRACKING = 0x0C - ---- @type integer -CAMERA_MODE_RADIAL = 0x01 - ---- @type integer -CAMERA_MODE_ROM_HACK = 0x13 - ---- @type integer -CAMERA_MODE_SLIDE_HOOT = 0x09 - ---- @type integer -CAMERA_MODE_SPIRAL_STAIRS = 0x11 - ---- @type integer -CAMERA_MODE_WATER_SURFACE = 0x08 - ---- @type integer -CAM_ANGLE_LAKITU = 2 - ---- @type integer -CAM_ANGLE_MARIO = 1 - ---- @type integer -CAM_EVENT_BOWSER_INIT = 4 - ---- @type integer -CAM_EVENT_BOWSER_JUMP = 7 - ---- @type integer -CAM_EVENT_BOWSER_THROW_BOUNCE = 8 - ---- @type integer -CAM_EVENT_CANNON = 1 - ---- @type integer -CAM_EVENT_DOOR = 6 - ---- @type integer -CAM_EVENT_DOOR_WARP = 5 - ---- @type integer -CAM_EVENT_SHOT_FROM_CANNON = 2 - ---- @type integer -CAM_EVENT_START_CREDITS = 13 - ---- @type integer -CAM_EVENT_START_ENDING = 11 - ---- @type integer -CAM_EVENT_START_END_WAVING = 12 - ---- @type integer -CAM_EVENT_START_GRAND_STAR = 10 - ---- @type integer -CAM_EVENT_START_INTRO = 9 - ---- @type integer -CAM_EVENT_UNUSED_3 = 3 - ---- @type integer -CAM_FLAG_BEHIND_MARIO_POST_DOOR = 0x8000 - ---- @type integer -CAM_FLAG_BLOCK_AREA_PROCESSING = 0x1000 - ---- @type integer -CAM_FLAG_BLOCK_SMOOTH_MOVEMENT = 0x0002 - ---- @type integer -CAM_FLAG_CAM_NEAR_WALL = 0x0020 - ---- @type integer -CAM_FLAG_CCM_SLIDE_SHORTCUT = 0x0010 - ---- @type integer -CAM_FLAG_CHANGED_PARTRACK_INDEX = 0x0008 - ---- @type integer -CAM_FLAG_COLLIDED_WITH_WALL = 0x0200 - ---- @type integer -CAM_FLAG_FRAME_AFTER_CAM_INIT = 0x0004 - ---- @type integer -CAM_FLAG_SLEEPING = 0x0040 - ---- @type integer -CAM_FLAG_SMOOTH_MOVEMENT = 0x0001 - ---- @type integer -CAM_FLAG_START_TRANSITION = 0x0400 - ---- @type integer -CAM_FLAG_TRANSITION_OUT_OF_C_UP = 0x0800 - ---- @type integer -CAM_FLAG_UNUSED_13 = 0x2000 - ---- @type integer -CAM_FLAG_UNUSED_7 = 0x0080 - ---- @type integer -CAM_FLAG_UNUSED_8 = 0x0100 - ---- @type integer -CAM_FLAG_UNUSED_CUTSCENE_ACTIVE = 0x4000 - ---- @type integer -CAM_FOV_APP_20 = 6 - ---- @type integer -CAM_FOV_APP_30 = 10 - ---- @type integer -CAM_FOV_APP_45 = 4 - ---- @type integer -CAM_FOV_APP_60 = 11 - ---- @type integer -CAM_FOV_APP_80 = 9 - ---- @type integer -CAM_FOV_BBH = 7 - ---- @type integer -CAM_FOV_DEFAULT = 2 - ---- @type integer -CAM_FOV_SET_29 = 13 - ---- @type integer -CAM_FOV_SET_30 = 5 - ---- @type integer -CAM_FOV_SET_45 = 1 - ---- @type integer -CAM_FOV_ZOOM_30 = 12 - ---- @type integer -CAM_MODE_LAKITU_WAS_ZOOMED_OUT = 0x02 - ---- @type integer -CAM_MODE_MARIO_ACTIVE = 0x01 - ---- @type integer -CAM_MODE_MARIO_SELECTED = 0x04 - ---- @type integer -CAM_MOVE_ALREADY_ZOOMED_OUT = 0x1000 - ---- @type integer -CAM_MOVE_C_UP_MODE = 0x2000 - ---- @type integer -CAM_MOVE_ENTERED_ROTATE_SURFACE = 0x0010 - ---- @type integer -CAM_MOVE_FIX_IN_PLACE = 0x0040 - ---- @type integer -CAM_MOVE_INIT_CAMERA = 0x0800 - ---- @type integer -CAM_MOVE_METAL_BELOW_WATER = 0x0020 - ---- @type integer -CAM_MOVE_PAUSE_SCREEN = 0x8000 - ---- @type integer -CAM_MOVE_RESTRICT = (CAM_MOVE_ENTERED_ROTATE_SURFACE | CAM_MOVE_METAL_BELOW_WATER | CAM_MOVE_FIX_IN_PLACE | CAM_MOVE_UNKNOWN_8) - ---- @type integer -CAM_MOVE_RETURN_TO_MIDDLE = 0x0001 - ---- @type integer -CAM_MOVE_ROTATE = (CAM_MOVE_ROTATE_RIGHT | CAM_MOVE_ROTATE_LEFT | CAM_MOVE_RETURN_TO_MIDDLE) - ---- @type integer -CAM_MOVE_ROTATE_LEFT = 0x0008 - ---- @type integer -CAM_MOVE_ROTATE_RIGHT = 0x0004 - ---- @type integer -CAM_MOVE_STARTED_EXITING_C_UP = 0x0200 - ---- @type integer -CAM_MOVE_SUBMERGED = 0x4000 - ---- @type integer -CAM_MOVE_UNKNOWN_11 = 0x0400 - ---- @type integer -CAM_MOVE_UNKNOWN_8 = 0x0080 - ---- @type integer -CAM_MOVE_ZOOMED_OUT = 0x0002 - ---- @type integer -CAM_MOVING_INTO_MODE = 0x0100 - ---- @type integer -CAM_SELECTION_FIXED = 2 - ---- @type integer -CAM_SELECTION_MARIO = 1 - ---- @type integer -CAM_SOUND_C_UP_PLAYED = 0x01 - ---- @type integer -CAM_SOUND_FIXED_ACTIVE = 0x20 - ---- @type integer -CAM_SOUND_MARIO_ACTIVE = 0x02 - ---- @type integer -CAM_SOUND_NORMAL_ACTIVE = 0x04 - ---- @type integer -CAM_SOUND_UNUSED_SELECT_FIXED = 0x10 - ---- @type integer -CAM_SOUND_UNUSED_SELECT_MARIO = 0x08 - ---- @type integer -CAM_STATUS_C_DOWN = 1 << 3 - ---- @type integer -CAM_STATUS_C_MODE_GROUP = (CAM_STATUS_C_DOWN | CAM_STATUS_C_UP) - ---- @type integer -CAM_STATUS_C_UP = 1 << 4 - ---- @type integer -CAM_STATUS_FIXED = 1 << 2 - ---- @type integer -CAM_STATUS_LAKITU = 1 << 1 - ---- @type integer -CAM_STATUS_MARIO = 1 << 0 - ---- @type integer -CAM_STATUS_MODE_GROUP = (CAM_STATUS_MARIO | CAM_STATUS_LAKITU | CAM_STATUS_FIXED) - ---- @type integer -CAM_STATUS_NONE = 0 - ---- @type integer -CUTSCENE_0F_UNUSED = 145 - ---- @type integer -CUTSCENE_CAP_SWITCH_PRESS = 161 - ---- @type integer -CUTSCENE_CREDITS = 178 - ---- @type integer -CUTSCENE_DANCE_CLOSEUP = 166 - ---- @type integer -CUTSCENE_DANCE_DEFAULT = 175 - ---- @type integer -CUTSCENE_DANCE_FLY_AWAY = 165 - ---- @type integer -CUTSCENE_DANCE_ROTATE = 143 - ---- @type integer -CUTSCENE_DEATH_EXIT = 135 - ---- @type integer -CUTSCENE_DEATH_ON_BACK = 154 - ---- @type integer -CUTSCENE_DEATH_ON_STOMACH = 153 - ---- @type integer -CUTSCENE_DIALOG = 162 - ---- @type integer -CUTSCENE_DOOR_PULL = 130 - ---- @type integer -CUTSCENE_DOOR_PULL_MODE = 140 - ---- @type integer -CUTSCENE_DOOR_PUSH = 131 - ---- @type integer -CUTSCENE_DOOR_PUSH_MODE = 141 - ---- @type integer -CUTSCENE_DOOR_WARP = 139 - ---- @type integer -CUTSCENE_ENDING = 172 - ---- @type integer -CUTSCENE_END_WAVING = 177 - ---- @type integer -CUTSCENE_ENTER_BOWSER_ARENA = 144 - ---- @type integer -CUTSCENE_ENTER_CANNON = 133 - ---- @type integer -CUTSCENE_ENTER_PAINTING = 134 - ---- @type integer -CUTSCENE_ENTER_POOL = 181 - ---- @type integer -CUTSCENE_ENTER_PYRAMID_TOP = 164 - ---- @type integer -CUTSCENE_EXIT_BOWSER_DEATH = 158 - ---- @type integer -CUTSCENE_EXIT_BOWSER_SUCC = 157 - ---- @type integer -CUTSCENE_EXIT_FALL_WMOTR = 180 - ---- @type integer -CUTSCENE_EXIT_PAINTING_SUCC = 160 - ---- @type integer -CUTSCENE_EXIT_SPECIAL_SUCC = 169 - ---- @type integer -CUTSCENE_EXIT_WATERFALL = 179 - ---- @type integer -CUTSCENE_GRAND_STAR = 174 - ---- @type integer -CUTSCENE_INTRO_PEACH = 142 - ---- @type integer -CUTSCENE_KEY_DANCE = 167 - ---- @type integer -CUTSCENE_LOOP = 0x7FFF - ---- @type integer -CUTSCENE_NONPAINTING_DEATH = 170 - ---- @type integer -CUTSCENE_PALETTE_EDITOR = 182 - ---- @type integer -CUTSCENE_PREPARE_CANNON = 150 - ---- @type integer -CUTSCENE_QUICKSAND_DEATH = 155 - ---- @type integer -CUTSCENE_RACE_DIALOG = 163 - ---- @type integer -CUTSCENE_READ_MESSAGE = 171 - ---- @type integer -CUTSCENE_RED_COIN_STAR_SPAWN = 176 - ---- @type integer -CUTSCENE_SLIDING_DOORS_OPEN = 149 - ---- @type integer -CUTSCENE_SSL_PYRAMID_EXPLODE = 168 - ---- @type integer -CUTSCENE_STANDING_DEATH = 152 - ---- @type integer -CUTSCENE_STAR_SPAWN = 173 - ---- @type integer -CUTSCENE_STOP = 0x8000 - ---- @type integer -CUTSCENE_SUFFOCATION_DEATH = 156 - ---- @type integer -CUTSCENE_UNLOCK_KEY_DOOR = 151 - ---- @type integer -CUTSCENE_UNUSED_EXIT = 147 - ---- @type integer -CUTSCENE_WATER_DEATH = 159 - ---- @type integer -DOOR_DEFAULT = 0 - ---- @type integer -DOOR_ENTER_LOBBY = 2 - ---- @type integer -DOOR_LEAVING_SPECIAL = 1 - ---- @type integer -HAND_CAM_SHAKE_CUTSCENE = 1 - ---- @type integer -HAND_CAM_SHAKE_HANG_OWL = 3 - ---- @type integer -HAND_CAM_SHAKE_HIGH = 4 - ---- @type integer -HAND_CAM_SHAKE_LOW = 6 - ---- @type integer -HAND_CAM_SHAKE_OFF = 0 - ---- @type integer -HAND_CAM_SHAKE_STAR_DANCE = 5 - ---- @type integer -HAND_CAM_SHAKE_UNUSED = 2 - ---- @type integer -SHAKE_ATTACK = 1 - ---- @type integer -SHAKE_ENV_BOWSER_JUMP = 3 - ---- @type integer -SHAKE_ENV_BOWSER_THROW_BOUNCE = 2 - ---- @type integer -SHAKE_ENV_EXPLOSION = 1 - ---- @type integer -SHAKE_ENV_FALLING_BITS_PLAT = 10 - ---- @type integer -SHAKE_ENV_JRB_SHIP_DRAIN = 9 - ---- @type integer -SHAKE_ENV_PYRAMID_EXPLODE = 8 - ---- @type integer -SHAKE_ENV_UNUSED_5 = 5 - ---- @type integer -SHAKE_ENV_UNUSED_6 = 6 - ---- @type integer -SHAKE_ENV_UNUSED_7 = 7 - ---- @type integer -SHAKE_FALL_DAMAGE = 9 - ---- @type integer -SHAKE_FOV_LARGE = 4 - ---- @type integer -SHAKE_FOV_MEDIUM = 3 - ---- @type integer -SHAKE_FOV_SMALL = 1 - ---- @type integer -SHAKE_FOV_UNUSED = 2 - ---- @type integer -SHAKE_GROUND_POUND = 2 - ---- @type integer -SHAKE_HIT_FROM_BELOW = 8 - ---- @type integer -SHAKE_LARGE_DAMAGE = 5 - ---- @type integer -SHAKE_MED_DAMAGE = 4 - ---- @type integer -SHAKE_POS_BOWLING_BALL = 4 - ---- @type integer -SHAKE_POS_LARGE = 3 - ---- @type integer -SHAKE_POS_MEDIUM = 2 - ---- @type integer -SHAKE_POS_SMALL = 1 - ---- @type integer -SHAKE_SHOCK = 10 - ---- @type integer -SHAKE_SMALL_DAMAGE = 3 - -RCE_AUTOMATIC = 0 --- @type RomhackCameraEnable -RCE_ON = 1 --- @type RomhackCameraEnable -RCE_OFF = 2 --- @type RomhackCameraEnable - ---- @alias RomhackCameraEnable ---- | `RCE_AUTOMATIC` ---- | `RCE_ON` ---- | `RCE_OFF` - RCO_ALL = 0 --- @type RomhackCameraOverride RCO_ALL_EXCEPT_BOWSER = 1 --- @type RomhackCameraOverride RCO_NONE = 2 --- @type RomhackCameraOverride @@ -2008,6 +1459,570 @@ RCO_DISABLE = 5 --- @type RomhackCameraOverride --- | `RCO_ALL_VANILLA_EXCEPT_BOWSER` --- | `RCO_DISABLE` +RCE_AUTOMATIC = 0 --- @type RomhackCameraEnable +RCE_ON = 1 --- @type RomhackCameraEnable +RCE_OFF = 2 --- @type RomhackCameraEnable + +--- @alias RomhackCameraEnable +--- | `RCE_AUTOMATIC` +--- | `RCE_ON` +--- | `RCE_OFF` + +--- @type integer +CAM_MODE_MARIO_ACTIVE = 0x01 + +--- @type integer +CAM_MODE_LAKITU_WAS_ZOOMED_OUT = 0x02 + +--- @type integer +CAM_MODE_MARIO_SELECTED = 0x04 + +--- @type integer +CAM_SELECTION_MARIO = 1 + +--- @type integer +CAM_SELECTION_FIXED = 2 + +--- @type integer +CAM_ANGLE_MARIO = 1 + +--- @type integer +CAM_ANGLE_LAKITU = 2 + +--- @type integer +CAMERA_MODE_NONE = 0x00 + +--- @type integer +CAMERA_MODE_RADIAL = 0x01 + +--- @type integer +CAMERA_MODE_OUTWARD_RADIAL = 0x02 + +--- @type integer +CAMERA_MODE_BEHIND_MARIO = 0x03 + +--- @type integer +CAMERA_MODE_CLOSE = 0x04 + +--- @type integer +CAMERA_MODE_C_UP = 0x06 + +--- @type integer +CAMERA_MODE_WATER_SURFACE = 0x08 + +--- @type integer +CAMERA_MODE_SLIDE_HOOT = 0x09 + +--- @type integer +CAMERA_MODE_INSIDE_CANNON = 0x0A + +--- @type integer +CAMERA_MODE_BOSS_FIGHT = 0x0B + +--- @type integer +CAMERA_MODE_PARALLEL_TRACKING = 0x0C + +--- @type integer +CAMERA_MODE_FIXED = 0x0D + +--- @type integer +CAMERA_MODE_8_DIRECTIONS = 0x0E + +--- @type integer +CAMERA_MODE_FREE_ROAM = 0x10 + +--- @type integer +CAMERA_MODE_SPIRAL_STAIRS = 0x11 + +--- @type integer +CAMERA_MODE_NEWCAM = 0x12 + +--- @type integer +CAMERA_MODE_ROM_HACK = 0x13 + +--- @type integer +CAM_MOVE_RETURN_TO_MIDDLE = 0x0001 + +--- @type integer +CAM_MOVE_ZOOMED_OUT = 0x0002 + +--- @type integer +CAM_MOVE_ROTATE_RIGHT = 0x0004 + +--- @type integer +CAM_MOVE_ROTATE_LEFT = 0x0008 + +--- @type integer +CAM_MOVE_ENTERED_ROTATE_SURFACE = 0x0010 + +--- @type integer +CAM_MOVE_METAL_BELOW_WATER = 0x0020 + +--- @type integer +CAM_MOVE_FIX_IN_PLACE = 0x0040 + +--- @type integer +CAM_MOVE_UNKNOWN_8 = 0x0080 + +--- @type integer +CAM_MOVING_INTO_MODE = 0x0100 + +--- @type integer +CAM_MOVE_STARTED_EXITING_C_UP = 0x0200 + +--- @type integer +CAM_MOVE_UNKNOWN_11 = 0x0400 + +--- @type integer +CAM_MOVE_INIT_CAMERA = 0x0800 + +--- @type integer +CAM_MOVE_ALREADY_ZOOMED_OUT = 0x1000 + +--- @type integer +CAM_MOVE_C_UP_MODE = 0x2000 + +--- @type integer +CAM_MOVE_SUBMERGED = 0x4000 + +--- @type integer +CAM_MOVE_PAUSE_SCREEN = 0x8000 + +--- @type integer +CAM_MOVE_ROTATE = (CAM_MOVE_ROTATE_RIGHT | CAM_MOVE_ROTATE_LEFT | CAM_MOVE_RETURN_TO_MIDDLE) + +--- @type integer +CAM_MOVE_RESTRICT = (CAM_MOVE_ENTERED_ROTATE_SURFACE | CAM_MOVE_METAL_BELOW_WATER | CAM_MOVE_FIX_IN_PLACE | CAM_MOVE_UNKNOWN_8) + +--- @type integer +CAM_SOUND_C_UP_PLAYED = 0x01 + +--- @type integer +CAM_SOUND_MARIO_ACTIVE = 0x02 + +--- @type integer +CAM_SOUND_NORMAL_ACTIVE = 0x04 + +--- @type integer +CAM_SOUND_UNUSED_SELECT_MARIO = 0x08 + +--- @type integer +CAM_SOUND_UNUSED_SELECT_FIXED = 0x10 + +--- @type integer +CAM_SOUND_FIXED_ACTIVE = 0x20 + +--- @type integer +CAM_FLAG_SMOOTH_MOVEMENT = 0x0001 + +--- @type integer +CAM_FLAG_BLOCK_SMOOTH_MOVEMENT = 0x0002 + +--- @type integer +CAM_FLAG_FRAME_AFTER_CAM_INIT = 0x0004 + +--- @type integer +CAM_FLAG_CHANGED_PARTRACK_INDEX = 0x0008 + +--- @type integer +CAM_FLAG_CCM_SLIDE_SHORTCUT = 0x0010 + +--- @type integer +CAM_FLAG_CAM_NEAR_WALL = 0x0020 + +--- @type integer +CAM_FLAG_SLEEPING = 0x0040 + +--- @type integer +CAM_FLAG_UNUSED_7 = 0x0080 + +--- @type integer +CAM_FLAG_UNUSED_8 = 0x0100 + +--- @type integer +CAM_FLAG_COLLIDED_WITH_WALL = 0x0200 + +--- @type integer +CAM_FLAG_START_TRANSITION = 0x0400 + +--- @type integer +CAM_FLAG_TRANSITION_OUT_OF_C_UP = 0x0800 + +--- @type integer +CAM_FLAG_BLOCK_AREA_PROCESSING = 0x1000 + +--- @type integer +CAM_FLAG_UNUSED_13 = 0x2000 + +--- @type integer +CAM_FLAG_UNUSED_CUTSCENE_ACTIVE = 0x4000 + +--- @type integer +CAM_FLAG_BEHIND_MARIO_POST_DOOR = 0x8000 + +--- @type integer +CAM_STATUS_NONE = 0 + +--- @type integer +CAM_STATUS_MARIO = 1 << 0 + +--- @type integer +CAM_STATUS_LAKITU = 1 << 1 + +--- @type integer +CAM_STATUS_FIXED = 1 << 2 + +--- @type integer +CAM_STATUS_C_DOWN = 1 << 3 + +--- @type integer +CAM_STATUS_C_UP = 1 << 4 + +--- @type integer +CAM_STATUS_MODE_GROUP = (CAM_STATUS_MARIO | CAM_STATUS_LAKITU | CAM_STATUS_FIXED) + +--- @type integer +CAM_STATUS_C_MODE_GROUP = (CAM_STATUS_C_DOWN | CAM_STATUS_C_UP) + +--- @type integer +SHAKE_ATTACK = 1 + +--- @type integer +SHAKE_GROUND_POUND = 2 + +--- @type integer +SHAKE_SMALL_DAMAGE = 3 + +--- @type integer +SHAKE_MED_DAMAGE = 4 + +--- @type integer +SHAKE_LARGE_DAMAGE = 5 + +--- @type integer +SHAKE_HIT_FROM_BELOW = 8 + +--- @type integer +SHAKE_FALL_DAMAGE = 9 + +--- @type integer +SHAKE_SHOCK = 10 + +--- @type integer +SHAKE_ENV_EXPLOSION = 1 + +--- @type integer +SHAKE_ENV_BOWSER_THROW_BOUNCE = 2 + +--- @type integer +SHAKE_ENV_BOWSER_JUMP = 3 + +--- @type integer +SHAKE_ENV_UNUSED_5 = 5 + +--- @type integer +SHAKE_ENV_UNUSED_6 = 6 + +--- @type integer +SHAKE_ENV_UNUSED_7 = 7 + +--- @type integer +SHAKE_ENV_PYRAMID_EXPLODE = 8 + +--- @type integer +SHAKE_ENV_JRB_SHIP_DRAIN = 9 + +--- @type integer +SHAKE_ENV_FALLING_BITS_PLAT = 10 + +--- @type integer +SHAKE_FOV_SMALL = 1 + +--- @type integer +SHAKE_FOV_UNUSED = 2 + +--- @type integer +SHAKE_FOV_MEDIUM = 3 + +--- @type integer +SHAKE_FOV_LARGE = 4 + +--- @type integer +SHAKE_POS_SMALL = 1 + +--- @type integer +SHAKE_POS_MEDIUM = 2 + +--- @type integer +SHAKE_POS_LARGE = 3 + +--- @type integer +SHAKE_POS_BOWLING_BALL = 4 + +--- @type integer +CUTSCENE_DOOR_PULL = 130 + +--- @type integer +CUTSCENE_DOOR_PUSH = 131 + +--- @type integer +CUTSCENE_ENTER_CANNON = 133 + +--- @type integer +CUTSCENE_ENTER_PAINTING = 134 + +--- @type integer +CUTSCENE_DEATH_EXIT = 135 + +--- @type integer +CUTSCENE_DOOR_WARP = 139 + +--- @type integer +CUTSCENE_DOOR_PULL_MODE = 140 + +--- @type integer +CUTSCENE_DOOR_PUSH_MODE = 141 + +--- @type integer +CUTSCENE_INTRO_PEACH = 142 + +--- @type integer +CUTSCENE_DANCE_ROTATE = 143 + +--- @type integer +CUTSCENE_ENTER_BOWSER_ARENA = 144 + +--- @type integer +CUTSCENE_0F_UNUSED = 145 + +--- @type integer +CUTSCENE_UNUSED_EXIT = 147 + +--- @type integer +CUTSCENE_SLIDING_DOORS_OPEN = 149 + +--- @type integer +CUTSCENE_PREPARE_CANNON = 150 + +--- @type integer +CUTSCENE_UNLOCK_KEY_DOOR = 151 + +--- @type integer +CUTSCENE_STANDING_DEATH = 152 + +--- @type integer +CUTSCENE_DEATH_ON_STOMACH = 153 + +--- @type integer +CUTSCENE_DEATH_ON_BACK = 154 + +--- @type integer +CUTSCENE_QUICKSAND_DEATH = 155 + +--- @type integer +CUTSCENE_SUFFOCATION_DEATH = 156 + +--- @type integer +CUTSCENE_EXIT_BOWSER_SUCC = 157 + +--- @type integer +CUTSCENE_EXIT_BOWSER_DEATH = 158 + +--- @type integer +CUTSCENE_WATER_DEATH = 159 + +--- @type integer +CUTSCENE_EXIT_PAINTING_SUCC = 160 + +--- @type integer +CUTSCENE_CAP_SWITCH_PRESS = 161 + +--- @type integer +CUTSCENE_DIALOG = 162 + +--- @type integer +CUTSCENE_RACE_DIALOG = 163 + +--- @type integer +CUTSCENE_ENTER_PYRAMID_TOP = 164 + +--- @type integer +CUTSCENE_DANCE_FLY_AWAY = 165 + +--- @type integer +CUTSCENE_DANCE_CLOSEUP = 166 + +--- @type integer +CUTSCENE_KEY_DANCE = 167 + +--- @type integer +CUTSCENE_SSL_PYRAMID_EXPLODE = 168 + +--- @type integer +CUTSCENE_EXIT_SPECIAL_SUCC = 169 + +--- @type integer +CUTSCENE_NONPAINTING_DEATH = 170 + +--- @type integer +CUTSCENE_READ_MESSAGE = 171 + +--- @type integer +CUTSCENE_ENDING = 172 + +--- @type integer +CUTSCENE_STAR_SPAWN = 173 + +--- @type integer +CUTSCENE_GRAND_STAR = 174 + +--- @type integer +CUTSCENE_DANCE_DEFAULT = 175 + +--- @type integer +CUTSCENE_RED_COIN_STAR_SPAWN = 176 + +--- @type integer +CUTSCENE_END_WAVING = 177 + +--- @type integer +CUTSCENE_CREDITS = 178 + +--- @type integer +CUTSCENE_EXIT_WATERFALL = 179 + +--- @type integer +CUTSCENE_EXIT_FALL_WMOTR = 180 + +--- @type integer +CUTSCENE_ENTER_POOL = 181 + +--- @type integer +CUTSCENE_PALETTE_EDITOR = 182 + +--- @type integer +CUTSCENE_STOP = 0x8000 + +--- @type integer +CUTSCENE_LOOP = 0x7FFF + +--- @type integer +HAND_CAM_SHAKE_OFF = 0 + +--- @type integer +HAND_CAM_SHAKE_CUTSCENE = 1 + +--- @type integer +HAND_CAM_SHAKE_UNUSED = 2 + +--- @type integer +HAND_CAM_SHAKE_HANG_OWL = 3 + +--- @type integer +HAND_CAM_SHAKE_HIGH = 4 + +--- @type integer +HAND_CAM_SHAKE_STAR_DANCE = 5 + +--- @type integer +HAND_CAM_SHAKE_LOW = 6 + +--- @type integer +DOOR_DEFAULT = 0 + +--- @type integer +DOOR_LEAVING_SPECIAL = 1 + +--- @type integer +DOOR_ENTER_LOBBY = 2 + +--- @type integer +CAM_FOV_SET_45 = 1 + +--- @type integer +CAM_FOV_DEFAULT = 2 + +--- @type integer +CAM_FOV_APP_45 = 4 + +--- @type integer +CAM_FOV_SET_30 = 5 + +--- @type integer +CAM_FOV_APP_20 = 6 + +--- @type integer +CAM_FOV_BBH = 7 + +--- @type integer +CAM_FOV_APP_80 = 9 + +--- @type integer +CAM_FOV_APP_30 = 10 + +--- @type integer +CAM_FOV_APP_60 = 11 + +--- @type integer +CAM_FOV_ZOOM_30 = 12 + +--- @type integer +CAM_FOV_SET_29 = 13 + +--- @type integer +CAM_EVENT_CANNON = 1 + +--- @type integer +CAM_EVENT_SHOT_FROM_CANNON = 2 + +--- @type integer +CAM_EVENT_UNUSED_3 = 3 + +--- @type integer +CAM_EVENT_BOWSER_INIT = 4 + +--- @type integer +CAM_EVENT_DOOR_WARP = 5 + +--- @type integer +CAM_EVENT_DOOR = 6 + +--- @type integer +CAM_EVENT_BOWSER_JUMP = 7 + +--- @type integer +CAM_EVENT_BOWSER_THROW_BOUNCE = 8 + +--- @type integer +CAM_EVENT_START_INTRO = 9 + +--- @type integer +CAM_EVENT_START_GRAND_STAR = 10 + +--- @type integer +CAM_EVENT_START_ENDING = 11 + +--- @type integer +CAM_EVENT_START_END_WAVING = 12 + +--- @type integer +CAM_EVENT_START_CREDITS = 13 + +CT_MARIO = 0 --- @type CharacterType +CT_LUIGI = 1 --- @type CharacterType +CT_TOAD = 2 --- @type CharacterType +CT_WALUIGI = 3 --- @type CharacterType +CT_WARIO = 4 --- @type CharacterType +CT_MAX = 5 --- @type CharacterType + +--- @alias CharacterType +--- | `CT_MARIO` +--- | `CT_LUIGI` +--- | `CT_TOAD` +--- | `CT_WALUIGI` +--- | `CT_WARIO` +--- | `CT_MAX` + CHAR_SOUND_YAH_WAH_HOO = 0 --- @type CharacterSound CHAR_SOUND_HOOHOO = 1 --- @type CharacterSound CHAR_SOUND_YAHOO = 2 --- @type CharacterSound @@ -2101,20 +2116,29 @@ CHAR_SOUND_MAX = 44 --- @type CharacterSound --- | `CHAR_SOUND_OKEY_DOKEY` --- | `CHAR_SOUND_MAX` -CT_MARIO = 0 --- @type CharacterType -CT_LUIGI = 1 --- @type CharacterType -CT_TOAD = 2 --- @type CharacterType -CT_WALUIGI = 3 --- @type CharacterType -CT_WARIO = 4 --- @type CharacterType -CT_MAX = 5 --- @type CharacterType +--- @type integer +MOUSE_BUTTON_1 = (1 << 0) ---- @alias CharacterType ---- | `CT_MARIO` ---- | `CT_LUIGI` ---- | `CT_TOAD` ---- | `CT_WALUIGI` ---- | `CT_WARIO` ---- | `CT_MAX` +--- @type integer +MOUSE_BUTTON_2 = (1 << 1) + +--- @type integer +MOUSE_BUTTON_3 = (1 << 2) + +--- @type integer +MOUSE_BUTTON_4 = (1 << 3) + +--- @type integer +MOUSE_BUTTON_5 = (1 << 4) + +--- @type integer +L_MOUSE_BUTTON = MOUSE_BUTTON_1 + +--- @type integer +M_MOUSE_BUTTON = MOUSE_BUTTON_2 + +--- @type integer +R_MOUSE_BUTTON = MOUSE_BUTTON_3 DIALOG_000 = 0 --- @type DialogId DIALOG_001 = 1 --- @type DialogId @@ -2470,6 +2494,24 @@ CONSOLE_MESSAGE_ERROR = 2 --- @type ConsoleMessageLevel --- | `CONSOLE_MESSAGE_WARNING` --- | `CONSOLE_MESSAGE_ERROR` +RESOLUTION_DJUI = 0 --- @type HudUtilsResolution +RESOLUTION_N64 = 1 --- @type HudUtilsResolution +RESOLUTION_COUNT = 2 --- @type HudUtilsResolution + +--- @alias HudUtilsResolution +--- | `RESOLUTION_DJUI` +--- | `RESOLUTION_N64` +--- | `RESOLUTION_COUNT` + +FILTER_NEAREST = 0 --- @type HudUtilsFilter +FILTER_LINEAR = 1 --- @type HudUtilsFilter +FILTER_COUNT = 2 --- @type HudUtilsFilter + +--- @alias HudUtilsFilter +--- | `FILTER_NEAREST` +--- | `FILTER_LINEAR` +--- | `FILTER_COUNT` + FONT_NORMAL = 0 --- @type DjuiFontType FONT_MENU = 1 --- @type DjuiFontType FONT_HUD = 2 --- @type DjuiFontType @@ -2489,24 +2531,6 @@ FONT_COUNT = 7 --- @type DjuiFontType --- | `FONT_SPECIAL` --- | `FONT_COUNT` -FILTER_NEAREST = 0 --- @type HudUtilsFilter -FILTER_LINEAR = 1 --- @type HudUtilsFilter -FILTER_COUNT = 2 --- @type HudUtilsFilter - ---- @alias HudUtilsFilter ---- | `FILTER_NEAREST` ---- | `FILTER_LINEAR` ---- | `FILTER_COUNT` - -RESOLUTION_DJUI = 0 --- @type HudUtilsResolution -RESOLUTION_N64 = 1 --- @type HudUtilsResolution -RESOLUTION_COUNT = 2 --- @type HudUtilsResolution - ---- @alias HudUtilsResolution ---- | `RESOLUTION_DJUI` ---- | `RESOLUTION_N64` ---- | `RESOLUTION_COUNT` - DJUI_RAINBOW_COLOR_RED = 0 --- @type DjuiRainbowColor DJUI_RAINBOW_COLOR_GREEN = 1 --- @type DjuiRainbowColor DJUI_RAINBOW_COLOR_BLUE = 2 --- @type DjuiRainbowColor @@ -2518,48 +2542,42 @@ DJUI_RAINBOW_COLOR_YELLOW = 3 --- @type DjuiRainbowColor --- | `DJUI_RAINBOW_COLOR_BLUE` --- | `DJUI_RAINBOW_COLOR_YELLOW` ---- @type integer -ENVFX_BUBBLE_START = 10 - ---- @type integer -ENVFX_FLOWERS = 11 - ---- @type integer -ENVFX_JETSTREAM_BUBBLES = 14 - ---- @type integer -ENVFX_LAVA_BUBBLES = 12 - --- @type integer ENVFX_MODE_NONE = 0 ---- @type integer -ENVFX_MODE_NO_OVERRIDE = -1 - ---- @type integer -ENVFX_SNOW_BLIZZARD = 3 - --- @type integer ENVFX_SNOW_NORMAL = 1 --- @type integer ENVFX_SNOW_WATER = 2 +--- @type integer +ENVFX_SNOW_BLIZZARD = 3 + +--- @type integer +ENVFX_BUBBLE_START = 10 + +--- @type integer +ENVFX_FLOWERS = 11 + +--- @type integer +ENVFX_LAVA_BUBBLES = 12 + --- @type integer ENVFX_WHIRLPOOL_BUBBLES = 13 --- @type integer -DS_DIFF = DS_KOOPA +ENVFX_JETSTREAM_BUBBLES = 14 --- @type integer -DS_DIFF = DS_TUXIE - ---- @type integer -SEQ_PLAYER_ENV = 1 +ENVFX_MODE_NO_OVERRIDE = -1 --- @type integer SEQ_PLAYER_LEVEL = 0 +--- @type integer +SEQ_PLAYER_ENV = 1 + --- @type integer SEQ_PLAYER_SFX = 2 @@ -2592,6 +2610,12 @@ DS_NONE = 0xff --- @type DialogSound --- | `DS_MAX` --- | `DS_NONE` +--- @type integer +DS_DIFF = DS_KOOPA + +--- @type integer +DS_DIFF = DS_TUXIE + --- @type integer FIRST_PERSON_DEFAULT_FOV = 70 @@ -2602,179 +2626,461 @@ FIRST_PERSON_MARIO_HEAD_POS = 120 FIRST_PERSON_MARIO_HEAD_POS_SHORT = 60 --- @type integer -AA_EN = 0x8 +G_COPYMEM = 0xd2 --- @type integer -ALPHA_CVG_SEL = 0x2000 +G_NOOP = 0x00 --- @type integer -BOWTIE_VAL = 0 +G_RDPHALF_2 = 0xf1 --- @type integer -CLR_ON_CVG = 0x80 +G_SETOTHERMODE_H = 0xe3 --- @type integer -CVG_DST_CLAMP = 0 +G_SETOTHERMODE_L = 0xe2 --- @type integer -CVG_DST_FULL = 0x200 +G_RDPHALF_1 = 0xe1 --- @type integer -CVG_DST_SAVE = 0x300 +G_SPNOOP = 0xe0 --- @type integer -CVG_DST_WRAP = 0x100 +G_ENDDL = 0xdf --- @type integer -CVG_X_ALPHA = 0x1000 +G_DL = 0xde --- @type integer -FORCE_BL = 0x4000 +G_LOAD_UCODE = 0xdd --- @type integer -FR_NEG_FRUSTRATIO_1 = 0x00000001 +G_MOVEMEM = 0xdc --- @type integer -FR_NEG_FRUSTRATIO_2 = 0x00000002 +G_MOVEWORD = 0xdb --- @type integer -FR_NEG_FRUSTRATIO_3 = 0x00000003 +G_MTX = 0xda --- @type integer -FR_NEG_FRUSTRATIO_4 = 0x00000004 +G_GEOMETRYMODE = 0xd9 --- @type integer -FR_NEG_FRUSTRATIO_5 = 0x00000005 +G_POPMTX = 0xd8 --- @type integer -FR_NEG_FRUSTRATIO_6 = 0x00000006 +G_TEXTURE = 0xd7 --- @type integer -FR_POS_FRUSTRATIO_1 = 0x0000ffff +G_DMA_IO = 0xd6 --- @type integer -FR_POS_FRUSTRATIO_2 = 0x0000fffe +G_SPECIAL_1 = 0xd5 --- @type integer -FR_POS_FRUSTRATIO_3 = 0x0000fffd +G_SPECIAL_2 = 0xd4 --- @type integer -FR_POS_FRUSTRATIO_4 = 0x0000fffc +G_SPECIAL_3 = 0xd3 --- @type integer -FR_POS_FRUSTRATIO_5 = 0x0000fffb +G_VTX = 0x01 --- @type integer -FR_POS_FRUSTRATIO_6 = 0x0000fffa +G_MODIFYVTX = 0x02 --- @type integer -G_ACMUX_0 = 7 - ---- @type integer -G_ACMUX_1 = 6 - ---- @type integer -G_ACMUX_COMBINED = 0 - ---- @type integer -G_ACMUX_ENVIRONMENT = 5 - ---- @type integer -G_ACMUX_LOD_FRACTION = 0 - ---- @type integer -G_ACMUX_PRIMITIVE = 3 - ---- @type integer -G_ACMUX_PRIM_LOD_FRAC = 6 - ---- @type integer -G_ACMUX_SHADE = 4 - ---- @type integer -G_ACMUX_TEXEL0 = 1 - ---- @type integer -G_ACMUX_TEXEL1 = 2 - ---- @type integer -G_AC_DITHER = (3 << G_MDSFT_ALPHACOMPARE) - ---- @type integer -G_AC_NONE = (0 << G_MDSFT_ALPHACOMPARE) - ---- @type integer -G_AC_THRESHOLD = (1 << G_MDSFT_ALPHACOMPARE) - ---- @type integer -G_AD_DISABLE = (3 << G_MDSFT_ALPHADITHER) - ---- @type integer -G_AD_NOISE = (2 << G_MDSFT_ALPHADITHER) - ---- @type integer -G_AD_NOTPATTERN = (1 << G_MDSFT_ALPHADITHER) - ---- @type integer -G_AD_PATTERN = (0 << G_MDSFT_ALPHADITHER) - ---- @type integer -G_BL_0 = 3 - ---- @type integer -G_BL_1 = 2 - ---- @type integer -G_BL_1MA = 0 - ---- @type integer -G_BL_A_FOG = 1 - ---- @type integer -G_BL_A_IN = 0 - ---- @type integer -G_BL_A_MEM = 1 - ---- @type integer -G_BL_A_SHADE = 2 - ---- @type integer -G_BL_CLR_BL = 2 - ---- @type integer -G_BL_CLR_FOG = 3 - ---- @type integer -G_BL_CLR_IN = 0 - ---- @type integer -G_BL_CLR_MEM = 1 +G_CULLDL = 0x03 --- @type integer G_BRANCH_Z = 0x04 --- @type integer -G_CCMUX_0 = 31 +G_TRI1 = 0x05 --- @type integer -G_CCMUX_1 = 6 +G_TRI2 = 0x06 --- @type integer -G_CCMUX_CENTER = 6 +G_QUAD = 0x07 + +--- @type integer +G_LINE3D = 0x08 + +--- @type integer +G_SPNOOP = 0 + +--- @type integer +G_MTX = 1 + +--- @type integer +G_RESERVED0 = 2 + +--- @type integer +G_MOVEMEM = 3 + +--- @type integer +G_VTX = 4 + +--- @type integer +G_RESERVED1 = 5 + +--- @type integer +G_DL = 6 + +--- @type integer +G_RESERVED2 = 7 + +--- @type integer +G_RESERVED3 = 8 + +--- @type integer +G_SPRITE2D_BASE = 9 + +--- @type integer +G_IMMFIRST = -65 + +--- @type integer +G_TRI1 = (G_IMMFIRST-0) + +--- @type integer +G_CULLDL = (G_IMMFIRST-1) + +--- @type integer +G_POPMTX = (G_IMMFIRST-2) + +--- @type integer +G_MOVEWORD = (G_IMMFIRST-3) + +--- @type integer +G_TEXTURE = (G_IMMFIRST-4) + +--- @type integer +G_SETOTHERMODE_H = (G_IMMFIRST-5) + +--- @type integer +G_SETOTHERMODE_L = (G_IMMFIRST-6) + +--- @type integer +G_ENDDL = (G_IMMFIRST-7) + +--- @type integer +G_SETGEOMETRYMODE = (G_IMMFIRST-8) + +--- @type integer +G_CLEARGEOMETRYMODE = (G_IMMFIRST-9) + +--- @type integer +G_LINE3D = (G_IMMFIRST-10) + +--- @type integer +G_RDPHALF_1 = (G_IMMFIRST-11) + +--- @type integer +G_RDPHALF_2 = (G_IMMFIRST-12) + +--- @type integer +G_SPRITE2D_SCALEFLIP = (G_IMMFIRST-1) + +--- @type integer +G_SPRITE2D_DRAW = (G_IMMFIRST-2) + +--- @type integer +G_NOOP = 0xc0 + +--- @type integer +G_SETCIMG = 0xff + +--- @type integer +G_SETZIMG = 0xfe + +--- @type integer +G_SETTIMG = 0xfd + +--- @type integer +G_SETCOMBINE = 0xfc + +--- @type integer +G_SETENVCOLOR = 0xfb + +--- @type integer +G_SETPRIMCOLOR = 0xfa + +--- @type integer +G_SETBLENDCOLOR = 0xf9 + +--- @type integer +G_SETFOGCOLOR = 0xf8 + +--- @type integer +G_SETFILLCOLOR = 0xf7 + +--- @type integer +G_FILLRECT = 0xf6 + +--- @type integer +G_SETTILE = 0xf5 + +--- @type integer +G_LOADTILE = 0xf4 + +--- @type integer +G_LOADBLOCK = 0xf3 + +--- @type integer +G_SETTILESIZE = 0xf2 + +--- @type integer +G_LOADTLUT = 0xf0 + +--- @type integer +G_RDPSETOTHERMODE = 0xef + +--- @type integer +G_SETPRIMDEPTH = 0xee + +--- @type integer +G_SETSCISSOR = 0xed + +--- @type integer +G_SETCONVERT = 0xec + +--- @type integer +G_SETKEYR = 0xeb + +--- @type integer +G_SETKEYGB = 0xea + +--- @type integer +G_RDPFULLSYNC = 0xe9 + +--- @type integer +G_RDPTILESYNC = 0xe8 + +--- @type integer +G_RDPPIPESYNC = 0xe7 + +--- @type integer +G_RDPLOADSYNC = 0xe6 + +--- @type integer +G_TEXRECTFLIP = 0xe5 + +--- @type integer +G_TEXRECT = 0xe4 + +--- @type integer +G_TRI_FILL = 0xc8 + +--- @type integer +G_TRI_SHADE = 0xcc + +--- @type integer +G_TRI_TXTR = 0xca + +--- @type integer +G_TRI_SHADE_TXTR = 0xce + +--- @type integer +G_TRI_FILL_ZBUFF = 0xc9 + +--- @type integer +G_TRI_SHADE_ZBUFF = 0xcd + +--- @type integer +G_TRI_TXTR_ZBUFF = 0xcb + +--- @type integer +G_TRI_SHADE_TXTR_ZBUFF = 0xcf + +--- @type integer +G_RDP_TRI_FILL_MASK = 0x08 + +--- @type integer +G_RDP_TRI_SHADE_MASK = 0x04 + +--- @type integer +G_RDP_TRI_TXTR_MASK = 0x02 + +--- @type integer +G_RDP_TRI_ZBUFF_MASK = 0x01 + +--- @type integer +BOWTIE_VAL = 0 + +--- @type integer +G_RDP_ADDR_FIXUP = 3 + +--- @type integer +G_DMACMDSIZ = 128 + +--- @type integer +G_IMMCMDSIZ = 64 + +--- @type integer +G_RDPCMDSIZ = 64 + +--- @type integer +G_TEXTURE_IMAGE_FRAC = 2 + +--- @type integer +G_TEXTURE_SCALE_FRAC = 16 + +--- @type integer +G_SCALE_FRAC = 8 + +--- @type integer +G_ROTATE_FRAC = 16 + +--- @type integer +G_MAXFBZ = 0x3fff + +--- @type integer +G_ZBUFFER = 0x00000001 + +--- @type integer +G_SHADE = 0x00000004 + +--- @type integer +G_FOG = 0x00010000 + +--- @type integer +G_LIGHTING = 0x00020000 + +--- @type integer +G_TEXTURE_GEN = 0x00040000 + +--- @type integer +G_TEXTURE_GEN_LINEAR = 0x00080000 + +--- @type integer +G_LOD = 0x00100000 + +--- @type integer +G_IM_FMT_RGBA = 0 + +--- @type integer +G_IM_FMT_YUV = 1 + +--- @type integer +G_IM_FMT_CI = 2 + +--- @type integer +G_IM_FMT_IA = 3 + +--- @type integer +G_IM_FMT_I = 4 + +--- @type integer +G_IM_SIZ_4b = 0 + +--- @type integer +G_IM_SIZ_8b = 1 + +--- @type integer +G_IM_SIZ_16b = 2 + +--- @type integer +G_IM_SIZ_32b = 3 + +--- @type integer +G_IM_SIZ_DD = 5 + +--- @type integer +G_IM_SIZ_4b_BYTES = 0 + +--- @type integer +G_IM_SIZ_8b_BYTES = 1 + +--- @type integer +G_IM_SIZ_16b_BYTES = 2 + +--- @type integer +G_IM_SIZ_32b_BYTES = 4 + +--- @type integer +G_IM_SIZ_32b_TILE_BYTES = 2 + +--- @type integer +G_IM_SIZ_32b_LINE_BYTES = 2 + +--- @type integer +G_IM_SIZ_4b_SHIFT = 2 + +--- @type integer +G_IM_SIZ_8b_SHIFT = 1 + +--- @type integer +G_IM_SIZ_16b_SHIFT = 0 + +--- @type integer +G_IM_SIZ_32b_SHIFT = 0 + +--- @type integer +G_IM_SIZ_4b_INCR = 3 + +--- @type integer +G_IM_SIZ_8b_INCR = 1 + +--- @type integer +G_IM_SIZ_16b_INCR = 0 + +--- @type integer +G_IM_SIZ_32b_INCR = 0 --- @type integer G_CCMUX_COMBINED = 0 --- @type integer -G_CCMUX_COMBINED_ALPHA = 7 +G_CCMUX_TEXEL0 = 1 + +--- @type integer +G_CCMUX_TEXEL1 = 2 + +--- @type integer +G_CCMUX_PRIMITIVE = 3 + +--- @type integer +G_CCMUX_SHADE = 4 --- @type integer G_CCMUX_ENVIRONMENT = 5 +--- @type integer +G_CCMUX_CENTER = 6 + +--- @type integer +G_CCMUX_SCALE = 6 + +--- @type integer +G_CCMUX_COMBINED_ALPHA = 7 + +--- @type integer +G_CCMUX_TEXEL0_ALPHA = 8 + +--- @type integer +G_CCMUX_TEXEL1_ALPHA = 9 + +--- @type integer +G_CCMUX_PRIMITIVE_ALPHA = 10 + +--- @type integer +G_CCMUX_SHADE_ALPHA = 11 + --- @type integer G_CCMUX_ENV_ALPHA = 12 +--- @type integer +G_CCMUX_LOD_FRACTION = 13 + +--- @type integer +G_CCMUX_PRIM_LOD_FRAC = 14 + +--- @type integer +G_CCMUX_NOISE = 7 + --- @type integer G_CCMUX_K4 = 7 @@ -2782,49 +3088,175 @@ G_CCMUX_K4 = 7 G_CCMUX_K5 = 15 --- @type integer -G_CCMUX_LOD_FRACTION = 13 +G_CCMUX_1 = 6 --- @type integer -G_CCMUX_NOISE = 7 +G_CCMUX_0 = 31 --- @type integer -G_CCMUX_PRIMITIVE = 3 +G_ACMUX_COMBINED = 0 --- @type integer -G_CCMUX_PRIMITIVE_ALPHA = 10 +G_ACMUX_TEXEL0 = 1 --- @type integer -G_CCMUX_PRIM_LOD_FRAC = 14 +G_ACMUX_TEXEL1 = 2 --- @type integer -G_CCMUX_SCALE = 6 +G_ACMUX_PRIMITIVE = 3 --- @type integer -G_CCMUX_SHADE = 4 +G_ACMUX_SHADE = 4 --- @type integer -G_CCMUX_SHADE_ALPHA = 11 +G_ACMUX_ENVIRONMENT = 5 --- @type integer -G_CCMUX_TEXEL0 = 1 +G_ACMUX_LOD_FRACTION = 0 --- @type integer -G_CCMUX_TEXEL0_ALPHA = 8 +G_ACMUX_PRIM_LOD_FRAC = 6 --- @type integer -G_CCMUX_TEXEL1 = 2 +G_ACMUX_1 = 6 --- @type integer -G_CCMUX_TEXEL1_ALPHA = 9 +G_ACMUX_0 = 7 + +--- @type integer +G_MDSFT_ALPHACOMPARE = 0 + +--- @type integer +G_MDSFT_ZSRCSEL = 2 + +--- @type integer +G_MDSFT_RENDERMODE = 3 + +--- @type integer +G_MDSFT_BLENDER = 16 + +--- @type integer +G_MDSFT_BLENDMASK = 0 + +--- @type integer +G_MDSFT_ALPHADITHER = 4 + +--- @type integer +G_MDSFT_RGBDITHER = 6 + +--- @type integer +G_MDSFT_COMBKEY = 8 + +--- @type integer +G_MDSFT_TEXTCONV = 9 + +--- @type integer +G_MDSFT_TEXTFILT = 12 + +--- @type integer +G_MDSFT_TEXTLUT = 14 + +--- @type integer +G_MDSFT_TEXTLOD = 16 + +--- @type integer +G_MDSFT_TEXTDETAIL = 17 + +--- @type integer +G_MDSFT_TEXTPERSP = 19 + +--- @type integer +G_MDSFT_CYCLETYPE = 20 + +--- @type integer +G_MDSFT_COLORDITHER = 22 + +--- @type integer +G_MDSFT_PIPELINE = 23 + +--- @type integer +G_PM_1PRIMITIVE = (1 << G_MDSFT_PIPELINE) + +--- @type integer +G_PM_NPRIMITIVE = (0 << G_MDSFT_PIPELINE) + +--- @type integer +G_CYC_1CYCLE = (0 << G_MDSFT_CYCLETYPE) + +--- @type integer +G_CYC_2CYCLE = (1 << G_MDSFT_CYCLETYPE) + +--- @type integer +G_CYC_COPY = (2 << G_MDSFT_CYCLETYPE) + +--- @type integer +G_CYC_FILL = (3 << G_MDSFT_CYCLETYPE) + +--- @type integer +G_TP_NONE = (0 << G_MDSFT_TEXTPERSP) + +--- @type integer +G_TP_PERSP = (1 << G_MDSFT_TEXTPERSP) + +--- @type integer +G_TD_CLAMP = (0 << G_MDSFT_TEXTDETAIL) + +--- @type integer +G_TD_SHARPEN = (1 << G_MDSFT_TEXTDETAIL) + +--- @type integer +G_TD_DETAIL = (2 << G_MDSFT_TEXTDETAIL) + +--- @type integer +G_TL_TILE = (0 << G_MDSFT_TEXTLOD) + +--- @type integer +G_TL_LOD = (1 << G_MDSFT_TEXTLOD) + +--- @type integer +G_TT_NONE = (0 << G_MDSFT_TEXTLUT) + +--- @type integer +G_TT_RGBA16 = (2 << G_MDSFT_TEXTLUT) + +--- @type integer +G_TT_IA16 = (3 << G_MDSFT_TEXTLUT) + +--- @type integer +G_TF_POINT = (0 << G_MDSFT_TEXTFILT) + +--- @type integer +G_TF_AVERAGE = (3 << G_MDSFT_TEXTFILT) + +--- @type integer +G_TF_BILERP = (2 << G_MDSFT_TEXTFILT) + +--- @type integer +G_TC_CONV = (0 << G_MDSFT_TEXTCONV) + +--- @type integer +G_TC_FILTCONV = (5 << G_MDSFT_TEXTCONV) + +--- @type integer +G_TC_FILT = (6 << G_MDSFT_TEXTCONV) + +--- @type integer +G_CK_NONE = (0 << G_MDSFT_COMBKEY) + +--- @type integer +G_CK_KEY = (1 << G_MDSFT_COMBKEY) + +--- @type integer +G_CD_MAGICSQ = (0 << G_MDSFT_RGBDITHER) --- @type integer G_CD_BAYER = (1 << G_MDSFT_RGBDITHER) --- @type integer -G_CD_DISABLE = (3 << G_MDSFT_RGBDITHER) +G_CD_NOISE = (2 << G_MDSFT_RGBDITHER) --- @type integer -G_CD_DISABLE = (0 << G_MDSFT_COLORDITHER) +G_CD_DISABLE = (3 << G_MDSFT_RGBDITHER) --- @type integer G_CD_ENABLE = G_CD_NOISE @@ -2833,28 +3265,118 @@ G_CD_ENABLE = G_CD_NOISE G_CD_ENABLE = (1 << G_MDSFT_COLORDITHER) --- @type integer -G_CD_MAGICSQ = (0 << G_MDSFT_RGBDITHER) +G_CD_DISABLE = (0 << G_MDSFT_COLORDITHER) --- @type integer -G_CD_NOISE = (2 << G_MDSFT_RGBDITHER) +G_AD_PATTERN = (0 << G_MDSFT_ALPHADITHER) --- @type integer -G_CK_KEY = (1 << G_MDSFT_COMBKEY) +G_AD_NOTPATTERN = (1 << G_MDSFT_ALPHADITHER) --- @type integer -G_CK_NONE = (0 << G_MDSFT_COMBKEY) +G_AD_NOISE = (2 << G_MDSFT_ALPHADITHER) --- @type integer -G_CLEARGEOMETRYMODE = (G_IMMFIRST-9) +G_AD_DISABLE = (3 << G_MDSFT_ALPHADITHER) --- @type integer -G_COPYMEM = 0xd2 +G_AC_NONE = (0 << G_MDSFT_ALPHACOMPARE) --- @type integer -G_CULLDL = 0x03 +G_AC_THRESHOLD = (1 << G_MDSFT_ALPHACOMPARE) --- @type integer -G_CULLDL = (G_IMMFIRST-1) +G_AC_DITHER = (3 << G_MDSFT_ALPHACOMPARE) + +--- @type integer +G_ZS_PIXEL = (0 << G_MDSFT_ZSRCSEL) + +--- @type integer +G_ZS_PRIM = (1 << G_MDSFT_ZSRCSEL) + +--- @type integer +AA_EN = 0x8 + +--- @type integer +Z_CMP = 0x10 + +--- @type integer +Z_UPD = 0x20 + +--- @type integer +IM_RD = 0x40 + +--- @type integer +CLR_ON_CVG = 0x80 + +--- @type integer +CVG_DST_CLAMP = 0 + +--- @type integer +CVG_DST_WRAP = 0x100 + +--- @type integer +CVG_DST_FULL = 0x200 + +--- @type integer +CVG_DST_SAVE = 0x300 + +--- @type integer +ZMODE_OPA = 0 + +--- @type integer +ZMODE_INTER = 0x400 + +--- @type integer +ZMODE_XLU = 0x800 + +--- @type integer +ZMODE_DEC = 0xc00 + +--- @type integer +CVG_X_ALPHA = 0x1000 + +--- @type integer +ALPHA_CVG_SEL = 0x2000 + +--- @type integer +FORCE_BL = 0x4000 + +--- @type integer +TEX_EDGE = 0x0000 + +--- @type integer +G_BL_CLR_IN = 0 + +--- @type integer +G_BL_CLR_MEM = 1 + +--- @type integer +G_BL_CLR_BL = 2 + +--- @type integer +G_BL_CLR_FOG = 3 + +--- @type integer +G_BL_1MA = 0 + +--- @type integer +G_BL_A_MEM = 1 + +--- @type integer +G_BL_A_IN = 0 + +--- @type integer +G_BL_A_FOG = 1 + +--- @type integer +G_BL_A_SHADE = 2 + +--- @type integer +G_BL_1 = 2 + +--- @type integer +G_BL_0 = 3 --- @type integer G_CV_K0 = 175 @@ -2875,226 +3397,43 @@ G_CV_K4 = 114 G_CV_K5 = 42 --- @type integer -G_CYC_1CYCLE = (0 << G_MDSFT_CYCLETYPE) +G_SC_NON_INTERLACE = 0 --- @type integer -G_CYC_2CYCLE = (1 << G_MDSFT_CYCLETYPE) +G_SC_ODD_INTERLACE = 3 --- @type integer -G_CYC_COPY = (2 << G_MDSFT_CYCLETYPE) - ---- @type integer -G_CYC_FILL = (3 << G_MDSFT_CYCLETYPE) - ---- @type integer -G_DL = 0xde - ---- @type integer -G_DL = 6 - ---- @type integer -G_DL_NOPUSH = 0x01 +G_SC_EVEN_INTERLACE = 2 --- @type integer G_DL_PUSH = 0x00 --- @type integer -G_DMACMDSIZ = 128 +G_DL_NOPUSH = 0x01 --- @type integer -G_DMA_IO = 0xd6 +G_MW_MATRIX = 0x00 --- @type integer -G_ENDDL = 0xdf +G_MW_NUMLIGHT = 0x02 --- @type integer -G_ENDDL = (G_IMMFIRST-7) +G_MW_CLIP = 0x04 --- @type integer -G_FILLRECT = 0xf6 +G_MW_SEGMENT = 0x06 --- @type integer -G_FOG = 0x00010000 +G_MW_FOG = 0x08 --- @type integer -G_GEOMETRYMODE = 0xd9 +G_MW_LIGHTCOL = 0x0a --- @type integer -G_IMMCMDSIZ = 64 +G_MW_PERSPNORM = 0x0e --- @type integer -G_IMMFIRST = -65 - ---- @type integer -G_IM_FMT_CI = 2 - ---- @type integer -G_IM_FMT_I = 4 - ---- @type integer -G_IM_FMT_IA = 3 - ---- @type integer -G_IM_FMT_RGBA = 0 - ---- @type integer -G_IM_FMT_YUV = 1 - ---- @type integer -G_IM_SIZ_16b = 2 - ---- @type integer -G_IM_SIZ_16b_BYTES = 2 - ---- @type integer -G_IM_SIZ_16b_INCR = 0 - ---- @type integer -G_IM_SIZ_16b_SHIFT = 0 - ---- @type integer -G_IM_SIZ_32b = 3 - ---- @type integer -G_IM_SIZ_32b_BYTES = 4 - ---- @type integer -G_IM_SIZ_32b_INCR = 0 - ---- @type integer -G_IM_SIZ_32b_LINE_BYTES = 2 - ---- @type integer -G_IM_SIZ_32b_SHIFT = 0 - ---- @type integer -G_IM_SIZ_32b_TILE_BYTES = 2 - ---- @type integer -G_IM_SIZ_4b = 0 - ---- @type integer -G_IM_SIZ_4b_BYTES = 0 - ---- @type integer -G_IM_SIZ_4b_INCR = 3 - ---- @type integer -G_IM_SIZ_4b_SHIFT = 2 - ---- @type integer -G_IM_SIZ_8b = 1 - ---- @type integer -G_IM_SIZ_8b_BYTES = 1 - ---- @type integer -G_IM_SIZ_8b_INCR = 1 - ---- @type integer -G_IM_SIZ_8b_SHIFT = 1 - ---- @type integer -G_IM_SIZ_DD = 5 - ---- @type integer -G_LIGHTING = 0x00020000 - ---- @type integer -G_LINE3D = 0x08 - ---- @type integer -G_LINE3D = (G_IMMFIRST-10) - ---- @type integer -G_LOADBLOCK = 0xf3 - ---- @type integer -G_LOADTILE = 0xf4 - ---- @type integer -G_LOADTLUT = 0xf0 - ---- @type integer -G_LOAD_UCODE = 0xdd - ---- @type integer -G_LOD = 0x00100000 - ---- @type integer -G_MAXFBZ = 0x3fff - ---- @type integer -G_MDSFT_ALPHACOMPARE = 0 - ---- @type integer -G_MDSFT_ALPHADITHER = 4 - ---- @type integer -G_MDSFT_BLENDER = 16 - ---- @type integer -G_MDSFT_BLENDMASK = 0 - ---- @type integer -G_MDSFT_COLORDITHER = 22 - ---- @type integer -G_MDSFT_COMBKEY = 8 - ---- @type integer -G_MDSFT_CYCLETYPE = 20 - ---- @type integer -G_MDSFT_PIPELINE = 23 - ---- @type integer -G_MDSFT_RENDERMODE = 3 - ---- @type integer -G_MDSFT_RGBDITHER = 6 - ---- @type integer -G_MDSFT_TEXTCONV = 9 - ---- @type integer -G_MDSFT_TEXTDETAIL = 17 - ---- @type integer -G_MDSFT_TEXTFILT = 12 - ---- @type integer -G_MDSFT_TEXTLOD = 16 - ---- @type integer -G_MDSFT_TEXTLUT = 14 - ---- @type integer -G_MDSFT_TEXTPERSP = 19 - ---- @type integer -G_MDSFT_ZSRCSEL = 2 - ---- @type integer -G_MODIFYVTX = 0x02 - ---- @type integer -G_MOVEMEM = 0xdc - ---- @type integer -G_MOVEMEM = 3 - ---- @type integer -G_MOVEWORD = 0xdb - ---- @type integer -G_MOVEWORD = (G_IMMFIRST-3) - ---- @type integer -G_MTX = 0xda - ---- @type integer -G_MTX = 1 +G_MWO_NUMLIGHT = 0x00 --- @type integer G_MWO_CLIP_RNX = 0x04 @@ -3108,72 +3447,6 @@ G_MWO_CLIP_RPX = 0x14 --- @type integer G_MWO_CLIP_RPY = 0x1c ---- @type integer -G_MWO_FOG = 0x00 - ---- @type integer -G_MWO_MATRIX_WX_WY_F = 0x38 - ---- @type integer -G_MWO_MATRIX_WX_WY_I = 0x18 - ---- @type integer -G_MWO_MATRIX_WZ_WW_F = 0x3c - ---- @type integer -G_MWO_MATRIX_WZ_WW_I = 0x1c - ---- @type integer -G_MWO_MATRIX_XX_XY_F = 0x20 - ---- @type integer -G_MWO_MATRIX_XX_XY_I = 0x00 - ---- @type integer -G_MWO_MATRIX_XZ_XW_F = 0x24 - ---- @type integer -G_MWO_MATRIX_XZ_XW_I = 0x04 - ---- @type integer -G_MWO_MATRIX_YX_YY_F = 0x28 - ---- @type integer -G_MWO_MATRIX_YX_YY_I = 0x08 - ---- @type integer -G_MWO_MATRIX_YZ_YW_F = 0x2c - ---- @type integer -G_MWO_MATRIX_YZ_YW_I = 0x0c - ---- @type integer -G_MWO_MATRIX_ZX_ZY_F = 0x30 - ---- @type integer -G_MWO_MATRIX_ZX_ZY_I = 0x10 - ---- @type integer -G_MWO_MATRIX_ZZ_ZW_F = 0x34 - ---- @type integer -G_MWO_MATRIX_ZZ_ZW_I = 0x14 - ---- @type integer -G_MWO_NUMLIGHT = 0x00 - ---- @type integer -G_MWO_POINT_RGBA = 0x10 - ---- @type integer -G_MWO_POINT_ST = 0x14 - ---- @type integer -G_MWO_POINT_XYSCREEN = 0x18 - ---- @type integer -G_MWO_POINT_ZSCREEN = 0x1c - --- @type integer G_MWO_SEGMENT_0 = 0x00 @@ -3222,479 +3495,194 @@ G_MWO_SEGMENT_E = 0x0e --- @type integer G_MWO_SEGMENT_F = 0x0f +--- @type integer +G_MWO_FOG = 0x00 + --- @type integer G_MWO_aLIGHT_1 = 0x00 ---- @type integer -G_MWO_aLIGHT_2 = 0x18 - ---- @type integer -G_MWO_aLIGHT_2 = 0x20 - ---- @type integer -G_MWO_aLIGHT_3 = 0x30 - ---- @type integer -G_MWO_aLIGHT_3 = 0x40 - ---- @type integer -G_MWO_aLIGHT_4 = 0x48 - ---- @type integer -G_MWO_aLIGHT_4 = 0x60 - ---- @type integer -G_MWO_aLIGHT_5 = 0x60 - ---- @type integer -G_MWO_aLIGHT_5 = 0x80 - ---- @type integer -G_MWO_aLIGHT_6 = 0x78 - ---- @type integer -G_MWO_aLIGHT_6 = 0xa0 - ---- @type integer -G_MWO_aLIGHT_7 = 0x90 - ---- @type integer -G_MWO_aLIGHT_7 = 0xc0 - ---- @type integer -G_MWO_aLIGHT_8 = 0xa8 - ---- @type integer -G_MWO_aLIGHT_8 = 0xe0 - --- @type integer G_MWO_bLIGHT_1 = 0x04 +--- @type integer +G_MWO_aLIGHT_2 = 0x18 + --- @type integer G_MWO_bLIGHT_2 = 0x1c --- @type integer -G_MWO_bLIGHT_2 = 0x24 +G_MWO_aLIGHT_3 = 0x30 --- @type integer G_MWO_bLIGHT_3 = 0x34 --- @type integer -G_MWO_bLIGHT_3 = 0x44 +G_MWO_aLIGHT_4 = 0x48 --- @type integer G_MWO_bLIGHT_4 = 0x4c --- @type integer -G_MWO_bLIGHT_4 = 0x64 +G_MWO_aLIGHT_5 = 0x60 --- @type integer G_MWO_bLIGHT_5 = 0x64 --- @type integer -G_MWO_bLIGHT_5 = 0x84 +G_MWO_aLIGHT_6 = 0x78 --- @type integer G_MWO_bLIGHT_6 = 0x7c --- @type integer -G_MWO_bLIGHT_6 = 0xa4 +G_MWO_aLIGHT_7 = 0x90 --- @type integer G_MWO_bLIGHT_7 = 0x94 --- @type integer -G_MWO_bLIGHT_7 = 0xc4 +G_MWO_aLIGHT_8 = 0xa8 --- @type integer G_MWO_bLIGHT_8 = 0xac +--- @type integer +G_MWO_aLIGHT_2 = 0x20 + +--- @type integer +G_MWO_bLIGHT_2 = 0x24 + +--- @type integer +G_MWO_aLIGHT_3 = 0x40 + +--- @type integer +G_MWO_bLIGHT_3 = 0x44 + +--- @type integer +G_MWO_aLIGHT_4 = 0x60 + +--- @type integer +G_MWO_bLIGHT_4 = 0x64 + +--- @type integer +G_MWO_aLIGHT_5 = 0x80 + +--- @type integer +G_MWO_bLIGHT_5 = 0x84 + +--- @type integer +G_MWO_aLIGHT_6 = 0xa0 + +--- @type integer +G_MWO_bLIGHT_6 = 0xa4 + +--- @type integer +G_MWO_aLIGHT_7 = 0xc0 + +--- @type integer +G_MWO_bLIGHT_7 = 0xc4 + +--- @type integer +G_MWO_aLIGHT_8 = 0xe0 + --- @type integer G_MWO_bLIGHT_8 = 0xe4 --- @type integer -G_MW_CLIP = 0x04 +G_MWO_MATRIX_XX_XY_I = 0x00 --- @type integer -G_MW_FOG = 0x08 +G_MWO_MATRIX_XZ_XW_I = 0x04 --- @type integer -G_MW_LIGHTCOL = 0x0a +G_MWO_MATRIX_YX_YY_I = 0x08 --- @type integer -G_MW_MATRIX = 0x00 +G_MWO_MATRIX_YZ_YW_I = 0x0c --- @type integer -G_MW_NUMLIGHT = 0x02 +G_MWO_MATRIX_ZX_ZY_I = 0x10 --- @type integer -G_MW_PERSPNORM = 0x0e +G_MWO_MATRIX_ZZ_ZW_I = 0x14 --- @type integer -G_MW_SEGMENT = 0x06 +G_MWO_MATRIX_WX_WY_I = 0x18 --- @type integer -G_NOOP = 0x00 +G_MWO_MATRIX_WZ_WW_I = 0x1c --- @type integer -G_NOOP = 0xc0 +G_MWO_MATRIX_XX_XY_F = 0x20 --- @type integer -G_PM_1PRIMITIVE = (1 << G_MDSFT_PIPELINE) +G_MWO_MATRIX_XZ_XW_F = 0x24 --- @type integer -G_PM_NPRIMITIVE = (0 << G_MDSFT_PIPELINE) +G_MWO_MATRIX_YX_YY_F = 0x28 --- @type integer -G_POPMTX = 0xd8 +G_MWO_MATRIX_YZ_YW_F = 0x2c --- @type integer -G_POPMTX = (G_IMMFIRST-2) +G_MWO_MATRIX_ZX_ZY_F = 0x30 --- @type integer -G_QUAD = 0x07 +G_MWO_MATRIX_ZZ_ZW_F = 0x34 --- @type integer -G_RDPCMDSIZ = 64 +G_MWO_MATRIX_WX_WY_F = 0x38 --- @type integer -G_RDPFULLSYNC = 0xe9 +G_MWO_MATRIX_WZ_WW_F = 0x3c --- @type integer -G_RDPHALF_1 = 0xe1 +G_MWO_POINT_RGBA = 0x10 --- @type integer -G_RDPHALF_1 = (G_IMMFIRST-11) +G_MWO_POINT_ST = 0x14 --- @type integer -G_RDPHALF_2 = 0xf1 +G_MWO_POINT_XYSCREEN = 0x18 --- @type integer -G_RDPHALF_2 = (G_IMMFIRST-12) +G_MWO_POINT_ZSCREEN = 0x1c --- @type integer -G_RDPLOADSYNC = 0xe6 +FR_NEG_FRUSTRATIO_1 = 0x00000001 --- @type integer -G_RDPPIPESYNC = 0xe7 +FR_POS_FRUSTRATIO_1 = 0x0000ffff --- @type integer -G_RDPSETOTHERMODE = 0xef +FR_NEG_FRUSTRATIO_2 = 0x00000002 --- @type integer -G_RDPTILESYNC = 0xe8 +FR_POS_FRUSTRATIO_2 = 0x0000fffe --- @type integer -G_RDP_ADDR_FIXUP = 3 +FR_NEG_FRUSTRATIO_3 = 0x00000003 --- @type integer -G_RDP_TRI_FILL_MASK = 0x08 +FR_POS_FRUSTRATIO_3 = 0x0000fffd --- @type integer -G_RDP_TRI_SHADE_MASK = 0x04 +FR_NEG_FRUSTRATIO_4 = 0x00000004 --- @type integer -G_RDP_TRI_TXTR_MASK = 0x02 +FR_POS_FRUSTRATIO_4 = 0x0000fffc --- @type integer -G_RDP_TRI_ZBUFF_MASK = 0x01 +FR_NEG_FRUSTRATIO_5 = 0x00000005 --- @type integer -G_RESERVED0 = 2 +FR_POS_FRUSTRATIO_5 = 0x0000fffb --- @type integer -G_RESERVED1 = 5 +FR_NEG_FRUSTRATIO_6 = 0x00000006 --- @type integer -G_RESERVED2 = 7 - ---- @type integer -G_RESERVED3 = 8 - ---- @type integer -G_ROTATE_FRAC = 16 - ---- @type integer -G_SCALE_FRAC = 8 - ---- @type integer -G_SC_EVEN_INTERLACE = 2 - ---- @type integer -G_SC_NON_INTERLACE = 0 - ---- @type integer -G_SC_ODD_INTERLACE = 3 - ---- @type integer -G_SETBLENDCOLOR = 0xf9 - ---- @type integer -G_SETCIMG = 0xff - ---- @type integer -G_SETCOMBINE = 0xfc - ---- @type integer -G_SETCONVERT = 0xec - ---- @type integer -G_SETENVCOLOR = 0xfb - ---- @type integer -G_SETFILLCOLOR = 0xf7 - ---- @type integer -G_SETFOGCOLOR = 0xf8 - ---- @type integer -G_SETGEOMETRYMODE = (G_IMMFIRST-8) - ---- @type integer -G_SETKEYGB = 0xea - ---- @type integer -G_SETKEYR = 0xeb - ---- @type integer -G_SETOTHERMODE_H = 0xe3 - ---- @type integer -G_SETOTHERMODE_H = (G_IMMFIRST-5) - ---- @type integer -G_SETOTHERMODE_L = 0xe2 - ---- @type integer -G_SETOTHERMODE_L = (G_IMMFIRST-6) - ---- @type integer -G_SETPRIMCOLOR = 0xfa - ---- @type integer -G_SETPRIMDEPTH = 0xee - ---- @type integer -G_SETSCISSOR = 0xed - ---- @type integer -G_SETTILE = 0xf5 - ---- @type integer -G_SETTILESIZE = 0xf2 - ---- @type integer -G_SETTIMG = 0xfd - ---- @type integer -G_SETZIMG = 0xfe - ---- @type integer -G_SHADE = 0x00000004 - ---- @type integer -G_SPECIAL_1 = 0xd5 - ---- @type integer -G_SPECIAL_2 = 0xd4 - ---- @type integer -G_SPECIAL_3 = 0xd3 - ---- @type integer -G_SPNOOP = 0xe0 - ---- @type integer -G_SPNOOP = 0 - ---- @type integer -G_SPRITE2D_BASE = 9 - ---- @type integer -G_SPRITE2D_DRAW = (G_IMMFIRST-2) - ---- @type integer -G_SPRITE2D_SCALEFLIP = (G_IMMFIRST-1) - ---- @type integer -G_TC_CONV = (0 << G_MDSFT_TEXTCONV) - ---- @type integer -G_TC_FILT = (6 << G_MDSFT_TEXTCONV) - ---- @type integer -G_TC_FILTCONV = (5 << G_MDSFT_TEXTCONV) - ---- @type integer -G_TD_CLAMP = (0 << G_MDSFT_TEXTDETAIL) - ---- @type integer -G_TD_DETAIL = (2 << G_MDSFT_TEXTDETAIL) - ---- @type integer -G_TD_SHARPEN = (1 << G_MDSFT_TEXTDETAIL) - ---- @type integer -G_TEXRECT = 0xe4 - ---- @type integer -G_TEXRECTFLIP = 0xe5 - ---- @type integer -G_TEXTURE = 0xd7 - ---- @type integer -G_TEXTURE = (G_IMMFIRST-4) - ---- @type integer -G_TEXTURE_GEN = 0x00040000 - ---- @type integer -G_TEXTURE_GEN_LINEAR = 0x00080000 - ---- @type integer -G_TEXTURE_IMAGE_FRAC = 2 - ---- @type integer -G_TEXTURE_SCALE_FRAC = 16 - ---- @type integer -G_TF_AVERAGE = (3 << G_MDSFT_TEXTFILT) - ---- @type integer -G_TF_BILERP = (2 << G_MDSFT_TEXTFILT) - ---- @type integer -G_TF_POINT = (0 << G_MDSFT_TEXTFILT) - ---- @type integer -G_TL_LOD = (1 << G_MDSFT_TEXTLOD) - ---- @type integer -G_TL_TILE = (0 << G_MDSFT_TEXTLOD) - ---- @type integer -G_TP_NONE = (0 << G_MDSFT_TEXTPERSP) - ---- @type integer -G_TP_PERSP = (1 << G_MDSFT_TEXTPERSP) - ---- @type integer -G_TRI1 = 0x05 - ---- @type integer -G_TRI1 = (G_IMMFIRST-0) - ---- @type integer -G_TRI2 = 0x06 - ---- @type integer -G_TRI_FILL = 0xc8 - ---- @type integer -G_TRI_FILL_ZBUFF = 0xc9 - ---- @type integer -G_TRI_SHADE = 0xcc - ---- @type integer -G_TRI_SHADE_TXTR = 0xce - ---- @type integer -G_TRI_SHADE_TXTR_ZBUFF = 0xcf - ---- @type integer -G_TRI_SHADE_ZBUFF = 0xcd - ---- @type integer -G_TRI_TXTR = 0xca - ---- @type integer -G_TRI_TXTR_ZBUFF = 0xcb - ---- @type integer -G_TT_IA16 = (3 << G_MDSFT_TEXTLUT) - ---- @type integer -G_TT_NONE = (0 << G_MDSFT_TEXTLUT) - ---- @type integer -G_TT_RGBA16 = (2 << G_MDSFT_TEXTLUT) - ---- @type integer -G_TX_CLAMP = 0x2 - ---- @type integer -G_TX_DXT_FRAC = 11 - ---- @type integer -G_TX_LDBLK_MAX_TXL = 4095 - ---- @type integer -G_TX_LDBLK_MAX_TXL = 2047 - ---- @type integer -G_TX_LOADTILE = 7 - ---- @type integer -G_TX_MIRROR = 0x1 - ---- @type integer -G_TX_NOLOD = 0 - ---- @type integer -G_TX_NOMASK = 0 - ---- @type integer -G_TX_NOMIRROR = 0 - ---- @type integer -G_TX_RENDERTILE = 0 - ---- @type integer -G_TX_WRAP = 0 - ---- @type integer -G_VTX = 0x01 - ---- @type integer -G_VTX = 4 - ---- @type integer -G_ZBUFFER = 0x00000001 - ---- @type integer -G_ZS_PIXEL = (0 << G_MDSFT_ZSRCSEL) - ---- @type integer -G_ZS_PRIM = (1 << G_MDSFT_ZSRCSEL) - ---- @type integer -IM_RD = 0x40 - ---- @type integer -LIGHT_1 = 1 - ---- @type integer -LIGHT_2 = 2 - ---- @type integer -LIGHT_3 = 3 - ---- @type integer -LIGHT_4 = 4 - ---- @type integer -LIGHT_5 = 5 - ---- @type integer -LIGHT_6 = 6 - ---- @type integer -LIGHT_7 = 7 - ---- @type integer -LIGHT_8 = 8 +FR_POS_FRUSTRATIO_6 = 0x0000fffa --- @type integer NUMLIGHTS_0 = 1 @@ -3721,124 +3709,130 @@ NUMLIGHTS_6 = 6 NUMLIGHTS_7 = 7 --- @type integer -TEX_EDGE = 0x0000 +LIGHT_1 = 1 --- @type integer -ZMODE_DEC = 0xc00 +LIGHT_2 = 2 --- @type integer -ZMODE_INTER = 0x400 +LIGHT_3 = 3 --- @type integer -ZMODE_OPA = 0 +LIGHT_4 = 4 --- @type integer -ZMODE_XLU = 0x800 +LIGHT_5 = 5 --- @type integer -Z_CMP = 0x10 +LIGHT_6 = 6 --- @type integer -Z_UPD = 0x20 +LIGHT_7 = 7 --- @type integer -BACKGROUND_ABOVE_CLOUDS = 8 +LIGHT_8 = 8 --- @type integer -BACKGROUND_BELOW_CLOUDS = 3 +G_TX_LOADTILE = 7 --- @type integer -BACKGROUND_CUSTOM = 10 +G_TX_RENDERTILE = 0 --- @type integer -BACKGROUND_DESERT = 5 +G_TX_NOMIRROR = 0 --- @type integer -BACKGROUND_FLAMING_SKY = 1 +G_TX_WRAP = 0 --- @type integer -BACKGROUND_GREEN_SKY = 7 +G_TX_MIRROR = 0x1 --- @type integer -BACKGROUND_HAUNTED = 6 +G_TX_CLAMP = 0x2 + +--- @type integer +G_TX_NOMASK = 0 + +--- @type integer +G_TX_NOLOD = 0 + +--- @type integer +G_TX_DXT_FRAC = 11 + +--- @type integer +G_TX_LDBLK_MAX_TXL = 4095 + +--- @type integer +G_TX_LDBLK_MAX_TXL = 2047 --- @type integer BACKGROUND_OCEAN_SKY = 0 --- @type integer -BACKGROUND_PURPLE_SKY = 9 - ---- @type integer -BACKGROUND_SNOW_MOUNTAINS = 4 +BACKGROUND_FLAMING_SKY = 1 --- @type integer BACKGROUND_UNDERWATER_CITY = 2 --- @type integer -GEO_CONTEXT_AREA_INIT = 4 +BACKGROUND_BELOW_CLOUDS = 3 --- @type integer -GEO_CONTEXT_AREA_LOAD = 3 +BACKGROUND_SNOW_MOUNTAINS = 4 --- @type integer -GEO_CONTEXT_AREA_UNLOAD = 2 +BACKGROUND_DESERT = 5 --- @type integer -GEO_CONTEXT_CREATE = 0 +BACKGROUND_HAUNTED = 6 --- @type integer -GEO_CONTEXT_HELD_OBJ = 5 +BACKGROUND_GREEN_SKY = 7 --- @type integer -GEO_CONTEXT_RENDER = 1 +BACKGROUND_ABOVE_CLOUDS = 8 --- @type integer -GFX_NUM_MASTER_LISTS = 8 +BACKGROUND_PURPLE_SKY = 9 + +--- @type integer +BACKGROUND_CUSTOM = 10 + +--- @type integer +GRAPH_RENDER_ACTIVE = (1 << 0) + +--- @type integer +GRAPH_RENDER_CHILDREN_FIRST = (1 << 1) + +--- @type integer +GRAPH_RENDER_BILLBOARD = (1 << 2) + +--- @type integer +GRAPH_RENDER_Z_BUFFER = (1 << 3) + +--- @type integer +GRAPH_RENDER_INVISIBLE = (1 << 4) + +--- @type integer +GRAPH_RENDER_HAS_ANIMATION = (1 << 5) + +--- @type integer +GRAPH_RENDER_CYLBOARD = (1 << 6) + +--- @type integer +GRAPH_RENDER_PLAYER = (1 << 7) --- @type integer GRAPH_EXTRA_FORCE_3D = (1 << 0) ---- @type integer -GRAPH_NODE_TYPE_400 = 0x400 - ---- @type integer -GRAPH_NODE_TYPE_ANIMATED_PART = 0x019 - ---- @type integer -GRAPH_NODE_TYPE_BACKGROUND = (0x02C | GRAPH_NODE_TYPE_FUNCTIONAL) - ---- @type integer -GRAPH_NODE_TYPE_BILLBOARD = 0x01A - ---- @type integer -GRAPH_NODE_TYPE_CAMERA = (0x014 | GRAPH_NODE_TYPE_FUNCTIONAL) - ---- @type integer -GRAPH_NODE_TYPE_CULLING_RADIUS = 0x02F - ---- @type integer -GRAPH_NODE_TYPE_DISPLAY_LIST = 0x01B - --- @type integer GRAPH_NODE_TYPE_FUNCTIONAL = 0x100 --- @type integer -GRAPH_NODE_TYPE_GENERATED_LIST = (0x02A | GRAPH_NODE_TYPE_FUNCTIONAL) +GRAPH_NODE_TYPE_400 = 0x400 --- @type integer -GRAPH_NODE_TYPE_HELD_OBJ = (0x02E | GRAPH_NODE_TYPE_FUNCTIONAL) - ---- @type integer -GRAPH_NODE_TYPE_LEVEL_OF_DETAIL = 0x00B - ---- @type integer -GRAPH_NODE_TYPE_MASTER_LIST = 0x004 - ---- @type integer -GRAPH_NODE_TYPE_OBJECT = 0x018 - ---- @type integer -GRAPH_NODE_TYPE_OBJECT_PARENT = 0x029 +GRAPH_NODE_TYPE_ROOT = 0x001 --- @type integer GRAPH_NODE_TYPE_ORTHO_PROJECTION = 0x002 @@ -3847,11 +3841,41 @@ GRAPH_NODE_TYPE_ORTHO_PROJECTION = 0x002 GRAPH_NODE_TYPE_PERSPECTIVE = (0x003 | GRAPH_NODE_TYPE_FUNCTIONAL) --- @type integer -GRAPH_NODE_TYPE_ROOT = 0x001 +GRAPH_NODE_TYPE_MASTER_LIST = 0x004 + +--- @type integer +GRAPH_NODE_TYPE_START = 0x00A + +--- @type integer +GRAPH_NODE_TYPE_LEVEL_OF_DETAIL = 0x00B + +--- @type integer +GRAPH_NODE_TYPE_SWITCH_CASE = (0x00C | GRAPH_NODE_TYPE_FUNCTIONAL) + +--- @type integer +GRAPH_NODE_TYPE_CAMERA = (0x014 | GRAPH_NODE_TYPE_FUNCTIONAL) + +--- @type integer +GRAPH_NODE_TYPE_TRANSLATION_ROTATION = 0x015 + +--- @type integer +GRAPH_NODE_TYPE_TRANSLATION = 0x016 --- @type integer GRAPH_NODE_TYPE_ROTATION = 0x017 +--- @type integer +GRAPH_NODE_TYPE_OBJECT = 0x018 + +--- @type integer +GRAPH_NODE_TYPE_ANIMATED_PART = 0x019 + +--- @type integer +GRAPH_NODE_TYPE_BILLBOARD = 0x01A + +--- @type integer +GRAPH_NODE_TYPE_DISPLAY_LIST = 0x01B + --- @type integer GRAPH_NODE_TYPE_SCALE = 0x01C @@ -3859,204 +3883,44 @@ GRAPH_NODE_TYPE_SCALE = 0x01C GRAPH_NODE_TYPE_SHADOW = 0x028 --- @type integer -GRAPH_NODE_TYPE_START = 0x00A +GRAPH_NODE_TYPE_OBJECT_PARENT = 0x029 --- @type integer -GRAPH_NODE_TYPE_SWITCH_CASE = (0x00C | GRAPH_NODE_TYPE_FUNCTIONAL) +GRAPH_NODE_TYPE_GENERATED_LIST = (0x02A | GRAPH_NODE_TYPE_FUNCTIONAL) --- @type integer -GRAPH_NODE_TYPE_TRANSLATION = 0x016 +GRAPH_NODE_TYPE_BACKGROUND = (0x02C | GRAPH_NODE_TYPE_FUNCTIONAL) --- @type integer -GRAPH_NODE_TYPE_TRANSLATION_ROTATION = 0x015 +GRAPH_NODE_TYPE_HELD_OBJ = (0x02E | GRAPH_NODE_TYPE_FUNCTIONAL) --- @type integer -GRAPH_RENDER_ACTIVE = (1 << 0) +GRAPH_NODE_TYPE_CULLING_RADIUS = 0x02F --- @type integer -GRAPH_RENDER_BILLBOARD = (1 << 2) +GFX_NUM_MASTER_LISTS = 8 --- @type integer -GRAPH_RENDER_CHILDREN_FIRST = (1 << 1) +GEO_CONTEXT_CREATE = 0 --- @type integer -GRAPH_RENDER_CYLBOARD = (1 << 6) +GEO_CONTEXT_RENDER = 1 --- @type integer -GRAPH_RENDER_HAS_ANIMATION = (1 << 5) +GEO_CONTEXT_AREA_UNLOAD = 2 --- @type integer -GRAPH_RENDER_INVISIBLE = (1 << 4) +GEO_CONTEXT_AREA_LOAD = 3 --- @type integer -GRAPH_RENDER_PLAYER = (1 << 7) +GEO_CONTEXT_AREA_INIT = 4 --- @type integer -GRAPH_RENDER_Z_BUFFER = (1 << 3) - ---- @type integer -ATTACK_FAST_ATTACK = 5 - ---- @type integer -ATTACK_FROM_ABOVE = 3 - ---- @type integer -ATTACK_FROM_BELOW = 6 - ---- @type integer -ATTACK_GROUND_POUND_OR_TWIRL = 4 - ---- @type integer -ATTACK_KICK_OR_TRIP = 2 - ---- @type integer -ATTACK_PUNCH = 1 +GEO_CONTEXT_HELD_OBJ = 5 --- @type integer INTERACT_UNKNOWN_08 = (1 << 8) ---- @type integer -INT_ANY_ATTACK = (INT_GROUND_POUND_OR_TWIRL | INT_PUNCH | INT_KICK | INT_TRIP | INT_SLIDE_KICK | INT_FAST_ATTACK_OR_SHELL | INT_HIT_FROM_ABOVE | INT_HIT_FROM_BELOW) - ---- @type integer -INT_ATTACK_NOT_FROM_BELOW = (INT_GROUND_POUND_OR_TWIRL | INT_PUNCH | INT_KICK | INT_TRIP | INT_SLIDE_KICK | INT_FAST_ATTACK_OR_SHELL | INT_HIT_FROM_ABOVE) - ---- @type integer -INT_ATTACK_NOT_WEAK_FROM_ABOVE = (INT_GROUND_POUND_OR_TWIRL | INT_PUNCH | INT_KICK | INT_TRIP | INT_HIT_FROM_BELOW) - ---- @type integer -INT_ATTACK_SLIDE = (INT_SLIDE_KICK | INT_FAST_ATTACK_OR_SHELL) - ---- @type integer -INT_STATUS_ATTACKED_MARIO = (1 << 13) - ---- @type integer -INT_STATUS_ATTACK_MASK = 0x000000FF - ---- @type integer -INT_STATUS_GRABBED_MARIO = (1 << 11) - ---- @type integer -INT_STATUS_HIT_BY_SHOCKWAVE = (1 << 4) - ---- @type integer -INT_STATUS_HIT_MINE = (1 << 21) - ---- @type integer -INT_STATUS_HOOT_GRABBED_BY_MARIO = (1 << 0) - ---- @type integer -INT_STATUS_INTERACTED = (1 << 15) - ---- @type integer -INT_STATUS_MARIO_DROP_OBJECT = (1 << 3) - ---- @type integer -INT_STATUS_MARIO_UNK1 = (1 << 1) - ---- @type integer -INT_STATUS_MARIO_UNK2 = (1 << 2) - ---- @type integer -INT_STATUS_MARIO_UNK5 = (1 << 5) - ---- @type integer -INT_STATUS_MARIO_UNK6 = (1 << 6) - ---- @type integer -INT_STATUS_MARIO_UNK7 = (1 << 7) - ---- @type integer -INT_STATUS_STOP_RIDING = (1 << 22) - ---- @type integer -INT_STATUS_TOUCHED_BOB_OMB = (1 << 23) - ---- @type integer -INT_STATUS_TRAP_TURN = (1 << 20) - ---- @type integer -INT_STATUS_WAS_ATTACKED = (1 << 14) - ---- @type integer -INT_SUBTYPE_BIG_KNOCKBACK = 0x00000008 - ---- @type integer -INT_SUBTYPE_DELAY_INVINCIBILITY = 0x00000002 - ---- @type integer -INT_SUBTYPE_DROP_IMMEDIATELY = 0x00000040 - ---- @type integer -INT_SUBTYPE_EATS_MARIO = 0x00002000 - ---- @type integer -INT_SUBTYPE_FADING_WARP = 0x00000001 - ---- @type integer -INT_SUBTYPE_GRABS_MARIO = 0x00000004 - ---- @type integer -INT_SUBTYPE_GRAND_STAR = 0x00000800 - ---- @type integer -INT_SUBTYPE_HOLDABLE_NPC = 0x00000010 - ---- @type integer -INT_SUBTYPE_KICKABLE = 0x00000100 - ---- @type integer -INT_SUBTYPE_NOT_GRABBABLE = 0x00000200 - ---- @type integer -INT_SUBTYPE_NO_EXIT = 0x00000400 - ---- @type integer -INT_SUBTYPE_NPC = 0x00004000 - ---- @type integer -INT_SUBTYPE_SIGN = 0x00001000 - ---- @type integer -INT_SUBTYPE_STAR_DOOR = 0x00000020 - ---- @type integer -INT_SUBTYPE_TWIRL_BOUNCE = 0x00000080 - ---- @type integer -PVP_ATTACK_KNOCKBACK_TIMER_DEFAULT = 10 - ---- @type integer -PVP_ATTACK_KNOCKBACK_TIMER_OVERRIDE = -5 - ---- @type integer -PVP_ATTACK_OVERRIDE_VANILLA_INVINCIBILITY = 0x0000FFFF - -INT_GROUND_POUND = (1 << 0) --- @type InteractionFlag -INT_PUNCH = (1 << 1) --- @type InteractionFlag -INT_KICK = (1 << 2) --- @type InteractionFlag -INT_TRIP = (1 << 3) --- @type InteractionFlag -INT_SLIDE_KICK = (1 << 4) --- @type InteractionFlag -INT_FAST_ATTACK_OR_SHELL = (1 << 5) --- @type InteractionFlag -INT_HIT_FROM_ABOVE = (1 << 6) --- @type InteractionFlag -INT_HIT_FROM_BELOW = (1 << 7) --- @type InteractionFlag -INT_TWIRL = (1 << 8) --- @type InteractionFlag -INT_GROUND_POUND_OR_TWIRL = (INT_GROUND_POUND | INT_TWIRL) --- @type InteractionFlag -INT_LUA = (1 << 31) --- @type InteractionFlag - ---- @alias InteractionFlag ---- | `INT_GROUND_POUND` ---- | `INT_PUNCH` ---- | `INT_KICK` ---- | `INT_TRIP` ---- | `INT_SLIDE_KICK` ---- | `INT_FAST_ATTACK_OR_SHELL` ---- | `INT_HIT_FROM_ABOVE` ---- | `INT_HIT_FROM_BELOW` ---- | `INT_TWIRL` ---- | `INT_GROUND_POUND_OR_TWIRL` ---- | `INT_LUA` - INTERACT_HOOT = (1 << 0) --- @type InteractionType INTERACT_GRABBABLE = (1 << 1) --- @type InteractionType INTERACT_DOOR = (1 << 2) --- @type InteractionType @@ -4124,6 +3988,166 @@ INTERACT_PLAYER = (1 << 31) --- @type InteractionType --- | `INTERACT_IGLOO_BARRIER` --- | `INTERACT_PLAYER` +INT_GROUND_POUND = (1 << 0) --- @type InteractionFlag +INT_PUNCH = (1 << 1) --- @type InteractionFlag +INT_KICK = (1 << 2) --- @type InteractionFlag +INT_TRIP = (1 << 3) --- @type InteractionFlag +INT_SLIDE_KICK = (1 << 4) --- @type InteractionFlag +INT_FAST_ATTACK_OR_SHELL = (1 << 5) --- @type InteractionFlag +INT_HIT_FROM_ABOVE = (1 << 6) --- @type InteractionFlag +INT_HIT_FROM_BELOW = (1 << 7) --- @type InteractionFlag +INT_TWIRL = (1 << 8) --- @type InteractionFlag +INT_GROUND_POUND_OR_TWIRL = (INT_GROUND_POUND | INT_TWIRL) --- @type InteractionFlag +INT_LUA = (1 << 31) --- @type InteractionFlag + +--- @alias InteractionFlag +--- | `INT_GROUND_POUND` +--- | `INT_PUNCH` +--- | `INT_KICK` +--- | `INT_TRIP` +--- | `INT_SLIDE_KICK` +--- | `INT_FAST_ATTACK_OR_SHELL` +--- | `INT_HIT_FROM_ABOVE` +--- | `INT_HIT_FROM_BELOW` +--- | `INT_TWIRL` +--- | `INT_GROUND_POUND_OR_TWIRL` +--- | `INT_LUA` + +--- @type integer +INT_ATTACK_NOT_FROM_BELOW = (INT_GROUND_POUND_OR_TWIRL | INT_PUNCH | INT_KICK | INT_TRIP | INT_SLIDE_KICK | INT_FAST_ATTACK_OR_SHELL | INT_HIT_FROM_ABOVE) + +--- @type integer +INT_ANY_ATTACK = (INT_GROUND_POUND_OR_TWIRL | INT_PUNCH | INT_KICK | INT_TRIP | INT_SLIDE_KICK | INT_FAST_ATTACK_OR_SHELL | INT_HIT_FROM_ABOVE | INT_HIT_FROM_BELOW) + +--- @type integer +INT_ATTACK_NOT_WEAK_FROM_ABOVE = (INT_GROUND_POUND_OR_TWIRL | INT_PUNCH | INT_KICK | INT_TRIP | INT_HIT_FROM_BELOW) + +--- @type integer +INT_ATTACK_SLIDE = (INT_SLIDE_KICK | INT_FAST_ATTACK_OR_SHELL) + +--- @type integer +INT_SUBTYPE_FADING_WARP = 0x00000001 + +--- @type integer +INT_SUBTYPE_DELAY_INVINCIBILITY = 0x00000002 + +--- @type integer +INT_SUBTYPE_BIG_KNOCKBACK = 0x00000008 + +--- @type integer +INT_SUBTYPE_GRABS_MARIO = 0x00000004 + +--- @type integer +INT_SUBTYPE_HOLDABLE_NPC = 0x00000010 + +--- @type integer +INT_SUBTYPE_DROP_IMMEDIATELY = 0x00000040 + +--- @type integer +INT_SUBTYPE_KICKABLE = 0x00000100 + +--- @type integer +INT_SUBTYPE_NOT_GRABBABLE = 0x00000200 + +--- @type integer +INT_SUBTYPE_STAR_DOOR = 0x00000020 + +--- @type integer +INT_SUBTYPE_TWIRL_BOUNCE = 0x00000080 + +--- @type integer +INT_SUBTYPE_NO_EXIT = 0x00000400 + +--- @type integer +INT_SUBTYPE_GRAND_STAR = 0x00000800 + +--- @type integer +INT_SUBTYPE_SIGN = 0x00001000 + +--- @type integer +INT_SUBTYPE_NPC = 0x00004000 + +--- @type integer +INT_SUBTYPE_EATS_MARIO = 0x00002000 + +--- @type integer +ATTACK_PUNCH = 1 + +--- @type integer +ATTACK_KICK_OR_TRIP = 2 + +--- @type integer +ATTACK_FROM_ABOVE = 3 + +--- @type integer +ATTACK_GROUND_POUND_OR_TWIRL = 4 + +--- @type integer +ATTACK_FAST_ATTACK = 5 + +--- @type integer +ATTACK_FROM_BELOW = 6 + +--- @type integer +PVP_ATTACK_KNOCKBACK_TIMER_DEFAULT = 10 + +--- @type integer +PVP_ATTACK_KNOCKBACK_TIMER_OVERRIDE = -5 + +--- @type integer +PVP_ATTACK_OVERRIDE_VANILLA_INVINCIBILITY = 0x0000FFFF + +--- @type integer +INT_STATUS_ATTACK_MASK = 0x000000FF + +--- @type integer +INT_STATUS_HOOT_GRABBED_BY_MARIO = (1 << 0) + +--- @type integer +INT_STATUS_MARIO_UNK1 = (1 << 1) + +--- @type integer +INT_STATUS_MARIO_UNK2 = (1 << 2) + +--- @type integer +INT_STATUS_MARIO_DROP_OBJECT = (1 << 3) + +--- @type integer +INT_STATUS_HIT_BY_SHOCKWAVE = (1 << 4) + +--- @type integer +INT_STATUS_MARIO_UNK5 = (1 << 5) + +--- @type integer +INT_STATUS_MARIO_UNK6 = (1 << 6) + +--- @type integer +INT_STATUS_MARIO_UNK7 = (1 << 7) + +--- @type integer +INT_STATUS_GRABBED_MARIO = (1 << 11) + +--- @type integer +INT_STATUS_ATTACKED_MARIO = (1 << 13) + +--- @type integer +INT_STATUS_WAS_ATTACKED = (1 << 14) + +--- @type integer +INT_STATUS_INTERACTED = (1 << 15) + +--- @type integer +INT_STATUS_TRAP_TURN = (1 << 20) + +--- @type integer +INT_STATUS_HIT_MINE = (1 << 21) + +--- @type integer +INT_STATUS_STOP_RIDING = (1 << 22) + +--- @type integer +INT_STATUS_TOUCHED_BOB_OMB = (1 << 23) + --- @type integer MAX_LOCAL_STATE_HISTORY = 30 @@ -4217,25 +4241,70 @@ LEVEL_COUNT = 39 --- @type LevelNum --- | `LEVEL_COUNT` --- @type integer -MARIO_SPAWN_UNKNOWN_02 = 0x02 +TIMER_CONTROL_SHOW = 0 --- @type integer -MARIO_SPAWN_UNKNOWN_03 = 0x03 +TIMER_CONTROL_START = 1 --- @type integer -MARIO_SPAWN_UNKNOWN_27 = 0x27 +TIMER_CONTROL_STOP = 2 --- @type integer -PAINTING_WARP_INDEX_END = 0x2D +TIMER_CONTROL_HIDE = 3 --- @type integer -PAINTING_WARP_INDEX_FA = 0x2A +WARP_OP_NONE = 0x00 --- @type integer -PAINTING_WARP_INDEX_START = 0x00 +WARP_OP_LOOK_UP = 0x01 --- @type integer -PRESS_START_DEMO_TIMER = 800 +WARP_OP_SPIN_SHRINK = 0x02 + +--- @type integer +WARP_OP_WARP_DOOR = 0x03 + +--- @type integer +WARP_OP_WARP_OBJECT = 0x04 + +--- @type integer +WARP_OP_TELEPORT = 0x05 + +--- @type integer +WARP_OP_STAR_EXIT = 0x11 + +--- @type integer +WARP_OP_DEATH = 0x12 + +--- @type integer +WARP_OP_WARP_FLOOR = 0x13 + +--- @type integer +WARP_OP_GAME_OVER = 0x14 + +--- @type integer +WARP_OP_CREDITS_END = 0x15 + +--- @type integer +WARP_OP_DEMO_NEXT = 0x16 + +--- @type integer +WARP_OP_CREDITS_START = 0x17 + +--- @type integer +WARP_OP_CREDITS_NEXT = 0x18 + +--- @type integer +WARP_OP_DEMO_END = 0x19 + +--- @type integer +WARP_OP_FORCE_SYNC = 0x20 + +--- @type integer +WARP_OP_EXIT = 0x21 + +--- @type integer +WARP_OP_TRIGGERS_LEVEL_SELECT = 0x10 --- @type integer SPECIAL_WARP_CAKE = -1 @@ -4246,140 +4315,11 @@ SPECIAL_WARP_GODDARD = -2 --- @type integer SPECIAL_WARP_GODDARD_GAMEOVER = -3 ---- @type integer -SPECIAL_WARP_LEVEL_SELECT = -9 - --- @type integer SPECIAL_WARP_TITLE = -8 --- @type integer -TIMER_CONTROL_HIDE = 3 - ---- @type integer -TIMER_CONTROL_SHOW = 0 - ---- @type integer -TIMER_CONTROL_START = 1 - ---- @type integer -TIMER_CONTROL_STOP = 2 - ---- @type integer -WARP_NODE_CREDITS_END = 0xFA - ---- @type integer -WARP_NODE_CREDITS_MIN = 0xF8 - ---- @type integer -WARP_NODE_CREDITS_NEXT = 0xF9 - ---- @type integer -WARP_NODE_CREDITS_START = 0xF8 - ---- @type integer -WARP_NODE_DEATH = 0xF1 - ---- @type integer -WARP_NODE_F0 = 0xF0 - ---- @type integer -WARP_NODE_F2 = 0xF2 - ---- @type integer -WARP_NODE_WARP_FLOOR = 0xF3 - ---- @type integer -WARP_OP_CREDITS_END = 0x15 - ---- @type integer -WARP_OP_CREDITS_NEXT = 0x18 - ---- @type integer -WARP_OP_CREDITS_START = 0x17 - ---- @type integer -WARP_OP_DEATH = 0x12 - ---- @type integer -WARP_OP_DEMO_END = 0x19 - ---- @type integer -WARP_OP_DEMO_NEXT = 0x16 - ---- @type integer -WARP_OP_EXIT = 0x21 - ---- @type integer -WARP_OP_FORCE_SYNC = 0x20 - ---- @type integer -WARP_OP_GAME_OVER = 0x14 - ---- @type integer -WARP_OP_LOOK_UP = 0x01 - ---- @type integer -WARP_OP_NONE = 0x00 - ---- @type integer -WARP_OP_SPIN_SHRINK = 0x02 - ---- @type integer -WARP_OP_STAR_EXIT = 0x11 - ---- @type integer -WARP_OP_TELEPORT = 0x05 - ---- @type integer -WARP_OP_TRIGGERS_LEVEL_SELECT = 0x10 - ---- @type integer -WARP_OP_WARP_DOOR = 0x03 - ---- @type integer -WARP_OP_WARP_FLOOR = 0x13 - ---- @type integer -WARP_OP_WARP_OBJECT = 0x04 - ---- @type integer -WARP_TYPE_CHANGE_AREA = 2 - ---- @type integer -WARP_TYPE_CHANGE_LEVEL = 1 - ---- @type integer -WARP_TYPE_NOT_WARPING = 0 - ---- @type integer -WARP_TYPE_SAME_AREA = 3 - -HUD_DISPLAY_FLAG_LIVES = 0x0001 --- @type HUDDisplayFlag -HUD_DISPLAY_FLAG_COIN_COUNT = 0x0002 --- @type HUDDisplayFlag -HUD_DISPLAY_FLAG_STAR_COUNT = 0x0004 --- @type HUDDisplayFlag -HUD_DISPLAY_FLAG_CAMERA_AND_POWER = 0x0008 --- @type HUDDisplayFlag -HUD_DISPLAY_FLAG_KEYS = 0x0010 --- @type HUDDisplayFlag -HUD_DISPLAY_FLAG_UNKNOWN_0020 = 0x0020 --- @type HUDDisplayFlag -HUD_DISPLAY_FLAG_TIMER = 0x0040 --- @type HUDDisplayFlag -HUD_DISPLAY_FLAG_CAMERA = 0x0080 --- @type HUDDisplayFlag -HUD_DISPLAY_FLAG_POWER = 0x0100 --- @type HUDDisplayFlag -HUD_DISPLAY_FLAG_EMPHASIZE_POWER = 0x8000 --- @type HUDDisplayFlag -HUD_DISPLAY_NONE = 0x0000 --- @type HUDDisplayFlag -HUD_DISPLAY_DEFAULT = HUD_DISPLAY_FLAG_LIVES | HUD_DISPLAY_FLAG_COIN_COUNT | HUD_DISPLAY_FLAG_STAR_COUNT | HUD_DISPLAY_FLAG_CAMERA_AND_POWER | HUD_DISPLAY_FLAG_CAMERA | HUD_DISPLAY_FLAG_POWER | HUD_DISPLAY_FLAG_KEYS | HUD_DISPLAY_FLAG_UNKNOWN_0020 --- @type HUDDisplayFlag - ---- @alias HUDDisplayFlag ---- | `HUD_DISPLAY_FLAG_LIVES` ---- | `HUD_DISPLAY_FLAG_COIN_COUNT` ---- | `HUD_DISPLAY_FLAG_STAR_COUNT` ---- | `HUD_DISPLAY_FLAG_CAMERA_AND_POWER` ---- | `HUD_DISPLAY_FLAG_KEYS` ---- | `HUD_DISPLAY_FLAG_UNKNOWN_0020` ---- | `HUD_DISPLAY_FLAG_TIMER` ---- | `HUD_DISPLAY_FLAG_CAMERA` ---- | `HUD_DISPLAY_FLAG_POWER` ---- | `HUD_DISPLAY_FLAG_EMPHASIZE_POWER` ---- | `HUD_DISPLAY_NONE` ---- | `HUD_DISPLAY_DEFAULT` +SPECIAL_WARP_LEVEL_SELECT = -9 MARIO_SPAWN_NONE = 0 --- @type MarioSpawnType MARIO_SPAWN_DOOR_WARP = 1 --- @type MarioSpawnType @@ -4426,6 +4366,511 @@ MARIO_SPAWN_FADE_FROM_BLACK = ((MARIO_SPAWN_PAINTING_STAR_COLLECT ) + 7) - --- | `MARIO_SPAWN_UNUSED_38` --- | `MARIO_SPAWN_FADE_FROM_BLACK` +--- @type integer +MARIO_SPAWN_UNKNOWN_02 = 0x02 + +--- @type integer +MARIO_SPAWN_UNKNOWN_03 = 0x03 + +--- @type integer +MARIO_SPAWN_UNKNOWN_27 = 0x27 + +--- @type integer +WARP_NODE_F0 = 0xF0 + +--- @type integer +WARP_NODE_DEATH = 0xF1 + +--- @type integer +WARP_NODE_F2 = 0xF2 + +--- @type integer +WARP_NODE_WARP_FLOOR = 0xF3 + +--- @type integer +WARP_NODE_CREDITS_START = 0xF8 + +--- @type integer +WARP_NODE_CREDITS_NEXT = 0xF9 + +--- @type integer +WARP_NODE_CREDITS_END = 0xFA + +--- @type integer +WARP_NODE_CREDITS_MIN = 0xF8 + +--- @type integer +WARP_TYPE_NOT_WARPING = 0 + +--- @type integer +WARP_TYPE_CHANGE_LEVEL = 1 + +--- @type integer +WARP_TYPE_CHANGE_AREA = 2 + +--- @type integer +WARP_TYPE_SAME_AREA = 3 + +--- @type integer +PRESS_START_DEMO_TIMER = 800 + +--- @type integer +PAINTING_WARP_INDEX_START = 0x00 + +--- @type integer +PAINTING_WARP_INDEX_FA = 0x2A + +--- @type integer +PAINTING_WARP_INDEX_END = 0x2D + +HUD_DISPLAY_FLAG_LIVES = 0x0001 --- @type HUDDisplayFlag +HUD_DISPLAY_FLAG_COIN_COUNT = 0x0002 --- @type HUDDisplayFlag +HUD_DISPLAY_FLAG_STAR_COUNT = 0x0004 --- @type HUDDisplayFlag +HUD_DISPLAY_FLAG_CAMERA_AND_POWER = 0x0008 --- @type HUDDisplayFlag +HUD_DISPLAY_FLAG_KEYS = 0x0010 --- @type HUDDisplayFlag +HUD_DISPLAY_FLAG_UNKNOWN_0020 = 0x0020 --- @type HUDDisplayFlag +HUD_DISPLAY_FLAG_TIMER = 0x0040 --- @type HUDDisplayFlag +HUD_DISPLAY_FLAG_CAMERA = 0x0080 --- @type HUDDisplayFlag +HUD_DISPLAY_FLAG_POWER = 0x0100 --- @type HUDDisplayFlag +HUD_DISPLAY_FLAG_EMPHASIZE_POWER = 0x8000 --- @type HUDDisplayFlag +HUD_DISPLAY_NONE = 0x0000 --- @type HUDDisplayFlag +HUD_DISPLAY_DEFAULT = HUD_DISPLAY_FLAG_LIVES | HUD_DISPLAY_FLAG_COIN_COUNT | HUD_DISPLAY_FLAG_STAR_COUNT | HUD_DISPLAY_FLAG_CAMERA_AND_POWER | HUD_DISPLAY_FLAG_CAMERA | HUD_DISPLAY_FLAG_POWER | HUD_DISPLAY_FLAG_KEYS | HUD_DISPLAY_FLAG_UNKNOWN_0020 --- @type HUDDisplayFlag + +--- @alias HUDDisplayFlag +--- | `HUD_DISPLAY_FLAG_LIVES` +--- | `HUD_DISPLAY_FLAG_COIN_COUNT` +--- | `HUD_DISPLAY_FLAG_STAR_COUNT` +--- | `HUD_DISPLAY_FLAG_CAMERA_AND_POWER` +--- | `HUD_DISPLAY_FLAG_KEYS` +--- | `HUD_DISPLAY_FLAG_UNKNOWN_0020` +--- | `HUD_DISPLAY_FLAG_TIMER` +--- | `HUD_DISPLAY_FLAG_CAMERA` +--- | `HUD_DISPLAY_FLAG_POWER` +--- | `HUD_DISPLAY_FLAG_EMPHASIZE_POWER` +--- | `HUD_DISPLAY_NONE` +--- | `HUD_DISPLAY_DEFAULT` + +MARIO_ANIM_SLOW_LEDGE_GRAB = 0 --- @type MarioAnimID +MARIO_ANIM_FALL_OVER_BACKWARDS = 1 --- @type MarioAnimID +MARIO_ANIM_BACKWARD_AIR_KB = 2 --- @type MarioAnimID +MARIO_ANIM_DYING_ON_BACK = 3 --- @type MarioAnimID +MARIO_ANIM_BACKFLIP = 4 --- @type MarioAnimID +MARIO_ANIM_CLIMB_UP_POLE = 5 --- @type MarioAnimID +MARIO_ANIM_GRAB_POLE_SHORT = 6 --- @type MarioAnimID +MARIO_ANIM_GRAB_POLE_SWING_PART1 = 7 --- @type MarioAnimID +MARIO_ANIM_GRAB_POLE_SWING_PART2 = 8 --- @type MarioAnimID +MARIO_ANIM_HANDSTAND_IDLE = 9 --- @type MarioAnimID +MARIO_ANIM_HANDSTAND_JUMP = 10 --- @type MarioAnimID +MARIO_ANIM_START_HANDSTAND = 11 --- @type MarioAnimID +MARIO_ANIM_RETURN_FROM_HANDSTAND = 12 --- @type MarioAnimID +MARIO_ANIM_IDLE_ON_POLE = 13 --- @type MarioAnimID +MARIO_ANIM_A_POSE = 14 --- @type MarioAnimID +MARIO_ANIM_SKID_ON_GROUND = 15 --- @type MarioAnimID +MARIO_ANIM_STOP_SKID = 16 --- @type MarioAnimID +MARIO_ANIM_CROUCH_FROM_FAST_LONGJUMP = 17 --- @type MarioAnimID +MARIO_ANIM_CROUCH_FROM_SLOW_LONGJUMP = 18 --- @type MarioAnimID +MARIO_ANIM_FAST_LONGJUMP = 19 --- @type MarioAnimID +MARIO_ANIM_SLOW_LONGJUMP = 20 --- @type MarioAnimID +MARIO_ANIM_AIRBORNE_ON_STOMACH = 21 --- @type MarioAnimID +MARIO_ANIM_WALK_WITH_LIGHT_OBJ = 22 --- @type MarioAnimID +MARIO_ANIM_RUN_WITH_LIGHT_OBJ = 23 --- @type MarioAnimID +MARIO_ANIM_SLOW_WALK_WITH_LIGHT_OBJ = 24 --- @type MarioAnimID +MARIO_ANIM_SHIVERING_WARMING_HAND = 25 --- @type MarioAnimID +MARIO_ANIM_SHIVERING_RETURN_TO_IDLE = 26 --- @type MarioAnimID +MARIO_ANIM_SHIVERING = 27 --- @type MarioAnimID +MARIO_ANIM_CLIMB_DOWN_LEDGE = 28 --- @type MarioAnimID +MARIO_ANIM_CREDITS_WAVING = 29 --- @type MarioAnimID +MARIO_ANIM_CREDITS_LOOK_UP = 30 --- @type MarioAnimID +MARIO_ANIM_CREDITS_RETURN_FROM_LOOK_UP = 31 --- @type MarioAnimID +MARIO_ANIM_CREDITS_RAISE_HAND = 32 --- @type MarioAnimID +MARIO_ANIM_CREDITS_LOWER_HAND = 33 --- @type MarioAnimID +MARIO_ANIM_CREDITS_TAKE_OFF_CAP = 34 --- @type MarioAnimID +MARIO_ANIM_CREDITS_START_WALK_LOOK_UP = 35 --- @type MarioAnimID +MARIO_ANIM_CREDITS_LOOK_BACK_THEN_RUN = 36 --- @type MarioAnimID +MARIO_ANIM_FINAL_BOWSER_RAISE_HAND_SPIN = 37 --- @type MarioAnimID +MARIO_ANIM_FINAL_BOWSER_WING_CAP_TAKE_OFF = 38 --- @type MarioAnimID +MARIO_ANIM_CREDITS_PEACE_SIGN = 39 --- @type MarioAnimID +MARIO_ANIM_STAND_UP_FROM_LAVA_BOOST = 40 --- @type MarioAnimID +MARIO_ANIM_FIRE_LAVA_BURN = 41 --- @type MarioAnimID +MARIO_ANIM_WING_CAP_FLY = 42 --- @type MarioAnimID +MARIO_ANIM_HANG_ON_OWL = 43 --- @type MarioAnimID +MARIO_ANIM_LAND_ON_STOMACH = 44 --- @type MarioAnimID +MARIO_ANIM_AIR_FORWARD_KB = 45 --- @type MarioAnimID +MARIO_ANIM_DYING_ON_STOMACH = 46 --- @type MarioAnimID +MARIO_ANIM_SUFFOCATING = 47 --- @type MarioAnimID +MARIO_ANIM_COUGHING = 48 --- @type MarioAnimID +MARIO_ANIM_THROW_CATCH_KEY = 49 --- @type MarioAnimID +MARIO_ANIM_DYING_FALL_OVER = 50 --- @type MarioAnimID +MARIO_ANIM_IDLE_ON_LEDGE = 51 --- @type MarioAnimID +MARIO_ANIM_FAST_LEDGE_GRAB = 52 --- @type MarioAnimID +MARIO_ANIM_HANG_ON_CEILING = 53 --- @type MarioAnimID +MARIO_ANIM_PUT_CAP_ON = 54 --- @type MarioAnimID +MARIO_ANIM_TAKE_CAP_OFF_THEN_ON = 55 --- @type MarioAnimID +MARIO_ANIM_QUICKLY_PUT_CAP_ON = 56 --- @type MarioAnimID +MARIO_ANIM_HEAD_STUCK_IN_GROUND = 57 --- @type MarioAnimID +MARIO_ANIM_GROUND_POUND_LANDING = 58 --- @type MarioAnimID +MARIO_ANIM_TRIPLE_JUMP_GROUND_POUND = 59 --- @type MarioAnimID +MARIO_ANIM_START_GROUND_POUND = 60 --- @type MarioAnimID +MARIO_ANIM_GROUND_POUND = 61 --- @type MarioAnimID +MARIO_ANIM_BOTTOM_STUCK_IN_GROUND = 62 --- @type MarioAnimID +MARIO_ANIM_IDLE_WITH_LIGHT_OBJ = 63 --- @type MarioAnimID +MARIO_ANIM_JUMP_LAND_WITH_LIGHT_OBJ = 64 --- @type MarioAnimID +MARIO_ANIM_JUMP_WITH_LIGHT_OBJ = 65 --- @type MarioAnimID +MARIO_ANIM_FALL_LAND_WITH_LIGHT_OBJ = 66 --- @type MarioAnimID +MARIO_ANIM_FALL_WITH_LIGHT_OBJ = 67 --- @type MarioAnimID +MARIO_ANIM_FALL_FROM_SLIDING_WITH_LIGHT_OBJ = 68 --- @type MarioAnimID +MARIO_ANIM_SLIDING_ON_BOTTOM_WITH_LIGHT_OBJ = 69 --- @type MarioAnimID +MARIO_ANIM_STAND_UP_FROM_SLIDING_WITH_LIGHT_OBJ = 70 --- @type MarioAnimID +MARIO_ANIM_RIDING_SHELL = 71 --- @type MarioAnimID +MARIO_ANIM_WALKING = 72 --- @type MarioAnimID +MARIO_ANIM_FORWARD_FLIP = 73 --- @type MarioAnimID +MARIO_ANIM_JUMP_RIDING_SHELL = 74 --- @type MarioAnimID +MARIO_ANIM_LAND_FROM_DOUBLE_JUMP = 75 --- @type MarioAnimID +MARIO_ANIM_DOUBLE_JUMP_FALL = 76 --- @type MarioAnimID +MARIO_ANIM_SINGLE_JUMP = 77 --- @type MarioAnimID +MARIO_ANIM_LAND_FROM_SINGLE_JUMP = 78 --- @type MarioAnimID +MARIO_ANIM_AIR_KICK = 79 --- @type MarioAnimID +MARIO_ANIM_DOUBLE_JUMP_RISE = 80 --- @type MarioAnimID +MARIO_ANIM_START_FORWARD_SPINNING = 81 --- @type MarioAnimID +MARIO_ANIM_THROW_LIGHT_OBJECT = 82 --- @type MarioAnimID +MARIO_ANIM_FALL_FROM_SLIDE_KICK = 83 --- @type MarioAnimID +MARIO_ANIM_BEND_KNESS_RIDING_SHELL = 84 --- @type MarioAnimID +MARIO_ANIM_LEGS_STUCK_IN_GROUND = 85 --- @type MarioAnimID +MARIO_ANIM_GENERAL_FALL = 86 --- @type MarioAnimID +MARIO_ANIM_GENERAL_LAND = 87 --- @type MarioAnimID +MARIO_ANIM_BEING_GRABBED = 88 --- @type MarioAnimID +MARIO_ANIM_GRAB_HEAVY_OBJECT = 89 --- @type MarioAnimID +MARIO_ANIM_SLOW_LAND_FROM_DIVE = 90 --- @type MarioAnimID +MARIO_ANIM_FLY_FROM_CANNON = 91 --- @type MarioAnimID +MARIO_ANIM_MOVE_ON_WIRE_NET_RIGHT = 92 --- @type MarioAnimID +MARIO_ANIM_MOVE_ON_WIRE_NET_LEFT = 93 --- @type MarioAnimID +MARIO_ANIM_MISSING_CAP = 94 --- @type MarioAnimID +MARIO_ANIM_PULL_DOOR_WALK_IN = 95 --- @type MarioAnimID +MARIO_ANIM_PUSH_DOOR_WALK_IN = 96 --- @type MarioAnimID +MARIO_ANIM_UNLOCK_DOOR = 97 --- @type MarioAnimID +MARIO_ANIM_START_REACH_POCKET = 98 --- @type MarioAnimID +MARIO_ANIM_REACH_POCKET = 99 --- @type MarioAnimID +MARIO_ANIM_STOP_REACH_POCKET = 100 --- @type MarioAnimID +MARIO_ANIM_GROUND_THROW = 101 --- @type MarioAnimID +MARIO_ANIM_GROUND_KICK = 102 --- @type MarioAnimID +MARIO_ANIM_FIRST_PUNCH = 103 --- @type MarioAnimID +MARIO_ANIM_SECOND_PUNCH = 104 --- @type MarioAnimID +MARIO_ANIM_FIRST_PUNCH_FAST = 105 --- @type MarioAnimID +MARIO_ANIM_SECOND_PUNCH_FAST = 106 --- @type MarioAnimID +MARIO_ANIM_PICK_UP_LIGHT_OBJ = 107 --- @type MarioAnimID +MARIO_ANIM_PUSHING = 108 --- @type MarioAnimID +MARIO_ANIM_START_RIDING_SHELL = 109 --- @type MarioAnimID +MARIO_ANIM_PLACE_LIGHT_OBJ = 110 --- @type MarioAnimID +MARIO_ANIM_FORWARD_SPINNING = 111 --- @type MarioAnimID +MARIO_ANIM_BACKWARD_SPINNING = 112 --- @type MarioAnimID +MARIO_ANIM_BREAKDANCE = 113 --- @type MarioAnimID +MARIO_ANIM_RUNNING = 114 --- @type MarioAnimID +MARIO_ANIM_RUNNING_UNUSED = 115 --- @type MarioAnimID +MARIO_ANIM_SOFT_BACK_KB = 116 --- @type MarioAnimID +MARIO_ANIM_SOFT_FRONT_KB = 117 --- @type MarioAnimID +MARIO_ANIM_DYING_IN_QUICKSAND = 118 --- @type MarioAnimID +MARIO_ANIM_IDLE_IN_QUICKSAND = 119 --- @type MarioAnimID +MARIO_ANIM_MOVE_IN_QUICKSAND = 120 --- @type MarioAnimID +MARIO_ANIM_ELECTROCUTION = 121 --- @type MarioAnimID +MARIO_ANIM_SHOCKED = 122 --- @type MarioAnimID +MARIO_ANIM_BACKWARD_KB = 123 --- @type MarioAnimID +MARIO_ANIM_FORWARD_KB = 124 --- @type MarioAnimID +MARIO_ANIM_IDLE_HEAVY_OBJ = 125 --- @type MarioAnimID +MARIO_ANIM_STAND_AGAINST_WALL = 126 --- @type MarioAnimID +MARIO_ANIM_SIDESTEP_LEFT = 127 --- @type MarioAnimID +MARIO_ANIM_SIDESTEP_RIGHT = 128 --- @type MarioAnimID +MARIO_ANIM_START_SLEEP_IDLE = 129 --- @type MarioAnimID +MARIO_ANIM_START_SLEEP_SCRATCH = 130 --- @type MarioAnimID +MARIO_ANIM_START_SLEEP_YAWN = 131 --- @type MarioAnimID +MARIO_ANIM_START_SLEEP_SITTING = 132 --- @type MarioAnimID +MARIO_ANIM_SLEEP_IDLE = 133 --- @type MarioAnimID +MARIO_ANIM_SLEEP_START_LYING = 134 --- @type MarioAnimID +MARIO_ANIM_SLEEP_LYING = 135 --- @type MarioAnimID +MARIO_ANIM_DIVE = 136 --- @type MarioAnimID +MARIO_ANIM_SLIDE_DIVE = 137 --- @type MarioAnimID +MARIO_ANIM_GROUND_BONK = 138 --- @type MarioAnimID +MARIO_ANIM_STOP_SLIDE_LIGHT_OBJ = 139 --- @type MarioAnimID +MARIO_ANIM_SLIDE_KICK = 140 --- @type MarioAnimID +MARIO_ANIM_CROUCH_FROM_SLIDE_KICK = 141 --- @type MarioAnimID +MARIO_ANIM_SLIDE_MOTIONLESS = 142 --- @type MarioAnimID +MARIO_ANIM_STOP_SLIDE = 143 --- @type MarioAnimID +MARIO_ANIM_FALL_FROM_SLIDE = 144 --- @type MarioAnimID +MARIO_ANIM_SLIDE = 145 --- @type MarioAnimID +MARIO_ANIM_TIPTOE = 146 --- @type MarioAnimID +MARIO_ANIM_TWIRL_LAND = 147 --- @type MarioAnimID +MARIO_ANIM_TWIRL = 148 --- @type MarioAnimID +MARIO_ANIM_START_TWIRL = 149 --- @type MarioAnimID +MARIO_ANIM_STOP_CROUCHING = 150 --- @type MarioAnimID +MARIO_ANIM_START_CROUCHING = 151 --- @type MarioAnimID +MARIO_ANIM_CROUCHING = 152 --- @type MarioAnimID +MARIO_ANIM_CRAWLING = 153 --- @type MarioAnimID +MARIO_ANIM_STOP_CRAWLING = 154 --- @type MarioAnimID +MARIO_ANIM_START_CRAWLING = 155 --- @type MarioAnimID +MARIO_ANIM_SUMMON_STAR = 156 --- @type MarioAnimID +MARIO_ANIM_RETURN_STAR_APPROACH_DOOR = 157 --- @type MarioAnimID +MARIO_ANIM_BACKWARDS_WATER_KB = 158 --- @type MarioAnimID +MARIO_ANIM_SWIM_WITH_OBJ_PART1 = 159 --- @type MarioAnimID +MARIO_ANIM_SWIM_WITH_OBJ_PART2 = 160 --- @type MarioAnimID +MARIO_ANIM_FLUTTERKICK_WITH_OBJ = 161 --- @type MarioAnimID +MARIO_ANIM_WATER_ACTION_END_WITH_OBJ = 162 --- @type MarioAnimID +MARIO_ANIM_STOP_GRAB_OBJ_WATER = 163 --- @type MarioAnimID +MARIO_ANIM_WATER_IDLE_WITH_OBJ = 164 --- @type MarioAnimID +MARIO_ANIM_DROWNING_PART1 = 165 --- @type MarioAnimID +MARIO_ANIM_DROWNING_PART2 = 166 --- @type MarioAnimID +MARIO_ANIM_WATER_DYING = 167 --- @type MarioAnimID +MARIO_ANIM_WATER_FORWARD_KB = 168 --- @type MarioAnimID +MARIO_ANIM_FALL_FROM_WATER = 169 --- @type MarioAnimID +MARIO_ANIM_SWIM_PART1 = 170 --- @type MarioAnimID +MARIO_ANIM_SWIM_PART2 = 171 --- @type MarioAnimID +MARIO_ANIM_FLUTTERKICK = 172 --- @type MarioAnimID +MARIO_ANIM_WATER_ACTION_END = 173 --- @type MarioAnimID +MARIO_ANIM_WATER_PICK_UP_OBJ = 174 --- @type MarioAnimID +MARIO_ANIM_WATER_GRAB_OBJ_PART2 = 175 --- @type MarioAnimID +MARIO_ANIM_WATER_GRAB_OBJ_PART1 = 176 --- @type MarioAnimID +MARIO_ANIM_WATER_THROW_OBJ = 177 --- @type MarioAnimID +MARIO_ANIM_WATER_IDLE = 178 --- @type MarioAnimID +MARIO_ANIM_WATER_STAR_DANCE = 179 --- @type MarioAnimID +MARIO_ANIM_RETURN_FROM_WATER_STAR_DANCE = 180 --- @type MarioAnimID +MARIO_ANIM_GRAB_BOWSER = 181 --- @type MarioAnimID +MARIO_ANIM_SWINGING_BOWSER = 182 --- @type MarioAnimID +MARIO_ANIM_RELEASE_BOWSER = 183 --- @type MarioAnimID +MARIO_ANIM_HOLDING_BOWSER = 184 --- @type MarioAnimID +MARIO_ANIM_HEAVY_THROW = 185 --- @type MarioAnimID +MARIO_ANIM_WALK_PANTING = 186 --- @type MarioAnimID +MARIO_ANIM_WALK_WITH_HEAVY_OBJ = 187 --- @type MarioAnimID +MARIO_ANIM_TURNING_PART1 = 188 --- @type MarioAnimID +MARIO_ANIM_TURNING_PART2 = 189 --- @type MarioAnimID +MARIO_ANIM_SLIDEFLIP_LAND = 190 --- @type MarioAnimID +MARIO_ANIM_SLIDEFLIP = 191 --- @type MarioAnimID +MARIO_ANIM_TRIPLE_JUMP_LAND = 192 --- @type MarioAnimID +MARIO_ANIM_TRIPLE_JUMP = 193 --- @type MarioAnimID +MARIO_ANIM_FIRST_PERSON = 194 --- @type MarioAnimID +MARIO_ANIM_IDLE_HEAD_LEFT = 195 --- @type MarioAnimID +MARIO_ANIM_IDLE_HEAD_RIGHT = 196 --- @type MarioAnimID +MARIO_ANIM_IDLE_HEAD_CENTER = 197 --- @type MarioAnimID +MARIO_ANIM_HANDSTAND_LEFT = 198 --- @type MarioAnimID +MARIO_ANIM_HANDSTAND_RIGHT = 199 --- @type MarioAnimID +MARIO_ANIM_WAKE_FROM_SLEEP = 200 --- @type MarioAnimID +MARIO_ANIM_WAKE_FROM_LYING = 201 --- @type MarioAnimID +MARIO_ANIM_START_TIPTOE = 202 --- @type MarioAnimID +MARIO_ANIM_SLIDEJUMP = 203 --- @type MarioAnimID +MARIO_ANIM_START_WALLKICK = 204 --- @type MarioAnimID +MARIO_ANIM_STAR_DANCE = 205 --- @type MarioAnimID +MARIO_ANIM_RETURN_FROM_STAR_DANCE = 206 --- @type MarioAnimID +MARIO_ANIM_FORWARD_SPINNING_FLIP = 207 --- @type MarioAnimID +MARIO_ANIM_TRIPLE_JUMP_FLY = 208 --- @type MarioAnimID + +--- @alias MarioAnimID +--- | `MARIO_ANIM_SLOW_LEDGE_GRAB` +--- | `MARIO_ANIM_FALL_OVER_BACKWARDS` +--- | `MARIO_ANIM_BACKWARD_AIR_KB` +--- | `MARIO_ANIM_DYING_ON_BACK` +--- | `MARIO_ANIM_BACKFLIP` +--- | `MARIO_ANIM_CLIMB_UP_POLE` +--- | `MARIO_ANIM_GRAB_POLE_SHORT` +--- | `MARIO_ANIM_GRAB_POLE_SWING_PART1` +--- | `MARIO_ANIM_GRAB_POLE_SWING_PART2` +--- | `MARIO_ANIM_HANDSTAND_IDLE` +--- | `MARIO_ANIM_HANDSTAND_JUMP` +--- | `MARIO_ANIM_START_HANDSTAND` +--- | `MARIO_ANIM_RETURN_FROM_HANDSTAND` +--- | `MARIO_ANIM_IDLE_ON_POLE` +--- | `MARIO_ANIM_A_POSE` +--- | `MARIO_ANIM_SKID_ON_GROUND` +--- | `MARIO_ANIM_STOP_SKID` +--- | `MARIO_ANIM_CROUCH_FROM_FAST_LONGJUMP` +--- | `MARIO_ANIM_CROUCH_FROM_SLOW_LONGJUMP` +--- | `MARIO_ANIM_FAST_LONGJUMP` +--- | `MARIO_ANIM_SLOW_LONGJUMP` +--- | `MARIO_ANIM_AIRBORNE_ON_STOMACH` +--- | `MARIO_ANIM_WALK_WITH_LIGHT_OBJ` +--- | `MARIO_ANIM_RUN_WITH_LIGHT_OBJ` +--- | `MARIO_ANIM_SLOW_WALK_WITH_LIGHT_OBJ` +--- | `MARIO_ANIM_SHIVERING_WARMING_HAND` +--- | `MARIO_ANIM_SHIVERING_RETURN_TO_IDLE` +--- | `MARIO_ANIM_SHIVERING` +--- | `MARIO_ANIM_CLIMB_DOWN_LEDGE` +--- | `MARIO_ANIM_CREDITS_WAVING` +--- | `MARIO_ANIM_CREDITS_LOOK_UP` +--- | `MARIO_ANIM_CREDITS_RETURN_FROM_LOOK_UP` +--- | `MARIO_ANIM_CREDITS_RAISE_HAND` +--- | `MARIO_ANIM_CREDITS_LOWER_HAND` +--- | `MARIO_ANIM_CREDITS_TAKE_OFF_CAP` +--- | `MARIO_ANIM_CREDITS_START_WALK_LOOK_UP` +--- | `MARIO_ANIM_CREDITS_LOOK_BACK_THEN_RUN` +--- | `MARIO_ANIM_FINAL_BOWSER_RAISE_HAND_SPIN` +--- | `MARIO_ANIM_FINAL_BOWSER_WING_CAP_TAKE_OFF` +--- | `MARIO_ANIM_CREDITS_PEACE_SIGN` +--- | `MARIO_ANIM_STAND_UP_FROM_LAVA_BOOST` +--- | `MARIO_ANIM_FIRE_LAVA_BURN` +--- | `MARIO_ANIM_WING_CAP_FLY` +--- | `MARIO_ANIM_HANG_ON_OWL` +--- | `MARIO_ANIM_LAND_ON_STOMACH` +--- | `MARIO_ANIM_AIR_FORWARD_KB` +--- | `MARIO_ANIM_DYING_ON_STOMACH` +--- | `MARIO_ANIM_SUFFOCATING` +--- | `MARIO_ANIM_COUGHING` +--- | `MARIO_ANIM_THROW_CATCH_KEY` +--- | `MARIO_ANIM_DYING_FALL_OVER` +--- | `MARIO_ANIM_IDLE_ON_LEDGE` +--- | `MARIO_ANIM_FAST_LEDGE_GRAB` +--- | `MARIO_ANIM_HANG_ON_CEILING` +--- | `MARIO_ANIM_PUT_CAP_ON` +--- | `MARIO_ANIM_TAKE_CAP_OFF_THEN_ON` +--- | `MARIO_ANIM_QUICKLY_PUT_CAP_ON` +--- | `MARIO_ANIM_HEAD_STUCK_IN_GROUND` +--- | `MARIO_ANIM_GROUND_POUND_LANDING` +--- | `MARIO_ANIM_TRIPLE_JUMP_GROUND_POUND` +--- | `MARIO_ANIM_START_GROUND_POUND` +--- | `MARIO_ANIM_GROUND_POUND` +--- | `MARIO_ANIM_BOTTOM_STUCK_IN_GROUND` +--- | `MARIO_ANIM_IDLE_WITH_LIGHT_OBJ` +--- | `MARIO_ANIM_JUMP_LAND_WITH_LIGHT_OBJ` +--- | `MARIO_ANIM_JUMP_WITH_LIGHT_OBJ` +--- | `MARIO_ANIM_FALL_LAND_WITH_LIGHT_OBJ` +--- | `MARIO_ANIM_FALL_WITH_LIGHT_OBJ` +--- | `MARIO_ANIM_FALL_FROM_SLIDING_WITH_LIGHT_OBJ` +--- | `MARIO_ANIM_SLIDING_ON_BOTTOM_WITH_LIGHT_OBJ` +--- | `MARIO_ANIM_STAND_UP_FROM_SLIDING_WITH_LIGHT_OBJ` +--- | `MARIO_ANIM_RIDING_SHELL` +--- | `MARIO_ANIM_WALKING` +--- | `MARIO_ANIM_FORWARD_FLIP` +--- | `MARIO_ANIM_JUMP_RIDING_SHELL` +--- | `MARIO_ANIM_LAND_FROM_DOUBLE_JUMP` +--- | `MARIO_ANIM_DOUBLE_JUMP_FALL` +--- | `MARIO_ANIM_SINGLE_JUMP` +--- | `MARIO_ANIM_LAND_FROM_SINGLE_JUMP` +--- | `MARIO_ANIM_AIR_KICK` +--- | `MARIO_ANIM_DOUBLE_JUMP_RISE` +--- | `MARIO_ANIM_START_FORWARD_SPINNING` +--- | `MARIO_ANIM_THROW_LIGHT_OBJECT` +--- | `MARIO_ANIM_FALL_FROM_SLIDE_KICK` +--- | `MARIO_ANIM_BEND_KNESS_RIDING_SHELL` +--- | `MARIO_ANIM_LEGS_STUCK_IN_GROUND` +--- | `MARIO_ANIM_GENERAL_FALL` +--- | `MARIO_ANIM_GENERAL_LAND` +--- | `MARIO_ANIM_BEING_GRABBED` +--- | `MARIO_ANIM_GRAB_HEAVY_OBJECT` +--- | `MARIO_ANIM_SLOW_LAND_FROM_DIVE` +--- | `MARIO_ANIM_FLY_FROM_CANNON` +--- | `MARIO_ANIM_MOVE_ON_WIRE_NET_RIGHT` +--- | `MARIO_ANIM_MOVE_ON_WIRE_NET_LEFT` +--- | `MARIO_ANIM_MISSING_CAP` +--- | `MARIO_ANIM_PULL_DOOR_WALK_IN` +--- | `MARIO_ANIM_PUSH_DOOR_WALK_IN` +--- | `MARIO_ANIM_UNLOCK_DOOR` +--- | `MARIO_ANIM_START_REACH_POCKET` +--- | `MARIO_ANIM_REACH_POCKET` +--- | `MARIO_ANIM_STOP_REACH_POCKET` +--- | `MARIO_ANIM_GROUND_THROW` +--- | `MARIO_ANIM_GROUND_KICK` +--- | `MARIO_ANIM_FIRST_PUNCH` +--- | `MARIO_ANIM_SECOND_PUNCH` +--- | `MARIO_ANIM_FIRST_PUNCH_FAST` +--- | `MARIO_ANIM_SECOND_PUNCH_FAST` +--- | `MARIO_ANIM_PICK_UP_LIGHT_OBJ` +--- | `MARIO_ANIM_PUSHING` +--- | `MARIO_ANIM_START_RIDING_SHELL` +--- | `MARIO_ANIM_PLACE_LIGHT_OBJ` +--- | `MARIO_ANIM_FORWARD_SPINNING` +--- | `MARIO_ANIM_BACKWARD_SPINNING` +--- | `MARIO_ANIM_BREAKDANCE` +--- | `MARIO_ANIM_RUNNING` +--- | `MARIO_ANIM_RUNNING_UNUSED` +--- | `MARIO_ANIM_SOFT_BACK_KB` +--- | `MARIO_ANIM_SOFT_FRONT_KB` +--- | `MARIO_ANIM_DYING_IN_QUICKSAND` +--- | `MARIO_ANIM_IDLE_IN_QUICKSAND` +--- | `MARIO_ANIM_MOVE_IN_QUICKSAND` +--- | `MARIO_ANIM_ELECTROCUTION` +--- | `MARIO_ANIM_SHOCKED` +--- | `MARIO_ANIM_BACKWARD_KB` +--- | `MARIO_ANIM_FORWARD_KB` +--- | `MARIO_ANIM_IDLE_HEAVY_OBJ` +--- | `MARIO_ANIM_STAND_AGAINST_WALL` +--- | `MARIO_ANIM_SIDESTEP_LEFT` +--- | `MARIO_ANIM_SIDESTEP_RIGHT` +--- | `MARIO_ANIM_START_SLEEP_IDLE` +--- | `MARIO_ANIM_START_SLEEP_SCRATCH` +--- | `MARIO_ANIM_START_SLEEP_YAWN` +--- | `MARIO_ANIM_START_SLEEP_SITTING` +--- | `MARIO_ANIM_SLEEP_IDLE` +--- | `MARIO_ANIM_SLEEP_START_LYING` +--- | `MARIO_ANIM_SLEEP_LYING` +--- | `MARIO_ANIM_DIVE` +--- | `MARIO_ANIM_SLIDE_DIVE` +--- | `MARIO_ANIM_GROUND_BONK` +--- | `MARIO_ANIM_STOP_SLIDE_LIGHT_OBJ` +--- | `MARIO_ANIM_SLIDE_KICK` +--- | `MARIO_ANIM_CROUCH_FROM_SLIDE_KICK` +--- | `MARIO_ANIM_SLIDE_MOTIONLESS` +--- | `MARIO_ANIM_STOP_SLIDE` +--- | `MARIO_ANIM_FALL_FROM_SLIDE` +--- | `MARIO_ANIM_SLIDE` +--- | `MARIO_ANIM_TIPTOE` +--- | `MARIO_ANIM_TWIRL_LAND` +--- | `MARIO_ANIM_TWIRL` +--- | `MARIO_ANIM_START_TWIRL` +--- | `MARIO_ANIM_STOP_CROUCHING` +--- | `MARIO_ANIM_START_CROUCHING` +--- | `MARIO_ANIM_CROUCHING` +--- | `MARIO_ANIM_CRAWLING` +--- | `MARIO_ANIM_STOP_CRAWLING` +--- | `MARIO_ANIM_START_CRAWLING` +--- | `MARIO_ANIM_SUMMON_STAR` +--- | `MARIO_ANIM_RETURN_STAR_APPROACH_DOOR` +--- | `MARIO_ANIM_BACKWARDS_WATER_KB` +--- | `MARIO_ANIM_SWIM_WITH_OBJ_PART1` +--- | `MARIO_ANIM_SWIM_WITH_OBJ_PART2` +--- | `MARIO_ANIM_FLUTTERKICK_WITH_OBJ` +--- | `MARIO_ANIM_WATER_ACTION_END_WITH_OBJ` +--- | `MARIO_ANIM_STOP_GRAB_OBJ_WATER` +--- | `MARIO_ANIM_WATER_IDLE_WITH_OBJ` +--- | `MARIO_ANIM_DROWNING_PART1` +--- | `MARIO_ANIM_DROWNING_PART2` +--- | `MARIO_ANIM_WATER_DYING` +--- | `MARIO_ANIM_WATER_FORWARD_KB` +--- | `MARIO_ANIM_FALL_FROM_WATER` +--- | `MARIO_ANIM_SWIM_PART1` +--- | `MARIO_ANIM_SWIM_PART2` +--- | `MARIO_ANIM_FLUTTERKICK` +--- | `MARIO_ANIM_WATER_ACTION_END` +--- | `MARIO_ANIM_WATER_PICK_UP_OBJ` +--- | `MARIO_ANIM_WATER_GRAB_OBJ_PART2` +--- | `MARIO_ANIM_WATER_GRAB_OBJ_PART1` +--- | `MARIO_ANIM_WATER_THROW_OBJ` +--- | `MARIO_ANIM_WATER_IDLE` +--- | `MARIO_ANIM_WATER_STAR_DANCE` +--- | `MARIO_ANIM_RETURN_FROM_WATER_STAR_DANCE` +--- | `MARIO_ANIM_GRAB_BOWSER` +--- | `MARIO_ANIM_SWINGING_BOWSER` +--- | `MARIO_ANIM_RELEASE_BOWSER` +--- | `MARIO_ANIM_HOLDING_BOWSER` +--- | `MARIO_ANIM_HEAVY_THROW` +--- | `MARIO_ANIM_WALK_PANTING` +--- | `MARIO_ANIM_WALK_WITH_HEAVY_OBJ` +--- | `MARIO_ANIM_TURNING_PART1` +--- | `MARIO_ANIM_TURNING_PART2` +--- | `MARIO_ANIM_SLIDEFLIP_LAND` +--- | `MARIO_ANIM_SLIDEFLIP` +--- | `MARIO_ANIM_TRIPLE_JUMP_LAND` +--- | `MARIO_ANIM_TRIPLE_JUMP` +--- | `MARIO_ANIM_FIRST_PERSON` +--- | `MARIO_ANIM_IDLE_HEAD_LEFT` +--- | `MARIO_ANIM_IDLE_HEAD_RIGHT` +--- | `MARIO_ANIM_IDLE_HEAD_CENTER` +--- | `MARIO_ANIM_HANDSTAND_LEFT` +--- | `MARIO_ANIM_HANDSTAND_RIGHT` +--- | `MARIO_ANIM_WAKE_FROM_SLEEP` +--- | `MARIO_ANIM_WAKE_FROM_LYING` +--- | `MARIO_ANIM_START_TIPTOE` +--- | `MARIO_ANIM_SLIDEJUMP` +--- | `MARIO_ANIM_START_WALLKICK` +--- | `MARIO_ANIM_STAR_DANCE` +--- | `MARIO_ANIM_RETURN_FROM_STAR_DANCE` +--- | `MARIO_ANIM_FORWARD_SPINNING_FLIP` +--- | `MARIO_ANIM_TRIPLE_JUMP_FLY` + CHAR_ANIM_SLOW_LEDGE_GRAB = 0 --- @type CharacterAnimID CHAR_ANIM_FALL_OVER_BACKWARDS = 1 --- @type CharacterAnimID CHAR_ANIM_BACKWARD_AIR_KB = 2 --- @type CharacterAnimID @@ -4849,438 +5294,6 @@ CHAR_ANIM_MAX = 209 --- @type CharacterAnimID --- | `CHAR_ANIM_TRIPLE_JUMP_FLY` --- | `CHAR_ANIM_MAX` -MARIO_ANIM_SLOW_LEDGE_GRAB = 0 --- @type MarioAnimID -MARIO_ANIM_FALL_OVER_BACKWARDS = 1 --- @type MarioAnimID -MARIO_ANIM_BACKWARD_AIR_KB = 2 --- @type MarioAnimID -MARIO_ANIM_DYING_ON_BACK = 3 --- @type MarioAnimID -MARIO_ANIM_BACKFLIP = 4 --- @type MarioAnimID -MARIO_ANIM_CLIMB_UP_POLE = 5 --- @type MarioAnimID -MARIO_ANIM_GRAB_POLE_SHORT = 6 --- @type MarioAnimID -MARIO_ANIM_GRAB_POLE_SWING_PART1 = 7 --- @type MarioAnimID -MARIO_ANIM_GRAB_POLE_SWING_PART2 = 8 --- @type MarioAnimID -MARIO_ANIM_HANDSTAND_IDLE = 9 --- @type MarioAnimID -MARIO_ANIM_HANDSTAND_JUMP = 10 --- @type MarioAnimID -MARIO_ANIM_START_HANDSTAND = 11 --- @type MarioAnimID -MARIO_ANIM_RETURN_FROM_HANDSTAND = 12 --- @type MarioAnimID -MARIO_ANIM_IDLE_ON_POLE = 13 --- @type MarioAnimID -MARIO_ANIM_A_POSE = 14 --- @type MarioAnimID -MARIO_ANIM_SKID_ON_GROUND = 15 --- @type MarioAnimID -MARIO_ANIM_STOP_SKID = 16 --- @type MarioAnimID -MARIO_ANIM_CROUCH_FROM_FAST_LONGJUMP = 17 --- @type MarioAnimID -MARIO_ANIM_CROUCH_FROM_SLOW_LONGJUMP = 18 --- @type MarioAnimID -MARIO_ANIM_FAST_LONGJUMP = 19 --- @type MarioAnimID -MARIO_ANIM_SLOW_LONGJUMP = 20 --- @type MarioAnimID -MARIO_ANIM_AIRBORNE_ON_STOMACH = 21 --- @type MarioAnimID -MARIO_ANIM_WALK_WITH_LIGHT_OBJ = 22 --- @type MarioAnimID -MARIO_ANIM_RUN_WITH_LIGHT_OBJ = 23 --- @type MarioAnimID -MARIO_ANIM_SLOW_WALK_WITH_LIGHT_OBJ = 24 --- @type MarioAnimID -MARIO_ANIM_SHIVERING_WARMING_HAND = 25 --- @type MarioAnimID -MARIO_ANIM_SHIVERING_RETURN_TO_IDLE = 26 --- @type MarioAnimID -MARIO_ANIM_SHIVERING = 27 --- @type MarioAnimID -MARIO_ANIM_CLIMB_DOWN_LEDGE = 28 --- @type MarioAnimID -MARIO_ANIM_CREDITS_WAVING = 29 --- @type MarioAnimID -MARIO_ANIM_CREDITS_LOOK_UP = 30 --- @type MarioAnimID -MARIO_ANIM_CREDITS_RETURN_FROM_LOOK_UP = 31 --- @type MarioAnimID -MARIO_ANIM_CREDITS_RAISE_HAND = 32 --- @type MarioAnimID -MARIO_ANIM_CREDITS_LOWER_HAND = 33 --- @type MarioAnimID -MARIO_ANIM_CREDITS_TAKE_OFF_CAP = 34 --- @type MarioAnimID -MARIO_ANIM_CREDITS_START_WALK_LOOK_UP = 35 --- @type MarioAnimID -MARIO_ANIM_CREDITS_LOOK_BACK_THEN_RUN = 36 --- @type MarioAnimID -MARIO_ANIM_FINAL_BOWSER_RAISE_HAND_SPIN = 37 --- @type MarioAnimID -MARIO_ANIM_FINAL_BOWSER_WING_CAP_TAKE_OFF = 38 --- @type MarioAnimID -MARIO_ANIM_CREDITS_PEACE_SIGN = 39 --- @type MarioAnimID -MARIO_ANIM_STAND_UP_FROM_LAVA_BOOST = 40 --- @type MarioAnimID -MARIO_ANIM_FIRE_LAVA_BURN = 41 --- @type MarioAnimID -MARIO_ANIM_WING_CAP_FLY = 42 --- @type MarioAnimID -MARIO_ANIM_HANG_ON_OWL = 43 --- @type MarioAnimID -MARIO_ANIM_LAND_ON_STOMACH = 44 --- @type MarioAnimID -MARIO_ANIM_AIR_FORWARD_KB = 45 --- @type MarioAnimID -MARIO_ANIM_DYING_ON_STOMACH = 46 --- @type MarioAnimID -MARIO_ANIM_SUFFOCATING = 47 --- @type MarioAnimID -MARIO_ANIM_COUGHING = 48 --- @type MarioAnimID -MARIO_ANIM_THROW_CATCH_KEY = 49 --- @type MarioAnimID -MARIO_ANIM_DYING_FALL_OVER = 50 --- @type MarioAnimID -MARIO_ANIM_IDLE_ON_LEDGE = 51 --- @type MarioAnimID -MARIO_ANIM_FAST_LEDGE_GRAB = 52 --- @type MarioAnimID -MARIO_ANIM_HANG_ON_CEILING = 53 --- @type MarioAnimID -MARIO_ANIM_PUT_CAP_ON = 54 --- @type MarioAnimID -MARIO_ANIM_TAKE_CAP_OFF_THEN_ON = 55 --- @type MarioAnimID -MARIO_ANIM_QUICKLY_PUT_CAP_ON = 56 --- @type MarioAnimID -MARIO_ANIM_HEAD_STUCK_IN_GROUND = 57 --- @type MarioAnimID -MARIO_ANIM_GROUND_POUND_LANDING = 58 --- @type MarioAnimID -MARIO_ANIM_TRIPLE_JUMP_GROUND_POUND = 59 --- @type MarioAnimID -MARIO_ANIM_START_GROUND_POUND = 60 --- @type MarioAnimID -MARIO_ANIM_GROUND_POUND = 61 --- @type MarioAnimID -MARIO_ANIM_BOTTOM_STUCK_IN_GROUND = 62 --- @type MarioAnimID -MARIO_ANIM_IDLE_WITH_LIGHT_OBJ = 63 --- @type MarioAnimID -MARIO_ANIM_JUMP_LAND_WITH_LIGHT_OBJ = 64 --- @type MarioAnimID -MARIO_ANIM_JUMP_WITH_LIGHT_OBJ = 65 --- @type MarioAnimID -MARIO_ANIM_FALL_LAND_WITH_LIGHT_OBJ = 66 --- @type MarioAnimID -MARIO_ANIM_FALL_WITH_LIGHT_OBJ = 67 --- @type MarioAnimID -MARIO_ANIM_FALL_FROM_SLIDING_WITH_LIGHT_OBJ = 68 --- @type MarioAnimID -MARIO_ANIM_SLIDING_ON_BOTTOM_WITH_LIGHT_OBJ = 69 --- @type MarioAnimID -MARIO_ANIM_STAND_UP_FROM_SLIDING_WITH_LIGHT_OBJ = 70 --- @type MarioAnimID -MARIO_ANIM_RIDING_SHELL = 71 --- @type MarioAnimID -MARIO_ANIM_WALKING = 72 --- @type MarioAnimID -MARIO_ANIM_FORWARD_FLIP = 73 --- @type MarioAnimID -MARIO_ANIM_JUMP_RIDING_SHELL = 74 --- @type MarioAnimID -MARIO_ANIM_LAND_FROM_DOUBLE_JUMP = 75 --- @type MarioAnimID -MARIO_ANIM_DOUBLE_JUMP_FALL = 76 --- @type MarioAnimID -MARIO_ANIM_SINGLE_JUMP = 77 --- @type MarioAnimID -MARIO_ANIM_LAND_FROM_SINGLE_JUMP = 78 --- @type MarioAnimID -MARIO_ANIM_AIR_KICK = 79 --- @type MarioAnimID -MARIO_ANIM_DOUBLE_JUMP_RISE = 80 --- @type MarioAnimID -MARIO_ANIM_START_FORWARD_SPINNING = 81 --- @type MarioAnimID -MARIO_ANIM_THROW_LIGHT_OBJECT = 82 --- @type MarioAnimID -MARIO_ANIM_FALL_FROM_SLIDE_KICK = 83 --- @type MarioAnimID -MARIO_ANIM_BEND_KNESS_RIDING_SHELL = 84 --- @type MarioAnimID -MARIO_ANIM_LEGS_STUCK_IN_GROUND = 85 --- @type MarioAnimID -MARIO_ANIM_GENERAL_FALL = 86 --- @type MarioAnimID -MARIO_ANIM_GENERAL_LAND = 87 --- @type MarioAnimID -MARIO_ANIM_BEING_GRABBED = 88 --- @type MarioAnimID -MARIO_ANIM_GRAB_HEAVY_OBJECT = 89 --- @type MarioAnimID -MARIO_ANIM_SLOW_LAND_FROM_DIVE = 90 --- @type MarioAnimID -MARIO_ANIM_FLY_FROM_CANNON = 91 --- @type MarioAnimID -MARIO_ANIM_MOVE_ON_WIRE_NET_RIGHT = 92 --- @type MarioAnimID -MARIO_ANIM_MOVE_ON_WIRE_NET_LEFT = 93 --- @type MarioAnimID -MARIO_ANIM_MISSING_CAP = 94 --- @type MarioAnimID -MARIO_ANIM_PULL_DOOR_WALK_IN = 95 --- @type MarioAnimID -MARIO_ANIM_PUSH_DOOR_WALK_IN = 96 --- @type MarioAnimID -MARIO_ANIM_UNLOCK_DOOR = 97 --- @type MarioAnimID -MARIO_ANIM_START_REACH_POCKET = 98 --- @type MarioAnimID -MARIO_ANIM_REACH_POCKET = 99 --- @type MarioAnimID -MARIO_ANIM_STOP_REACH_POCKET = 100 --- @type MarioAnimID -MARIO_ANIM_GROUND_THROW = 101 --- @type MarioAnimID -MARIO_ANIM_GROUND_KICK = 102 --- @type MarioAnimID -MARIO_ANIM_FIRST_PUNCH = 103 --- @type MarioAnimID -MARIO_ANIM_SECOND_PUNCH = 104 --- @type MarioAnimID -MARIO_ANIM_FIRST_PUNCH_FAST = 105 --- @type MarioAnimID -MARIO_ANIM_SECOND_PUNCH_FAST = 106 --- @type MarioAnimID -MARIO_ANIM_PICK_UP_LIGHT_OBJ = 107 --- @type MarioAnimID -MARIO_ANIM_PUSHING = 108 --- @type MarioAnimID -MARIO_ANIM_START_RIDING_SHELL = 109 --- @type MarioAnimID -MARIO_ANIM_PLACE_LIGHT_OBJ = 110 --- @type MarioAnimID -MARIO_ANIM_FORWARD_SPINNING = 111 --- @type MarioAnimID -MARIO_ANIM_BACKWARD_SPINNING = 112 --- @type MarioAnimID -MARIO_ANIM_BREAKDANCE = 113 --- @type MarioAnimID -MARIO_ANIM_RUNNING = 114 --- @type MarioAnimID -MARIO_ANIM_RUNNING_UNUSED = 115 --- @type MarioAnimID -MARIO_ANIM_SOFT_BACK_KB = 116 --- @type MarioAnimID -MARIO_ANIM_SOFT_FRONT_KB = 117 --- @type MarioAnimID -MARIO_ANIM_DYING_IN_QUICKSAND = 118 --- @type MarioAnimID -MARIO_ANIM_IDLE_IN_QUICKSAND = 119 --- @type MarioAnimID -MARIO_ANIM_MOVE_IN_QUICKSAND = 120 --- @type MarioAnimID -MARIO_ANIM_ELECTROCUTION = 121 --- @type MarioAnimID -MARIO_ANIM_SHOCKED = 122 --- @type MarioAnimID -MARIO_ANIM_BACKWARD_KB = 123 --- @type MarioAnimID -MARIO_ANIM_FORWARD_KB = 124 --- @type MarioAnimID -MARIO_ANIM_IDLE_HEAVY_OBJ = 125 --- @type MarioAnimID -MARIO_ANIM_STAND_AGAINST_WALL = 126 --- @type MarioAnimID -MARIO_ANIM_SIDESTEP_LEFT = 127 --- @type MarioAnimID -MARIO_ANIM_SIDESTEP_RIGHT = 128 --- @type MarioAnimID -MARIO_ANIM_START_SLEEP_IDLE = 129 --- @type MarioAnimID -MARIO_ANIM_START_SLEEP_SCRATCH = 130 --- @type MarioAnimID -MARIO_ANIM_START_SLEEP_YAWN = 131 --- @type MarioAnimID -MARIO_ANIM_START_SLEEP_SITTING = 132 --- @type MarioAnimID -MARIO_ANIM_SLEEP_IDLE = 133 --- @type MarioAnimID -MARIO_ANIM_SLEEP_START_LYING = 134 --- @type MarioAnimID -MARIO_ANIM_SLEEP_LYING = 135 --- @type MarioAnimID -MARIO_ANIM_DIVE = 136 --- @type MarioAnimID -MARIO_ANIM_SLIDE_DIVE = 137 --- @type MarioAnimID -MARIO_ANIM_GROUND_BONK = 138 --- @type MarioAnimID -MARIO_ANIM_STOP_SLIDE_LIGHT_OBJ = 139 --- @type MarioAnimID -MARIO_ANIM_SLIDE_KICK = 140 --- @type MarioAnimID -MARIO_ANIM_CROUCH_FROM_SLIDE_KICK = 141 --- @type MarioAnimID -MARIO_ANIM_SLIDE_MOTIONLESS = 142 --- @type MarioAnimID -MARIO_ANIM_STOP_SLIDE = 143 --- @type MarioAnimID -MARIO_ANIM_FALL_FROM_SLIDE = 144 --- @type MarioAnimID -MARIO_ANIM_SLIDE = 145 --- @type MarioAnimID -MARIO_ANIM_TIPTOE = 146 --- @type MarioAnimID -MARIO_ANIM_TWIRL_LAND = 147 --- @type MarioAnimID -MARIO_ANIM_TWIRL = 148 --- @type MarioAnimID -MARIO_ANIM_START_TWIRL = 149 --- @type MarioAnimID -MARIO_ANIM_STOP_CROUCHING = 150 --- @type MarioAnimID -MARIO_ANIM_START_CROUCHING = 151 --- @type MarioAnimID -MARIO_ANIM_CROUCHING = 152 --- @type MarioAnimID -MARIO_ANIM_CRAWLING = 153 --- @type MarioAnimID -MARIO_ANIM_STOP_CRAWLING = 154 --- @type MarioAnimID -MARIO_ANIM_START_CRAWLING = 155 --- @type MarioAnimID -MARIO_ANIM_SUMMON_STAR = 156 --- @type MarioAnimID -MARIO_ANIM_RETURN_STAR_APPROACH_DOOR = 157 --- @type MarioAnimID -MARIO_ANIM_BACKWARDS_WATER_KB = 158 --- @type MarioAnimID -MARIO_ANIM_SWIM_WITH_OBJ_PART1 = 159 --- @type MarioAnimID -MARIO_ANIM_SWIM_WITH_OBJ_PART2 = 160 --- @type MarioAnimID -MARIO_ANIM_FLUTTERKICK_WITH_OBJ = 161 --- @type MarioAnimID -MARIO_ANIM_WATER_ACTION_END_WITH_OBJ = 162 --- @type MarioAnimID -MARIO_ANIM_STOP_GRAB_OBJ_WATER = 163 --- @type MarioAnimID -MARIO_ANIM_WATER_IDLE_WITH_OBJ = 164 --- @type MarioAnimID -MARIO_ANIM_DROWNING_PART1 = 165 --- @type MarioAnimID -MARIO_ANIM_DROWNING_PART2 = 166 --- @type MarioAnimID -MARIO_ANIM_WATER_DYING = 167 --- @type MarioAnimID -MARIO_ANIM_WATER_FORWARD_KB = 168 --- @type MarioAnimID -MARIO_ANIM_FALL_FROM_WATER = 169 --- @type MarioAnimID -MARIO_ANIM_SWIM_PART1 = 170 --- @type MarioAnimID -MARIO_ANIM_SWIM_PART2 = 171 --- @type MarioAnimID -MARIO_ANIM_FLUTTERKICK = 172 --- @type MarioAnimID -MARIO_ANIM_WATER_ACTION_END = 173 --- @type MarioAnimID -MARIO_ANIM_WATER_PICK_UP_OBJ = 174 --- @type MarioAnimID -MARIO_ANIM_WATER_GRAB_OBJ_PART2 = 175 --- @type MarioAnimID -MARIO_ANIM_WATER_GRAB_OBJ_PART1 = 176 --- @type MarioAnimID -MARIO_ANIM_WATER_THROW_OBJ = 177 --- @type MarioAnimID -MARIO_ANIM_WATER_IDLE = 178 --- @type MarioAnimID -MARIO_ANIM_WATER_STAR_DANCE = 179 --- @type MarioAnimID -MARIO_ANIM_RETURN_FROM_WATER_STAR_DANCE = 180 --- @type MarioAnimID -MARIO_ANIM_GRAB_BOWSER = 181 --- @type MarioAnimID -MARIO_ANIM_SWINGING_BOWSER = 182 --- @type MarioAnimID -MARIO_ANIM_RELEASE_BOWSER = 183 --- @type MarioAnimID -MARIO_ANIM_HOLDING_BOWSER = 184 --- @type MarioAnimID -MARIO_ANIM_HEAVY_THROW = 185 --- @type MarioAnimID -MARIO_ANIM_WALK_PANTING = 186 --- @type MarioAnimID -MARIO_ANIM_WALK_WITH_HEAVY_OBJ = 187 --- @type MarioAnimID -MARIO_ANIM_TURNING_PART1 = 188 --- @type MarioAnimID -MARIO_ANIM_TURNING_PART2 = 189 --- @type MarioAnimID -MARIO_ANIM_SLIDEFLIP_LAND = 190 --- @type MarioAnimID -MARIO_ANIM_SLIDEFLIP = 191 --- @type MarioAnimID -MARIO_ANIM_TRIPLE_JUMP_LAND = 192 --- @type MarioAnimID -MARIO_ANIM_TRIPLE_JUMP = 193 --- @type MarioAnimID -MARIO_ANIM_FIRST_PERSON = 194 --- @type MarioAnimID -MARIO_ANIM_IDLE_HEAD_LEFT = 195 --- @type MarioAnimID -MARIO_ANIM_IDLE_HEAD_RIGHT = 196 --- @type MarioAnimID -MARIO_ANIM_IDLE_HEAD_CENTER = 197 --- @type MarioAnimID -MARIO_ANIM_HANDSTAND_LEFT = 198 --- @type MarioAnimID -MARIO_ANIM_HANDSTAND_RIGHT = 199 --- @type MarioAnimID -MARIO_ANIM_WAKE_FROM_SLEEP = 200 --- @type MarioAnimID -MARIO_ANIM_WAKE_FROM_LYING = 201 --- @type MarioAnimID -MARIO_ANIM_START_TIPTOE = 202 --- @type MarioAnimID -MARIO_ANIM_SLIDEJUMP = 203 --- @type MarioAnimID -MARIO_ANIM_START_WALLKICK = 204 --- @type MarioAnimID -MARIO_ANIM_STAR_DANCE = 205 --- @type MarioAnimID -MARIO_ANIM_RETURN_FROM_STAR_DANCE = 206 --- @type MarioAnimID -MARIO_ANIM_FORWARD_SPINNING_FLIP = 207 --- @type MarioAnimID -MARIO_ANIM_TRIPLE_JUMP_FLY = 208 --- @type MarioAnimID - ---- @alias MarioAnimID ---- | `MARIO_ANIM_SLOW_LEDGE_GRAB` ---- | `MARIO_ANIM_FALL_OVER_BACKWARDS` ---- | `MARIO_ANIM_BACKWARD_AIR_KB` ---- | `MARIO_ANIM_DYING_ON_BACK` ---- | `MARIO_ANIM_BACKFLIP` ---- | `MARIO_ANIM_CLIMB_UP_POLE` ---- | `MARIO_ANIM_GRAB_POLE_SHORT` ---- | `MARIO_ANIM_GRAB_POLE_SWING_PART1` ---- | `MARIO_ANIM_GRAB_POLE_SWING_PART2` ---- | `MARIO_ANIM_HANDSTAND_IDLE` ---- | `MARIO_ANIM_HANDSTAND_JUMP` ---- | `MARIO_ANIM_START_HANDSTAND` ---- | `MARIO_ANIM_RETURN_FROM_HANDSTAND` ---- | `MARIO_ANIM_IDLE_ON_POLE` ---- | `MARIO_ANIM_A_POSE` ---- | `MARIO_ANIM_SKID_ON_GROUND` ---- | `MARIO_ANIM_STOP_SKID` ---- | `MARIO_ANIM_CROUCH_FROM_FAST_LONGJUMP` ---- | `MARIO_ANIM_CROUCH_FROM_SLOW_LONGJUMP` ---- | `MARIO_ANIM_FAST_LONGJUMP` ---- | `MARIO_ANIM_SLOW_LONGJUMP` ---- | `MARIO_ANIM_AIRBORNE_ON_STOMACH` ---- | `MARIO_ANIM_WALK_WITH_LIGHT_OBJ` ---- | `MARIO_ANIM_RUN_WITH_LIGHT_OBJ` ---- | `MARIO_ANIM_SLOW_WALK_WITH_LIGHT_OBJ` ---- | `MARIO_ANIM_SHIVERING_WARMING_HAND` ---- | `MARIO_ANIM_SHIVERING_RETURN_TO_IDLE` ---- | `MARIO_ANIM_SHIVERING` ---- | `MARIO_ANIM_CLIMB_DOWN_LEDGE` ---- | `MARIO_ANIM_CREDITS_WAVING` ---- | `MARIO_ANIM_CREDITS_LOOK_UP` ---- | `MARIO_ANIM_CREDITS_RETURN_FROM_LOOK_UP` ---- | `MARIO_ANIM_CREDITS_RAISE_HAND` ---- | `MARIO_ANIM_CREDITS_LOWER_HAND` ---- | `MARIO_ANIM_CREDITS_TAKE_OFF_CAP` ---- | `MARIO_ANIM_CREDITS_START_WALK_LOOK_UP` ---- | `MARIO_ANIM_CREDITS_LOOK_BACK_THEN_RUN` ---- | `MARIO_ANIM_FINAL_BOWSER_RAISE_HAND_SPIN` ---- | `MARIO_ANIM_FINAL_BOWSER_WING_CAP_TAKE_OFF` ---- | `MARIO_ANIM_CREDITS_PEACE_SIGN` ---- | `MARIO_ANIM_STAND_UP_FROM_LAVA_BOOST` ---- | `MARIO_ANIM_FIRE_LAVA_BURN` ---- | `MARIO_ANIM_WING_CAP_FLY` ---- | `MARIO_ANIM_HANG_ON_OWL` ---- | `MARIO_ANIM_LAND_ON_STOMACH` ---- | `MARIO_ANIM_AIR_FORWARD_KB` ---- | `MARIO_ANIM_DYING_ON_STOMACH` ---- | `MARIO_ANIM_SUFFOCATING` ---- | `MARIO_ANIM_COUGHING` ---- | `MARIO_ANIM_THROW_CATCH_KEY` ---- | `MARIO_ANIM_DYING_FALL_OVER` ---- | `MARIO_ANIM_IDLE_ON_LEDGE` ---- | `MARIO_ANIM_FAST_LEDGE_GRAB` ---- | `MARIO_ANIM_HANG_ON_CEILING` ---- | `MARIO_ANIM_PUT_CAP_ON` ---- | `MARIO_ANIM_TAKE_CAP_OFF_THEN_ON` ---- | `MARIO_ANIM_QUICKLY_PUT_CAP_ON` ---- | `MARIO_ANIM_HEAD_STUCK_IN_GROUND` ---- | `MARIO_ANIM_GROUND_POUND_LANDING` ---- | `MARIO_ANIM_TRIPLE_JUMP_GROUND_POUND` ---- | `MARIO_ANIM_START_GROUND_POUND` ---- | `MARIO_ANIM_GROUND_POUND` ---- | `MARIO_ANIM_BOTTOM_STUCK_IN_GROUND` ---- | `MARIO_ANIM_IDLE_WITH_LIGHT_OBJ` ---- | `MARIO_ANIM_JUMP_LAND_WITH_LIGHT_OBJ` ---- | `MARIO_ANIM_JUMP_WITH_LIGHT_OBJ` ---- | `MARIO_ANIM_FALL_LAND_WITH_LIGHT_OBJ` ---- | `MARIO_ANIM_FALL_WITH_LIGHT_OBJ` ---- | `MARIO_ANIM_FALL_FROM_SLIDING_WITH_LIGHT_OBJ` ---- | `MARIO_ANIM_SLIDING_ON_BOTTOM_WITH_LIGHT_OBJ` ---- | `MARIO_ANIM_STAND_UP_FROM_SLIDING_WITH_LIGHT_OBJ` ---- | `MARIO_ANIM_RIDING_SHELL` ---- | `MARIO_ANIM_WALKING` ---- | `MARIO_ANIM_FORWARD_FLIP` ---- | `MARIO_ANIM_JUMP_RIDING_SHELL` ---- | `MARIO_ANIM_LAND_FROM_DOUBLE_JUMP` ---- | `MARIO_ANIM_DOUBLE_JUMP_FALL` ---- | `MARIO_ANIM_SINGLE_JUMP` ---- | `MARIO_ANIM_LAND_FROM_SINGLE_JUMP` ---- | `MARIO_ANIM_AIR_KICK` ---- | `MARIO_ANIM_DOUBLE_JUMP_RISE` ---- | `MARIO_ANIM_START_FORWARD_SPINNING` ---- | `MARIO_ANIM_THROW_LIGHT_OBJECT` ---- | `MARIO_ANIM_FALL_FROM_SLIDE_KICK` ---- | `MARIO_ANIM_BEND_KNESS_RIDING_SHELL` ---- | `MARIO_ANIM_LEGS_STUCK_IN_GROUND` ---- | `MARIO_ANIM_GENERAL_FALL` ---- | `MARIO_ANIM_GENERAL_LAND` ---- | `MARIO_ANIM_BEING_GRABBED` ---- | `MARIO_ANIM_GRAB_HEAVY_OBJECT` ---- | `MARIO_ANIM_SLOW_LAND_FROM_DIVE` ---- | `MARIO_ANIM_FLY_FROM_CANNON` ---- | `MARIO_ANIM_MOVE_ON_WIRE_NET_RIGHT` ---- | `MARIO_ANIM_MOVE_ON_WIRE_NET_LEFT` ---- | `MARIO_ANIM_MISSING_CAP` ---- | `MARIO_ANIM_PULL_DOOR_WALK_IN` ---- | `MARIO_ANIM_PUSH_DOOR_WALK_IN` ---- | `MARIO_ANIM_UNLOCK_DOOR` ---- | `MARIO_ANIM_START_REACH_POCKET` ---- | `MARIO_ANIM_REACH_POCKET` ---- | `MARIO_ANIM_STOP_REACH_POCKET` ---- | `MARIO_ANIM_GROUND_THROW` ---- | `MARIO_ANIM_GROUND_KICK` ---- | `MARIO_ANIM_FIRST_PUNCH` ---- | `MARIO_ANIM_SECOND_PUNCH` ---- | `MARIO_ANIM_FIRST_PUNCH_FAST` ---- | `MARIO_ANIM_SECOND_PUNCH_FAST` ---- | `MARIO_ANIM_PICK_UP_LIGHT_OBJ` ---- | `MARIO_ANIM_PUSHING` ---- | `MARIO_ANIM_START_RIDING_SHELL` ---- | `MARIO_ANIM_PLACE_LIGHT_OBJ` ---- | `MARIO_ANIM_FORWARD_SPINNING` ---- | `MARIO_ANIM_BACKWARD_SPINNING` ---- | `MARIO_ANIM_BREAKDANCE` ---- | `MARIO_ANIM_RUNNING` ---- | `MARIO_ANIM_RUNNING_UNUSED` ---- | `MARIO_ANIM_SOFT_BACK_KB` ---- | `MARIO_ANIM_SOFT_FRONT_KB` ---- | `MARIO_ANIM_DYING_IN_QUICKSAND` ---- | `MARIO_ANIM_IDLE_IN_QUICKSAND` ---- | `MARIO_ANIM_MOVE_IN_QUICKSAND` ---- | `MARIO_ANIM_ELECTROCUTION` ---- | `MARIO_ANIM_SHOCKED` ---- | `MARIO_ANIM_BACKWARD_KB` ---- | `MARIO_ANIM_FORWARD_KB` ---- | `MARIO_ANIM_IDLE_HEAVY_OBJ` ---- | `MARIO_ANIM_STAND_AGAINST_WALL` ---- | `MARIO_ANIM_SIDESTEP_LEFT` ---- | `MARIO_ANIM_SIDESTEP_RIGHT` ---- | `MARIO_ANIM_START_SLEEP_IDLE` ---- | `MARIO_ANIM_START_SLEEP_SCRATCH` ---- | `MARIO_ANIM_START_SLEEP_YAWN` ---- | `MARIO_ANIM_START_SLEEP_SITTING` ---- | `MARIO_ANIM_SLEEP_IDLE` ---- | `MARIO_ANIM_SLEEP_START_LYING` ---- | `MARIO_ANIM_SLEEP_LYING` ---- | `MARIO_ANIM_DIVE` ---- | `MARIO_ANIM_SLIDE_DIVE` ---- | `MARIO_ANIM_GROUND_BONK` ---- | `MARIO_ANIM_STOP_SLIDE_LIGHT_OBJ` ---- | `MARIO_ANIM_SLIDE_KICK` ---- | `MARIO_ANIM_CROUCH_FROM_SLIDE_KICK` ---- | `MARIO_ANIM_SLIDE_MOTIONLESS` ---- | `MARIO_ANIM_STOP_SLIDE` ---- | `MARIO_ANIM_FALL_FROM_SLIDE` ---- | `MARIO_ANIM_SLIDE` ---- | `MARIO_ANIM_TIPTOE` ---- | `MARIO_ANIM_TWIRL_LAND` ---- | `MARIO_ANIM_TWIRL` ---- | `MARIO_ANIM_START_TWIRL` ---- | `MARIO_ANIM_STOP_CROUCHING` ---- | `MARIO_ANIM_START_CROUCHING` ---- | `MARIO_ANIM_CROUCHING` ---- | `MARIO_ANIM_CRAWLING` ---- | `MARIO_ANIM_STOP_CRAWLING` ---- | `MARIO_ANIM_START_CRAWLING` ---- | `MARIO_ANIM_SUMMON_STAR` ---- | `MARIO_ANIM_RETURN_STAR_APPROACH_DOOR` ---- | `MARIO_ANIM_BACKWARDS_WATER_KB` ---- | `MARIO_ANIM_SWIM_WITH_OBJ_PART1` ---- | `MARIO_ANIM_SWIM_WITH_OBJ_PART2` ---- | `MARIO_ANIM_FLUTTERKICK_WITH_OBJ` ---- | `MARIO_ANIM_WATER_ACTION_END_WITH_OBJ` ---- | `MARIO_ANIM_STOP_GRAB_OBJ_WATER` ---- | `MARIO_ANIM_WATER_IDLE_WITH_OBJ` ---- | `MARIO_ANIM_DROWNING_PART1` ---- | `MARIO_ANIM_DROWNING_PART2` ---- | `MARIO_ANIM_WATER_DYING` ---- | `MARIO_ANIM_WATER_FORWARD_KB` ---- | `MARIO_ANIM_FALL_FROM_WATER` ---- | `MARIO_ANIM_SWIM_PART1` ---- | `MARIO_ANIM_SWIM_PART2` ---- | `MARIO_ANIM_FLUTTERKICK` ---- | `MARIO_ANIM_WATER_ACTION_END` ---- | `MARIO_ANIM_WATER_PICK_UP_OBJ` ---- | `MARIO_ANIM_WATER_GRAB_OBJ_PART2` ---- | `MARIO_ANIM_WATER_GRAB_OBJ_PART1` ---- | `MARIO_ANIM_WATER_THROW_OBJ` ---- | `MARIO_ANIM_WATER_IDLE` ---- | `MARIO_ANIM_WATER_STAR_DANCE` ---- | `MARIO_ANIM_RETURN_FROM_WATER_STAR_DANCE` ---- | `MARIO_ANIM_GRAB_BOWSER` ---- | `MARIO_ANIM_SWINGING_BOWSER` ---- | `MARIO_ANIM_RELEASE_BOWSER` ---- | `MARIO_ANIM_HOLDING_BOWSER` ---- | `MARIO_ANIM_HEAVY_THROW` ---- | `MARIO_ANIM_WALK_PANTING` ---- | `MARIO_ANIM_WALK_WITH_HEAVY_OBJ` ---- | `MARIO_ANIM_TURNING_PART1` ---- | `MARIO_ANIM_TURNING_PART2` ---- | `MARIO_ANIM_SLIDEFLIP_LAND` ---- | `MARIO_ANIM_SLIDEFLIP` ---- | `MARIO_ANIM_TRIPLE_JUMP_LAND` ---- | `MARIO_ANIM_TRIPLE_JUMP` ---- | `MARIO_ANIM_FIRST_PERSON` ---- | `MARIO_ANIM_IDLE_HEAD_LEFT` ---- | `MARIO_ANIM_IDLE_HEAD_RIGHT` ---- | `MARIO_ANIM_IDLE_HEAD_CENTER` ---- | `MARIO_ANIM_HANDSTAND_LEFT` ---- | `MARIO_ANIM_HANDSTAND_RIGHT` ---- | `MARIO_ANIM_WAKE_FROM_SLEEP` ---- | `MARIO_ANIM_WAKE_FROM_LYING` ---- | `MARIO_ANIM_START_TIPTOE` ---- | `MARIO_ANIM_SLIDEJUMP` ---- | `MARIO_ANIM_START_WALLKICK` ---- | `MARIO_ANIM_STAR_DANCE` ---- | `MARIO_ANIM_RETURN_FROM_STAR_DANCE` ---- | `MARIO_ANIM_FORWARD_SPINNING_FLIP` ---- | `MARIO_ANIM_TRIPLE_JUMP_FLY` - -MARIO_HAS_DEFAULT_CAP_ON = 0 --- @type MarioCapGSCId -MARIO_HAS_DEFAULT_CAP_OFF = 1 --- @type MarioCapGSCId -MARIO_HAS_WING_CAP_ON = 2 --- @type MarioCapGSCId -MARIO_HAS_WING_CAP_OFF = 3 --- @type MarioCapGSCId - ---- @alias MarioCapGSCId ---- | `MARIO_HAS_DEFAULT_CAP_ON` ---- | `MARIO_HAS_DEFAULT_CAP_OFF` ---- | `MARIO_HAS_WING_CAP_ON` ---- | `MARIO_HAS_WING_CAP_OFF` - MARIO_EYES_BLINK = 0 --- @type MarioEyesGSCId MARIO_EYES_OPEN = 1 --- @type MarioEyesGSCId MARIO_EYES_HALF_CLOSED = 2 --- @type MarioEyesGSCId @@ -5302,17 +5315,6 @@ MARIO_EYES_DEAD = 8 --- @type MarioEyesGSCId --- | `MARIO_EYES_LOOK_DOWN` --- | `MARIO_EYES_DEAD` -GRAB_POS_NULL = 0 --- @type MarioGrabPosGSCId -GRAB_POS_LIGHT_OBJ = 1 --- @type MarioGrabPosGSCId -GRAB_POS_HEAVY_OBJ = 2 --- @type MarioGrabPosGSCId -GRAB_POS_BOWSER = 3 --- @type MarioGrabPosGSCId - ---- @alias MarioGrabPosGSCId ---- | `GRAB_POS_NULL` ---- | `GRAB_POS_LIGHT_OBJ` ---- | `GRAB_POS_HEAVY_OBJ` ---- | `GRAB_POS_BOWSER` - MARIO_HAND_FISTS = 0 --- @type MarioHandGSCId MARIO_HAND_OPEN = 1 --- @type MarioHandGSCId MARIO_HAND_PEACE_SIGN = 2 --- @type MarioHandGSCId @@ -5328,32 +5330,45 @@ MARIO_HAND_RIGHT_OPEN = 5 --- @type MarioHandGSCId --- | `MARIO_HAND_HOLDING_WING_CAP` --- | `MARIO_HAND_RIGHT_OPEN` +MARIO_HAS_DEFAULT_CAP_ON = 0 --- @type MarioCapGSCId +MARIO_HAS_DEFAULT_CAP_OFF = 1 --- @type MarioCapGSCId +MARIO_HAS_WING_CAP_ON = 2 --- @type MarioCapGSCId +MARIO_HAS_WING_CAP_OFF = 3 --- @type MarioCapGSCId + +--- @alias MarioCapGSCId +--- | `MARIO_HAS_DEFAULT_CAP_ON` +--- | `MARIO_HAS_DEFAULT_CAP_OFF` +--- | `MARIO_HAS_WING_CAP_ON` +--- | `MARIO_HAS_WING_CAP_OFF` + +GRAB_POS_NULL = 0 --- @type MarioGrabPosGSCId +GRAB_POS_LIGHT_OBJ = 1 --- @type MarioGrabPosGSCId +GRAB_POS_HEAVY_OBJ = 2 --- @type MarioGrabPosGSCId +GRAB_POS_BOWSER = 3 --- @type MarioGrabPosGSCId + +--- @alias MarioGrabPosGSCId +--- | `GRAB_POS_NULL` +--- | `GRAB_POS_LIGHT_OBJ` +--- | `GRAB_POS_HEAVY_OBJ` +--- | `GRAB_POS_BOWSER` + --- @type integer MAX_KEYS = 4096 --- @type integer MAX_KEY_VALUE_LENGTH = 1024 ---- @type integer -PACKET_LENGTH = 3000 - ---- @type integer -SYNC_DISTANCE_INFINITE = 0 - --- @type integer SYNC_DISTANCE_ONLY_DEATH = -1 --- @type integer SYNC_DISTANCE_ONLY_EVENTS = -2 -BOUNCY_LEVEL_BOUNDS_OFF = 0 --- @type BouncyLevelBounds -BOUNCY_LEVEL_BOUNDS_ON = 1 --- @type BouncyLevelBounds -BOUNCY_LEVEL_BOUNDS_ON_CAP = 2 --- @type BouncyLevelBounds +--- @type integer +SYNC_DISTANCE_INFINITE = 0 ---- @alias BouncyLevelBounds ---- | `BOUNCY_LEVEL_BOUNDS_OFF` ---- | `BOUNCY_LEVEL_BOUNDS_ON` ---- | `BOUNCY_LEVEL_BOUNDS_ON_CAP` +--- @type integer +PACKET_LENGTH = 3000 NS_SOCKET = 0 --- @type NetworkSystemType NS_COOPNET = 1 --- @type NetworkSystemType @@ -5373,6 +5388,15 @@ PLAYER_INTERACTIONS_PVP = 2 --- @type PlayerInteractions --- | `PLAYER_INTERACTIONS_SOLID` --- | `PLAYER_INTERACTIONS_PVP` +BOUNCY_LEVEL_BOUNDS_OFF = 0 --- @type BouncyLevelBounds +BOUNCY_LEVEL_BOUNDS_ON = 1 --- @type BouncyLevelBounds +BOUNCY_LEVEL_BOUNDS_ON_CAP = 2 --- @type BouncyLevelBounds + +--- @alias BouncyLevelBounds +--- | `BOUNCY_LEVEL_BOUNDS_OFF` +--- | `BOUNCY_LEVEL_BOUNDS_ON` +--- | `BOUNCY_LEVEL_BOUNDS_ON_CAP` + PLAYER_PVP_CLASSIC = 0 --- @type PvpType PLAYER_PVP_REVAMPED = 1 --- @type PvpType @@ -5381,29 +5405,29 @@ PLAYER_PVP_REVAMPED = 1 --- @type PvpType --- | `PLAYER_PVP_REVAMPED` --- @type integer -MAX_DESCRIPTION_STRING = 20 - ---- @type integer -MAX_RX_SEQ_IDS = 256 - ---- @type integer -NETWORK_PLAYER_PING_TIMEOUT = 3 - ---- @type integer -NETWORK_PLAYER_TIMEOUT = 15 +UNKNOWN_LOCAL_INDEX = (-1) --- @type integer UNKNOWN_GLOBAL_INDEX = (-1) ---- @type integer -UNKNOWN_LOCAL_INDEX = (-1) - --- @type integer UNKNOWN_NETWORK_INDEX = (-1) +--- @type integer +NETWORK_PLAYER_TIMEOUT = 15 + +--- @type integer +NETWORK_PLAYER_PING_TIMEOUT = 3 + +--- @type integer +MAX_RX_SEQ_IDS = 256 + --- @type integer USE_REAL_PALETTE_VAR = 0xFF +--- @type integer +MAX_DESCRIPTION_STRING = 20 + NPT_UNKNOWN = 0 --- @type NetworkPlayerType NPT_LOCAL = 1 --- @type NetworkPlayerType NPT_SERVER = 2 --- @type NetworkPlayerType @@ -5415,20 +5439,23 @@ NPT_CLIENT = 3 --- @type NetworkPlayerType --- | `NPT_SERVER` --- | `NPT_CLIENT` ---- @type integer -OBJ_COL_FLAGS_LANDED = (OBJ_COL_FLAG_GROUNDED | OBJ_COL_FLAG_NO_Y_VEL) - --- @type integer OBJ_COL_FLAG_GROUNDED = (1 << 0) --- @type integer OBJ_COL_FLAG_HIT_WALL = (1 << 1) +--- @type integer +OBJ_COL_FLAG_UNDERWATER = (1 << 2) + --- @type integer OBJ_COL_FLAG_NO_Y_VEL = (1 << 3) --- @type integer -OBJ_COL_FLAG_UNDERWATER = (1 << 2) +OBJ_COL_FLAGS_LANDED = (OBJ_COL_FLAG_GROUNDED | OBJ_COL_FLAG_NO_Y_VEL) + +--- @type integer +ATTACK_HANDLER_NOP = 0 --- @type integer ATTACK_HANDLER_DIE_IF_HEALTH_NON_POSITIVE = 1 @@ -5437,67 +5464,49 @@ ATTACK_HANDLER_DIE_IF_HEALTH_NON_POSITIVE = 1 ATTACK_HANDLER_KNOCKBACK = 2 --- @type integer -ATTACK_HANDLER_NOP = 0 - ---- @type integer -ATTACK_HANDLER_SET_SPEED_TO_ZERO = 5 - ---- @type integer -ATTACK_HANDLER_SPECIAL_HUGE_GOOMBA_WEAKLY_ATTACKED = 7 +ATTACK_HANDLER_SQUISHED = 3 --- @type integer ATTACK_HANDLER_SPECIAL_KOOPA_LOSE_SHELL = 4 +--- @type integer +ATTACK_HANDLER_SET_SPEED_TO_ZERO = 5 + --- @type integer ATTACK_HANDLER_SPECIAL_WIGGLER_JUMPED_ON = 6 --- @type integer -ATTACK_HANDLER_SQUISHED = 3 +ATTACK_HANDLER_SPECIAL_HUGE_GOOMBA_WEAKLY_ATTACKED = 7 --- @type integer ATTACK_HANDLER_SQUISHED_WITH_BLUE_COIN = 8 --- @type integer -ACTIVATED_BF_PLAT_TYPE_BITFS_ELEVATOR = 2 - ---- @type integer -ACTIVATED_BF_PLAT_TYPE_BITFS_MESH_PLAT = 1 - ---- @type integer -ACTIVATED_BF_PLAT_TYPE_BITS_ARROW_PLAT = 0 +ACTIVE_FLAG_DEACTIVATED = 0 --- @type integer ACTIVE_FLAG_ACTIVE = (1 << 0) ---- @type integer -ACTIVE_FLAG_DEACTIVATED = 0 - ---- @type integer -ACTIVE_FLAG_DITHERED_ALPHA = (1 << 7) - ---- @type integer -ACTIVE_FLAG_DORMANT = (1 << 11) - --- @type integer ACTIVE_FLAG_FAR_AWAY = (1 << 1) --- @type integer -ACTIVE_FLAG_INITIATED_TIME_STOP = (1 << 5) +ACTIVE_FLAG_UNK2 = (1 << 2) --- @type integer ACTIVE_FLAG_IN_DIFFERENT_ROOM = (1 << 3) ---- @type integer -ACTIVE_FLAG_MOVE_THROUGH_GRATE = (1 << 6) - --- @type integer ACTIVE_FLAG_UNIMPORTANT = (1 << 4) --- @type integer -ACTIVE_FLAG_UNK10 = (1 << 10) +ACTIVE_FLAG_INITIATED_TIME_STOP = (1 << 5) --- @type integer -ACTIVE_FLAG_UNK2 = (1 << 2) +ACTIVE_FLAG_MOVE_THROUGH_GRATE = (1 << 6) + +--- @type integer +ACTIVE_FLAG_DITHERED_ALPHA = (1 << 7) --- @type integer ACTIVE_FLAG_UNK8 = (1 << 8) @@ -5506,730 +5515,73 @@ ACTIVE_FLAG_UNK8 = (1 << 8) ACTIVE_FLAG_UNK9 = (1 << 9) --- @type integer -ACTIVE_PARTICLE_BREATH = (1 << 17) +ACTIVE_FLAG_UNK10 = (1 << 10) --- @type integer -ACTIVE_PARTICLE_BUBBLE = (1 << 5) +ACTIVE_FLAG_DORMANT = (1 << 11) --- @type integer -ACTIVE_PARTICLE_DIRT = (1 << 14) +RESPAWN_INFO_TYPE_NULL = 0 --- @type integer -ACTIVE_PARTICLE_DUST = (1 << 0) +RESPAWN_INFO_TYPE_32 = 1 --- @type integer -ACTIVE_PARTICLE_FIRE = (1 << 11) +RESPAWN_INFO_TYPE_16 = 2 --- @type integer -ACTIVE_PARTICLE_H_STAR = (1 << 4) +RESPAWN_INFO_DONT_RESPAWN = 0xFF --- @type integer -ACTIVE_PARTICLE_IDLE_WATER_WAVE = (1 << 7) +OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE = (1 << 0) --- @type integer -ACTIVE_PARTICLE_LEAF = (1 << 13) +OBJ_FLAG_MOVE_XZ_USING_FVEL = (1 << 1) --- @type integer -ACTIVE_PARTICLE_MIST_CIRCLE = (1 << 15) +OBJ_FLAG_MOVE_Y_WITH_TERMINAL_VEL = (1 << 2) --- @type integer -ACTIVE_PARTICLE_PLUNGE_BUBBLE = (1 << 9) +OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW = (1 << 3) --- @type integer -ACTIVE_PARTICLE_SHALLOW_WATER_SPLASH = (1 << 12) +OBJ_FLAG_SET_FACE_ANGLE_TO_MOVE_ANGLE = (1 << 4) --- @type integer -ACTIVE_PARTICLE_SHALLOW_WATER_WAVE = (1 << 8) +OBJ_FLAG_0020 = (1 << 5) --- @type integer -ACTIVE_PARTICLE_SNOW = (1 << 16) +OBJ_FLAG_COMPUTE_DIST_TO_MARIO = (1 << 6) --- @type integer -ACTIVE_PARTICLE_SPARKLES = (1 << 3) +OBJ_FLAG_ACTIVE_FROM_AFAR = (1 << 7) --- @type integer -ACTIVE_PARTICLE_TRIANGLE = (1 << 19) +OBJ_FLAG_0100 = (1 << 8) --- @type integer -ACTIVE_PARTICLE_UNUSED_1 = (1 << 1) +OBJ_FLAG_TRANSFORM_RELATIVE_TO_PARENT = (1 << 9) --- @type integer -ACTIVE_PARTICLE_UNUSED_2 = (1 << 2) +OBJ_FLAG_HOLDABLE = (1 << 10) --- @type integer -ACTIVE_PARTICLE_V_STAR = (1 << 18) +OBJ_FLAG_SET_THROW_MATRIX_FROM_TRANSFORM = (1 << 11) --- @type integer -ACTIVE_PARTICLE_WATER_SPLASH = (1 << 6) +OBJ_FLAG_1000 = (1 << 12) --- @type integer -ACTIVE_PARTICLE_WAVE_TRAIL = (1 << 10) +OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO = (1 << 13) --- @type integer -AMP_ACT_ATTACK_COOLDOWN = 4 +OBJ_FLAG_PERSISTENT_RESPAWN = (1 << 14) --- @type integer -AMP_ACT_IDLE = 2 +OBJ_FLAG_8000 = (1 << 15) --- @type integer -AMP_BP_ROT_RADIUS_0 = 3 - ---- @type integer -AMP_BP_ROT_RADIUS_200 = 0 - ---- @type integer -AMP_BP_ROT_RADIUS_300 = 1 - ---- @type integer -AMP_BP_ROT_RADIUS_400 = 2 - ---- @type integer -ARROW_LIFT_ACT_IDLE = 0 - ---- @type integer -ARROW_LIFT_ACT_MOVING_AWAY = 1 - ---- @type integer -ARROW_LIFT_ACT_MOVING_BACK = 2 - ---- @type integer -ARROW_LIFT_DONE_MOVING = 1 - ---- @type integer -ARROW_LIFT_NOT_DONE_MOVING = 0 - ---- @type integer -BBALL_ACT_INITIALIZE = 0 - ---- @type integer -BBALL_ACT_ROLL = 1 - ---- @type integer -BBALL_BP_STYPE_BOB_LOWER = 2 - ---- @type integer -BBALL_BP_STYPE_BOB_UPPER = 0 - ---- @type integer -BBALL_BP_STYPE_THI_LARGE = 3 - ---- @type integer -BBALL_BP_STYPE_THI_SMALL = 4 - ---- @type integer -BBALL_BP_STYPE_TTM = 1 - ---- @type integer -BBH_DYNAMIC_SURFACE_ROOM = 0 - ---- @type integer -BBH_NEAR_MERRY_GO_ROUND_ROOM = 10 - ---- @type integer -BBH_OUTSIDE_ROOM = 13 - ---- @type integer -BBH_TILTING_TRAP_PLATFORM_ACT_MARIO_OFF = 1 - ---- @type integer -BBH_TILTING_TRAP_PLATFORM_ACT_MARIO_ON = 0 - ---- @type integer -BETA_BOO_KEY_ACT_DROPPED = 2 - ---- @type integer -BETA_BOO_KEY_ACT_DROPPING = 1 - ---- @type integer -BETA_BOO_KEY_ACT_IN_BOO = 0 - ---- @type integer -BETA_CHEST_ACT_IDLE_CLOSED = 0 - ---- @type integer -BETA_CHEST_ACT_IDLE_OPEN = 2 - ---- @type integer -BETA_CHEST_ACT_OPENING = 1 - ---- @type integer -BIRD_ACT_FLY = 1 - ---- @type integer -BIRD_ACT_INACTIVE = 0 - ---- @type integer -BIRD_BP_SPAWNED = 0 - ---- @type integer -BIRD_BP_SPAWNER = 1 - ---- @type integer -BLUE_COIN_SWITCH_ACT_IDLE = 0 - ---- @type integer -BLUE_COIN_SWITCH_ACT_RECEDING = 1 - ---- @type integer -BLUE_COIN_SWITCH_ACT_RESPAWNING = 3 - ---- @type integer -BLUE_COIN_SWITCH_ACT_TICKING = 2 - ---- @type integer -BLUE_FISH_ACT_ASCEND = 2 - ---- @type integer -BLUE_FISH_ACT_DIVE = 0 - ---- @type integer -BLUE_FISH_ACT_DUPLICATE = 2 - ---- @type integer -BLUE_FISH_ACT_ROOM = 1 - ---- @type integer -BLUE_FISH_ACT_SPAWN = 0 - ---- @type integer -BLUE_FISH_ACT_TURN = 1 - ---- @type integer -BLUE_FISH_ACT_TURN_BACK = 3 - ---- @type integer -BOBOMB_ACT_CHASE_MARIO = 2 - ---- @type integer -BOBOMB_ACT_DEATH_PLANE_DEATH = 101 - ---- @type integer -BOBOMB_ACT_EXPLODE = 3 - ---- @type integer -BOBOMB_ACT_LAUNCHED = 1 - ---- @type integer -BOBOMB_ACT_LAVA_DEATH = 100 - ---- @type integer -BOBOMB_ACT_PATROL = 0 - ---- @type integer -BOBOMB_BP_STYPE_GENERIC = 0 - ---- @type integer -BOBOMB_BP_STYPE_STATIONARY = 1 - ---- @type integer -BOBOMB_BUDDY_ACT_IDLE = 0 - ---- @type integer -BOBOMB_BUDDY_ACT_TALK = 3 - ---- @type integer -BOBOMB_BUDDY_ACT_TURN_TO_TALK = 2 - ---- @type integer -BOBOMB_BUDDY_BP_STYPE_BOB_CANNON_KBB = 2 - ---- @type integer -BOBOMB_BUDDY_BP_STYPE_BOB_GRASS = 3 - ---- @type integer -BOBOMB_BUDDY_BP_STYPE_BOB_GRASS_KBB = 1 - ---- @type integer -BOBOMB_BUDDY_BP_STYPE_GENERIC = 0 - ---- @type integer -BOBOMB_BUDDY_CANNON_OPENED = 2 - ---- @type integer -BOBOMB_BUDDY_CANNON_OPENING = 1 - ---- @type integer -BOBOMB_BUDDY_CANNON_STOP_TALKING = 3 - ---- @type integer -BOBOMB_BUDDY_CANNON_UNOPENED = 0 - ---- @type integer -BOBOMB_BUDDY_HAS_NOT_TALKED = 0 - ---- @type integer -BOBOMB_BUDDY_HAS_TALKED = 2 - ---- @type integer -BOBOMB_BUDDY_ROLE_ADVICE = 0 - ---- @type integer -BOBOMB_BUDDY_ROLE_CANNON = 1 - ---- @type integer -BOMP_ACT_EXTEND = 2 - ---- @type integer -BOMP_ACT_POKE_OUT = 1 - ---- @type integer -BOMP_ACT_RETRACT = 3 - ---- @type integer -BOMP_ACT_WAIT = 0 - ---- @type integer -BOO_ATTACKED = 1 - ---- @type integer -BOO_BOUNCED_ON = -1 - ---- @type integer -BOO_CAGE_ACT_FALLING = 1 - ---- @type integer -BOO_CAGE_ACT_IN_BOO = 0 - ---- @type integer -BOO_CAGE_ACT_MARIO_JUMPING_IN = 3 - ---- @type integer -BOO_CAGE_ACT_ON_GROUND = 2 - ---- @type integer -BOO_CAGE_ACT_USELESS = 4 - ---- @type integer -BOO_DEATH_STATUS_ALIVE = 0 - ---- @type integer -BOO_DEATH_STATUS_DEAD = 2 - ---- @type integer -BOO_DEATH_STATUS_DYING = 1 - ---- @type integer -BOO_NOT_ATTACKED = 0 - ---- @type integer -BOWSER_PUZZLE_ACT_DONE = 2 - ---- @type integer -BOWSER_PUZZLE_ACT_SPAWN_PIECES = 0 - ---- @type integer -BOWSER_PUZZLE_ACT_WAIT_FOR_COMPLETE = 1 - ---- @type integer -BULLY_ACT_ACTIVATE_AND_FALL = 5 - ---- @type integer -BULLY_ACT_BACK_UP = 3 - ---- @type integer -BULLY_ACT_CHASE_MARIO = 1 - ---- @type integer -BULLY_ACT_DEATH_PLANE_DEATH = 101 - ---- @type integer -BULLY_ACT_INACTIVE = 4 - ---- @type integer -BULLY_ACT_KNOCKBACK = 2 - ---- @type integer -BULLY_ACT_LAVA_DEATH = 100 - ---- @type integer -BULLY_ACT_PATROL = 0 - ---- @type integer -BULLY_BP_SIZE_BIG = 1 - ---- @type integer -BULLY_BP_SIZE_SMALL = 0 - ---- @type integer -BULLY_STYPE_CHILL = 16 - ---- @type integer -BULLY_STYPE_GENERIC = 0 - ---- @type integer -BULLY_STYPE_MINION = 1 - ---- @type integer -BUTTERFLY_ACT_FOLLOW_MARIO = 1 - ---- @type integer -BUTTERFLY_ACT_RESTING = 0 - ---- @type integer -BUTTERFLY_ACT_RETURN_HOME = 2 - ---- @type integer -CAMERA_LAKITU_BP_FOLLOW_CAMERA = 0 - ---- @type integer -CAMERA_LAKITU_BP_INTRO = 1 - ---- @type integer -CAMERA_LAKITU_INTRO_ACT_SPAWN_CLOUD = 1 - ---- @type integer -CAMERA_LAKITU_INTRO_ACT_TRIGGER_CUTSCENE = 0 - ---- @type integer -CAMERA_LAKITU_INTRO_ACT_UNK2 = 2 - ---- @type integer -CANNON_TRAP_DOOR_ACT_CAM_ZOOM = 1 - ---- @type integer -CANNON_TRAP_DOOR_ACT_CLOSED = 0 - ---- @type integer -CANNON_TRAP_DOOR_ACT_OPEN = 3 - ---- @type integer -CANNON_TRAP_DOOR_ACT_OPENING = 2 - ---- @type integer -CELEB_STAR_ACT_FACE_CAMERA = 1 - ---- @type integer -CELEB_STAR_ACT_SPIN_AROUND_MARIO = 0 - ---- @type integer -CHAIN_CHOMP_ACT_MOVE = 1 - ---- @type integer -CHAIN_CHOMP_ACT_UNINITIALIZED = 0 - ---- @type integer -CHAIN_CHOMP_ACT_UNLOAD_CHAIN = 2 - ---- @type integer -CHAIN_CHOMP_CHAIN_PART_BP_PIVOT = 0 - ---- @type integer -CHAIN_CHOMP_NOT_RELEASED = 0 - ---- @type integer -CHAIN_CHOMP_RELEASED_BREAK_GATE = 3 - ---- @type integer -CHAIN_CHOMP_RELEASED_END_CUTSCENE = 5 - ---- @type integer -CHAIN_CHOMP_RELEASED_JUMP_AWAY = 4 - ---- @type integer -CHAIN_CHOMP_RELEASED_LUNGE_AROUND = 2 - ---- @type integer -CHAIN_CHOMP_RELEASED_TRIGGER_CUTSCENE = 1 - ---- @type integer -CHAIN_CHOMP_SUB_ACT_LUNGE = 1 - ---- @type integer -CHAIN_CHOMP_SUB_ACT_TURN = 0 - ---- @type integer -CLOUD_ACT_FWOOSH_HIDDEN = 3 - ---- @type integer -CLOUD_ACT_MAIN = 1 - ---- @type integer -CLOUD_ACT_SPAWN_PARTS = 0 - ---- @type integer -CLOUD_ACT_UNLOAD = 2 - ---- @type integer -CLOUD_BP_FWOOSH = 0 - ---- @type integer -CLOUD_BP_LAKITU_CLOUD = 1 - ---- @type integer -COFFIN_ACT_IDLE = 0 - ---- @type integer -COFFIN_ACT_STAND_UP = 1 - ---- @type integer -COFFIN_BP_STATIC = 0 - ---- @type integer -COFFIN_SPAWNER_ACT_COFFINS_UNLOADED = 0 - ---- @type integer -DIALOG_UNK1_AWAIT_DIALOG = 3 - ---- @type integer -DIALOG_UNK1_BEGIN_DIALOG = 2 - ---- @type integer -DIALOG_UNK1_DISABLE_TIME_STOP = 4 - ---- @type integer -DIALOG_UNK1_ENABLE_TIME_STOP = 0 - ---- @type integer -DIALOG_UNK1_FLAG_4 = (1 << 4) - ---- @type integer -DIALOG_UNK1_FLAG_DEFAULT = (1 << 1) - ---- @type integer -DIALOG_UNK1_FLAG_RESPONSE = (1 << 2) - ---- @type integer -DIALOG_UNK1_INTERRUPT_MARIO_ACTION = 1 - ---- @type integer -DIALOG_UNK2_AWAIT_DIALOG = 2 - ---- @type integer -DIALOG_UNK2_ENABLE_TIME_STOP = 0 - ---- @type integer -DIALOG_UNK2_END_DIALOG = 3 - ---- @type integer -DIALOG_UNK2_FLAG_0 = (1 << 0) - ---- @type integer -DIALOG_UNK2_LEAVE_TIME_STOP_ENABLED = (1 << 4) - ---- @type integer -DIALOG_UNK2_TURN_AND_INTERRUPT_MARIO_ACTION = 1 - ---- @type integer -DORRIE_ACT_LOWER_HEAD = 1 - ---- @type integer -DORRIE_ACT_MOVE = 0 - ---- @type integer -DORRIE_ACT_RAISE_HEAD = 2 - ---- @type integer -ENEMY_LAKITU_ACT_MAIN = 1 - ---- @type integer -ENEMY_LAKITU_ACT_UNINITIALIZED = 0 - ---- @type integer -ENEMY_LAKITU_SUB_ACT_HOLD_SPINY = 1 - ---- @type integer -ENEMY_LAKITU_SUB_ACT_NO_SPINY = 0 - ---- @type integer -ENEMY_LAKITU_SUB_ACT_THROW_SPINY = 2 - ---- @type integer -EYEROK_BOSS_ACT_DEAD = 5 - ---- @type integer -EYEROK_BOSS_ACT_DIE = 4 - ---- @type integer -EYEROK_BOSS_ACT_FIGHT = 3 - ---- @type integer -EYEROK_BOSS_ACT_PAUSE = 6 - ---- @type integer -EYEROK_BOSS_ACT_SHOW_INTRO_TEXT = 2 - ---- @type integer -EYEROK_BOSS_ACT_SLEEP = 0 - ---- @type integer -EYEROK_BOSS_ACT_WAKE_UP = 1 - ---- @type integer -EYEROK_HAND_ACT_ATTACKED = 12 - ---- @type integer -EYEROK_HAND_ACT_BECOME_ACTIVE = 14 - ---- @type integer -EYEROK_HAND_ACT_BEGIN_DOUBLE_POUND = 10 - ---- @type integer -EYEROK_HAND_ACT_CLOSE = 4 - ---- @type integer -EYEROK_HAND_ACT_DEAD = 16 - ---- @type integer -EYEROK_HAND_ACT_DIE = 15 - ---- @type integer -EYEROK_HAND_ACT_DOUBLE_POUND = 11 - ---- @type integer -EYEROK_HAND_ACT_FIST_PUSH = 8 - ---- @type integer -EYEROK_HAND_ACT_FIST_SWEEP = 9 - ---- @type integer -EYEROK_HAND_ACT_IDLE = 1 - ---- @type integer -EYEROK_HAND_ACT_OPEN = 2 - ---- @type integer -EYEROK_HAND_ACT_PAUSE = 17 - ---- @type integer -EYEROK_HAND_ACT_RECOVER = 13 - ---- @type integer -EYEROK_HAND_ACT_RETREAT = 5 - ---- @type integer -EYEROK_HAND_ACT_SHOW_EYE = 3 - ---- @type integer -EYEROK_HAND_ACT_SLEEP = 0 - ---- @type integer -EYEROK_HAND_ACT_SMASH = 7 - ---- @type integer -EYEROK_HAND_ACT_TARGET_MARIO = 6 - ---- @type integer -FAKE_MONEYBAG_COIN_ACT_IDLE = 0 - ---- @type integer -FAKE_MONEYBAG_COIN_ACT_TRANSFORM = 1 - ---- @type integer -FALLING_PILLAR_ACT_FALLING = 2 - ---- @type integer -FALLING_PILLAR_ACT_IDLE = 0 - ---- @type integer -FALLING_PILLAR_ACT_TURNING = 1 - ---- @type integer -FIRE_PIRANHA_PLANT_ACT_GROW = 1 - ---- @type integer -FIRE_PIRANHA_PLANT_ACT_HIDE = 0 - ---- @type integer -FIRE_SPITTER_ACT_IDLE = 0 - ---- @type integer -FIRE_SPITTER_ACT_SPIT_FIRE = 1 - ---- @type integer -FISH_ACT_FLEE = 2 - ---- @type integer -FISH_ACT_INIT = 0 - ---- @type integer -FISH_ACT_ROAM = 1 - ---- @type integer -FISH_SPAWNER_ACT_IDLE = 1 - ---- @type integer -FISH_SPAWNER_ACT_RESPAWN = 2 - ---- @type integer -FISH_SPAWNER_ACT_SPAWN = 0 - ---- @type integer -FISH_SPAWNER_BP_FEW_BLUE = 1 - ---- @type integer -FISH_SPAWNER_BP_FEW_CYAN = 3 - ---- @type integer -FISH_SPAWNER_BP_MANY_BLUE = 0 - ---- @type integer -FISH_SPAWNER_BP_MANY_CYAN = 2 - ---- @type integer -FLY_GUY_ACT_APPROACH_MARIO = 1 - ---- @type integer -FLY_GUY_ACT_IDLE = 0 - ---- @type integer -FLY_GUY_ACT_LUNGE = 2 - ---- @type integer -FLY_GUY_ACT_SHOOT_FIRE = 3 - ---- @type integer -FREE_BBALL_ACT_IDLE = 0 - ---- @type integer -FREE_BBALL_ACT_RESET = 2 - ---- @type integer -FREE_BBALL_ACT_ROLL = 1 - ---- @type integer -GOOMBA_ACT_ATTACKED_MARIO = 1 - ---- @type integer -GOOMBA_ACT_JUMP = 2 - ---- @type integer -GOOMBA_ACT_WALK = 0 - ---- @type integer -GOOMBA_BP_SIZE_MASK = 0x00000003 - ---- @type integer -GOOMBA_BP_TRIPLET_FLAG_MASK = 0x000000FC - ---- @type integer -GOOMBA_SIZE_HUGE = 1 - ---- @type integer -GOOMBA_SIZE_REGULAR = 0 - ---- @type integer -GOOMBA_SIZE_TINY = 2 - ---- @type integer -GOOMBA_TRIPLET_SPAWNER_ACT_LOADED = 1 - ---- @type integer -GOOMBA_TRIPLET_SPAWNER_ACT_UNLOADED = 0 - ---- @type integer -GOOMBA_TRIPLET_SPAWNER_BP_EXTRA_GOOMBAS_MASK = 0x000000FC - ---- @type integer -GOOMBA_TRIPLET_SPAWNER_BP_SIZE_MASK = 0x00000003 - ---- @type integer -HAUNTED_BOOKSHELF_ACT_IDLE = 0 - ---- @type integer -HAUNTED_BOOKSHELF_ACT_RECEDE = 1 - ---- @type integer -HELD_DROPPED = 3 +OBJ_FLAG_30 = (1 << 30) --- @type integer HELD_FREE = 0 @@ -6241,7 +5593,211 @@ HELD_HELD = 1 HELD_THROWN = 2 --- @type integer -HIDDEN_BLUE_COIN_ACT_ACTIVE = 2 +HELD_DROPPED = 3 + +--- @type integer +DIALOG_UNK1_ENABLE_TIME_STOP = 0 + +--- @type integer +DIALOG_UNK1_INTERRUPT_MARIO_ACTION = 1 + +--- @type integer +DIALOG_UNK1_BEGIN_DIALOG = 2 + +--- @type integer +DIALOG_UNK1_AWAIT_DIALOG = 3 + +--- @type integer +DIALOG_UNK1_DISABLE_TIME_STOP = 4 + +--- @type integer +DIALOG_UNK1_FLAG_DEFAULT = (1 << 1) + +--- @type integer +DIALOG_UNK1_FLAG_RESPONSE = (1 << 2) + +--- @type integer +DIALOG_UNK1_FLAG_4 = (1 << 4) + +--- @type integer +DIALOG_UNK2_ENABLE_TIME_STOP = 0 + +--- @type integer +DIALOG_UNK2_TURN_AND_INTERRUPT_MARIO_ACTION = 1 + +--- @type integer +DIALOG_UNK2_AWAIT_DIALOG = 2 + +--- @type integer +DIALOG_UNK2_END_DIALOG = 3 + +--- @type integer +DIALOG_UNK2_FLAG_0 = (1 << 0) + +--- @type integer +DIALOG_UNK2_LEAVE_TIME_STOP_ENABLED = (1 << 4) + +--- @type integer +OBJ_MOVE_LANDED = (1 << 0) + +--- @type integer +OBJ_MOVE_ON_GROUND = (1 << 1) + +--- @type integer +OBJ_MOVE_LEFT_GROUND = (1 << 2) + +--- @type integer +OBJ_MOVE_ENTERED_WATER = (1 << 3) + +--- @type integer +OBJ_MOVE_AT_WATER_SURFACE = (1 << 4) + +--- @type integer +OBJ_MOVE_UNDERWATER_OFF_GROUND = (1 << 5) + +--- @type integer +OBJ_MOVE_UNDERWATER_ON_GROUND = (1 << 6) + +--- @type integer +OBJ_MOVE_IN_AIR = (1 << 7) + +--- @type integer +OBJ_MOVE_OUT_SCOPE = (1 << 8) + +--- @type integer +OBJ_MOVE_HIT_WALL = (1 << 9) + +--- @type integer +OBJ_MOVE_HIT_EDGE = (1 << 10) + +--- @type integer +OBJ_MOVE_ABOVE_LAVA = (1 << 11) + +--- @type integer +OBJ_MOVE_LEAVING_WATER = (1 << 12) + +--- @type integer +OBJ_MOVE_BOUNCE = (1 << 13) + +--- @type integer +OBJ_MOVE_ABOVE_DEATH_BARRIER = (1 << 14) + +--- @type integer +OBJ_MOVE_MASK_ON_GROUND = (OBJ_MOVE_LANDED | OBJ_MOVE_ON_GROUND) + +--- @type integer +OBJ_MOVE_MASK_IN_WATER = ( OBJ_MOVE_ENTERED_WATER | OBJ_MOVE_AT_WATER_SURFACE | OBJ_MOVE_UNDERWATER_OFF_GROUND | OBJ_MOVE_UNDERWATER_ON_GROUND) + +--- @type integer +ACTIVE_PARTICLE_DUST = (1 << 0) + +--- @type integer +ACTIVE_PARTICLE_UNUSED_1 = (1 << 1) + +--- @type integer +ACTIVE_PARTICLE_UNUSED_2 = (1 << 2) + +--- @type integer +ACTIVE_PARTICLE_SPARKLES = (1 << 3) + +--- @type integer +ACTIVE_PARTICLE_H_STAR = (1 << 4) + +--- @type integer +ACTIVE_PARTICLE_BUBBLE = (1 << 5) + +--- @type integer +ACTIVE_PARTICLE_WATER_SPLASH = (1 << 6) + +--- @type integer +ACTIVE_PARTICLE_IDLE_WATER_WAVE = (1 << 7) + +--- @type integer +ACTIVE_PARTICLE_SHALLOW_WATER_WAVE = (1 << 8) + +--- @type integer +ACTIVE_PARTICLE_PLUNGE_BUBBLE = (1 << 9) + +--- @type integer +ACTIVE_PARTICLE_WAVE_TRAIL = (1 << 10) + +--- @type integer +ACTIVE_PARTICLE_FIRE = (1 << 11) + +--- @type integer +ACTIVE_PARTICLE_SHALLOW_WATER_SPLASH = (1 << 12) + +--- @type integer +ACTIVE_PARTICLE_LEAF = (1 << 13) + +--- @type integer +ACTIVE_PARTICLE_DIRT = (1 << 14) + +--- @type integer +ACTIVE_PARTICLE_MIST_CIRCLE = (1 << 15) + +--- @type integer +ACTIVE_PARTICLE_SNOW = (1 << 16) + +--- @type integer +ACTIVE_PARTICLE_BREATH = (1 << 17) + +--- @type integer +ACTIVE_PARTICLE_V_STAR = (1 << 18) + +--- @type integer +ACTIVE_PARTICLE_TRIANGLE = (1 << 19) + +--- @type integer +OBJ_ACT_LAVA_DEATH = 100 + +--- @type integer +OBJ_ACT_DEATH_PLANE_DEATH = 101 + +--- @type integer +OBJ_ACT_HORIZONTAL_KNOCKBACK = 100 + +--- @type integer +OBJ_ACT_VERTICAL_KNOCKBACK = 101 + +--- @type integer +OBJ_ACT_SQUISHED = 102 + +--- @type integer +TTC_SPEED_SLOW = 0 + +--- @type integer +TTC_SPEED_FAST = 1 + +--- @type integer +TTC_SPEED_RANDOM = 2 + +--- @type integer +TTC_SPEED_STOPPED = 3 + +--- @type integer +BOBOMB_BP_STYPE_GENERIC = 0 + +--- @type integer +BOBOMB_BP_STYPE_STATIONARY = 1 + +--- @type integer +BOBOMB_ACT_PATROL = 0 + +--- @type integer +BOBOMB_ACT_LAUNCHED = 1 + +--- @type integer +BOBOMB_ACT_CHASE_MARIO = 2 + +--- @type integer +BOBOMB_ACT_EXPLODE = 3 + +--- @type integer +BOBOMB_ACT_LAVA_DEATH = 100 + +--- @type integer +BOBOMB_ACT_DEATH_PLANE_DEATH = 101 --- @type integer HIDDEN_BLUE_COIN_ACT_INACTIVE = 0 @@ -6250,10 +5806,151 @@ HIDDEN_BLUE_COIN_ACT_INACTIVE = 0 HIDDEN_BLUE_COIN_ACT_WAITING = 1 --- @type integer -HOMING_AMP_ACT_APPEAR = 1 +HIDDEN_BLUE_COIN_ACT_ACTIVE = 2 --- @type integer -HOMING_AMP_ACT_ATTACK_COOLDOWN = 4 +BLUE_COIN_SWITCH_ACT_IDLE = 0 + +--- @type integer +BLUE_COIN_SWITCH_ACT_RECEDING = 1 + +--- @type integer +BLUE_COIN_SWITCH_ACT_TICKING = 2 + +--- @type integer +BLUE_COIN_SWITCH_ACT_RESPAWNING = 3 + +--- @type integer +MOV_BCOIN_ACT_STILL = 0 + +--- @type integer +MOV_BCOIN_ACT_MOVING = 1 + +--- @type integer +MOV_YCOIN_ACT_IDLE = 0 + +--- @type integer +MOV_YCOIN_ACT_BLINKING = 1 + +--- @type integer +MOV_YCOIN_ACT_LAVA_DEATH = 100 + +--- @type integer +MOV_YCOIN_ACT_DEATH_PLANE_DEATH = 101 + +--- @type integer +BOBOMB_BUDDY_BP_STYPE_GENERIC = 0 + +--- @type integer +BOBOMB_BUDDY_BP_STYPE_BOB_GRASS_KBB = 1 + +--- @type integer +BOBOMB_BUDDY_BP_STYPE_BOB_CANNON_KBB = 2 + +--- @type integer +BOBOMB_BUDDY_BP_STYPE_BOB_GRASS = 3 + +--- @type integer +BOBOMB_BUDDY_ACT_IDLE = 0 + +--- @type integer +BOBOMB_BUDDY_ACT_TURN_TO_TALK = 2 + +--- @type integer +BOBOMB_BUDDY_ACT_TALK = 3 + +--- @type integer +BOBOMB_BUDDY_ROLE_ADVICE = 0 + +--- @type integer +BOBOMB_BUDDY_ROLE_CANNON = 1 + +--- @type integer +BOBOMB_BUDDY_CANNON_UNOPENED = 0 + +--- @type integer +BOBOMB_BUDDY_CANNON_OPENING = 1 + +--- @type integer +BOBOMB_BUDDY_CANNON_OPENED = 2 + +--- @type integer +BOBOMB_BUDDY_CANNON_STOP_TALKING = 3 + +--- @type integer +BOBOMB_BUDDY_HAS_NOT_TALKED = 0 + +--- @type integer +BOBOMB_BUDDY_HAS_TALKED = 2 + +--- @type integer +FISH_SPAWNER_ACT_SPAWN = 0 + +--- @type integer +FISH_SPAWNER_ACT_IDLE = 1 + +--- @type integer +FISH_SPAWNER_ACT_RESPAWN = 2 + +--- @type integer +FISH_SPAWNER_BP_MANY_BLUE = 0 + +--- @type integer +FISH_SPAWNER_BP_FEW_BLUE = 1 + +--- @type integer +FISH_SPAWNER_BP_MANY_CYAN = 2 + +--- @type integer +FISH_SPAWNER_BP_FEW_CYAN = 3 + +--- @type integer +FISH_ACT_INIT = 0 + +--- @type integer +FISH_ACT_ROAM = 1 + +--- @type integer +FISH_ACT_FLEE = 2 + +--- @type integer +BLUE_FISH_ACT_DIVE = 0 + +--- @type integer +BLUE_FISH_ACT_TURN = 1 + +--- @type integer +BLUE_FISH_ACT_ASCEND = 2 + +--- @type integer +BLUE_FISH_ACT_TURN_BACK = 3 + +--- @type integer +BLUE_FISH_ACT_SPAWN = 0 + +--- @type integer +BLUE_FISH_ACT_ROOM = 1 + +--- @type integer +BLUE_FISH_ACT_DUPLICATE = 2 + +--- @type integer +CANNON_TRAP_DOOR_ACT_CLOSED = 0 + +--- @type integer +CANNON_TRAP_DOOR_ACT_CAM_ZOOM = 1 + +--- @type integer +CANNON_TRAP_DOOR_ACT_OPENING = 2 + +--- @type integer +CANNON_TRAP_DOOR_ACT_OPEN = 3 + +--- @type integer +HOMING_AMP_ACT_INACTIVE = 0 + +--- @type integer +HOMING_AMP_ACT_APPEAR = 1 --- @type integer HOMING_AMP_ACT_CHASE = 2 @@ -6262,7 +5959,43 @@ HOMING_AMP_ACT_CHASE = 2 HOMING_AMP_ACT_GIVE_UP = 3 --- @type integer -HOMING_AMP_ACT_INACTIVE = 0 +HOMING_AMP_ACT_ATTACK_COOLDOWN = 4 + +--- @type integer +AMP_BP_ROT_RADIUS_200 = 0 + +--- @type integer +AMP_BP_ROT_RADIUS_300 = 1 + +--- @type integer +AMP_BP_ROT_RADIUS_400 = 2 + +--- @type integer +AMP_BP_ROT_RADIUS_0 = 3 + +--- @type integer +AMP_ACT_IDLE = 2 + +--- @type integer +AMP_ACT_ATTACK_COOLDOWN = 4 + +--- @type integer +BUTTERFLY_ACT_RESTING = 0 + +--- @type integer +BUTTERFLY_ACT_FOLLOW_MARIO = 1 + +--- @type integer +BUTTERFLY_ACT_RETURN_HOME = 2 + +--- @type integer +HOOT_AVAIL_ASLEEP_IN_TREE = 0 + +--- @type integer +HOOT_AVAIL_WANTS_TO_TALK = 1 + +--- @type integer +HOOT_AVAIL_READY_TO_FLY = 2 --- @type integer HOOT_ACT_ASCENT = 0 @@ -6274,13 +6007,49 @@ HOOT_ACT_CARRY = 1 HOOT_ACT_TIRED = 2 --- @type integer -HOOT_AVAIL_ASLEEP_IN_TREE = 0 +BULLY_BP_SIZE_SMALL = 0 --- @type integer -HOOT_AVAIL_READY_TO_FLY = 2 +BULLY_BP_SIZE_BIG = 1 --- @type integer -HOOT_AVAIL_WANTS_TO_TALK = 1 +BULLY_ACT_PATROL = 0 + +--- @type integer +BULLY_ACT_CHASE_MARIO = 1 + +--- @type integer +BULLY_ACT_KNOCKBACK = 2 + +--- @type integer +BULLY_ACT_BACK_UP = 3 + +--- @type integer +BULLY_ACT_INACTIVE = 4 + +--- @type integer +BULLY_ACT_ACTIVATE_AND_FALL = 5 + +--- @type integer +BULLY_ACT_LAVA_DEATH = 100 + +--- @type integer +BULLY_ACT_DEATH_PLANE_DEATH = 101 + +--- @type integer +BULLY_STYPE_GENERIC = 0 + +--- @type integer +BULLY_STYPE_MINION = 1 + +--- @type integer +BULLY_STYPE_CHILL = 16 + +--- @type integer +WATER_RING_ACT_NOT_COLLECTED = 0 + +--- @type integer +WATER_RING_ACT_COLLECTED = 1 --- @type integer JS_RING_SPAWNER_ACT_ACTIVE = 0 @@ -6289,37 +6058,316 @@ JS_RING_SPAWNER_ACT_ACTIVE = 0 JS_RING_SPAWNER_ACT_INACTIVE = 1 --- @type integer -KLEPTO_ACT_APPROACH_TARGET_HOLDING = 1 +CELEB_STAR_ACT_SPIN_AROUND_MARIO = 0 --- @type integer -KLEPTO_ACT_CIRCLE_TARGET_HOLDING = 0 +CELEB_STAR_ACT_FACE_CAMERA = 1 --- @type integer -KLEPTO_ACT_DIVE_AT_MARIO = 4 +LLL_DRAWBRIDGE_ACT_LOWER = 0 --- @type integer -KLEPTO_ACT_RESET_POSITION = 5 +LLL_DRAWBRIDGE_ACT_RAISE = 1 --- @type integer -KLEPTO_ACT_RETREAT = 7 +BOMP_ACT_WAIT = 0 --- @type integer -KLEPTO_ACT_STRUCK_BY_MARIO = 6 +BOMP_ACT_POKE_OUT = 1 --- @type integer -KLEPTO_ACT_TURN_TOWARD_MARIO = 3 +BOMP_ACT_EXTEND = 2 --- @type integer -KLEPTO_ACT_WAIT_FOR_MARIO = 2 +BOMP_ACT_RETRACT = 3 --- @type integer -KLEPTO_ANIM_STATE_HOLDING_CAP = 1 +WF_SLID_BRICK_PTFM_BP_MOV_VEL_10 = 1 --- @type integer -KLEPTO_ANIM_STATE_HOLDING_NOTHING = 0 +WF_SLID_BRICK_PTFM_BP_MOV_VEL_15 = 2 --- @type integer -KLEPTO_ANIM_STATE_HOLDING_STAR = 2 +WF_SLID_BRICK_PTFM_BP_MOV_VEL_20 = 3 + +--- @type integer +WF_SLID_BRICK_PTFM_ACT_WAIT = 0 + +--- @type integer +WF_SLID_BRICK_PTFM_ACT_EXTEND = 1 + +--- @type integer +WF_SLID_BRICK_PTFM_ACT_RETRACT = 2 + +--- @type integer +FAKE_MONEYBAG_COIN_ACT_IDLE = 0 + +--- @type integer +FAKE_MONEYBAG_COIN_ACT_TRANSFORM = 1 + +--- @type integer +MONEYBAG_ACT_APPEAR = 0 + +--- @type integer +MONEYBAG_ACT_UNUSED_APPEAR = 1 + +--- @type integer +MONEYBAG_ACT_MOVE_AROUND = 2 + +--- @type integer +MONEYBAG_ACT_RETURN_HOME = 3 + +--- @type integer +MONEYBAG_ACT_DISAPPEAR = 4 + +--- @type integer +MONEYBAG_ACT_DEATH = 5 + +--- @type integer +MONEYBAG_JUMP_LANDING = 0 + +--- @type integer +MONEYBAG_JUMP_PREPARE = 1 + +--- @type integer +MONEYBAG_JUMP_JUMP = 2 + +--- @type integer +MONEYBAG_JUMP_JUMP_AND_BOUNCE = 3 + +--- @type integer +MONEYBAG_JUMP_WALK_AROUND = 4 + +--- @type integer +MONEYBAG_JUMP_WALK_HOME = 5 + +--- @type integer +BBALL_ACT_INITIALIZE = 0 + +--- @type integer +BBALL_ACT_ROLL = 1 + +--- @type integer +BBALL_BP_STYPE_BOB_UPPER = 0 + +--- @type integer +BBALL_BP_STYPE_TTM = 1 + +--- @type integer +BBALL_BP_STYPE_BOB_LOWER = 2 + +--- @type integer +BBALL_BP_STYPE_THI_LARGE = 3 + +--- @type integer +BBALL_BP_STYPE_THI_SMALL = 4 + +--- @type integer +FREE_BBALL_ACT_IDLE = 0 + +--- @type integer +FREE_BBALL_ACT_ROLL = 1 + +--- @type integer +FREE_BBALL_ACT_RESET = 2 + +--- @type integer +BETA_CHEST_ACT_IDLE_CLOSED = 0 + +--- @type integer +BETA_CHEST_ACT_OPENING = 1 + +--- @type integer +BETA_CHEST_ACT_IDLE_OPEN = 2 + +--- @type integer +BBH_TILTING_TRAP_PLATFORM_ACT_MARIO_ON = 0 + +--- @type integer +BBH_TILTING_TRAP_PLATFORM_ACT_MARIO_OFF = 1 + +--- @type integer +BOO_DEATH_STATUS_ALIVE = 0 + +--- @type integer +BOO_DEATH_STATUS_DYING = 1 + +--- @type integer +BOO_DEATH_STATUS_DEAD = 2 + +--- @type integer +BOO_NOT_ATTACKED = 0 + +--- @type integer +BOO_ATTACKED = 1 + +--- @type integer +BOO_BOUNCED_ON = -1 + +--- @type integer +BETA_BOO_KEY_ACT_IN_BOO = 0 + +--- @type integer +BETA_BOO_KEY_ACT_DROPPING = 1 + +--- @type integer +BETA_BOO_KEY_ACT_DROPPED = 2 + +--- @type integer +BOO_CAGE_ACT_IN_BOO = 0 + +--- @type integer +BOO_CAGE_ACT_FALLING = 1 + +--- @type integer +BOO_CAGE_ACT_ON_GROUND = 2 + +--- @type integer +BOO_CAGE_ACT_MARIO_JUMPING_IN = 3 + +--- @type integer +BOO_CAGE_ACT_USELESS = 4 + +--- @type integer +HAUNTED_BOOKSHELF_ACT_IDLE = 0 + +--- @type integer +HAUNTED_BOOKSHELF_ACT_RECEDE = 1 + +--- @type integer +BBH_NEAR_MERRY_GO_ROUND_ROOM = 10 + +--- @type integer +BBH_DYNAMIC_SURFACE_ROOM = 0 + +--- @type integer +BBH_OUTSIDE_ROOM = 13 + +--- @type integer +COFFIN_SPAWNER_ACT_COFFINS_UNLOADED = 0 + +--- @type integer +COFFIN_ACT_IDLE = 0 + +--- @type integer +COFFIN_ACT_STAND_UP = 1 + +--- @type integer +COFFIN_BP_STATIC = 0 + +--- @type integer +ARROW_LIFT_ACT_IDLE = 0 + +--- @type integer +ARROW_LIFT_ACT_MOVING_AWAY = 1 + +--- @type integer +ARROW_LIFT_ACT_MOVING_BACK = 2 + +--- @type integer +ARROW_LIFT_NOT_DONE_MOVING = 0 + +--- @type integer +ARROW_LIFT_DONE_MOVING = 1 + +--- @type integer +YOSHI_ACT_IDLE = 0 + +--- @type integer +YOSHI_ACT_WALK = 1 + +--- @type integer +YOSHI_ACT_TALK = 2 + +--- @type integer +YOSHI_ACT_WALK_JUMP_OFF_ROOF = 3 + +--- @type integer +YOSHI_ACT_FINISH_JUMPING_AND_DESPAWN = 4 + +--- @type integer +YOSHI_ACT_GIVE_PRESENT = 5 + +--- @type integer +YOSHI_ACT_CREDITS = 10 + +--- @type integer +KOOPA_UNSHELLED_ACT_RUN = 0 + +--- @type integer +KOOPA_UNSHELLED_ACT_DIVE = 1 + +--- @type integer +KOOPA_UNSHELLED_ACT_LYING = 2 + +--- @type integer +KOOPA_UNSHELLED_ACT_UNUSED3 = 3 + +--- @type integer +KOOPA_SHELLED_ACT_STOPPED = 0 + +--- @type integer +KOOPA_SHELLED_ACT_WALK = 1 + +--- @type integer +KOOPA_SHELLED_ACT_RUN_FROM_MARIO = 2 + +--- @type integer +KOOPA_SHELLED_ACT_LYING = 3 + +--- @type integer +KOOPA_SHELLED_ACT_DIE = 4 + +--- @type integer +KOOPA_THE_QUICK_ACT_WAIT_BEFORE_RACE = 0 + +--- @type integer +KOOPA_THE_QUICK_ACT_UNUSED1 = 1 + +--- @type integer +KOOPA_THE_QUICK_ACT_SHOW_INIT_TEXT = 2 + +--- @type integer +KOOPA_THE_QUICK_ACT_RACE = 3 + +--- @type integer +KOOPA_THE_QUICK_ACT_DECELERATE = 4 + +--- @type integer +KOOPA_THE_QUICK_ACT_STOP = 5 + +--- @type integer +KOOPA_THE_QUICK_ACT_AFTER_RACE = 6 + +--- @type integer +KOOPA_SHELLED_SUB_ACT_START_WALK = 0 + +--- @type integer +KOOPA_SHELLED_SUB_ACT_WALK = 1 + +--- @type integer +KOOPA_SHELLED_SUB_ACT_STOP_WALK = 2 + +--- @type integer +KOOPA_THE_QUICK_SUB_ACT_START_RUN = 0 + +--- @type integer +KOOPA_THE_QUICK_SUB_ACT_RUN = 1 + +--- @type integer +KOOPA_THE_QUICK_SUB_ACT_JUMP = 2 + +--- @type integer +KOOPA_THE_QUICK_BOB_INDEX = 0 + +--- @type integer +KOOPA_THE_QUICK_THI_INDEX = 1 + +--- @type integer +KOOPA_BP_UNSHELLED = 0 + +--- @type integer +KOOPA_BP_NORMAL = 1 --- @type integer KOOPA_BP_KOOPA_THE_QUICK_BASE = 2 @@ -6330,189 +6378,228 @@ KOOPA_BP_KOOPA_THE_QUICK_BOB = (KOOPA_BP_KOOPA_THE_QUICK_BASE + KOOPA_THE_QUICK_ --- @type integer KOOPA_BP_KOOPA_THE_QUICK_THI = (KOOPA_BP_KOOPA_THE_QUICK_BASE + KOOPA_THE_QUICK_THI_INDEX) ---- @type integer -KOOPA_BP_NORMAL = 1 - --- @type integer KOOPA_BP_TINY = 4 --- @type integer -KOOPA_BP_UNSHELLED = 0 +POKEY_ACT_UNINITIALIZED = 0 --- @type integer -KOOPA_SHELLED_ACT_DIE = 4 +POKEY_ACT_WANDER = 1 --- @type integer -KOOPA_SHELLED_ACT_LYING = 3 +POKEY_ACT_UNLOAD_PARTS = 2 --- @type integer -KOOPA_SHELLED_ACT_RUN_FROM_MARIO = 2 +SWOOP_ACT_IDLE = 0 --- @type integer -KOOPA_SHELLED_ACT_STOPPED = 0 +SWOOP_ACT_MOVE = 1 --- @type integer -KOOPA_SHELLED_ACT_WALK = 1 +FLY_GUY_ACT_IDLE = 0 --- @type integer -KOOPA_SHELLED_SUB_ACT_START_WALK = 0 +FLY_GUY_ACT_APPROACH_MARIO = 1 --- @type integer -KOOPA_SHELLED_SUB_ACT_STOP_WALK = 2 +FLY_GUY_ACT_LUNGE = 2 --- @type integer -KOOPA_SHELLED_SUB_ACT_WALK = 1 +FLY_GUY_ACT_SHOOT_FIRE = 3 --- @type integer -KOOPA_THE_QUICK_ACT_AFTER_RACE = 6 +GOOMBA_TRIPLET_SPAWNER_BP_SIZE_MASK = 0x00000003 --- @type integer -KOOPA_THE_QUICK_ACT_DECELERATE = 4 +GOOMBA_TRIPLET_SPAWNER_BP_EXTRA_GOOMBAS_MASK = 0x000000FC --- @type integer -KOOPA_THE_QUICK_ACT_RACE = 3 +GOOMBA_TRIPLET_SPAWNER_ACT_UNLOADED = 0 --- @type integer -KOOPA_THE_QUICK_ACT_SHOW_INIT_TEXT = 2 +GOOMBA_TRIPLET_SPAWNER_ACT_LOADED = 1 --- @type integer -KOOPA_THE_QUICK_ACT_STOP = 5 +GOOMBA_BP_SIZE_MASK = 0x00000003 --- @type integer -KOOPA_THE_QUICK_ACT_UNUSED1 = 1 +GOOMBA_SIZE_REGULAR = 0 --- @type integer -KOOPA_THE_QUICK_ACT_WAIT_BEFORE_RACE = 0 +GOOMBA_SIZE_HUGE = 1 --- @type integer -KOOPA_THE_QUICK_BOB_INDEX = 0 +GOOMBA_SIZE_TINY = 2 --- @type integer -KOOPA_THE_QUICK_SUB_ACT_JUMP = 2 +GOOMBA_BP_TRIPLET_FLAG_MASK = 0x000000FC --- @type integer -KOOPA_THE_QUICK_SUB_ACT_RUN = 1 +GOOMBA_ACT_WALK = 0 --- @type integer -KOOPA_THE_QUICK_SUB_ACT_START_RUN = 0 +GOOMBA_ACT_ATTACKED_MARIO = 1 --- @type integer -KOOPA_THE_QUICK_THI_INDEX = 1 +GOOMBA_ACT_JUMP = 2 --- @type integer -KOOPA_UNSHELLED_ACT_DIVE = 1 +CHAIN_CHOMP_ACT_UNINITIALIZED = 0 --- @type integer -KOOPA_UNSHELLED_ACT_LYING = 2 +CHAIN_CHOMP_ACT_MOVE = 1 --- @type integer -KOOPA_UNSHELLED_ACT_RUN = 0 +CHAIN_CHOMP_ACT_UNLOAD_CHAIN = 2 --- @type integer -KOOPA_UNSHELLED_ACT_UNUSED3 = 3 +CHAIN_CHOMP_SUB_ACT_TURN = 0 --- @type integer -LLL_DRAWBRIDGE_ACT_LOWER = 0 +CHAIN_CHOMP_SUB_ACT_LUNGE = 1 --- @type integer -LLL_DRAWBRIDGE_ACT_RAISE = 1 +CHAIN_CHOMP_NOT_RELEASED = 0 --- @type integer -MAD_PIANO_ACT_ATTACK = 1 +CHAIN_CHOMP_RELEASED_TRIGGER_CUTSCENE = 1 --- @type integer -MAD_PIANO_ACT_WAIT = 0 +CHAIN_CHOMP_RELEASED_LUNGE_AROUND = 2 --- @type integer -MANTA_ACT_NO_RINGS = 1 +CHAIN_CHOMP_RELEASED_BREAK_GATE = 3 + +--- @type integer +CHAIN_CHOMP_RELEASED_JUMP_AWAY = 4 + +--- @type integer +CHAIN_CHOMP_RELEASED_END_CUTSCENE = 5 + +--- @type integer +CHAIN_CHOMP_CHAIN_PART_BP_PIVOT = 0 + +--- @type integer +WOODEN_POST_BP_NO_COINS_MASK = 0x0000FF00 + +--- @type integer +WIGGLER_ACT_UNINITIALIZED = 0 + +--- @type integer +WIGGLER_ACT_WALK = 1 + +--- @type integer +WIGGLER_ACT_KNOCKBACK = 2 + +--- @type integer +WIGGLER_ACT_JUMPED_ON = 3 + +--- @type integer +WIGGLER_ACT_SHRINK = 4 + +--- @type integer +WIGGLER_ACT_FALL_THROUGH_FLOOR = 5 + +--- @type integer +WIGGLER_TEXT_STATUS_AWAIT_DIALOG = 0 + +--- @type integer +WIGGLER_TEXT_STATUS_SHOWING_DIALOG = 1 + +--- @type integer +WIGGLER_TEXT_STATUS_COMPLETED_DIALOG = 2 + +--- @type integer +SPINY_ACT_WALK = 0 + +--- @type integer +SPINY_ACT_HELD_BY_LAKITU = 1 + +--- @type integer +SPINY_ACT_THROWN_BY_LAKITU = 2 + +--- @type integer +SPINY_ACT_ATTACKED_MARIO = 3 + +--- @type integer +ENEMY_LAKITU_ACT_UNINITIALIZED = 0 + +--- @type integer +ENEMY_LAKITU_ACT_MAIN = 1 + +--- @type integer +ENEMY_LAKITU_SUB_ACT_NO_SPINY = 0 + +--- @type integer +ENEMY_LAKITU_SUB_ACT_HOLD_SPINY = 1 + +--- @type integer +ENEMY_LAKITU_SUB_ACT_THROW_SPINY = 2 + +--- @type integer +CLOUD_ACT_SPAWN_PARTS = 0 + +--- @type integer +CLOUD_ACT_MAIN = 1 + +--- @type integer +CLOUD_ACT_UNLOAD = 2 + +--- @type integer +CLOUD_ACT_FWOOSH_HIDDEN = 3 + +--- @type integer +CLOUD_BP_FWOOSH = 0 + +--- @type integer +CLOUD_BP_LAKITU_CLOUD = 1 + +--- @type integer +CAMERA_LAKITU_INTRO_ACT_TRIGGER_CUTSCENE = 0 + +--- @type integer +CAMERA_LAKITU_INTRO_ACT_SPAWN_CLOUD = 1 + +--- @type integer +CAMERA_LAKITU_INTRO_ACT_UNK2 = 2 + +--- @type integer +CAMERA_LAKITU_BP_FOLLOW_CAMERA = 0 + +--- @type integer +CAMERA_LAKITU_BP_INTRO = 1 --- @type integer MANTA_ACT_SPAWN_RINGS = 0 --- @type integer -MIPS_ACT_FALL_DOWN = 3 - ---- @type integer -MIPS_ACT_FOLLOW_PATH = 1 - ---- @type integer -MIPS_ACT_IDLE = 4 - ---- @type integer -MIPS_ACT_WAIT_FOR_ANIMATION_DONE = 2 - ---- @type integer -MIPS_ACT_WAIT_FOR_NEARBY_MARIO = 0 - ---- @type integer -MIPS_STAR_STATUS_ALREADY_SPAWNED_STAR = 2 - ---- @type integer -MIPS_STAR_STATUS_HAVENT_SPAWNED_STAR = 0 - ---- @type integer -MIPS_STAR_STATUS_SHOULD_SPAWN_STAR = 1 - ---- @type integer -MONEYBAG_ACT_APPEAR = 0 - ---- @type integer -MONEYBAG_ACT_DEATH = 5 - ---- @type integer -MONEYBAG_ACT_DISAPPEAR = 4 - ---- @type integer -MONEYBAG_ACT_MOVE_AROUND = 2 - ---- @type integer -MONEYBAG_ACT_RETURN_HOME = 3 - ---- @type integer -MONEYBAG_ACT_UNUSED_APPEAR = 1 - ---- @type integer -MONEYBAG_JUMP_JUMP = 2 - ---- @type integer -MONEYBAG_JUMP_JUMP_AND_BOUNCE = 3 - ---- @type integer -MONEYBAG_JUMP_LANDING = 0 - ---- @type integer -MONEYBAG_JUMP_PREPARE = 1 - ---- @type integer -MONEYBAG_JUMP_WALK_AROUND = 4 - ---- @type integer -MONEYBAG_JUMP_WALK_HOME = 5 - ---- @type integer -MONTY_MOLE_ACT_BEGIN_JUMP_INTO_HOLE = 3 - ---- @type integer -MONTY_MOLE_ACT_HIDE = 6 - ---- @type integer -MONTY_MOLE_ACT_JUMP_INTO_HOLE = 5 - ---- @type integer -MONTY_MOLE_ACT_JUMP_OUT_OF_HOLE = 7 - ---- @type integer -MONTY_MOLE_ACT_RISE_FROM_HOLE = 1 +MANTA_ACT_NO_RINGS = 1 --- @type integer MONTY_MOLE_ACT_SELECT_HOLE = 0 +--- @type integer +MONTY_MOLE_ACT_RISE_FROM_HOLE = 1 + --- @type integer MONTY_MOLE_ACT_SPAWN_ROCK = 2 +--- @type integer +MONTY_MOLE_ACT_BEGIN_JUMP_INTO_HOLE = 3 + --- @type integer MONTY_MOLE_ACT_THROW_ROCK = 4 +--- @type integer +MONTY_MOLE_ACT_JUMP_INTO_HOLE = 5 + +--- @type integer +MONTY_MOLE_ACT_HIDE = 6 + +--- @type integer +MONTY_MOLE_ACT_JUMP_OUT_OF_HOLE = 7 + --- @type integer MONTY_MOLE_BP_NO_ROCK = 0 @@ -6523,224 +6610,209 @@ MONTY_MOLE_ROCK_ACT_HELD = 0 MONTY_MOLE_ROCK_ACT_MOVE = 1 --- @type integer -MOV_BCOIN_ACT_MOVING = 1 +UKIKI_ACT_IDLE = 0 --- @type integer -MOV_BCOIN_ACT_STILL = 0 +UKIKI_ACT_RUN = 1 --- @type integer -MOV_YCOIN_ACT_BLINKING = 1 +UKIKI_ACT_TURN_TO_MARIO = 2 --- @type integer -MOV_YCOIN_ACT_DEATH_PLANE_DEATH = 101 +UKIKI_ACT_JUMP = 3 --- @type integer -MOV_YCOIN_ACT_IDLE = 0 +UKIKI_ACT_GO_TO_CAGE = 4 --- @type integer -MOV_YCOIN_ACT_LAVA_DEATH = 100 +UKIKI_ACT_WAIT_TO_RESPAWN = 5 --- @type integer -MR_BLIZZARD_ACT_BURROW = 5 +UKIKI_ACT_UNUSED_TURN = 6 --- @type integer -MR_BLIZZARD_ACT_DEATH = 6 +UKIKI_ACT_RETURN_HOME = 7 --- @type integer -MR_BLIZZARD_ACT_HIDE_UNHIDE = 1 +UKIKI_SUB_ACT_TAUNT_NONE = 0 --- @type integer -MR_BLIZZARD_ACT_JUMP = 7 +UKIKI_SUB_ACT_TAUNT_ITCH = 1 --- @type integer -MR_BLIZZARD_ACT_RISE_FROM_GROUND = 2 +UKIKI_SUB_ACT_TAUNT_SCREECH = 2 --- @type integer -MR_BLIZZARD_ACT_ROTATE = 3 +UKIKI_SUB_ACT_TAUNT_JUMP_CLAP = 3 --- @type integer -MR_BLIZZARD_ACT_SPAWN_SNOWBALL = 0 +UKIKI_SUB_ACT_TAUNT_HANDSTAND = 4 --- @type integer -MR_BLIZZARD_ACT_THROW_SNOWBALL = 4 +UKIKI_SUB_ACT_CAGE_RUN_TO_CAGE = 0 --- @type integer -MR_BLIZZARD_STYPE_JUMPING = 1 +UKIKI_SUB_ACT_CAGE_WAIT_FOR_MARIO = 1 --- @type integer -MR_BLIZZARD_STYPE_NO_CAP = 0 +UKIKI_SUB_ACT_CAGE_TALK_TO_MARIO = 2 --- @type integer -OBJ_ACT_DEATH_PLANE_DEATH = 101 +UKIKI_SUB_ACT_CAGE_TURN_TO_CAGE = 3 --- @type integer -OBJ_ACT_HORIZONTAL_KNOCKBACK = 100 +UKIKI_SUB_ACT_CAGE_JUMP_TO_CAGE = 4 --- @type integer -OBJ_ACT_LAVA_DEATH = 100 +UKIKI_SUB_ACT_CAGE_LAND_ON_CAGE = 5 --- @type integer -OBJ_ACT_SQUISHED = 102 +UKIKI_SUB_ACT_CAGE_SPIN_ON_CAGE = 6 --- @type integer -OBJ_ACT_VERTICAL_KNOCKBACK = 101 +UKIKI_SUB_ACT_CAGE_DESPAWN = 7 --- @type integer -OBJ_FLAG_0020 = (1 << 5) +UKIKI_TEXT_DEFAULT = 0 --- @type integer -OBJ_FLAG_0100 = (1 << 8) +UKIKI_TEXT_CAGE_TEXTBOX = 1 --- @type integer -OBJ_FLAG_1000 = (1 << 12) +UKIKI_TEXT_GO_TO_CAGE = 2 --- @type integer -OBJ_FLAG_30 = (1 << 30) +UKIKI_TEXT_STOLE_CAP = 3 --- @type integer -OBJ_FLAG_8000 = (1 << 15) +UKIKI_TEXT_HAS_CAP = 4 --- @type integer -OBJ_FLAG_ACTIVE_FROM_AFAR = (1 << 7) +UKIKI_TEXT_GAVE_CAP_BACK = 5 --- @type integer -OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO = (1 << 13) +UKIKI_TEXT_DO_NOT_LET_GO = 6 --- @type integer -OBJ_FLAG_COMPUTE_DIST_TO_MARIO = (1 << 6) +UKIKI_TEXT_STEAL_CAP = 7 --- @type integer -OBJ_FLAG_HOLDABLE = (1 << 10) +UKIKI_CAGE = 0 --- @type integer -OBJ_FLAG_MOVE_XZ_USING_FVEL = (1 << 1) +UKIKI_CAP = 1 --- @type integer -OBJ_FLAG_MOVE_Y_WITH_TERMINAL_VEL = (1 << 2) +UKIKI_ANIM_RUN = 0 --- @type integer -OBJ_FLAG_PERSISTENT_RESPAWN = (1 << 14) +UKIKI_ANIM_UNUSED_WALK = 1 --- @type integer -OBJ_FLAG_SET_FACE_ANGLE_TO_MOVE_ANGLE = (1 << 4) +UKIKI_ANIM_UNUSED_APOSE = 2 --- @type integer -OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW = (1 << 3) +UKIKI_ANIM_UNUSED_DEATH = 3 --- @type integer -OBJ_FLAG_SET_THROW_MATRIX_FROM_TRANSFORM = (1 << 11) +UKIKI_ANIM_SCREECH = 4 --- @type integer -OBJ_FLAG_TRANSFORM_RELATIVE_TO_PARENT = (1 << 9) +UKIKI_ANIM_JUMP_CLAP = 5 --- @type integer -OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE = (1 << 0) +UKIKI_ANIM_UNUSED_HOP = 6 --- @type integer -OBJ_MOVE_ABOVE_DEATH_BARRIER = (1 << 14) +UKIKI_ANIM_LAND = 7 --- @type integer -OBJ_MOVE_ABOVE_LAVA = (1 << 11) +UKIKI_ANIM_JUMP = 8 --- @type integer -OBJ_MOVE_AT_WATER_SURFACE = (1 << 4) +UKIKI_ANIM_ITCH = 9 --- @type integer -OBJ_MOVE_BOUNCE = (1 << 13) +UKIKI_ANIM_HANDSTAND = 10 --- @type integer -OBJ_MOVE_ENTERED_WATER = (1 << 3) +UKIKI_ANIM_TURN = 11 --- @type integer -OBJ_MOVE_HIT_EDGE = (1 << 10) +UKIKI_ANIM_HELD = 12 --- @type integer -OBJ_MOVE_HIT_WALL = (1 << 9) +UKIKI_ANIM_STATE_DEFAULT = 0 --- @type integer -OBJ_MOVE_IN_AIR = (1 << 7) +UKIKI_ANIM_STATE_EYE_CLOSED = 1 --- @type integer -OBJ_MOVE_LANDED = (1 << 0) +UKIKI_ANIM_STATE_CAP_ON = 2 --- @type integer -OBJ_MOVE_LEAVING_WATER = (1 << 12) +UKIKI_CAP_ON = 1 --- @type integer -OBJ_MOVE_LEFT_GROUND = (1 << 2) +UKIKI_CAGE_STAR_ACT_IN_CAGE = 0 --- @type integer -OBJ_MOVE_MASK_IN_WATER = ( OBJ_MOVE_ENTERED_WATER | OBJ_MOVE_AT_WATER_SURFACE | OBJ_MOVE_UNDERWATER_OFF_GROUND | OBJ_MOVE_UNDERWATER_ON_GROUND) +UKIKI_CAGE_STAR_ACT_SPAWN_STAR = 1 --- @type integer -OBJ_MOVE_MASK_ON_GROUND = (OBJ_MOVE_LANDED | OBJ_MOVE_ON_GROUND) +UKIKI_CAGE_ACT_WAIT_FOR_UKIKI = 0 --- @type integer -OBJ_MOVE_ON_GROUND = (1 << 1) +UKIKI_CAGE_ACT_SPIN = 1 --- @type integer -OBJ_MOVE_OUT_SCOPE = (1 << 8) +UKIKI_CAGE_ACT_FALL = 2 --- @type integer -OBJ_MOVE_UNDERWATER_OFF_GROUND = (1 << 5) - ---- @type integer -OBJ_MOVE_UNDERWATER_ON_GROUND = (1 << 6) - ---- @type integer -PENGUIN_ANIM_IDLE = 3 - ---- @type integer -PENGUIN_ANIM_WALK = 0 - ---- @type integer -PENGUIN_WALK_BABY = 0 - ---- @type integer -PENGUIN_WALK_BIG = 1 - ---- @type integer -PIRANHA_PLANT_ACT_ATTACKED = 5 - ---- @type integer -PIRANHA_PLANT_ACT_BITING = 2 +UKIKI_CAGE_ACT_HIDE = 3 --- @type integer PIRANHA_PLANT_ACT_IDLE = 0 ---- @type integer -PIRANHA_PLANT_ACT_RESPAWN = 8 - ---- @type integer -PIRANHA_PLANT_ACT_SHRINK_AND_DIE = 6 - --- @type integer PIRANHA_PLANT_ACT_SLEEPING = 1 --- @type integer -PIRANHA_PLANT_ACT_STOPPED_BITING = 4 - ---- @type integer -PIRANHA_PLANT_ACT_WAIT_TO_RESPAWN = 7 +PIRANHA_PLANT_ACT_BITING = 2 --- @type integer PIRANHA_PLANT_ACT_WOKEN_UP = 3 --- @type integer -PIRANHA_PLANT_BUBBLE_ACT_BURST = 2 +PIRANHA_PLANT_ACT_STOPPED_BITING = 4 --- @type integer -PIRANHA_PLANT_BUBBLE_ACT_GROW_SHRINK_LOOP = 1 +PIRANHA_PLANT_ACT_ATTACKED = 5 + +--- @type integer +PIRANHA_PLANT_ACT_SHRINK_AND_DIE = 6 + +--- @type integer +PIRANHA_PLANT_ACT_WAIT_TO_RESPAWN = 7 + +--- @type integer +PIRANHA_PLANT_ACT_RESPAWN = 8 --- @type integer PIRANHA_PLANT_BUBBLE_ACT_IDLE = 0 --- @type integer -PLATFORM_ON_TRACK_ACT_FALL = 4 +PIRANHA_PLANT_BUBBLE_ACT_GROW_SHRINK_LOOP = 1 + +--- @type integer +PIRANHA_PLANT_BUBBLE_ACT_BURST = 2 --- @type integer PLATFORM_ON_TRACK_ACT_INIT = 0 +--- @type integer +PLATFORM_ON_TRACK_ACT_WAIT_FOR_MARIO = 1 + --- @type integer PLATFORM_ON_TRACK_ACT_MOVE_ALONG_TRACK = 2 @@ -6748,16 +6820,7 @@ PLATFORM_ON_TRACK_ACT_MOVE_ALONG_TRACK = 2 PLATFORM_ON_TRACK_ACT_PAUSE_BRIEFLY = 3 --- @type integer -PLATFORM_ON_TRACK_ACT_WAIT_FOR_MARIO = 1 - ---- @type integer -PLATFORM_ON_TRACK_BP_DONT_DISAPPEAR = (1 << 9) - ---- @type integer -PLATFORM_ON_TRACK_BP_DONT_TURN_ROLL = (1 << 11) - ---- @type integer -PLATFORM_ON_TRACK_BP_DONT_TURN_YAW = (1 << 10) +PLATFORM_ON_TRACK_ACT_FALL = 4 --- @type integer PLATFORM_ON_TRACK_BP_MASK_PATH = 0xF @@ -6768,27 +6831,27 @@ PLATFORM_ON_TRACK_BP_MASK_TYPE = (0x7 << 4) --- @type integer PLATFORM_ON_TRACK_BP_RETURN_TO_START = (1 << 8) +--- @type integer +PLATFORM_ON_TRACK_BP_DONT_DISAPPEAR = (1 << 9) + +--- @type integer +PLATFORM_ON_TRACK_BP_DONT_TURN_YAW = (1 << 10) + +--- @type integer +PLATFORM_ON_TRACK_BP_DONT_TURN_ROLL = (1 << 11) + --- @type integer PLATFORM_ON_TRACK_TYPE_CARPET = 0 +--- @type integer +PLATFORM_ON_TRACK_TYPE_SKI_LIFT = 1 + --- @type integer PLATFORM_ON_TRACK_TYPE_CHECKERED = 2 --- @type integer PLATFORM_ON_TRACK_TYPE_GRATE = 3 ---- @type integer -PLATFORM_ON_TRACK_TYPE_SKI_LIFT = 1 - ---- @type integer -POKEY_ACT_UNINITIALIZED = 0 - ---- @type integer -POKEY_ACT_UNLOAD_PARTS = 2 - ---- @type integer -POKEY_ACT_WANDER = 1 - --- @type integer PURPLE_SWITCH_IDLE = 0 @@ -6805,7 +6868,10 @@ PURPLE_SWITCH_UNPRESSED = 3 PURPLE_SWITCH_WAIT_FOR_MARIO_TO_GET_OFF = 4 --- @type integer -PYRAMID_ELEVATOR_AT_BOTTOM = 4 +PYRAMID_ELEVATOR_IDLE = 0 + +--- @type integer +PYRAMID_ELEVATOR_START_MOVING = 1 --- @type integer PYRAMID_ELEVATOR_CONSTANT_VELOCITY = 2 @@ -6814,19 +6880,16 @@ PYRAMID_ELEVATOR_CONSTANT_VELOCITY = 2 PYRAMID_ELEVATOR_END_MOVING = 3 --- @type integer -PYRAMID_ELEVATOR_IDLE = 0 - ---- @type integer -PYRAMID_ELEVATOR_START_MOVING = 1 +PYRAMID_ELEVATOR_AT_BOTTOM = 4 --- @type integer PYRAMID_TOP_ACT_CHECK_IF_SOLVED = 0 --- @type integer -PYRAMID_TOP_ACT_EXPLODE = 2 +PYRAMID_TOP_ACT_SPINNING = 1 --- @type integer -PYRAMID_TOP_ACT_SPINNING = 1 +PYRAMID_TOP_ACT_EXPLODE = 2 --- @type integer PYRAMID_WALL_ACT_MOVING_DOWN = 0 @@ -6837,14 +6900,29 @@ PYRAMID_WALL_ACT_MOVING_UP = 1 --- @type integer PYRAMID_WALL_BP_POSITION_HIGH = 0 ---- @type integer -PYRAMID_WALL_BP_POSITION_LOW = 2 - --- @type integer PYRAMID_WALL_BP_POSITION_MIDDLE = 1 --- @type integer -RACING_PENGUIN_ACT_FINISH_RACE = 4 +PYRAMID_WALL_BP_POSITION_LOW = 2 + +--- @type integer +PENGUIN_WALK_BABY = 0 + +--- @type integer +PENGUIN_WALK_BIG = 1 + +--- @type integer +PENGUIN_ANIM_WALK = 0 + +--- @type integer +PENGUIN_ANIM_IDLE = 3 + +--- @type integer +RACING_PENGUIN_ACT_WAIT_FOR_MARIO = 0 + +--- @type integer +RACING_PENGUIN_ACT_SHOW_INIT_TEXT = 1 --- @type integer RACING_PENGUIN_ACT_PREPARE_FOR_RACE = 2 @@ -6852,26 +6930,242 @@ RACING_PENGUIN_ACT_PREPARE_FOR_RACE = 2 --- @type integer RACING_PENGUIN_ACT_RACE = 3 +--- @type integer +RACING_PENGUIN_ACT_FINISH_RACE = 4 + --- @type integer RACING_PENGUIN_ACT_SHOW_FINAL_TEXT = 5 --- @type integer -RACING_PENGUIN_ACT_SHOW_INIT_TEXT = 1 +SL_WALKING_PENGUIN_ACT_MOVING_FORWARDS = 0 --- @type integer -RACING_PENGUIN_ACT_WAIT_FOR_MARIO = 0 +SL_WALKING_PENGUIN_ACT_TURNING_BACK = 1 --- @type integer -RESPAWN_INFO_DONT_RESPAWN = 0xFF +SL_WALKING_PENGUIN_ACT_RETURNING = 2 --- @type integer -RESPAWN_INFO_TYPE_16 = 2 +SL_WALKING_PENGUIN_ACT_TURNING_FORWARDS = 3 --- @type integer -RESPAWN_INFO_TYPE_32 = 1 +SL_SNOWMAN_WIND_ACT_IDLE = 0 --- @type integer -RESPAWN_INFO_TYPE_NULL = 0 +SL_SNOWMAN_WIND_ACT_TALKING = 1 + +--- @type integer +SL_SNOWMAN_WIND_ACT_BLOWING = 2 + +--- @type integer +WATER_BOMB_ACT_SHOT_FROM_CANNON = 0 + +--- @type integer +WATER_BOMB_ACT_INIT = 1 + +--- @type integer +WATER_BOMB_ACT_DROP = 2 + +--- @type integer +WATER_BOMB_ACT_EXPLODE = 3 + +--- @type integer +TTC_ROTATING_SOLID_BP_CUBE = 0 + +--- @type integer +TTC_ROTATING_SOLID_BP_TRIANGULAR_PRISM = 1 + +--- @type integer +TTC_MOVING_BAR_ACT_WAIT = 0 + +--- @type integer +TTC_MOVING_BAR_ACT_PULL_BACK = 1 + +--- @type integer +TTC_MOVING_BAR_ACT_EXTEND = 2 + +--- @type integer +TTC_MOVING_BAR_ACT_RETRACT = 3 + +--- @type integer +TTC_COG_BP_SHAPE_MASK = 0x00000002 + +--- @type integer +TTC_COG_BP_SHAPE_HEXAGON = (0 << 1) + +--- @type integer +TTC_COG_BP_SHAPE_TRIANGLE = (1 << 1) + +--- @type integer +TTC_COG_BP_DIR_MASK = 0x00000001 + +--- @type integer +TTC_COG_BP_DIR_CCW = (0 << 0) + +--- @type integer +TTC_COG_BP_DIR_CW = (1 << 0) + +--- @type integer +TTC_2D_ROTATOR_BP_HAND = 0 + +--- @type integer +TTC_2D_ROTATOR_BP_2D_COG = 1 + +--- @type integer +ACTIVATED_BF_PLAT_TYPE_BITS_ARROW_PLAT = 0 + +--- @type integer +ACTIVATED_BF_PLAT_TYPE_BITFS_MESH_PLAT = 1 + +--- @type integer +ACTIVATED_BF_PLAT_TYPE_BITFS_ELEVATOR = 2 + +--- @type integer +DORRIE_ACT_MOVE = 0 + +--- @type integer +DORRIE_ACT_LOWER_HEAD = 1 + +--- @type integer +DORRIE_ACT_RAISE_HEAD = 2 + +--- @type integer +MAD_PIANO_ACT_WAIT = 0 + +--- @type integer +MAD_PIANO_ACT_ATTACK = 1 + +--- @type integer +FIRE_PIRANHA_PLANT_ACT_HIDE = 0 + +--- @type integer +FIRE_PIRANHA_PLANT_ACT_GROW = 1 + +--- @type integer +FIRE_SPITTER_ACT_IDLE = 0 + +--- @type integer +FIRE_SPITTER_ACT_SPIT_FIRE = 1 + +--- @type integer +EYEROK_BOSS_ACT_SLEEP = 0 + +--- @type integer +EYEROK_BOSS_ACT_WAKE_UP = 1 + +--- @type integer +EYEROK_BOSS_ACT_SHOW_INTRO_TEXT = 2 + +--- @type integer +EYEROK_BOSS_ACT_FIGHT = 3 + +--- @type integer +EYEROK_BOSS_ACT_DIE = 4 + +--- @type integer +EYEROK_BOSS_ACT_DEAD = 5 + +--- @type integer +EYEROK_BOSS_ACT_PAUSE = 6 + +--- @type integer +EYEROK_HAND_ACT_SLEEP = 0 + +--- @type integer +EYEROK_HAND_ACT_IDLE = 1 + +--- @type integer +EYEROK_HAND_ACT_OPEN = 2 + +--- @type integer +EYEROK_HAND_ACT_SHOW_EYE = 3 + +--- @type integer +EYEROK_HAND_ACT_CLOSE = 4 + +--- @type integer +EYEROK_HAND_ACT_RETREAT = 5 + +--- @type integer +EYEROK_HAND_ACT_TARGET_MARIO = 6 + +--- @type integer +EYEROK_HAND_ACT_SMASH = 7 + +--- @type integer +EYEROK_HAND_ACT_FIST_PUSH = 8 + +--- @type integer +EYEROK_HAND_ACT_FIST_SWEEP = 9 + +--- @type integer +EYEROK_HAND_ACT_BEGIN_DOUBLE_POUND = 10 + +--- @type integer +EYEROK_HAND_ACT_DOUBLE_POUND = 11 + +--- @type integer +EYEROK_HAND_ACT_ATTACKED = 12 + +--- @type integer +EYEROK_HAND_ACT_RECOVER = 13 + +--- @type integer +EYEROK_HAND_ACT_BECOME_ACTIVE = 14 + +--- @type integer +EYEROK_HAND_ACT_DIE = 15 + +--- @type integer +EYEROK_HAND_ACT_DEAD = 16 + +--- @type integer +EYEROK_HAND_ACT_PAUSE = 17 + +--- @type integer +KLEPTO_ACT_CIRCLE_TARGET_HOLDING = 0 + +--- @type integer +KLEPTO_ACT_APPROACH_TARGET_HOLDING = 1 + +--- @type integer +KLEPTO_ACT_WAIT_FOR_MARIO = 2 + +--- @type integer +KLEPTO_ACT_TURN_TOWARD_MARIO = 3 + +--- @type integer +KLEPTO_ACT_DIVE_AT_MARIO = 4 + +--- @type integer +KLEPTO_ACT_RESET_POSITION = 5 + +--- @type integer +KLEPTO_ACT_STRUCK_BY_MARIO = 6 + +--- @type integer +KLEPTO_ACT_RETREAT = 7 + +--- @type integer +KLEPTO_ANIM_STATE_HOLDING_NOTHING = 0 + +--- @type integer +KLEPTO_ANIM_STATE_HOLDING_CAP = 1 + +--- @type integer +KLEPTO_ANIM_STATE_HOLDING_STAR = 2 + +--- @type integer +BIRD_ACT_INACTIVE = 0 + +--- @type integer +BIRD_ACT_FLY = 1 + +--- @type integer +BIRD_BP_SPAWNED = 0 + +--- @type integer +BIRD_BP_SPAWNER = 1 --- @type integer SKEETER_ACT_IDLE = 0 @@ -6882,27 +7176,6 @@ SKEETER_ACT_LUNGE = 1 --- @type integer SKEETER_ACT_WALK = 2 ---- @type integer -SL_SNOWMAN_WIND_ACT_BLOWING = 2 - ---- @type integer -SL_SNOWMAN_WIND_ACT_IDLE = 0 - ---- @type integer -SL_SNOWMAN_WIND_ACT_TALKING = 1 - ---- @type integer -SL_WALKING_PENGUIN_ACT_MOVING_FORWARDS = 0 - ---- @type integer -SL_WALKING_PENGUIN_ACT_RETURNING = 2 - ---- @type integer -SL_WALKING_PENGUIN_ACT_TURNING_BACK = 1 - ---- @type integer -SL_WALKING_PENGUIN_ACT_TURNING_FORWARDS = 3 - --- @type integer SNUFIT_ACT_IDLE = 0 @@ -6910,103 +7183,7 @@ SNUFIT_ACT_IDLE = 0 SNUFIT_ACT_SHOOT = 1 --- @type integer -SPINY_ACT_ATTACKED_MARIO = 3 - ---- @type integer -SPINY_ACT_HELD_BY_LAKITU = 1 - ---- @type integer -SPINY_ACT_THROWN_BY_LAKITU = 2 - ---- @type integer -SPINY_ACT_WALK = 0 - ---- @type integer -SWOOP_ACT_IDLE = 0 - ---- @type integer -SWOOP_ACT_MOVE = 1 - ---- @type integer -TRIPLET_BUTTERFLY_ACT_ACTIVATE = 2 - ---- @type integer -TRIPLET_BUTTERFLY_ACT_EXPLODE = 3 - ---- @type integer -TRIPLET_BUTTERFLY_ACT_INIT = 0 - ---- @type integer -TRIPLET_BUTTERFLY_ACT_WANDER = 1 - ---- @type integer -TRIPLET_BUTTERFLY_BP_BUTTERFLY_NUM = 0x00000003 - ---- @type integer -TRIPLET_BUTTERFLY_BP_NO_BOMBS = 0x00000004 - ---- @type integer -TRIPLET_BUTTERFLY_TYPE_EXPLODES = 0 - ---- @type integer -TRIPLET_BUTTERFLY_TYPE_NORMAL = -1 - ---- @type integer -TRIPLET_BUTTERFLY_TYPE_SPAWN_1UP = 1 - ---- @type integer -TTC_2D_ROTATOR_BP_2D_COG = 1 - ---- @type integer -TTC_2D_ROTATOR_BP_HAND = 0 - ---- @type integer -TTC_COG_BP_DIR_CCW = (0 << 0) - ---- @type integer -TTC_COG_BP_DIR_CW = (1 << 0) - ---- @type integer -TTC_COG_BP_DIR_MASK = 0x00000001 - ---- @type integer -TTC_COG_BP_SHAPE_HEXAGON = (0 << 1) - ---- @type integer -TTC_COG_BP_SHAPE_MASK = 0x00000002 - ---- @type integer -TTC_COG_BP_SHAPE_TRIANGLE = (1 << 1) - ---- @type integer -TTC_MOVING_BAR_ACT_EXTEND = 2 - ---- @type integer -TTC_MOVING_BAR_ACT_PULL_BACK = 1 - ---- @type integer -TTC_MOVING_BAR_ACT_RETRACT = 3 - ---- @type integer -TTC_MOVING_BAR_ACT_WAIT = 0 - ---- @type integer -TTC_ROTATING_SOLID_BP_CUBE = 0 - ---- @type integer -TTC_ROTATING_SOLID_BP_TRIANGULAR_PRISM = 1 - ---- @type integer -TTC_SPEED_FAST = 1 - ---- @type integer -TTC_SPEED_RANDOM = 2 - ---- @type integer -TTC_SPEED_SLOW = 0 - ---- @type integer -TTC_SPEED_STOPPED = 3 +TWEESTER_ACT_IDLE = 0 --- @type integer TWEESTER_ACT_CHASE = 1 @@ -7015,298 +7192,145 @@ TWEESTER_ACT_CHASE = 1 TWEESTER_ACT_HIDE = 2 --- @type integer -TWEESTER_ACT_IDLE = 0 +TWEESTER_SUB_ACT_WAIT = 0 --- @type integer TWEESTER_SUB_ACT_CHASE = 0 --- @type integer -TWEESTER_SUB_ACT_WAIT = 0 +TRIPLET_BUTTERFLY_ACT_INIT = 0 --- @type integer -UKIKI_ACT_GO_TO_CAGE = 4 +TRIPLET_BUTTERFLY_ACT_WANDER = 1 --- @type integer -UKIKI_ACT_IDLE = 0 +TRIPLET_BUTTERFLY_ACT_ACTIVATE = 2 --- @type integer -UKIKI_ACT_JUMP = 3 +TRIPLET_BUTTERFLY_ACT_EXPLODE = 3 --- @type integer -UKIKI_ACT_RETURN_HOME = 7 +TRIPLET_BUTTERFLY_BP_BUTTERFLY_NUM = 0x00000003 --- @type integer -UKIKI_ACT_RUN = 1 +TRIPLET_BUTTERFLY_BP_NO_BOMBS = 0x00000004 --- @type integer -UKIKI_ACT_TURN_TO_MARIO = 2 +TRIPLET_BUTTERFLY_TYPE_NORMAL = -1 --- @type integer -UKIKI_ACT_UNUSED_TURN = 6 +TRIPLET_BUTTERFLY_TYPE_EXPLODES = 0 --- @type integer -UKIKI_ACT_WAIT_TO_RESPAWN = 5 - ---- @type integer -UKIKI_ANIM_HANDSTAND = 10 - ---- @type integer -UKIKI_ANIM_HELD = 12 - ---- @type integer -UKIKI_ANIM_ITCH = 9 - ---- @type integer -UKIKI_ANIM_JUMP = 8 - ---- @type integer -UKIKI_ANIM_JUMP_CLAP = 5 - ---- @type integer -UKIKI_ANIM_LAND = 7 - ---- @type integer -UKIKI_ANIM_RUN = 0 - ---- @type integer -UKIKI_ANIM_SCREECH = 4 - ---- @type integer -UKIKI_ANIM_STATE_CAP_ON = 2 - ---- @type integer -UKIKI_ANIM_STATE_DEFAULT = 0 - ---- @type integer -UKIKI_ANIM_STATE_EYE_CLOSED = 1 - ---- @type integer -UKIKI_ANIM_TURN = 11 - ---- @type integer -UKIKI_ANIM_UNUSED_APOSE = 2 - ---- @type integer -UKIKI_ANIM_UNUSED_DEATH = 3 - ---- @type integer -UKIKI_ANIM_UNUSED_HOP = 6 - ---- @type integer -UKIKI_ANIM_UNUSED_WALK = 1 - ---- @type integer -UKIKI_CAGE = 0 - ---- @type integer -UKIKI_CAGE_ACT_FALL = 2 - ---- @type integer -UKIKI_CAGE_ACT_HIDE = 3 - ---- @type integer -UKIKI_CAGE_ACT_SPIN = 1 - ---- @type integer -UKIKI_CAGE_ACT_WAIT_FOR_UKIKI = 0 - ---- @type integer -UKIKI_CAGE_STAR_ACT_IN_CAGE = 0 - ---- @type integer -UKIKI_CAGE_STAR_ACT_SPAWN_STAR = 1 - ---- @type integer -UKIKI_CAP = 1 - ---- @type integer -UKIKI_CAP_ON = 1 - ---- @type integer -UKIKI_SUB_ACT_CAGE_DESPAWN = 7 - ---- @type integer -UKIKI_SUB_ACT_CAGE_JUMP_TO_CAGE = 4 - ---- @type integer -UKIKI_SUB_ACT_CAGE_LAND_ON_CAGE = 5 - ---- @type integer -UKIKI_SUB_ACT_CAGE_RUN_TO_CAGE = 0 - ---- @type integer -UKIKI_SUB_ACT_CAGE_SPIN_ON_CAGE = 6 - ---- @type integer -UKIKI_SUB_ACT_CAGE_TALK_TO_MARIO = 2 - ---- @type integer -UKIKI_SUB_ACT_CAGE_TURN_TO_CAGE = 3 - ---- @type integer -UKIKI_SUB_ACT_CAGE_WAIT_FOR_MARIO = 1 - ---- @type integer -UKIKI_SUB_ACT_TAUNT_HANDSTAND = 4 - ---- @type integer -UKIKI_SUB_ACT_TAUNT_ITCH = 1 - ---- @type integer -UKIKI_SUB_ACT_TAUNT_JUMP_CLAP = 3 - ---- @type integer -UKIKI_SUB_ACT_TAUNT_NONE = 0 - ---- @type integer -UKIKI_SUB_ACT_TAUNT_SCREECH = 2 - ---- @type integer -UKIKI_TEXT_CAGE_TEXTBOX = 1 - ---- @type integer -UKIKI_TEXT_DEFAULT = 0 - ---- @type integer -UKIKI_TEXT_DO_NOT_LET_GO = 6 - ---- @type integer -UKIKI_TEXT_GAVE_CAP_BACK = 5 - ---- @type integer -UKIKI_TEXT_GO_TO_CAGE = 2 - ---- @type integer -UKIKI_TEXT_HAS_CAP = 4 - ---- @type integer -UKIKI_TEXT_STEAL_CAP = 7 - ---- @type integer -UKIKI_TEXT_STOLE_CAP = 3 - ---- @type integer -WATER_BOMB_ACT_DROP = 2 - ---- @type integer -WATER_BOMB_ACT_EXPLODE = 3 - ---- @type integer -WATER_BOMB_ACT_INIT = 1 - ---- @type integer -WATER_BOMB_ACT_SHOT_FROM_CANNON = 0 - ---- @type integer -WATER_LEVEL_DIAMOND_ACT_CHANGE_WATER_LEVEL = 2 - ---- @type integer -WATER_LEVEL_DIAMOND_ACT_IDLE = 1 - ---- @type integer -WATER_LEVEL_DIAMOND_ACT_IDLE_SPINNING = 3 +TRIPLET_BUTTERFLY_TYPE_SPAWN_1UP = 1 --- @type integer WATER_LEVEL_DIAMOND_ACT_INIT = 0 --- @type integer -WATER_RING_ACT_COLLECTED = 1 +WATER_LEVEL_DIAMOND_ACT_IDLE = 1 --- @type integer -WATER_RING_ACT_NOT_COLLECTED = 0 +WATER_LEVEL_DIAMOND_ACT_CHANGE_WATER_LEVEL = 2 --- @type integer -WF_SLID_BRICK_PTFM_ACT_EXTEND = 1 +WATER_LEVEL_DIAMOND_ACT_IDLE_SPINNING = 3 --- @type integer -WF_SLID_BRICK_PTFM_ACT_RETRACT = 2 +MIPS_ACT_WAIT_FOR_NEARBY_MARIO = 0 --- @type integer -WF_SLID_BRICK_PTFM_ACT_WAIT = 0 +MIPS_ACT_FOLLOW_PATH = 1 --- @type integer -WF_SLID_BRICK_PTFM_BP_MOV_VEL_10 = 1 +MIPS_ACT_WAIT_FOR_ANIMATION_DONE = 2 --- @type integer -WF_SLID_BRICK_PTFM_BP_MOV_VEL_15 = 2 +MIPS_ACT_FALL_DOWN = 3 --- @type integer -WF_SLID_BRICK_PTFM_BP_MOV_VEL_20 = 3 +MIPS_ACT_IDLE = 4 --- @type integer -WIGGLER_ACT_FALL_THROUGH_FLOOR = 5 +MIPS_STAR_STATUS_HAVENT_SPAWNED_STAR = 0 --- @type integer -WIGGLER_ACT_JUMPED_ON = 3 +MIPS_STAR_STATUS_SHOULD_SPAWN_STAR = 1 --- @type integer -WIGGLER_ACT_KNOCKBACK = 2 +MIPS_STAR_STATUS_ALREADY_SPAWNED_STAR = 2 --- @type integer -WIGGLER_ACT_SHRINK = 4 +FALLING_PILLAR_ACT_IDLE = 0 --- @type integer -WIGGLER_ACT_UNINITIALIZED = 0 +FALLING_PILLAR_ACT_TURNING = 1 --- @type integer -WIGGLER_ACT_WALK = 1 +FALLING_PILLAR_ACT_FALLING = 2 --- @type integer -WIGGLER_TEXT_STATUS_AWAIT_DIALOG = 0 +BOWSER_PUZZLE_ACT_SPAWN_PIECES = 0 --- @type integer -WIGGLER_TEXT_STATUS_COMPLETED_DIALOG = 2 +BOWSER_PUZZLE_ACT_WAIT_FOR_COMPLETE = 1 --- @type integer -WIGGLER_TEXT_STATUS_SHOWING_DIALOG = 1 +BOWSER_PUZZLE_ACT_DONE = 2 --- @type integer -WOODEN_POST_BP_NO_COINS_MASK = 0x0000FF00 +MR_BLIZZARD_ACT_SPAWN_SNOWBALL = 0 --- @type integer -YOSHI_ACT_CREDITS = 10 +MR_BLIZZARD_ACT_HIDE_UNHIDE = 1 --- @type integer -YOSHI_ACT_FINISH_JUMPING_AND_DESPAWN = 4 +MR_BLIZZARD_ACT_RISE_FROM_GROUND = 2 --- @type integer -YOSHI_ACT_GIVE_PRESENT = 5 +MR_BLIZZARD_ACT_ROTATE = 3 --- @type integer -YOSHI_ACT_IDLE = 0 +MR_BLIZZARD_ACT_THROW_SNOWBALL = 4 --- @type integer -YOSHI_ACT_TALK = 2 +MR_BLIZZARD_ACT_BURROW = 5 --- @type integer -YOSHI_ACT_WALK = 1 +MR_BLIZZARD_ACT_DEATH = 6 --- @type integer -YOSHI_ACT_WALK_JUMP_OFF_ROOF = 3 +MR_BLIZZARD_ACT_JUMP = 7 --- @type integer -OBJECT_POOL_CAPACITY = 1200 +MR_BLIZZARD_STYPE_NO_CAP = 0 --- @type integer -TIME_STOP_ACTIVE = (1 << 6) +MR_BLIZZARD_STYPE_JUMPING = 1 --- @type integer -TIME_STOP_ALL_OBJECTS = (1 << 4) - ---- @type integer -TIME_STOP_DIALOG = (1 << 2) +TIME_STOP_UNKNOWN_0 = (1 << 0) --- @type integer TIME_STOP_ENABLED = (1 << 1) +--- @type integer +TIME_STOP_DIALOG = (1 << 2) + --- @type integer TIME_STOP_MARIO_AND_DOORS = (1 << 3) +--- @type integer +TIME_STOP_ALL_OBJECTS = (1 << 4) + --- @type integer TIME_STOP_MARIO_OPENED_DOOR = (1 << 5) --- @type integer -TIME_STOP_UNKNOWN_0 = (1 << 0) +TIME_STOP_ACTIVE = (1 << 6) + +--- @type integer +OBJECT_POOL_CAPACITY = 1200 OBJ_LIST_PLAYER = 0 --- @type ObjectList OBJ_LIST_EXT = 1 --- @type ObjectList @@ -7340,25 +7364,43 @@ NUM_OBJ_LISTS = 13 --- @type ObjectList --- | `NUM_OBJ_LISTS` --- @type integer -A_BUTTON = CONT_A +CONT_NO_RESPONSE_ERROR = 0x8 --- @type integer -B_BUTTON = CONT_B +CONT_OVERRUN_ERROR = 0x4 --- @type integer -CONT_A = 0x8000 +CONT_FRAME_ERROR = 0x2 + +--- @type integer +CONT_COLLISION_ERROR = 0x1 --- @type integer CONT_ABSOLUTE = 0x0001 --- @type integer -CONT_ADDR_CRC_ER = 0x04 +CONT_RELATIVE = 0x0002 --- @type integer -CONT_B = 0x4000 +CONT_JOYPORT = 0x0004 --- @type integer -CONT_C = 0x0002 +CONT_EEPROM = 0x8000 + +--- @type integer +CONT_EEP16K = 0x4000 + +--- @type integer +CONT_TYPE_MASK = 0x1f07 + +--- @type integer +CONT_TYPE_NORMAL = 0x0005 + +--- @type integer +CONT_TYPE_MOUSE = 0x0002 + +--- @type integer +CONT_TYPE_VOICE = 0x0100 --- @type integer CONT_CARD_ON = 0x01 @@ -7367,76 +7409,16 @@ CONT_CARD_ON = 0x01 CONT_CARD_PULL = 0x02 --- @type integer -CONT_COLLISION_ERROR = 0x1 - ---- @type integer -CONT_D = 0x0004 - ---- @type integer -CONT_DOWN = 0x0400 - ---- @type integer -CONT_E = 0x0008 - ---- @type integer -CONT_EEP16K = 0x4000 - ---- @type integer -CONT_EEPROM = 0x8000 +CONT_ADDR_CRC_ER = 0x04 --- @type integer CONT_EEPROM_BUSY = 0x80 --- @type integer -CONT_F = 0x0001 +CONT_A = 0x8000 --- @type integer -CONT_FRAME_ERROR = 0x2 - ---- @type integer -CONT_G = 0x2000 - ---- @type integer -CONT_JOYPORT = 0x0004 - ---- @type integer -CONT_L = 0x0020 - ---- @type integer -CONT_LEFT = 0x0200 - ---- @type integer -CONT_NO_RESPONSE_ERROR = 0x8 - ---- @type integer -CONT_OVERRUN_ERROR = 0x4 - ---- @type integer -CONT_R = 0x0010 - ---- @type integer -CONT_RELATIVE = 0x0002 - ---- @type integer -CONT_RIGHT = 0x0100 - ---- @type integer -CONT_START = 0x1000 - ---- @type integer -CONT_TYPE_MASK = 0x1f07 - ---- @type integer -CONT_TYPE_MOUSE = 0x0002 - ---- @type integer -CONT_TYPE_NORMAL = 0x0005 - ---- @type integer -CONT_TYPE_VOICE = 0x0100 - ---- @type integer -CONT_UP = 0x0800 +CONT_B = 0x4000 --- @type integer CONT_X = 0x0040 @@ -7445,37 +7427,46 @@ CONT_X = 0x0040 CONT_Y = 0x0080 --- @type integer -D_CBUTTONS = CONT_D +CONT_G = 0x2000 --- @type integer -D_JPAD = CONT_DOWN +CONT_START = 0x1000 --- @type integer -L_CBUTTONS = CONT_C +CONT_UP = 0x0800 --- @type integer -L_JPAD = CONT_LEFT +CONT_DOWN = 0x0400 --- @type integer -L_TRIG = CONT_L +CONT_LEFT = 0x0200 --- @type integer -R_CBUTTONS = CONT_F +CONT_RIGHT = 0x0100 --- @type integer -R_JPAD = CONT_RIGHT +CONT_L = 0x0020 --- @type integer -R_TRIG = CONT_R +CONT_R = 0x0010 --- @type integer -START_BUTTON = CONT_START +CONT_E = 0x0008 --- @type integer -U_CBUTTONS = CONT_E +CONT_D = 0x0004 --- @type integer -U_JPAD = CONT_UP +CONT_C = 0x0002 + +--- @type integer +CONT_F = 0x0001 + +--- @type integer +A_BUTTON = CONT_A + +--- @type integer +B_BUTTON = CONT_B --- @type integer X_BUTTON = CONT_X @@ -7483,9 +7474,42 @@ X_BUTTON = CONT_X --- @type integer Y_BUTTON = CONT_Y +--- @type integer +L_TRIG = CONT_L + +--- @type integer +R_TRIG = CONT_R + --- @type integer Z_TRIG = CONT_G +--- @type integer +START_BUTTON = CONT_START + +--- @type integer +U_JPAD = CONT_UP + +--- @type integer +L_JPAD = CONT_LEFT + +--- @type integer +R_JPAD = CONT_RIGHT + +--- @type integer +D_JPAD = CONT_DOWN + +--- @type integer +U_CBUTTONS = CONT_E + +--- @type integer +L_CBUTTONS = CONT_C + +--- @type integer +R_CBUTTONS = CONT_F + +--- @type integer +D_CBUTTONS = CONT_D + --- @type integer MAX_PRESET_PALETTES = 128 @@ -7518,23 +7542,79 @@ EEPROM_SIZE = 0x200 --- @type integer NUM_SAVE_FILES = 4 +SAVE_FILE_A = 0 --- @type SaveFileIndex +SAVE_FILE_B = 1 --- @type SaveFileIndex +SAVE_FILE_C = 2 --- @type SaveFileIndex +SAVE_FILE_D = 3 --- @type SaveFileIndex + +--- @alias SaveFileIndex +--- | `SAVE_FILE_A` +--- | `SAVE_FILE_B` +--- | `SAVE_FILE_C` +--- | `SAVE_FILE_D` + +--- @type integer +SAVE_FLAG_FILE_EXISTS = (1 << 0) + +--- @type integer +SAVE_FLAG_HAVE_WING_CAP = (1 << 1) + +--- @type integer +SAVE_FLAG_HAVE_METAL_CAP = (1 << 2) + +--- @type integer +SAVE_FLAG_HAVE_VANISH_CAP = (1 << 3) + +--- @type integer +SAVE_FLAG_HAVE_KEY_1 = (1 << 4) + +--- @type integer +SAVE_FLAG_HAVE_KEY_2 = (1 << 5) + +--- @type integer +SAVE_FLAG_UNLOCKED_BASEMENT_DOOR = (1 << 6) + +--- @type integer +SAVE_FLAG_UNLOCKED_UPSTAIRS_DOOR = (1 << 7) + +--- @type integer +SAVE_FLAG_DDD_MOVED_BACK = (1 << 8) + +--- @type integer +SAVE_FLAG_MOAT_DRAINED = (1 << 9) + +--- @type integer +SAVE_FLAG_UNLOCKED_PSS_DOOR = (1 << 10) + +--- @type integer +SAVE_FLAG_UNLOCKED_WF_DOOR = (1 << 11) + +--- @type integer +SAVE_FLAG_UNLOCKED_CCM_DOOR = (1 << 12) + +--- @type integer +SAVE_FLAG_UNLOCKED_JRB_DOOR = (1 << 13) + +--- @type integer +SAVE_FLAG_UNLOCKED_BITDW_DOOR = (1 << 14) + +--- @type integer +SAVE_FLAG_UNLOCKED_BITFS_DOOR = (1 << 15) + --- @type integer SAVE_FLAG_CAP_ON_GROUND = (1 << 16) --- @type integer SAVE_FLAG_CAP_ON_KLEPTO = (1 << 17) ---- @type integer -SAVE_FLAG_CAP_ON_MR_BLIZZARD = (1 << 19) - --- @type integer SAVE_FLAG_CAP_ON_UKIKI = (1 << 18) --- @type integer -SAVE_FLAG_COLLECTED_MIPS_STAR_1 = (1 << 27) +SAVE_FLAG_CAP_ON_MR_BLIZZARD = (1 << 19) --- @type integer -SAVE_FLAG_COLLECTED_MIPS_STAR_2 = (1 << 28) +SAVE_FLAG_UNLOCKED_50_STAR_DOOR = (1 << 20) --- @type integer SAVE_FLAG_COLLECTED_TOAD_STAR_1 = (1 << 24) @@ -7546,55 +7626,10 @@ SAVE_FLAG_COLLECTED_TOAD_STAR_2 = (1 << 25) SAVE_FLAG_COLLECTED_TOAD_STAR_3 = (1 << 26) --- @type integer -SAVE_FLAG_DDD_MOVED_BACK = (1 << 8) +SAVE_FLAG_COLLECTED_MIPS_STAR_1 = (1 << 27) --- @type integer -SAVE_FLAG_FILE_EXISTS = (1 << 0) - ---- @type integer -SAVE_FLAG_HAVE_KEY_1 = (1 << 4) - ---- @type integer -SAVE_FLAG_HAVE_KEY_2 = (1 << 5) - ---- @type integer -SAVE_FLAG_HAVE_METAL_CAP = (1 << 2) - ---- @type integer -SAVE_FLAG_HAVE_VANISH_CAP = (1 << 3) - ---- @type integer -SAVE_FLAG_HAVE_WING_CAP = (1 << 1) - ---- @type integer -SAVE_FLAG_MOAT_DRAINED = (1 << 9) - ---- @type integer -SAVE_FLAG_UNLOCKED_50_STAR_DOOR = (1 << 20) - ---- @type integer -SAVE_FLAG_UNLOCKED_BASEMENT_DOOR = (1 << 6) - ---- @type integer -SAVE_FLAG_UNLOCKED_BITDW_DOOR = (1 << 14) - ---- @type integer -SAVE_FLAG_UNLOCKED_BITFS_DOOR = (1 << 15) - ---- @type integer -SAVE_FLAG_UNLOCKED_CCM_DOOR = (1 << 12) - ---- @type integer -SAVE_FLAG_UNLOCKED_JRB_DOOR = (1 << 13) - ---- @type integer -SAVE_FLAG_UNLOCKED_PSS_DOOR = (1 << 10) - ---- @type integer -SAVE_FLAG_UNLOCKED_UPSTAIRS_DOOR = (1 << 7) - ---- @type integer -SAVE_FLAG_UNLOCKED_WF_DOOR = (1 << 11) +SAVE_FLAG_COLLECTED_MIPS_STAR_2 = (1 << 28) LANGUAGE_ENGLISH = 0 --- @type EuLanguages LANGUAGE_FRENCH = 1 --- @type EuLanguages @@ -7607,17 +7642,6 @@ LANGUAGE_MAX = 3 --- @type EuLanguages --- | `LANGUAGE_GERMAN` --- | `LANGUAGE_MAX` -SAVE_FILE_A = 0 --- @type SaveFileIndex -SAVE_FILE_B = 1 --- @type SaveFileIndex -SAVE_FILE_C = 2 --- @type SaveFileIndex -SAVE_FILE_D = 3 --- @type SaveFileIndex - ---- @alias SaveFileIndex ---- | `SAVE_FILE_A` ---- | `SAVE_FILE_B` ---- | `SAVE_FILE_C` ---- | `SAVE_FILE_D` - --- @type integer SEQ_BASE_ID = 0x7f @@ -7699,915 +7723,6 @@ SEQ_COUNT = 35 --- @type SeqId --- | `SEQ_EVENT_CUTSCENE_LAKITU` --- | `SEQ_COUNT` ---- @type integer -ACT_AIR_HIT_WALL = 0x000008A7 - ---- @type integer -ACT_AIR_THROW = 0x830008AB - ---- @type integer -ACT_AIR_THROW_LAND = 0x80000A36 - ---- @type integer -ACT_BACKFLIP = 0x01000883 - ---- @type integer -ACT_BACKFLIP_LAND = 0x0400047A - ---- @type integer -ACT_BACKFLIP_LAND_STOP = 0x0800022F - ---- @type integer -ACT_BACKWARD_AIR_KB = 0x010208B0 - ---- @type integer -ACT_BACKWARD_GROUND_KB = 0x00020462 - ---- @type integer -ACT_BACKWARD_ROLLOUT = 0x010008AD - ---- @type integer -ACT_BACKWARD_WATER_KB = 0x300222C5 - ---- @type integer -ACT_BBH_ENTER_JUMP = 0x00001934 - ---- @type integer -ACT_BBH_ENTER_SPIN = 0x00001535 - ---- @type integer -ACT_BEGIN_SLIDING = 0x00000050 - ---- @type integer -ACT_BRAKING = 0x04000445 - ---- @type integer -ACT_BRAKING_STOP = 0x0C00023D - ---- @type integer -ACT_BREASTSTROKE = 0x300024D0 - ---- @type integer -ACT_BUBBLED = (0x173 | ACT_FLAG_MOVING | ACT_FLAG_PAUSE_EXIT) - ---- @type integer -ACT_BURNING_FALL = 0x010208B5 - ---- @type integer -ACT_BURNING_GROUND = 0x00020449 - ---- @type integer -ACT_BURNING_JUMP = 0x010208B4 - ---- @type integer -ACT_BUTT_SLIDE = 0x00840452 - ---- @type integer -ACT_BUTT_SLIDE_AIR = 0x0300088E - ---- @type integer -ACT_BUTT_SLIDE_STOP = 0x0C00023E - ---- @type integer -ACT_BUTT_STUCK_IN_GROUND = 0x0002033B - ---- @type integer -ACT_CAUGHT_IN_WHIRLPOOL = 0x300222E3 - ---- @type integer -ACT_CLIMBING_POLE = 0x00100343 - ---- @type integer -ACT_COUGHING = 0x0C40020A - ---- @type integer -ACT_CRAWLING = 0x04008448 - ---- @type integer -ACT_CRAZY_BOX_BOUNCE = 0x000008AE - ---- @type integer -ACT_CREDITS_CUTSCENE = 0x00001319 - ---- @type integer -ACT_CROUCHING = 0x0C008220 - ---- @type integer -ACT_CROUCH_SLIDE = 0x04808459 - ---- @type integer -ACT_DEATH_EXIT = 0x00001928 - ---- @type integer -ACT_DEATH_EXIT_LAND = 0x00020467 - ---- @type integer -ACT_DEATH_ON_BACK = 0x00021316 - ---- @type integer -ACT_DEATH_ON_STOMACH = 0x00021315 - ---- @type integer -ACT_DEBUG_FREE_MOVE = 0x0000130F - ---- @type integer -ACT_DECELERATING = 0x0400044A - ---- @type integer -ACT_DISAPPEARED = 0x00001300 - ---- @type integer -ACT_DIVE = 0x0188088A - ---- @type integer -ACT_DIVE_PICKING_UP = 0x00000385 - ---- @type integer -ACT_DIVE_SLIDE = 0x00880456 - ---- @type integer -ACT_DOUBLE_JUMP = 0x03000881 - ---- @type integer -ACT_DOUBLE_JUMP_LAND = 0x04000472 - ---- @type integer -ACT_DOUBLE_JUMP_LAND_STOP = 0x0C000231 - ---- @type integer -ACT_DROWNING = 0x300032C4 - ---- @type integer -ACT_EATEN_BY_BUBBA = 0x00021317 - ---- @type integer -ACT_ELECTROCUTION = 0x00021313 - ---- @type integer -ACT_EMERGE_FROM_PIPE = 0x00001923 - ---- @type integer -ACT_END_PEACH_CUTSCENE = 0x00001918 - ---- @type integer -ACT_END_WAVING_CUTSCENE = 0x0000131A - ---- @type integer -ACT_ENTERING_STAR_DOOR = 0x00001331 - ---- @type integer -ACT_EXIT_AIRBORNE = 0x00001926 - ---- @type integer -ACT_EXIT_LAND_SAVE_DIALOG = 0x00001327 - ---- @type integer -ACT_FALLING_DEATH_EXIT = 0x0000192A - ---- @type integer -ACT_FALLING_EXIT_AIRBORNE = 0x0000192D - ---- @type integer -ACT_FALL_AFTER_STAR_GRAB = 0x00001904 - ---- @type integer -ACT_FEET_STUCK_IN_GROUND = 0x0002033C - ---- @type integer -ACT_FINISH_TURNING_AROUND = 0x00000444 - ---- @type integer -ACT_FIRST_PERSON = 0x0C000227 - ---- @type integer -ACT_FLAG_AIR = (1 << 11) - ---- @type integer -ACT_FLAG_ALLOW_FIRST_PERSON = (1 << 26) - ---- @type integer -ACT_FLAG_ALLOW_VERTICAL_WIND_ACTION = (1 << 24) - ---- @type integer -ACT_FLAG_ATTACKING = (1 << 23) - ---- @type integer -ACT_FLAG_BUTT_OR_STOMACH_SLIDE = (1 << 18) - ---- @type integer -ACT_FLAG_CONTROL_JUMP_HEIGHT = (1 << 25) - ---- @type integer -ACT_FLAG_CUSTOM_ACTION = (1 << 30) - ---- @type integer -ACT_FLAG_DIVING = (1 << 19) - ---- @type integer -ACT_FLAG_FLYING = (ACT_FLAG_AIR | ACT_FLAG_DIVING | ACT_FLAG_ATTACKING | ACT_FLAG_SWIMMING_OR_FLYING) - ---- @type integer -ACT_FLAG_HANGING = (1 << 21) - ---- @type integer -ACT_FLAG_IDLE = (1 << 22) - ---- @type integer -ACT_FLAG_INTANGIBLE = (1 << 12) - ---- @type integer -ACT_FLAG_INVULNERABLE = (1 << 17) - ---- @type integer -ACT_FLAG_METAL_WATER = (1 << 14) - ---- @type integer -ACT_FLAG_MOVING = (1 << 10) - ---- @type integer -ACT_FLAG_ON_POLE = (1 << 20) - ---- @type integer -ACT_FLAG_PAUSE_EXIT = (1 << 27) - ---- @type integer -ACT_FLAG_RIDING_SHELL = (1 << 16) - ---- @type integer -ACT_FLAG_SHORT_HITBOX = (1 << 15) - ---- @type integer -ACT_FLAG_STATIONARY = (1 << 9) - ---- @type integer -ACT_FLAG_SWIMMING = (1 << 13) - ---- @type integer -ACT_FLAG_SWIMMING_OR_FLYING = (1 << 28) - ---- @type integer -ACT_FLAG_THROWING = (1 << 31) - ---- @type integer -ACT_FLAG_WATER_OR_TEXT = (1 << 29) - ---- @type integer -ACT_FLUTTER_KICK = 0x300024D2 - ---- @type integer -ACT_FLYING = 0x10880899 - ---- @type integer -ACT_FLYING_TRIPLE_JUMP = 0x03000894 - ---- @type integer -ACT_FORWARD_AIR_KB = 0x010208B1 - ---- @type integer -ACT_FORWARD_GROUND_KB = 0x00020463 - ---- @type integer -ACT_FORWARD_ROLLOUT = 0x010008A6 - ---- @type integer -ACT_FORWARD_WATER_KB = 0x300222C6 - ---- @type integer -ACT_FREEFALL = 0x0100088C - ---- @type integer -ACT_FREEFALL_LAND = 0x04000471 - ---- @type integer -ACT_FREEFALL_LAND_STOP = 0x0C000232 - ---- @type integer -ACT_GETTING_BLOWN = 0x010208B8 - ---- @type integer -ACT_GRABBED = 0x00020370 - ---- @type integer -ACT_GRAB_POLE_FAST = 0x00100342 - ---- @type integer -ACT_GRAB_POLE_SLOW = 0x00100341 - ---- @type integer -ACT_GROUND_BONK = 0x00020466 - ---- @type integer -ACT_GROUND_POUND = 0x008008A9 - ---- @type integer -ACT_GROUND_POUND_LAND = 0x0080023C - ---- @type integer -ACT_GROUP_AIRBORNE = (2 << 6) - ---- @type integer -ACT_GROUP_AUTOMATIC = (5 << 6) - ---- @type integer -ACT_GROUP_CUTSCENE = (4 << 6) - ---- @type integer -ACT_GROUP_MASK = 0x000001C0 - ---- @type integer -ACT_GROUP_MOVING = (1 << 6) - ---- @type integer -ACT_GROUP_OBJECT = (6 << 6) - ---- @type integer -ACT_GROUP_STATIONARY = (0 << 6) - ---- @type integer -ACT_GROUP_SUBMERGED = (3 << 6) - ---- @type integer -ACT_HANGING = 0x00200349 - ---- @type integer -ACT_HANG_MOVING = 0x0020054A - ---- @type integer -ACT_HARD_BACKWARD_AIR_KB = 0x010208B3 - ---- @type integer -ACT_HARD_BACKWARD_GROUND_KB = 0x00020460 - ---- @type integer -ACT_HARD_FORWARD_AIR_KB = 0x010208B2 - ---- @type integer -ACT_HARD_FORWARD_GROUND_KB = 0x00020461 - ---- @type integer -ACT_HEAD_STUCK_IN_GROUND = 0x0002033A - ---- @type integer -ACT_HEAVY_THROW = 0x80000589 - ---- @type integer -ACT_HOLDING_BOWSER = 0x00000391 - ---- @type integer -ACT_HOLDING_POLE = 0x08100340 - ---- @type integer -ACT_HOLD_BEGIN_SLIDING = 0x00000051 - ---- @type integer -ACT_HOLD_BREASTSTROKE = 0x300024D3 - ---- @type integer -ACT_HOLD_BUTT_SLIDE = 0x00840454 - ---- @type integer -ACT_HOLD_BUTT_SLIDE_AIR = 0x010008A2 - ---- @type integer -ACT_HOLD_BUTT_SLIDE_STOP = 0x0800043F - ---- @type integer -ACT_HOLD_DECELERATING = 0x0000044B - ---- @type integer -ACT_HOLD_FLUTTER_KICK = 0x300024D5 - ---- @type integer -ACT_HOLD_FREEFALL = 0x010008A1 - ---- @type integer -ACT_HOLD_FREEFALL_LAND = 0x00000475 - ---- @type integer -ACT_HOLD_FREEFALL_LAND_STOP = 0x08000235 - ---- @type integer -ACT_HOLD_HEAVY_IDLE = 0x08000208 - ---- @type integer -ACT_HOLD_HEAVY_WALKING = 0x00000447 - ---- @type integer -ACT_HOLD_IDLE = 0x08000207 - ---- @type integer -ACT_HOLD_JUMP = 0x030008A0 - ---- @type integer -ACT_HOLD_JUMP_LAND = 0x00000474 - ---- @type integer -ACT_HOLD_JUMP_LAND_STOP = 0x08000234 - ---- @type integer -ACT_HOLD_METAL_WATER_FALLING = 0x000042F5 - ---- @type integer -ACT_HOLD_METAL_WATER_FALL_LAND = 0x000042F7 - ---- @type integer -ACT_HOLD_METAL_WATER_JUMP = 0x000044F9 - ---- @type integer -ACT_HOLD_METAL_WATER_JUMP_LAND = 0x000044FB - ---- @type integer -ACT_HOLD_METAL_WATER_STANDING = 0x080042F1 - ---- @type integer -ACT_HOLD_METAL_WATER_WALKING = 0x000044F3 - ---- @type integer -ACT_HOLD_PANTING_UNUSED = 0x08000206 - ---- @type integer -ACT_HOLD_QUICKSAND_JUMP_LAND = 0x00000477 - ---- @type integer -ACT_HOLD_STOMACH_SLIDE = 0x008C0455 - ---- @type integer -ACT_HOLD_SWIMMING_END = 0x300024D4 - ---- @type integer -ACT_HOLD_WALKING = 0x00000442 - ---- @type integer -ACT_HOLD_WATER_ACTION_END = 0x300022C3 - ---- @type integer -ACT_HOLD_WATER_IDLE = 0x380022C1 - ---- @type integer -ACT_HOLD_WATER_JUMP = 0x010008A3 - ---- @type integer -ACT_IDLE = 0x0C400201 - ---- @type integer -ACT_ID_MASK = 0x000001FF - ---- @type integer -ACT_INDEX_MASK = (ACT_ID_MASK & ~ACT_GROUP_MASK) - ---- @type integer -ACT_INTRO_CUTSCENE = 0x04001301 - ---- @type integer -ACT_IN_CANNON = 0x00001371 - ---- @type integer -ACT_IN_QUICKSAND = 0x0002020D - ---- @type integer -ACT_JUMBO_STAR_CUTSCENE = 0x00001909 - ---- @type integer -ACT_JUMP = 0x03000880 - ---- @type integer -ACT_JUMP_KICK = 0x018008AC - ---- @type integer -ACT_JUMP_LAND = 0x04000470 - ---- @type integer -ACT_JUMP_LAND_STOP = 0x0C000230 - ---- @type integer -ACT_LAVA_BOOST = 0x010208B7 - ---- @type integer -ACT_LAVA_BOOST_LAND = 0x08000239 - ---- @type integer -ACT_LEDGE_CLIMB_DOWN = 0x0000054E - ---- @type integer -ACT_LEDGE_CLIMB_FAST = 0x0000054F - ---- @type integer -ACT_LEDGE_CLIMB_SLOW_1 = 0x0000054C - ---- @type integer -ACT_LEDGE_CLIMB_SLOW_2 = 0x0000054D - ---- @type integer -ACT_LEDGE_GRAB = 0x0800034B - ---- @type integer -ACT_LONG_JUMP = 0x03000888 - ---- @type integer -ACT_LONG_JUMP_LAND = 0x00000479 - ---- @type integer -ACT_LONG_JUMP_LAND_STOP = 0x0800023B - ---- @type integer -ACT_METAL_WATER_FALLING = 0x000042F4 - ---- @type integer -ACT_METAL_WATER_FALL_LAND = 0x000042F6 - ---- @type integer -ACT_METAL_WATER_JUMP = 0x000044F8 - ---- @type integer -ACT_METAL_WATER_JUMP_LAND = 0x000044FA - ---- @type integer -ACT_METAL_WATER_STANDING = 0x080042F0 - ---- @type integer -ACT_METAL_WATER_WALKING = 0x000044F2 - ---- @type integer -ACT_MOVE_PUNCHING = 0x00800457 - ---- @type integer -ACT_NUM_ACTIONS_PER_GROUP = (ACT_INDEX_MASK + 1) - ---- @type integer -ACT_NUM_GROUPS = ((ACT_GROUP_MASK >> 6) + 1) - ---- @type integer -ACT_PANTING = 0x0C400205 - ---- @type integer -ACT_PICKING_UP = 0x00000383 - ---- @type integer -ACT_PICKING_UP_BOWSER = 0x00000390 - ---- @type integer -ACT_PLACING_DOWN = 0x00000387 - ---- @type integer -ACT_PULLING_DOOR = 0x00001320 - ---- @type integer -ACT_PUNCHING = 0x00800380 - ---- @type integer -ACT_PUSHING_DOOR = 0x00001321 - ---- @type integer -ACT_PUTTING_ON_CAP = 0x0000133D - ---- @type integer -ACT_QUICKSAND_DEATH = 0x00021312 - ---- @type integer -ACT_QUICKSAND_JUMP_LAND = 0x00000476 - ---- @type integer -ACT_READING_AUTOMATIC_DIALOG = 0x20001305 - ---- @type integer -ACT_READING_NPC_DIALOG = 0x20001306 - ---- @type integer -ACT_READING_SIGN = 0x00001308 - ---- @type integer -ACT_RELEASING_BOWSER = 0x00000392 - ---- @type integer -ACT_RIDING_HOOT = 0x000004A8 - ---- @type integer -ACT_RIDING_SHELL_FALL = 0x0081089B - ---- @type integer -ACT_RIDING_SHELL_GROUND = 0x20810446 - ---- @type integer -ACT_RIDING_SHELL_JUMP = 0x0281089A - ---- @type integer -ACT_SHIVERING = 0x0C40020B - ---- @type integer -ACT_SHOCKED = 0x00020338 - ---- @type integer -ACT_SHOCKWAVE_BOUNCE = 0x00020226 - ---- @type integer -ACT_SHOT_FROM_CANNON = 0x00880898 - ---- @type integer -ACT_SIDE_FLIP = 0x01000887 - ---- @type integer -ACT_SIDE_FLIP_LAND = 0x04000473 - ---- @type integer -ACT_SIDE_FLIP_LAND_STOP = 0x0C000233 - ---- @type integer -ACT_SLEEPING = 0x0C000203 - ---- @type integer -ACT_SLIDE_KICK = 0x018008AA - ---- @type integer -ACT_SLIDE_KICK_SLIDE = 0x0080045A - ---- @type integer -ACT_SLIDE_KICK_SLIDE_STOP = 0x08000225 - ---- @type integer -ACT_SOFT_BACKWARD_GROUND_KB = 0x00020464 - ---- @type integer -ACT_SOFT_BONK = 0x010208B6 - ---- @type integer -ACT_SOFT_FORWARD_GROUND_KB = 0x00020465 - ---- @type integer -ACT_SPAWN_NO_SPIN_AIRBORNE = 0x00001932 - ---- @type integer -ACT_SPAWN_NO_SPIN_LANDING = 0x00001333 - ---- @type integer -ACT_SPAWN_SPIN_AIRBORNE = 0x00001924 - ---- @type integer -ACT_SPAWN_SPIN_LANDING = 0x00001325 - ---- @type integer -ACT_SPECIAL_DEATH_EXIT = 0x0000192C - ---- @type integer -ACT_SPECIAL_EXIT_AIRBORNE = 0x0000192B - ---- @type integer -ACT_SPECIAL_TRIPLE_JUMP = 0x030008AF - ---- @type integer -ACT_SQUISHED = 0x00020339 - ---- @type integer -ACT_STANDING_AGAINST_WALL = 0x0C400209 - ---- @type integer -ACT_STANDING_DEATH = 0x00021311 - ---- @type integer -ACT_START_CRAWLING = 0x0C008223 - ---- @type integer -ACT_START_CROUCHING = 0x0C008221 - ---- @type integer -ACT_START_HANGING = 0x08200348 - ---- @type integer -ACT_START_SLEEPING = 0x0C400202 - ---- @type integer -ACT_STAR_DANCE_EXIT = 0x00001302 - ---- @type integer -ACT_STAR_DANCE_NO_EXIT = 0x00001307 - ---- @type integer -ACT_STAR_DANCE_WATER = 0x00001303 - ---- @type integer -ACT_STEEP_JUMP = 0x03000885 - ---- @type integer -ACT_STOMACH_SLIDE = 0x008C0453 - ---- @type integer -ACT_STOMACH_SLIDE_STOP = 0x00000386 - ---- @type integer -ACT_STOP_CRAWLING = 0x0C008224 - ---- @type integer -ACT_STOP_CROUCHING = 0x0C008222 - ---- @type integer -ACT_SUFFOCATION = 0x00021314 - ---- @type integer -ACT_SWIMMING_END = 0x300024D1 - ---- @type integer -ACT_TAKING_OFF_CAP = 0x0000133E - ---- @type integer -ACT_TELEPORT_FADE_IN = 0x00001337 - ---- @type integer -ACT_TELEPORT_FADE_OUT = 0x00001336 - ---- @type integer -ACT_THROWING = 0x80000588 - ---- @type integer -ACT_THROWN_BACKWARD = 0x010208BE - ---- @type integer -ACT_THROWN_FORWARD = 0x010208BD - ---- @type integer -ACT_TOP_OF_POLE = 0x00100345 - ---- @type integer -ACT_TOP_OF_POLE_JUMP = 0x0300088D - ---- @type integer -ACT_TOP_OF_POLE_TRANSITION = 0x00100344 - ---- @type integer -ACT_TORNADO_TWIRLING = 0x10020372 - ---- @type integer -ACT_TRIPLE_JUMP = 0x01000882 - ---- @type integer -ACT_TRIPLE_JUMP_LAND = 0x04000478 - ---- @type integer -ACT_TRIPLE_JUMP_LAND_STOP = 0x0800023A - ---- @type integer -ACT_TURNING_AROUND = 0x00000443 - ---- @type integer -ACT_TWIRLING = 0x108008A4 - ---- @type integer -ACT_TWIRL_LAND = 0x18800238 - ---- @type integer -ACT_UNINITIALIZED = 0x00000000 - ---- @type integer -ACT_UNKNOWN_0002020E = 0x0002020E - ---- @type integer -ACT_UNLOCKING_KEY_DOOR = 0x0000132E - ---- @type integer -ACT_UNLOCKING_STAR_DOOR = 0x0000132F - ---- @type integer -ACT_UNUSED_DEATH_EXIT = 0x00001929 - ---- @type integer -ACT_VERTICAL_WIND = 0x1008089C - ---- @type integer -ACT_WAITING_FOR_DIALOG = 0x0000130A - ---- @type integer -ACT_WAKING_UP = 0x0C000204 - ---- @type integer -ACT_WALKING = 0x04000440 - ---- @type integer -ACT_WALL_KICK_AIR = 0x03000886 - ---- @type integer -ACT_WARP_DOOR_SPAWN = 0x00001322 - ---- @type integer -ACT_WATER_ACTION_END = 0x300022C2 - ---- @type integer -ACT_WATER_DEATH = 0x300032C7 - ---- @type integer -ACT_WATER_IDLE = 0x380022C0 - ---- @type integer -ACT_WATER_JUMP = 0x01000889 - ---- @type integer -ACT_WATER_PLUNGE = 0x300022E2 - ---- @type integer -ACT_WATER_PUNCH = 0x300024E1 - ---- @type integer -ACT_WATER_SHELL_SWIMMING = 0x300024D6 - ---- @type integer -ACT_WATER_SHOCKED = 0x300222C8 - ---- @type integer -ACT_WATER_THROW = 0x300024E0 - ---- @type integer -AIR_STEP_CHECK_HANG = 0x00000002 - ---- @type integer -AIR_STEP_CHECK_LEDGE_GRAB = 0x00000001 - ---- @type integer -AIR_STEP_GRABBED_CEILING = 4 - ---- @type integer -AIR_STEP_GRABBED_LEDGE = 3 - ---- @type integer -AIR_STEP_HIT_LAVA_WALL = 6 - ---- @type integer -AIR_STEP_HIT_WALL = 2 - ---- @type integer -AIR_STEP_LANDED = 1 - ---- @type integer -AIR_STEP_NONE = 0 - ---- @type integer -C_BUTTONS = (U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS ) - ---- @type integer -END_DEMO = (1 << 7) - ---- @type integer -GROUND_STEP_HIT_WALL = 2 - ---- @type integer -GROUND_STEP_HIT_WALL_CONTINUE_QSTEPS = 3 - ---- @type integer -GROUND_STEP_HIT_WALL_STOP_QSTEPS = 2 - ---- @type integer -GROUND_STEP_LEFT_GROUND = 0 - ---- @type integer -GROUND_STEP_NONE = 1 - ---- @type integer -INPUT_ABOVE_SLIDE = 0x0008 - ---- @type integer -INPUT_A_DOWN = 0x0080 - ---- @type integer -INPUT_A_PRESSED = 0x0002 - ---- @type integer -INPUT_B_PRESSED = 0x2000 - ---- @type integer -INPUT_FIRST_PERSON = 0x0010 - ---- @type integer -INPUT_INTERACT_OBJ_GRABBABLE = 0x0800 - ---- @type integer -INPUT_IN_POISON_GAS = 0x0100 - ---- @type integer -INPUT_IN_WATER = 0x0200 - ---- @type integer -INPUT_NONZERO_ANALOG = 0x0001 - ---- @type integer -INPUT_OFF_FLOOR = 0x0004 - ---- @type integer -INPUT_SQUISHED = 0x0040 - ---- @type integer -INPUT_UNKNOWN_10 = 0x0400 - ---- @type integer -INPUT_UNKNOWN_12 = 0x1000 - ---- @type integer -INPUT_ZERO_MOVEMENT = 0x0020 - ---- @type integer -INPUT_Z_DOWN = 0x4000 - ---- @type integer -INPUT_Z_PRESSED = 0x8000 - ---- @type integer -LAYER_ALPHA = 4 - --- @type integer LAYER_FORCE = 0 @@ -8620,6 +7735,9 @@ LAYER_OPAQUE_DECAL = 2 --- @type integer LAYER_OPAQUE_INTER = 3 +--- @type integer +LAYER_ALPHA = 4 + --- @type integer LAYER_TRANSPARENT = 5 @@ -8630,53 +7748,233 @@ LAYER_TRANSPARENT_DECAL = 6 LAYER_TRANSPARENT_INTER = 7 --- @type integer -MARIO_ACTION_SOUND_PLAYED = 0x00010000 +INPUT_NONZERO_ANALOG = 0x0001 --- @type integer -MARIO_CAPS = (MARIO_NORMAL_CAP | MARIO_SPECIAL_CAPS) +INPUT_A_PRESSED = 0x0002 --- @type integer -MARIO_CAP_IN_HAND = 0x00000020 +INPUT_OFF_FLOOR = 0x0004 --- @type integer -MARIO_CAP_ON_HEAD = 0x00000010 +INPUT_ABOVE_SLIDE = 0x0008 --- @type integer -MARIO_KICKING = 0x00200000 +INPUT_FIRST_PERSON = 0x0010 --- @type integer -MARIO_MARIO_SOUND_PLAYED = 0x00020000 +INPUT_ZERO_MOVEMENT = 0x0020 --- @type integer -MARIO_METAL_CAP = 0x00000004 +INPUT_SQUISHED = 0x0040 --- @type integer -MARIO_METAL_SHOCK = 0x00000040 +INPUT_A_DOWN = 0x0080 + +--- @type integer +INPUT_IN_POISON_GAS = 0x0100 + +--- @type integer +INPUT_IN_WATER = 0x0200 + +--- @type integer +INPUT_UNKNOWN_10 = 0x0400 + +--- @type integer +INPUT_INTERACT_OBJ_GRABBABLE = 0x0800 + +--- @type integer +INPUT_UNKNOWN_12 = 0x1000 + +--- @type integer +INPUT_B_PRESSED = 0x2000 + +--- @type integer +INPUT_Z_DOWN = 0x4000 + +--- @type integer +INPUT_Z_PRESSED = 0x8000 + +--- @type integer +GROUND_STEP_LEFT_GROUND = 0 + +--- @type integer +GROUND_STEP_NONE = 1 + +--- @type integer +GROUND_STEP_HIT_WALL = 2 + +--- @type integer +GROUND_STEP_HIT_WALL_STOP_QSTEPS = 2 + +--- @type integer +GROUND_STEP_HIT_WALL_CONTINUE_QSTEPS = 3 + +--- @type integer +AIR_STEP_CHECK_LEDGE_GRAB = 0x00000001 + +--- @type integer +AIR_STEP_CHECK_HANG = 0x00000002 + +--- @type integer +AIR_STEP_NONE = 0 + +--- @type integer +AIR_STEP_LANDED = 1 + +--- @type integer +AIR_STEP_HIT_WALL = 2 + +--- @type integer +AIR_STEP_GRABBED_LEDGE = 3 + +--- @type integer +AIR_STEP_GRABBED_CEILING = 4 + +--- @type integer +AIR_STEP_HIT_LAVA_WALL = 6 + +--- @type integer +WATER_STEP_NONE = 0 + +--- @type integer +WATER_STEP_HIT_FLOOR = 1 + +--- @type integer +WATER_STEP_HIT_CEILING = 2 + +--- @type integer +WATER_STEP_CANCELLED = 3 + +--- @type integer +WATER_STEP_HIT_WALL = 4 + +--- @type integer +STEP_TYPE_GROUND = 1 + +--- @type integer +STEP_TYPE_AIR = 2 + +--- @type integer +STEP_TYPE_WATER = 3 + +--- @type integer +STEP_TYPE_HANG = 4 + +--- @type integer +PARTICLE_DUST = (1 << 0) + +--- @type integer +PARTICLE_VERTICAL_STAR = (1 << 1) + +--- @type integer +PARTICLE_2 = (1 << 2) + +--- @type integer +PARTICLE_SPARKLES = (1 << 3) + +--- @type integer +PARTICLE_HORIZONTAL_STAR = (1 << 4) + +--- @type integer +PARTICLE_BUBBLE = (1 << 5) + +--- @type integer +PARTICLE_WATER_SPLASH = (1 << 6) + +--- @type integer +PARTICLE_IDLE_WATER_WAVE = (1 << 7) + +--- @type integer +PARTICLE_SHALLOW_WATER_WAVE = (1 << 8) + +--- @type integer +PARTICLE_PLUNGE_BUBBLE = (1 << 9) + +--- @type integer +PARTICLE_WAVE_TRAIL = (1 << 10) + +--- @type integer +PARTICLE_FIRE = (1 << 11) + +--- @type integer +PARTICLE_SHALLOW_WATER_SPLASH = (1 << 12) + +--- @type integer +PARTICLE_LEAF = (1 << 13) + +--- @type integer +PARTICLE_SNOW = (1 << 14) + +--- @type integer +PARTICLE_DIRT = (1 << 15) + +--- @type integer +PARTICLE_MIST_CIRCLE = (1 << 16) + +--- @type integer +PARTICLE_BREATH = (1 << 17) + +--- @type integer +PARTICLE_TRIANGLE = (1 << 18) + +--- @type integer +PARTICLE_19 = (1 << 19) + +--- @type integer +MODEL_STATE_NOISE_ALPHA = 0x180 + +--- @type integer +MODEL_STATE_METAL = 0x200 --- @type integer MARIO_NORMAL_CAP = 0x00000001 --- @type integer -MARIO_PUNCHING = 0x00100000 +MARIO_VANISH_CAP = 0x00000002 --- @type integer -MARIO_SPECIAL_CAPS = (MARIO_VANISH_CAP | MARIO_METAL_CAP | MARIO_WING_CAP) +MARIO_METAL_CAP = 0x00000004 + +--- @type integer +MARIO_WING_CAP = 0x00000008 + +--- @type integer +MARIO_CAP_ON_HEAD = 0x00000010 + +--- @type integer +MARIO_CAP_IN_HAND = 0x00000020 + +--- @type integer +MARIO_METAL_SHOCK = 0x00000040 --- @type integer MARIO_TELEPORTING = 0x00000080 ---- @type integer -MARIO_TRIPPING = 0x00400000 - --- @type integer MARIO_UNKNOWN_08 = 0x00000100 --- @type integer MARIO_UNKNOWN_13 = 0x00002000 +--- @type integer +MARIO_ACTION_SOUND_PLAYED = 0x00010000 + +--- @type integer +MARIO_MARIO_SOUND_PLAYED = 0x00020000 + --- @type integer MARIO_UNKNOWN_18 = 0x00040000 +--- @type integer +MARIO_PUNCHING = 0x00100000 + +--- @type integer +MARIO_KICKING = 0x00200000 + +--- @type integer +MARIO_TRIPPING = 0x00400000 + --- @type integer MARIO_UNKNOWN_25 = 0x02000000 @@ -8687,115 +7985,832 @@ MARIO_UNKNOWN_30 = 0x40000000 MARIO_UNKNOWN_31 = 0x80000000 --- @type integer -MARIO_VANISH_CAP = 0x00000002 +MARIO_SPECIAL_CAPS = (MARIO_VANISH_CAP | MARIO_METAL_CAP | MARIO_WING_CAP) --- @type integer -MARIO_WING_CAP = 0x00000008 +MARIO_CAPS = (MARIO_NORMAL_CAP | MARIO_SPECIAL_CAPS) --- @type integer -MODEL_STATE_METAL = 0x200 +ACT_ID_MASK = 0x000001FF --- @type integer -MODEL_STATE_NOISE_ALPHA = 0x180 +ACT_GROUP_MASK = 0x000001C0 --- @type integer -PARTICLE_19 = (1 << 19) +ACT_GROUP_STATIONARY = (0 << 6) --- @type integer -PARTICLE_2 = (1 << 2) +ACT_GROUP_MOVING = (1 << 6) --- @type integer -PARTICLE_BREATH = (1 << 17) +ACT_GROUP_AIRBORNE = (2 << 6) --- @type integer -PARTICLE_BUBBLE = (1 << 5) +ACT_GROUP_SUBMERGED = (3 << 6) --- @type integer -PARTICLE_DIRT = (1 << 15) +ACT_GROUP_CUTSCENE = (4 << 6) --- @type integer -PARTICLE_DUST = (1 << 0) +ACT_GROUP_AUTOMATIC = (5 << 6) --- @type integer -PARTICLE_FIRE = (1 << 11) +ACT_GROUP_OBJECT = (6 << 6) --- @type integer -PARTICLE_HORIZONTAL_STAR = (1 << 4) +ACT_INDEX_MASK = (ACT_ID_MASK & ~ACT_GROUP_MASK) --- @type integer -PARTICLE_IDLE_WATER_WAVE = (1 << 7) +ACT_NUM_GROUPS = ((ACT_GROUP_MASK >> 6) + 1) --- @type integer -PARTICLE_LEAF = (1 << 13) +ACT_NUM_ACTIONS_PER_GROUP = (ACT_INDEX_MASK + 1) --- @type integer -PARTICLE_MIST_CIRCLE = (1 << 16) +ACT_FLAG_STATIONARY = (1 << 9) --- @type integer -PARTICLE_PLUNGE_BUBBLE = (1 << 9) +ACT_FLAG_MOVING = (1 << 10) --- @type integer -PARTICLE_SHALLOW_WATER_SPLASH = (1 << 12) +ACT_FLAG_AIR = (1 << 11) --- @type integer -PARTICLE_SHALLOW_WATER_WAVE = (1 << 8) +ACT_FLAG_INTANGIBLE = (1 << 12) --- @type integer -PARTICLE_SNOW = (1 << 14) +ACT_FLAG_SWIMMING = (1 << 13) --- @type integer -PARTICLE_SPARKLES = (1 << 3) +ACT_FLAG_METAL_WATER = (1 << 14) --- @type integer -PARTICLE_TRIANGLE = (1 << 18) +ACT_FLAG_SHORT_HITBOX = (1 << 15) --- @type integer -PARTICLE_VERTICAL_STAR = (1 << 1) +ACT_FLAG_RIDING_SHELL = (1 << 16) --- @type integer -PARTICLE_WATER_SPLASH = (1 << 6) +ACT_FLAG_INVULNERABLE = (1 << 17) --- @type integer -PARTICLE_WAVE_TRAIL = (1 << 10) +ACT_FLAG_BUTT_OR_STOMACH_SLIDE = (1 << 18) --- @type integer -STEP_TYPE_AIR = 2 +ACT_FLAG_DIVING = (1 << 19) --- @type integer -STEP_TYPE_GROUND = 1 +ACT_FLAG_ON_POLE = (1 << 20) --- @type integer -STEP_TYPE_HANG = 4 +ACT_FLAG_HANGING = (1 << 21) --- @type integer -STEP_TYPE_WATER = 3 +ACT_FLAG_IDLE = (1 << 22) + +--- @type integer +ACT_FLAG_ATTACKING = (1 << 23) + +--- @type integer +ACT_FLAG_ALLOW_VERTICAL_WIND_ACTION = (1 << 24) + +--- @type integer +ACT_FLAG_CONTROL_JUMP_HEIGHT = (1 << 25) + +--- @type integer +ACT_FLAG_ALLOW_FIRST_PERSON = (1 << 26) + +--- @type integer +ACT_FLAG_PAUSE_EXIT = (1 << 27) + +--- @type integer +ACT_FLAG_SWIMMING_OR_FLYING = (1 << 28) + +--- @type integer +ACT_FLAG_WATER_OR_TEXT = (1 << 29) + +--- @type integer +ACT_FLAG_CUSTOM_ACTION = (1 << 30) + +--- @type integer +ACT_FLAG_THROWING = (1 << 31) + +--- @type integer +ACT_FLAG_FLYING = (ACT_FLAG_AIR | ACT_FLAG_DIVING | ACT_FLAG_ATTACKING | ACT_FLAG_SWIMMING_OR_FLYING) + +--- @type integer +ACT_UNINITIALIZED = 0x00000000 + +--- @type integer +ACT_IDLE = 0x0C400201 + +--- @type integer +ACT_START_SLEEPING = 0x0C400202 + +--- @type integer +ACT_SLEEPING = 0x0C000203 + +--- @type integer +ACT_WAKING_UP = 0x0C000204 + +--- @type integer +ACT_PANTING = 0x0C400205 + +--- @type integer +ACT_HOLD_PANTING_UNUSED = 0x08000206 + +--- @type integer +ACT_HOLD_IDLE = 0x08000207 + +--- @type integer +ACT_HOLD_HEAVY_IDLE = 0x08000208 + +--- @type integer +ACT_STANDING_AGAINST_WALL = 0x0C400209 + +--- @type integer +ACT_COUGHING = 0x0C40020A + +--- @type integer +ACT_SHIVERING = 0x0C40020B + +--- @type integer +ACT_IN_QUICKSAND = 0x0002020D + +--- @type integer +ACT_UNKNOWN_0002020E = 0x0002020E + +--- @type integer +ACT_CROUCHING = 0x0C008220 + +--- @type integer +ACT_START_CROUCHING = 0x0C008221 + +--- @type integer +ACT_STOP_CROUCHING = 0x0C008222 + +--- @type integer +ACT_START_CRAWLING = 0x0C008223 + +--- @type integer +ACT_STOP_CRAWLING = 0x0C008224 + +--- @type integer +ACT_SLIDE_KICK_SLIDE_STOP = 0x08000225 + +--- @type integer +ACT_SHOCKWAVE_BOUNCE = 0x00020226 + +--- @type integer +ACT_FIRST_PERSON = 0x0C000227 + +--- @type integer +ACT_BACKFLIP_LAND_STOP = 0x0800022F + +--- @type integer +ACT_JUMP_LAND_STOP = 0x0C000230 + +--- @type integer +ACT_DOUBLE_JUMP_LAND_STOP = 0x0C000231 + +--- @type integer +ACT_FREEFALL_LAND_STOP = 0x0C000232 + +--- @type integer +ACT_SIDE_FLIP_LAND_STOP = 0x0C000233 + +--- @type integer +ACT_HOLD_JUMP_LAND_STOP = 0x08000234 + +--- @type integer +ACT_HOLD_FREEFALL_LAND_STOP = 0x08000235 + +--- @type integer +ACT_AIR_THROW_LAND = 0x80000A36 + +--- @type integer +ACT_TWIRL_LAND = 0x18800238 + +--- @type integer +ACT_LAVA_BOOST_LAND = 0x08000239 + +--- @type integer +ACT_TRIPLE_JUMP_LAND_STOP = 0x0800023A + +--- @type integer +ACT_LONG_JUMP_LAND_STOP = 0x0800023B + +--- @type integer +ACT_GROUND_POUND_LAND = 0x0080023C + +--- @type integer +ACT_BRAKING_STOP = 0x0C00023D + +--- @type integer +ACT_BUTT_SLIDE_STOP = 0x0C00023E + +--- @type integer +ACT_HOLD_BUTT_SLIDE_STOP = 0x0800043F + +--- @type integer +ACT_WALKING = 0x04000440 + +--- @type integer +ACT_HOLD_WALKING = 0x00000442 + +--- @type integer +ACT_TURNING_AROUND = 0x00000443 + +--- @type integer +ACT_FINISH_TURNING_AROUND = 0x00000444 + +--- @type integer +ACT_BRAKING = 0x04000445 + +--- @type integer +ACT_RIDING_SHELL_GROUND = 0x20810446 + +--- @type integer +ACT_HOLD_HEAVY_WALKING = 0x00000447 + +--- @type integer +ACT_CRAWLING = 0x04008448 + +--- @type integer +ACT_BURNING_GROUND = 0x00020449 + +--- @type integer +ACT_DECELERATING = 0x0400044A + +--- @type integer +ACT_HOLD_DECELERATING = 0x0000044B + +--- @type integer +ACT_BEGIN_SLIDING = 0x00000050 + +--- @type integer +ACT_HOLD_BEGIN_SLIDING = 0x00000051 + +--- @type integer +ACT_BUTT_SLIDE = 0x00840452 + +--- @type integer +ACT_STOMACH_SLIDE = 0x008C0453 + +--- @type integer +ACT_HOLD_BUTT_SLIDE = 0x00840454 + +--- @type integer +ACT_HOLD_STOMACH_SLIDE = 0x008C0455 + +--- @type integer +ACT_DIVE_SLIDE = 0x00880456 + +--- @type integer +ACT_MOVE_PUNCHING = 0x00800457 + +--- @type integer +ACT_CROUCH_SLIDE = 0x04808459 + +--- @type integer +ACT_SLIDE_KICK_SLIDE = 0x0080045A + +--- @type integer +ACT_HARD_BACKWARD_GROUND_KB = 0x00020460 + +--- @type integer +ACT_HARD_FORWARD_GROUND_KB = 0x00020461 + +--- @type integer +ACT_BACKWARD_GROUND_KB = 0x00020462 + +--- @type integer +ACT_FORWARD_GROUND_KB = 0x00020463 + +--- @type integer +ACT_SOFT_BACKWARD_GROUND_KB = 0x00020464 + +--- @type integer +ACT_SOFT_FORWARD_GROUND_KB = 0x00020465 + +--- @type integer +ACT_GROUND_BONK = 0x00020466 + +--- @type integer +ACT_DEATH_EXIT_LAND = 0x00020467 + +--- @type integer +ACT_JUMP_LAND = 0x04000470 + +--- @type integer +ACT_FREEFALL_LAND = 0x04000471 + +--- @type integer +ACT_DOUBLE_JUMP_LAND = 0x04000472 + +--- @type integer +ACT_SIDE_FLIP_LAND = 0x04000473 + +--- @type integer +ACT_HOLD_JUMP_LAND = 0x00000474 + +--- @type integer +ACT_HOLD_FREEFALL_LAND = 0x00000475 + +--- @type integer +ACT_QUICKSAND_JUMP_LAND = 0x00000476 + +--- @type integer +ACT_HOLD_QUICKSAND_JUMP_LAND = 0x00000477 + +--- @type integer +ACT_TRIPLE_JUMP_LAND = 0x04000478 + +--- @type integer +ACT_LONG_JUMP_LAND = 0x00000479 + +--- @type integer +ACT_BACKFLIP_LAND = 0x0400047A + +--- @type integer +ACT_JUMP = 0x03000880 + +--- @type integer +ACT_DOUBLE_JUMP = 0x03000881 + +--- @type integer +ACT_TRIPLE_JUMP = 0x01000882 + +--- @type integer +ACT_BACKFLIP = 0x01000883 + +--- @type integer +ACT_STEEP_JUMP = 0x03000885 + +--- @type integer +ACT_WALL_KICK_AIR = 0x03000886 + +--- @type integer +ACT_SIDE_FLIP = 0x01000887 + +--- @type integer +ACT_LONG_JUMP = 0x03000888 + +--- @type integer +ACT_WATER_JUMP = 0x01000889 + +--- @type integer +ACT_DIVE = 0x0188088A + +--- @type integer +ACT_FREEFALL = 0x0100088C + +--- @type integer +ACT_TOP_OF_POLE_JUMP = 0x0300088D + +--- @type integer +ACT_BUTT_SLIDE_AIR = 0x0300088E + +--- @type integer +ACT_FLYING_TRIPLE_JUMP = 0x03000894 + +--- @type integer +ACT_SHOT_FROM_CANNON = 0x00880898 + +--- @type integer +ACT_FLYING = 0x10880899 + +--- @type integer +ACT_RIDING_SHELL_JUMP = 0x0281089A + +--- @type integer +ACT_RIDING_SHELL_FALL = 0x0081089B + +--- @type integer +ACT_VERTICAL_WIND = 0x1008089C + +--- @type integer +ACT_HOLD_JUMP = 0x030008A0 + +--- @type integer +ACT_HOLD_FREEFALL = 0x010008A1 + +--- @type integer +ACT_HOLD_BUTT_SLIDE_AIR = 0x010008A2 + +--- @type integer +ACT_HOLD_WATER_JUMP = 0x010008A3 + +--- @type integer +ACT_TWIRLING = 0x108008A4 + +--- @type integer +ACT_FORWARD_ROLLOUT = 0x010008A6 + +--- @type integer +ACT_AIR_HIT_WALL = 0x000008A7 + +--- @type integer +ACT_RIDING_HOOT = 0x000004A8 + +--- @type integer +ACT_GROUND_POUND = 0x008008A9 + +--- @type integer +ACT_SLIDE_KICK = 0x018008AA + +--- @type integer +ACT_AIR_THROW = 0x830008AB + +--- @type integer +ACT_JUMP_KICK = 0x018008AC + +--- @type integer +ACT_BACKWARD_ROLLOUT = 0x010008AD + +--- @type integer +ACT_CRAZY_BOX_BOUNCE = 0x000008AE + +--- @type integer +ACT_SPECIAL_TRIPLE_JUMP = 0x030008AF + +--- @type integer +ACT_BACKWARD_AIR_KB = 0x010208B0 + +--- @type integer +ACT_FORWARD_AIR_KB = 0x010208B1 + +--- @type integer +ACT_HARD_FORWARD_AIR_KB = 0x010208B2 + +--- @type integer +ACT_HARD_BACKWARD_AIR_KB = 0x010208B3 + +--- @type integer +ACT_BURNING_JUMP = 0x010208B4 + +--- @type integer +ACT_BURNING_FALL = 0x010208B5 + +--- @type integer +ACT_SOFT_BONK = 0x010208B6 + +--- @type integer +ACT_LAVA_BOOST = 0x010208B7 + +--- @type integer +ACT_GETTING_BLOWN = 0x010208B8 + +--- @type integer +ACT_THROWN_FORWARD = 0x010208BD + +--- @type integer +ACT_THROWN_BACKWARD = 0x010208BE + +--- @type integer +ACT_WATER_IDLE = 0x380022C0 + +--- @type integer +ACT_HOLD_WATER_IDLE = 0x380022C1 + +--- @type integer +ACT_WATER_ACTION_END = 0x300022C2 + +--- @type integer +ACT_HOLD_WATER_ACTION_END = 0x300022C3 + +--- @type integer +ACT_DROWNING = 0x300032C4 + +--- @type integer +ACT_BACKWARD_WATER_KB = 0x300222C5 + +--- @type integer +ACT_FORWARD_WATER_KB = 0x300222C6 + +--- @type integer +ACT_WATER_DEATH = 0x300032C7 + +--- @type integer +ACT_WATER_SHOCKED = 0x300222C8 + +--- @type integer +ACT_BREASTSTROKE = 0x300024D0 + +--- @type integer +ACT_SWIMMING_END = 0x300024D1 + +--- @type integer +ACT_FLUTTER_KICK = 0x300024D2 + +--- @type integer +ACT_HOLD_BREASTSTROKE = 0x300024D3 + +--- @type integer +ACT_HOLD_SWIMMING_END = 0x300024D4 + +--- @type integer +ACT_HOLD_FLUTTER_KICK = 0x300024D5 + +--- @type integer +ACT_WATER_SHELL_SWIMMING = 0x300024D6 + +--- @type integer +ACT_WATER_THROW = 0x300024E0 + +--- @type integer +ACT_WATER_PUNCH = 0x300024E1 + +--- @type integer +ACT_WATER_PLUNGE = 0x300022E2 + +--- @type integer +ACT_CAUGHT_IN_WHIRLPOOL = 0x300222E3 + +--- @type integer +ACT_METAL_WATER_STANDING = 0x080042F0 + +--- @type integer +ACT_HOLD_METAL_WATER_STANDING = 0x080042F1 + +--- @type integer +ACT_METAL_WATER_WALKING = 0x000044F2 + +--- @type integer +ACT_HOLD_METAL_WATER_WALKING = 0x000044F3 + +--- @type integer +ACT_METAL_WATER_FALLING = 0x000042F4 + +--- @type integer +ACT_HOLD_METAL_WATER_FALLING = 0x000042F5 + +--- @type integer +ACT_METAL_WATER_FALL_LAND = 0x000042F6 + +--- @type integer +ACT_HOLD_METAL_WATER_FALL_LAND = 0x000042F7 + +--- @type integer +ACT_METAL_WATER_JUMP = 0x000044F8 + +--- @type integer +ACT_HOLD_METAL_WATER_JUMP = 0x000044F9 + +--- @type integer +ACT_METAL_WATER_JUMP_LAND = 0x000044FA + +--- @type integer +ACT_HOLD_METAL_WATER_JUMP_LAND = 0x000044FB + +--- @type integer +ACT_DISAPPEARED = 0x00001300 + +--- @type integer +ACT_INTRO_CUTSCENE = 0x04001301 + +--- @type integer +ACT_STAR_DANCE_EXIT = 0x00001302 + +--- @type integer +ACT_STAR_DANCE_WATER = 0x00001303 + +--- @type integer +ACT_FALL_AFTER_STAR_GRAB = 0x00001904 + +--- @type integer +ACT_READING_AUTOMATIC_DIALOG = 0x20001305 + +--- @type integer +ACT_READING_NPC_DIALOG = 0x20001306 + +--- @type integer +ACT_STAR_DANCE_NO_EXIT = 0x00001307 + +--- @type integer +ACT_READING_SIGN = 0x00001308 + +--- @type integer +ACT_JUMBO_STAR_CUTSCENE = 0x00001909 + +--- @type integer +ACT_WAITING_FOR_DIALOG = 0x0000130A + +--- @type integer +ACT_DEBUG_FREE_MOVE = 0x0000130F + +--- @type integer +ACT_STANDING_DEATH = 0x00021311 + +--- @type integer +ACT_QUICKSAND_DEATH = 0x00021312 + +--- @type integer +ACT_ELECTROCUTION = 0x00021313 + +--- @type integer +ACT_SUFFOCATION = 0x00021314 + +--- @type integer +ACT_DEATH_ON_STOMACH = 0x00021315 + +--- @type integer +ACT_DEATH_ON_BACK = 0x00021316 + +--- @type integer +ACT_EATEN_BY_BUBBA = 0x00021317 + +--- @type integer +ACT_END_PEACH_CUTSCENE = 0x00001918 + +--- @type integer +ACT_CREDITS_CUTSCENE = 0x00001319 + +--- @type integer +ACT_END_WAVING_CUTSCENE = 0x0000131A + +--- @type integer +ACT_PULLING_DOOR = 0x00001320 + +--- @type integer +ACT_PUSHING_DOOR = 0x00001321 + +--- @type integer +ACT_WARP_DOOR_SPAWN = 0x00001322 + +--- @type integer +ACT_EMERGE_FROM_PIPE = 0x00001923 + +--- @type integer +ACT_SPAWN_SPIN_AIRBORNE = 0x00001924 + +--- @type integer +ACT_SPAWN_SPIN_LANDING = 0x00001325 + +--- @type integer +ACT_EXIT_AIRBORNE = 0x00001926 + +--- @type integer +ACT_EXIT_LAND_SAVE_DIALOG = 0x00001327 + +--- @type integer +ACT_DEATH_EXIT = 0x00001928 + +--- @type integer +ACT_UNUSED_DEATH_EXIT = 0x00001929 + +--- @type integer +ACT_FALLING_DEATH_EXIT = 0x0000192A + +--- @type integer +ACT_SPECIAL_EXIT_AIRBORNE = 0x0000192B + +--- @type integer +ACT_SPECIAL_DEATH_EXIT = 0x0000192C + +--- @type integer +ACT_FALLING_EXIT_AIRBORNE = 0x0000192D + +--- @type integer +ACT_UNLOCKING_KEY_DOOR = 0x0000132E + +--- @type integer +ACT_UNLOCKING_STAR_DOOR = 0x0000132F + +--- @type integer +ACT_ENTERING_STAR_DOOR = 0x00001331 + +--- @type integer +ACT_SPAWN_NO_SPIN_AIRBORNE = 0x00001932 + +--- @type integer +ACT_SPAWN_NO_SPIN_LANDING = 0x00001333 + +--- @type integer +ACT_BBH_ENTER_JUMP = 0x00001934 + +--- @type integer +ACT_BBH_ENTER_SPIN = 0x00001535 + +--- @type integer +ACT_TELEPORT_FADE_OUT = 0x00001336 + +--- @type integer +ACT_TELEPORT_FADE_IN = 0x00001337 + +--- @type integer +ACT_SHOCKED = 0x00020338 + +--- @type integer +ACT_SQUISHED = 0x00020339 + +--- @type integer +ACT_HEAD_STUCK_IN_GROUND = 0x0002033A + +--- @type integer +ACT_BUTT_STUCK_IN_GROUND = 0x0002033B + +--- @type integer +ACT_FEET_STUCK_IN_GROUND = 0x0002033C + +--- @type integer +ACT_PUTTING_ON_CAP = 0x0000133D + +--- @type integer +ACT_TAKING_OFF_CAP = 0x0000133E + +--- @type integer +ACT_HOLDING_POLE = 0x08100340 + +--- @type integer +ACT_GRAB_POLE_SLOW = 0x00100341 + +--- @type integer +ACT_GRAB_POLE_FAST = 0x00100342 + +--- @type integer +ACT_CLIMBING_POLE = 0x00100343 + +--- @type integer +ACT_TOP_OF_POLE_TRANSITION = 0x00100344 + +--- @type integer +ACT_TOP_OF_POLE = 0x00100345 + +--- @type integer +ACT_START_HANGING = 0x08200348 + +--- @type integer +ACT_HANGING = 0x00200349 + +--- @type integer +ACT_HANG_MOVING = 0x0020054A + +--- @type integer +ACT_LEDGE_GRAB = 0x0800034B + +--- @type integer +ACT_LEDGE_CLIMB_SLOW_1 = 0x0000054C + +--- @type integer +ACT_LEDGE_CLIMB_SLOW_2 = 0x0000054D + +--- @type integer +ACT_LEDGE_CLIMB_DOWN = 0x0000054E + +--- @type integer +ACT_LEDGE_CLIMB_FAST = 0x0000054F + +--- @type integer +ACT_GRABBED = 0x00020370 + +--- @type integer +ACT_IN_CANNON = 0x00001371 + +--- @type integer +ACT_TORNADO_TWIRLING = 0x10020372 + +--- @type integer +ACT_BUBBLED = (0x173 | ACT_FLAG_MOVING | ACT_FLAG_PAUSE_EXIT) + +--- @type integer +ACT_PUNCHING = 0x00800380 + +--- @type integer +ACT_PICKING_UP = 0x00000383 + +--- @type integer +ACT_DIVE_PICKING_UP = 0x00000385 + +--- @type integer +ACT_STOMACH_SLIDE_STOP = 0x00000386 + +--- @type integer +ACT_PLACING_DOWN = 0x00000387 + +--- @type integer +ACT_THROWING = 0x80000588 + +--- @type integer +ACT_HEAVY_THROW = 0x80000589 + +--- @type integer +ACT_PICKING_UP_BOWSER = 0x00000390 + +--- @type integer +ACT_HOLDING_BOWSER = 0x00000391 + +--- @type integer +ACT_RELEASING_BOWSER = 0x00000392 + +--- @type integer +END_DEMO = (1 << 7) --- @type integer VALID_BUTTONS = (A_BUTTON | B_BUTTON | Z_TRIG | START_BUTTON | U_JPAD | D_JPAD | L_JPAD | R_JPAD | L_TRIG | R_TRIG | X_BUTTON | Y_BUTTON | U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS ) --- @type integer -WATER_STEP_CANCELLED = 3 - ---- @type integer -WATER_STEP_HIT_CEILING = 2 - ---- @type integer -WATER_STEP_HIT_FLOOR = 1 - ---- @type integer -WATER_STEP_HIT_WALL = 4 - ---- @type integer -WATER_STEP_NONE = 0 - -ACTION_HOOK_EVERY_FRAME = 0 --- @type LuaActionHookType -ACTION_HOOK_GRAVITY = 1 --- @type LuaActionHookType -ACTION_HOOK_MAX = 2 --- @type LuaActionHookType - ---- @alias LuaActionHookType ---- | `ACTION_HOOK_EVERY_FRAME` ---- | `ACTION_HOOK_GRAVITY` ---- | `ACTION_HOOK_MAX` +C_BUTTONS = (U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS ) HOOK_UPDATE = 0 --- @type LuaHookedEventType HOOK_MARIO_UPDATE = 1 --- @type LuaHookedEventType @@ -8908,6 +8923,15 @@ HOOK_MAX = 53 --- @type LuaHookedEventType --- | `HOOK_ON_INTERACTIONS` --- | `HOOK_MAX` +ACTION_HOOK_EVERY_FRAME = 0 --- @type LuaActionHookType +ACTION_HOOK_GRAVITY = 1 --- @type LuaActionHookType +ACTION_HOOK_MAX = 2 --- @type LuaActionHookType + +--- @alias LuaActionHookType +--- | `ACTION_HOOK_EVERY_FRAME` +--- | `ACTION_HOOK_GRAVITY` +--- | `ACTION_HOOK_MAX` + MOD_MENU_ELEMENT_TEXT = 0 --- @type LuaModMenuElementType MOD_MENU_ELEMENT_BUTTON = 1 --- @type LuaModMenuElementType MOD_MENU_ELEMENT_CHECKBOX = 2 --- @type LuaModMenuElementType @@ -8923,6 +8947,25 @@ MOD_MENU_ELEMENT_MAX = 5 --- @type LuaModMenuElementType --- | `MOD_MENU_ELEMENT_INPUTBOX` --- | `MOD_MENU_ELEMENT_MAX` +HUD_DISPLAY_LIVES = 0 --- @type HudDisplayValue +HUD_DISPLAY_COINS = 1 --- @type HudDisplayValue +HUD_DISPLAY_STARS = 2 --- @type HudDisplayValue +HUD_DISPLAY_WEDGES = 3 --- @type HudDisplayValue +HUD_DISPLAY_KEYS = 4 --- @type HudDisplayValue +HUD_DISPLAY_FLAGS = 5 --- @type HudDisplayValue +HUD_DISPLAY_TIMER = 6 --- @type HudDisplayValue +HUD_DISPLAY_CAMERA_STATUS = 7 --- @type HudDisplayValue + +--- @alias HudDisplayValue +--- | `HUD_DISPLAY_LIVES` +--- | `HUD_DISPLAY_COINS` +--- | `HUD_DISPLAY_STARS` +--- | `HUD_DISPLAY_WEDGES` +--- | `HUD_DISPLAY_KEYS` +--- | `HUD_DISPLAY_FLAGS` +--- | `HUD_DISPLAY_TIMER` +--- | `HUD_DISPLAY_CAMERA_STATUS` + HUD_DISPLAY_FLAGS_NONE = 0x0000 --- @type HudDisplayFlags HUD_DISPLAY_FLAGS_LIVES = 0x0001 --- @type HudDisplayFlags HUD_DISPLAY_FLAGS_COIN_COUNT = 0x0002 --- @type HudDisplayFlags @@ -8948,25 +8991,6 @@ HUD_DISPLAY_FLAGS_EMPHASIZE_POWER = 0x8000 --- @type HudDisplayFlags --- | `HUD_DISPLAY_FLAGS_POWER` --- | `HUD_DISPLAY_FLAGS_EMPHASIZE_POWER` -HUD_DISPLAY_LIVES = 0 --- @type HudDisplayValue -HUD_DISPLAY_COINS = 1 --- @type HudDisplayValue -HUD_DISPLAY_STARS = 2 --- @type HudDisplayValue -HUD_DISPLAY_WEDGES = 3 --- @type HudDisplayValue -HUD_DISPLAY_KEYS = 4 --- @type HudDisplayValue -HUD_DISPLAY_FLAGS = 5 --- @type HudDisplayValue -HUD_DISPLAY_TIMER = 6 --- @type HudDisplayValue -HUD_DISPLAY_CAMERA_STATUS = 7 --- @type HudDisplayValue - ---- @alias HudDisplayValue ---- | `HUD_DISPLAY_LIVES` ---- | `HUD_DISPLAY_COINS` ---- | `HUD_DISPLAY_STARS` ---- | `HUD_DISPLAY_WEDGES` ---- | `HUD_DISPLAY_KEYS` ---- | `HUD_DISPLAY_FLAGS` ---- | `HUD_DISPLAY_TIMER` ---- | `HUD_DISPLAY_CAMERA_STATUS` - E_MODEL_NONE = 0 --- @type ModelExtendedId E_MODEL_MARIO = 1 --- @type ModelExtendedId E_MODEL_SMOKE = 2 --- @type ModelExtendedId @@ -9734,17 +9758,14 @@ E_MODEL_MAX = 381 --- @type ModelExtendedId --- | `E_MODEL_WARIOS_WINGED_METAL_CAP` --- | `E_MODEL_MAX` ---- @type integer -NO_SOUND = 0 - --- @type integer SOUNDARGS_MASK_BANK = 0xF0000000 --- @type integer -SOUNDARGS_MASK_PRIORITY = 0x0000FF00 +SOUNDARGS_MASK_SOUNDID = 0x00FF0000 --- @type integer -SOUNDARGS_MASK_SOUNDID = 0x00FF0000 +SOUNDARGS_MASK_PRIORITY = 0x0000FF00 --- @type integer SOUNDARGS_MASK_STATUS = 0x0000000F @@ -9752,116 +9773,128 @@ SOUNDARGS_MASK_STATUS = 0x0000000F --- @type integer SOUNDARGS_SHIFT_BANK = 28 ---- @type integer -SOUNDARGS_SHIFT_PRIORITY = 8 - --- @type integer SOUNDARGS_SHIFT_SOUNDID = 16 --- @type integer -SOUND_ACTION_BONK = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x45, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUNDARGS_SHIFT_PRIORITY = 8 --- @type integer -SOUND_ACTION_BOUNCE_OFF_OBJECT = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x59, 0xB0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANK_ACTION = 0 --- @type integer -SOUND_ACTION_BRUSH_HAIR = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x40, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANK_MOVING = 1 --- @type integer -SOUND_ACTION_CLAP_HANDS_COLD = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2C, 0x00, SOUND_VIBRATO | SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANK_MARIO_VOICE = 2 --- @type integer -SOUND_ACTION_CLIMB_DOWN_TREE = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3B, 0x00, 0) +SOUND_BANK_GENERAL = 3 --- @type integer -SOUND_ACTION_CLIMB_UP_POLE = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x41, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANK_ENV = 4 --- @type integer -SOUND_ACTION_CLIMB_UP_TREE = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3A, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANK_OBJ = 5 --- @type integer -SOUND_ACTION_FLYING_FAST = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x56, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANK_AIR = 6 --- @type integer -SOUND_ACTION_HANGING_STEP = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2D, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANK_MENU = 7 --- @type integer -SOUND_ACTION_HIT = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x44, 0xC0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANK_GENERAL2 = 8 --- @type integer -SOUND_ACTION_HIT_2 = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x44, 0xB0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANK_OBJ2 = 9 --- @type integer -SOUND_ACTION_HIT_3 = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x44, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANK_LUIGI_VOICE = 10 --- @type integer -SOUND_ACTION_INTRO_UNK45E = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5E, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANK_WARIO_VOICE = 11 --- @type integer -SOUND_ACTION_INTRO_UNK45F = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5F, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANK_TOAD_VOICE = 12 --- @type integer -SOUND_ACTION_KEY_SWISH = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x36, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANK_COUNT = 13 --- @type integer -SOUND_ACTION_METAL_BONK = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x42, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANKS_ALL_BITS = 0xffff --- @type integer -SOUND_ACTION_METAL_HEAVY_LANDING = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2B, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANKS_ALL = ((1 << SOUND_BANK_COUNT) - 1) --- @type integer -SOUND_ACTION_METAL_JUMP = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x28, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANKS_FOREGROUND = ( (1 << SOUND_BANK_ACTION) | (1 << SOUND_BANK_MARIO_VOICE) | (1 << SOUND_BANK_MENU) | (1 << SOUND_BANK_LUIGI_VOICE) | (1 << SOUND_BANK_WARIO_VOICE) | (1 << SOUND_BANK_TOAD_VOICE)) --- @type integer -SOUND_ACTION_METAL_JUMP_WATER = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x50, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANKS_BACKGROUND = (SOUND_BANKS_ALL & ~SOUND_BANKS_FOREGROUND) --- @type integer -SOUND_ACTION_METAL_LANDING = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x29, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANKS_DISABLED_DURING_INTRO_CUTSCENE = ( (1 << SOUND_BANK_ENV) | (1 << SOUND_BANK_OBJ) | (1 << SOUND_BANK_GENERAL2) | (1 << SOUND_BANK_OBJ2)) --- @type integer -SOUND_ACTION_METAL_LAND_WATER = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x51, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_BANKS_DISABLED_AFTER_CREDITS = ( (1 << SOUND_BANK_ACTION) | (1 << SOUND_BANK_MOVING) | (1 << SOUND_BANK_MARIO_VOICE) | (1 << SOUND_BANK_GENERAL) | (1 << SOUND_BANK_LUIGI_VOICE) | (1 << SOUND_BANK_WARIO_VOICE) | (1 << SOUND_BANK_TOAD_VOICE)) --- @type integer -SOUND_ACTION_METAL_STEP = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2A, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_NO_VOLUME_LOSS = 0x1000000 --- @type integer -SOUND_ACTION_METAL_STEP_TIPTOE = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2F, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_VIBRATO = 0x2000000 --- @type integer -SOUND_ACTION_METAL_STEP_WATER = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x52, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_NO_PRIORITY_LOSS = 0x4000000 --- @type integer -SOUND_ACTION_PAT_BACK = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3F, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_CONSTANT_FREQUENCY = 0x8000000 --- @type integer -SOUND_ACTION_QUICKSAND_STEP = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2E, 0x00, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_LOWER_BACKGROUND_MUSIC = 0x10 --- @type integer -SOUND_ACTION_READ_SIGN = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5B, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_NO_ECHO = 0x20 --- @type integer -SOUND_ACTION_SHRINK_INTO_BBH = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x46, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_DISCRETE = 0x80 --- @type integer -SOUND_ACTION_SIDE_FLIP_UNK = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5A, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_STATUS_STOPPED = 0 --- @type integer -SOUND_ACTION_SPIN = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x37, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_STATUS_WAITING = 1 --- @type integer -SOUND_ACTION_SWIM = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x33, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_STATUS_PLAYING = 2 --- @type integer -SOUND_ACTION_SWIM_FAST = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x47, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_TERRAIN_DEFAULT = 0 --- @type integer -SOUND_ACTION_TELEPORT = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x57, 0xC0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_TERRAIN_GRASS = 1 --- @type integer -SOUND_ACTION_TERRAIN_BODY_HIT_GROUND = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x18, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_TERRAIN_WATER = 2 --- @type integer -SOUND_ACTION_TERRAIN_HEAVY_LANDING = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x60, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_TERRAIN_STONE = 3 + +--- @type integer +SOUND_TERRAIN_SPOOKY = 4 + +--- @type integer +SOUND_TERRAIN_SNOW = 5 + +--- @type integer +SOUND_TERRAIN_ICE = 6 + +--- @type integer +SOUND_TERRAIN_SAND = 7 + +--- @type integer +NO_SOUND = 0 --- @type integer SOUND_ACTION_TERRAIN_JUMP = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x00, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) @@ -9872,6 +9905,9 @@ SOUND_ACTION_TERRAIN_LANDING = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x08, 0x80, SOU --- @type integer SOUND_ACTION_TERRAIN_STEP = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x10, 0x80, SOUND_VIBRATO | SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +--- @type integer +SOUND_ACTION_TERRAIN_BODY_HIT_GROUND = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x18, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + --- @type integer SOUND_ACTION_TERRAIN_STEP_TIPTOE = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x20, 0x80, SOUND_VIBRATO | SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) @@ -9879,25 +9915,31 @@ SOUND_ACTION_TERRAIN_STEP_TIPTOE = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x20, 0x80, SOUND_ACTION_TERRAIN_STUCK_IN_GROUND = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x48, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ACTION_THROW = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x35, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ACTION_TERRAIN_HEAVY_LANDING = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x60, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ACTION_TWIRL = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x38, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ACTION_METAL_JUMP = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x28, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ACTION_UNK3C = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3C, 0x00, 0) +SOUND_ACTION_METAL_LANDING = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x29, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ACTION_UNK53 = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x53, 0x00, 0) +SOUND_ACTION_METAL_STEP = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2A, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ACTION_UNK54 = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x54, 0x00, 0) +SOUND_ACTION_METAL_HEAVY_LANDING = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2B, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ACTION_UNK55 = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x55, 0x00, 0) +SOUND_ACTION_CLAP_HANDS_COLD = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2C, 0x00, SOUND_VIBRATO | SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ACTION_UNK5D = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5D, 0x00, 0) +SOUND_ACTION_HANGING_STEP = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2D, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_ACTION_QUICKSAND_STEP = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2E, 0x00, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_ACTION_METAL_STEP_TIPTOE = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x2F, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer SOUND_ACTION_UNKNOWN430 = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x30, 0xC0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) @@ -9908,9 +9950,33 @@ SOUND_ACTION_UNKNOWN431 = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x31, 0x60, SOUND_NO --- @type integer SOUND_ACTION_UNKNOWN432 = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x32, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +--- @type integer +SOUND_ACTION_SWIM = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x33, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + --- @type integer SOUND_ACTION_UNKNOWN434 = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x34, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +--- @type integer +SOUND_ACTION_THROW = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x35, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_ACTION_KEY_SWISH = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x36, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_ACTION_SPIN = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x37, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_ACTION_TWIRL = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x38, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_ACTION_CLIMB_UP_TREE = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3A, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_ACTION_CLIMB_DOWN_TREE = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3B, 0x00, 0) + +--- @type integer +SOUND_ACTION_UNK3C = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3C, 0x00, 0) + --- @type integer SOUND_ACTION_UNKNOWN43D = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3D, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) @@ -9918,409 +9984,334 @@ SOUND_ACTION_UNKNOWN43D = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3D, 0x80, SOUND_NO SOUND_ACTION_UNKNOWN43E = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3E, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ACTION_UNKNOWN458 = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x58, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ACTION_PAT_BACK = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x3F, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ACTION_UNKNOWN45C = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5C, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ACTION_BRUSH_HAIR = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x40, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_ACTION_CLIMB_UP_POLE = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x41, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_ACTION_METAL_BONK = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x42, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer SOUND_ACTION_UNSTUCK_FROM_GROUND = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x43, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_AIR_AMP_BUZZ = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x03, 0x40, 0) +SOUND_ACTION_HIT = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x44, 0xC0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_AIR_BLOW_FIRE = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x04, 0x80, 0) +SOUND_ACTION_HIT_2 = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x44, 0xB0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_AIR_BLOW_WIND = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x04, 0x40, 0) +SOUND_ACTION_HIT_3 = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x44, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_AIR_BOBOMB_LIT_FUSE = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x08, 0x60, 0) +SOUND_ACTION_BONK = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x45, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_AIR_BOWSER_SPIT_FIRE = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x00, 0x00, 0) +SOUND_ACTION_SHRINK_INTO_BBH = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x46, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_AIR_CASTLE_OUTDOORS_AMBIENT = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x10, 0x40, 0) +SOUND_ACTION_SWIM_FAST = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x47, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_AIR_CHUCKYA_MOVE = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x0A, 0x40, 0) +SOUND_ACTION_METAL_JUMP_WATER = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x50, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_AIR_HEAVEHO_MOVE = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x06, 0x40, 0) +SOUND_ACTION_METAL_LAND_WATER = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x51, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_AIR_HOWLING_WIND = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x09, 0x80, 0) +SOUND_ACTION_METAL_STEP_WATER = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x52, 0x90, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_AIR_LAKITU_FLY = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x02, 0x80, 0) +SOUND_ACTION_UNK53 = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x53, 0x00, 0) --- @type integer -SOUND_AIR_LAKITU_FLY_HIGHPRIO = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x02, 0xFF, 0) +SOUND_ACTION_UNK54 = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x54, 0x00, 0) --- @type integer -SOUND_AIR_PEACH_TWINKLE = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x0B, 0x40, 0) +SOUND_ACTION_UNK55 = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x55, 0x00, 0) --- @type integer -SOUND_AIR_ROUGH_SLIDE = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x05, 0x00, 0) +SOUND_ACTION_FLYING_FAST = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x56, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_AIR_UNK01 = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x01, 0x00, 0) +SOUND_ACTION_TELEPORT = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x57, 0xC0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_AIR_UNK07 = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x07, 0x00, 0) +SOUND_ACTION_UNKNOWN458 = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x58, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_BANKS_ALL = ((1 << SOUND_BANK_COUNT) - 1) +SOUND_ACTION_BOUNCE_OFF_OBJECT = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x59, 0xB0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_BANKS_ALL_BITS = 0xffff +SOUND_ACTION_SIDE_FLIP_UNK = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5A, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_BANKS_BACKGROUND = (SOUND_BANKS_ALL & ~SOUND_BANKS_FOREGROUND) +SOUND_ACTION_READ_SIGN = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5B, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_BANKS_DISABLED_AFTER_CREDITS = ( (1 << SOUND_BANK_ACTION) | (1 << SOUND_BANK_MOVING) | (1 << SOUND_BANK_MARIO_VOICE) | (1 << SOUND_BANK_GENERAL) | (1 << SOUND_BANK_LUIGI_VOICE) | (1 << SOUND_BANK_WARIO_VOICE) | (1 << SOUND_BANK_TOAD_VOICE)) +SOUND_ACTION_UNKNOWN45C = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5C, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_BANKS_DISABLED_DURING_INTRO_CUTSCENE = ( (1 << SOUND_BANK_ENV) | (1 << SOUND_BANK_OBJ) | (1 << SOUND_BANK_GENERAL2) | (1 << SOUND_BANK_OBJ2)) +SOUND_ACTION_UNK5D = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5D, 0x00, 0) --- @type integer -SOUND_BANKS_FOREGROUND = ( (1 << SOUND_BANK_ACTION) | (1 << SOUND_BANK_MARIO_VOICE) | (1 << SOUND_BANK_MENU) | (1 << SOUND_BANK_LUIGI_VOICE) | (1 << SOUND_BANK_WARIO_VOICE) | (1 << SOUND_BANK_TOAD_VOICE)) +SOUND_ACTION_INTRO_UNK45E = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5E, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_BANK_ACTION = 0 +SOUND_ACTION_INTRO_UNK45F = SOUND_ARG_LOAD(SOUND_BANK_ACTION, 0x5F, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_BANK_AIR = 6 +SOUND_MOVING_TERRAIN_SLIDE = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x00, 0x00, SOUND_NO_PRIORITY_LOSS) --- @type integer -SOUND_BANK_COUNT = 13 +SOUND_MOVING_TERRAIN_RIDING_SHELL = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x20, 0x00, SOUND_NO_PRIORITY_LOSS) --- @type integer -SOUND_BANK_ENV = 4 +SOUND_MOVING_LAVA_BURN = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x10, 0x00, SOUND_NO_PRIORITY_LOSS) --- @type integer -SOUND_BANK_GENERAL = 3 +SOUND_MOVING_SLIDE_DOWN_POLE = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x11, 0x00, SOUND_NO_PRIORITY_LOSS) --- @type integer -SOUND_BANK_GENERAL2 = 8 +SOUND_MOVING_SLIDE_DOWN_TREE = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x12, 0x80, SOUND_NO_PRIORITY_LOSS) --- @type integer -SOUND_BANK_LUIGI_VOICE = 10 +SOUND_MOVING_QUICKSAND_DEATH = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x14, 0x00, SOUND_NO_PRIORITY_LOSS) --- @type integer -SOUND_BANK_MARIO_VOICE = 2 +SOUND_MOVING_SHOCKED = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x16, 0x00, SOUND_NO_PRIORITY_LOSS) --- @type integer -SOUND_BANK_MENU = 7 +SOUND_MOVING_FLYING = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x17, 0x00, SOUND_NO_PRIORITY_LOSS) --- @type integer -SOUND_BANK_MOVING = 1 +SOUND_MOVING_ALMOST_DROWNING = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x18, 0x00, SOUND_NO_PRIORITY_LOSS | SOUND_CONSTANT_FREQUENCY) --- @type integer -SOUND_BANK_OBJ = 5 +SOUND_MOVING_AIM_CANNON = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x19, 0x20, SOUND_NO_VOLUME_LOSS | SOUND_NO_PRIORITY_LOSS | SOUND_CONSTANT_FREQUENCY) --- @type integer -SOUND_BANK_OBJ2 = 9 +SOUND_MOVING_UNK1A = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x1A, 0x00, 0) --- @type integer -SOUND_BANK_TOAD_VOICE = 12 +SOUND_MOVING_RIDING_SHELL_LAVA = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x28, 0x00, SOUND_NO_PRIORITY_LOSS) --- @type integer -SOUND_BANK_WARIO_VOICE = 11 +SOUND_MARIO_YAH_WAH_HOO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x00, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_CONSTANT_FREQUENCY = 0x8000000 +SOUND_MARIO_HOOHOO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x03, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_DISCRETE = 0x80 +SOUND_MARIO_YAHOO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x04, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_BOAT_ROCKING1 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0B, 0x00, 0) +SOUND_MARIO_UH = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x05, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_DRONING1 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x03, 0x00, SOUND_NO_VOLUME_LOSS) +SOUND_MARIO_HRMM = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x06, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_DRONING2 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x04, 0x00, 0) +SOUND_MARIO_WAH2 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x07, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_ELEVATOR1 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x02, 0x00, 0) +SOUND_MARIO_WHOA = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x08, 0xC0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_ELEVATOR2 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x08, 0x00, 0) +SOUND_MARIO_EEUH = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x09, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_ELEVATOR3 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0C, 0x00, 0) +SOUND_MARIO_ATTACKED = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x0A, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_ELEVATOR4 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0D, 0x00, 0) +SOUND_MARIO_OOOF = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x0B, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_ELEVATOR4_2 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0D, 0x00, SOUND_NO_VOLUME_LOSS) +SOUND_MARIO_OOOF2 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x0B, 0xD0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_MERRY_GO_ROUND_CREAKING = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0F, 0x40, 0) +SOUND_MARIO_HERE_WE_GO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x0C, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_METAL_BOX_PUSH = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x17, 0x80, 0) +SOUND_MARIO_YAWNING = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x0D, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_MOVINGSAND = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0E, 0x00, 0) +SOUND_MARIO_SNORING1 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x0E, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_MOVING_SAND_SNOW = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x06, 0x00, 0) +SOUND_MARIO_SNORING2 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x0F, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_SINK_QUICKSAND = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x18, 0x80, 0) +SOUND_MARIO_WAAAOOOW = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x10, 0xC0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_SLIDING = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x13, 0x00, 0) +SOUND_MARIO_HAHA = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x11, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_STAR = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x14, 0x00, SOUND_LOWER_BACKGROUND_MUSIC) +SOUND_MARIO_HAHA_2 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x11, 0xF0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_UNK07 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x07, 0x00, 0) +SOUND_MARIO_UH2 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x13, 0xD0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_UNK12 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x12, 0x00, 0) +SOUND_MARIO_UH2_2 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x13, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_UNKNOWN2 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0A, 0x00, 0) +SOUND_MARIO_ON_FIRE = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x14, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_UNKNOWN4 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x15, 0x00, SOUND_NO_VOLUME_LOSS) +SOUND_MARIO_DYING = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x15, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_WATER = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x09, 0x00, 0) +SOUND_MARIO_PANTING_COLD = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x16, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_WATERFALL1 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x00, 0x00, 0) +SOUND_MARIO_PANTING = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x18, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_WATERFALL2 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x01, 0x00, 0) +SOUND_MARIO_COUGHING1 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x1B, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_WATER_DRAIN = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x16, 0x00, SOUND_NO_VOLUME_LOSS) +SOUND_MARIO_COUGHING2 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x1C, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_WIND1 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x05, 0x00, 0) +SOUND_MARIO_COUGHING3 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x1D, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_ENV_WIND2 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x10, 0x80, 0) +SOUND_MARIO_PUNCH_YAH = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x1E, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL2_1UP_APPEAR = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x63, 0xD0, SOUND_DISCRETE) +SOUND_MARIO_PUNCH_HOO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x1F, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL2_BIRD_CHIRP2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x50, 0x40, 0) +SOUND_MARIO_MAMA_MIA = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x20, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL2_BOBOMB_EXPLOSION = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x2E, 0x20, SOUND_DISCRETE) +SOUND_MARIO_OKEY_DOKEY = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x21, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL2_BOWSER_EXPLODE = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x60, 0x00, SOUND_DISCRETE) +SOUND_MARIO_GROUND_POUND_WAH = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x22, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL2_BOWSER_KEY = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x61, 0x00, SOUND_DISCRETE) +SOUND_MARIO_DROWNING = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x23, 0xF0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL2_PURPLE_SWITCH = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x3E, 0xC0, SOUND_DISCRETE) +SOUND_MARIO_PUNCH_WAH = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x24, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL2_PYRAMID_TOP_EXPLOSION = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x4C, 0xF0, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) +SOUND_PEACH_DEAR_MARIO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x28, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL2_PYRAMID_TOP_SPIN = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x4B, 0xE0, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) +SOUND_MARIO_YAHOO_WAHA_YIPPEE = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x2B, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL2_RIGHT_ANSWER = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x6A, 0xA0, SOUND_DISCRETE) +SOUND_MARIO_DOH = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x30, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL2_ROTATING_BLOCK_ALERT = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x59, 0x00, SOUND_DISCRETE) +SOUND_MARIO_GAME_OVER = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x31, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL2_ROTATING_BLOCK_CLICK = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x40, 0x00, SOUND_DISCRETE) +SOUND_MARIO_HELLO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x32, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL2_SPINDEL_ROLL = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x48, 0x20, SOUND_DISCRETE) +SOUND_MARIO_PRESS_START_TO_PLAY = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x33, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_NO_ECHO | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL2_STAR_APPEARS = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x57, 0xFF, SOUND_LOWER_BACKGROUND_MUSIC | SOUND_DISCRETE) +SOUND_MARIO_TWIRL_BOUNCE = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x34, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL2_SWITCH_TICK_FAST = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x54, 0xF0, SOUND_LOWER_BACKGROUND_MUSIC) +SOUND_MARIO_SNORING3 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x35, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL2_SWITCH_TICK_SLOW = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x55, 0xF0, SOUND_LOWER_BACKGROUND_MUSIC) +SOUND_MARIO_SO_LONGA_BOWSER = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x36, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_MARIO_IMA_TIRED = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x37, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_PEACH_MARIO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x38, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_PEACH_POWER_OF_THE_STARS = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x39, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_PEACH_THANKS_TO_YOU = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x3A, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_PEACH_THANK_YOU_MARIO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x3B, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_PEACH_SOMETHING_SPECIAL = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x3C, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_PEACH_BAKE_A_CAKE = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x3D, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_PEACH_FOR_MARIO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x3E, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_PEACH_MARIO2 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x3F, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_MARIO_LETS_A_GO = SOUND_MENU_STAR_SOUND_LETS_A_GO --- @type integer SOUND_GENERAL_ACTIVATE_CAP_SWITCH = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x00, 0x80, SOUND_DISCRETE) --- @type integer -SOUND_GENERAL_BIG_CLOCK = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x17, 0x00, SOUND_DISCRETE) +SOUND_GENERAL_FLAME_OUT = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x03, 0x80, SOUND_DISCRETE) --- @type integer -SOUND_GENERAL_BIG_POUND = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x44, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_BIRDS_FLY_AWAY = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x69, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_BOAT_ROCK = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x75, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_BOAT_TILT1 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x34, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_BOAT_TILT2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x35, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_BOING1 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6C, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_BOING2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6D, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_BOING2_LOWPRIO = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6D, 0x20, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_BOING3 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x72, 0x00, 0) - ---- @type integer -SOUND_GENERAL_BOWSER_BOMB_EXPLOSION = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2F, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_BOWSER_PLATFORM = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x62, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_BOWSER_PLATFORM_2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x62, 0x80, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_BOX_LANDING = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x24, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_BOX_LANDING_2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x24, 0x00, SOUND_VIBRATO | SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_BREAK_BOX = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x41, 0xC0, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_BUBBLES = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x08, 0x00, 0) - ---- @type integer -SOUND_GENERAL_BUTTON_PRESS = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5A, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_BUTTON_PRESS_2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5A, 0x40, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_BUTTON_PRESS_2_LOWPRIO = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5A, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_BUTTON_PRESS_LOWPRIO = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5A, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_CAGE_OPEN = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3F, 0xA0, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_CANNON_UP = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x47, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_CASTLE_TRAP_OPEN = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0E, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_CHAIN_CHOMP1 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x39, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_CHAIN_CHOMP2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3A, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_CLAM_SHELL1 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x22, 0x80, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_CLAM_SHELL2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x26, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_CLAM_SHELL3 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x27, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_CLOSE_IRON_DOOR = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x07, 0xC0, SOUND_DISCRETE) +SOUND_GENERAL_OPEN_WOOD_DOOR = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x04, 0xC0, SOUND_DISCRETE) --- @type integer SOUND_GENERAL_CLOSE_WOOD_DOOR = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x05, 0xC0, SOUND_DISCRETE) +--- @type integer +SOUND_GENERAL_OPEN_IRON_DOOR = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x06, 0xC0, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_CLOSE_IRON_DOOR = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x07, 0xC0, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_BUBBLES = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x08, 0x00, 0) + +--- @type integer +SOUND_GENERAL_MOVING_WATER = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x09, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_SWISH_WATER = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0A, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_QUIET_BUBBLE = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0B, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_VOLCANO_EXPLOSION = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0C, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_QUIET_BUBBLE2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0D, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_CASTLE_TRAP_OPEN = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0E, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_WALL_EXPLOSION = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0F, 0x00, SOUND_DISCRETE) + --- @type integer SOUND_GENERAL_COIN = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x11, 0x80, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) ---- @type integer -SOUND_GENERAL_COIN_DROP = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x36, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_COIN_SPURT = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x30, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_COIN_SPURT_2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x30, 0x00, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_COIN_SPURT_EU = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x30, 0x20, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) - --- @type integer SOUND_GENERAL_COIN_WATER = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x12, 0x80, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL_COLLECT_1UP = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x58, 0xFF, SOUND_DISCRETE) +SOUND_GENERAL_SHORT_STAR = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x16, 0x00, SOUND_LOWER_BACKGROUND_MUSIC | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL_DONUT_PLATFORM_EXPLOSION = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2E, 0x20, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_DOOR_INSERT_KEY = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x42, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_DOOR_TURN_KEY = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3B, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_ELEVATOR_MOVE = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5B, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_ELEVATOR_MOVE_2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5B, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_ENEMY_ALERT1 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6F, 0x30, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_EXPLOSION6 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x31, 0x00, 0) - ---- @type integer -SOUND_GENERAL_EXPLOSION7 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x49, 0x00, 0) - ---- @type integer -SOUND_GENERAL_FLAME_OUT = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x03, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_GRAND_STAR = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x73, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_GRAND_STAR_JUMP = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x74, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_GRINDEL_ROLL = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x48, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_HAUNTED_CHAIR = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5D, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_HAUNTED_CHAIR_MOVE = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5F, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_HEART_SPIN = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x64, 0xC0, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_LEVEL_SELECT_CHANGE = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2B, 0x00, SOUND_DISCRETE) +SOUND_GENERAL_BIG_CLOCK = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x17, 0x00, SOUND_DISCRETE) --- @type integer SOUND_GENERAL_LOUD_POUND = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x18, 0x00, 0) @@ -10328,69 +10319,6 @@ SOUND_GENERAL_LOUD_POUND = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x18, 0x00, 0) --- @type integer SOUND_GENERAL_LOUD_POUND2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x19, 0x00, 0) ---- @type integer -SOUND_GENERAL_METAL_POUND = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6B, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_MOVING_IN_SAND = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3C, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_MOVING_PLATFORM_SWITCH = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3E, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_MOVING_WATER = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x09, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_OPEN_CHEST = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x20, 0x80, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_OPEN_IRON_DOOR = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x06, 0xC0, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_OPEN_WOOD_DOOR = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x04, 0xC0, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_PAINTING_EJECT = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x28, 0x00, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_PAINTING_EJECT = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x28, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_PENDULUM_SWING = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x38, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_PLATFORM = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2D, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_POUND_ROCK = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x56, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_POUND_WOOD_POST = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x65, 0xC0, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_QUIET_BUBBLE = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0B, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_QUIET_BUBBLE2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0D, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_QUIET_POUND1 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x40, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_QUIET_POUND1_LOWPRIO = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x40, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_QUIET_POUND2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x43, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_RACE_GUN_SHOT = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x4D, 0x40, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_RED_COIN = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x68, 0x90, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_SHAKE_COFFIN = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x4A, 0x00, 0) - --- @type integer SOUND_GENERAL_SHORT_POUND1 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x1A, 0x00, 0) @@ -10410,46 +10338,16 @@ SOUND_GENERAL_SHORT_POUND5 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x1E, 0x00, 0) SOUND_GENERAL_SHORT_POUND6 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x1F, 0x00, 0) --- @type integer -SOUND_GENERAL_SHORT_STAR = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x16, 0x00, SOUND_LOWER_BACKGROUND_MUSIC | SOUND_DISCRETE) +SOUND_GENERAL_OPEN_CHEST = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x20, 0x80, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL_SOFT_LANDING = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5E, 0x00, SOUND_DISCRETE) +SOUND_GENERAL_CLAM_SHELL1 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x22, 0x80, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL_SPLATTERING = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x71, 0x30, SOUND_DISCRETE) +SOUND_GENERAL_BOX_LANDING = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x24, 0x00, SOUND_DISCRETE) --- @type integer -SOUND_GENERAL_STAR_APPEARS = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x57, 0xFF, SOUND_LOWER_BACKGROUND_MUSIC | SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_STAR_DOOR_CLOSE = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x4F, 0xC0, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_STAR_DOOR_OPEN = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x4E, 0xC0, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_SWISH_AIR = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5C, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_SWISH_AIR_2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5C, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_SWISH_WATER = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0A, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_SWITCH_DOOR_OPEN = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x67, 0xA0, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_UNK32 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x32, 0x00, 0) - ---- @type integer -SOUND_GENERAL_UNK45 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x45, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_UNK46 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x46, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_GENERAL_UNK46_LOWPRIO = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x46, 0x00, SOUND_DISCRETE) +SOUND_GENERAL_BOX_LANDING_2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x24, 0x00, SOUND_VIBRATO | SOUND_DISCRETE) --- @type integer SOUND_GENERAL_UNKNOWN1 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x25, 0x00, SOUND_DISCRETE) @@ -10457,6 +10355,57 @@ SOUND_GENERAL_UNKNOWN1 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x25, 0x00, SOUND_DI --- @type integer SOUND_GENERAL_UNKNOWN1_2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x25, 0x00, SOUND_VIBRATO | SOUND_DISCRETE) +--- @type integer +SOUND_GENERAL_CLAM_SHELL2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x26, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_CLAM_SHELL3 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x27, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_PAINTING_EJECT = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x28, 0x00, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_PAINTING_EJECT = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x28, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_LEVEL_SELECT_CHANGE = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2B, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_PLATFORM = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2D, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_DONUT_PLATFORM_EXPLOSION = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2E, 0x20, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_BOWSER_BOMB_EXPLOSION = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x2F, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_COIN_SPURT = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x30, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_COIN_SPURT_2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x30, 0x00, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_COIN_SPURT_EU = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x30, 0x20, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_EXPLOSION6 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x31, 0x00, 0) + +--- @type integer +SOUND_GENERAL_UNK32 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x32, 0x00, 0) + +--- @type integer +SOUND_GENERAL_BOAT_TILT1 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x34, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_BOAT_TILT2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x35, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_COIN_DROP = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x36, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_UNKNOWN3_LOWPRIO = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x37, 0x00, SOUND_DISCRETE) + --- @type integer SOUND_GENERAL_UNKNOWN3 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x37, 0x80, SOUND_DISCRETE) @@ -10464,454 +10413,295 @@ SOUND_GENERAL_UNKNOWN3 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x37, 0x80, SOUND_DI SOUND_GENERAL_UNKNOWN3_2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x37, 0x80, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) --- @type integer -SOUND_GENERAL_UNKNOWN3_LOWPRIO = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x37, 0x00, SOUND_DISCRETE) +SOUND_GENERAL_PENDULUM_SWING = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x38, 0x00, SOUND_DISCRETE) --- @type integer -SOUND_GENERAL_UNKNOWN4 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3D, 0x80, SOUND_DISCRETE) +SOUND_GENERAL_CHAIN_CHOMP1 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x39, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_CHAIN_CHOMP2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3A, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_DOOR_TURN_KEY = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3B, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_MOVING_IN_SAND = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3C, 0x00, SOUND_DISCRETE) --- @type integer SOUND_GENERAL_UNKNOWN4_LOWPRIO = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3D, 0x00, SOUND_DISCRETE) --- @type integer -SOUND_GENERAL_VANISH_SFX = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x76, 0x20, SOUND_DISCRETE) +SOUND_GENERAL_UNKNOWN4 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3D, 0x80, SOUND_DISCRETE) --- @type integer -SOUND_GENERAL_VOLCANO_EXPLOSION = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0C, 0x80, SOUND_DISCRETE) +SOUND_GENERAL_MOVING_PLATFORM_SWITCH = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3E, 0x00, SOUND_DISCRETE) --- @type integer -SOUND_GENERAL_WALL_EXPLOSION = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x0F, 0x00, SOUND_DISCRETE) +SOUND_GENERAL_CAGE_OPEN = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x3F, 0xA0, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_QUIET_POUND1_LOWPRIO = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x40, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_QUIET_POUND1 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x40, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_BREAK_BOX = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x41, 0xC0, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_DOOR_INSERT_KEY = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x42, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_QUIET_POUND2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x43, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_BIG_POUND = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x44, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_UNK45 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x45, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_UNK46_LOWPRIO = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x46, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_UNK46 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x46, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_CANNON_UP = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x47, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_GRINDEL_ROLL = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x48, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_EXPLOSION7 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x49, 0x00, 0) + +--- @type integer +SOUND_GENERAL_SHAKE_COFFIN = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x4A, 0x00, 0) + +--- @type integer +SOUND_GENERAL_RACE_GUN_SHOT = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x4D, 0x40, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_STAR_DOOR_OPEN = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x4E, 0xC0, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_STAR_DOOR_CLOSE = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x4F, 0xC0, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_POUND_ROCK = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x56, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_STAR_APPEARS = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x57, 0xFF, SOUND_LOWER_BACKGROUND_MUSIC | SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_COLLECT_1UP = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x58, 0xFF, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_BUTTON_PRESS_LOWPRIO = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5A, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_BUTTON_PRESS = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5A, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_BUTTON_PRESS_2_LOWPRIO = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5A, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_BUTTON_PRESS_2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5A, 0x40, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_ELEVATOR_MOVE = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5B, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_ELEVATOR_MOVE_2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5B, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_SWISH_AIR = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5C, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_SWISH_AIR_2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5C, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_HAUNTED_CHAIR = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5D, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_SOFT_LANDING = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5E, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_HAUNTED_CHAIR_MOVE = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x5F, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_BOWSER_PLATFORM = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x62, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_BOWSER_PLATFORM_2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x62, 0x80, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_HEART_SPIN = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x64, 0xC0, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_POUND_WOOD_POST = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x65, 0xC0, SOUND_DISCRETE) --- @type integer SOUND_GENERAL_WATER_LEVEL_TRIG = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x66, 0x80, SOUND_DISCRETE) --- @type integer -SOUND_GENERAL_YOSHI_TALK = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x70, 0x30, SOUND_DISCRETE) +SOUND_GENERAL_SWITCH_DOOR_OPEN = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x67, 0xA0, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_RED_COIN = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x68, 0x90, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_BIRDS_FLY_AWAY = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x69, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_METAL_POUND = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6B, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_BOING1 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6C, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_BOING2_LOWPRIO = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6D, 0x20, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL_BOING2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6D, 0x40, SOUND_DISCRETE) --- @type integer SOUND_GENERAL_YOSHI_WALK = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6E, 0x20, SOUND_DISCRETE) --- @type integer -SOUND_LOWER_BACKGROUND_MUSIC = 0x10 +SOUND_GENERAL_ENEMY_ALERT1 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x6F, 0x30, SOUND_DISCRETE) --- @type integer -SOUND_MARIO_ATTACKED = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x0A, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_GENERAL_YOSHI_TALK = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x70, 0x30, SOUND_DISCRETE) --- @type integer -SOUND_MARIO_COUGHING1 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x1B, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_GENERAL_SPLATTERING = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x71, 0x30, SOUND_DISCRETE) --- @type integer -SOUND_MARIO_COUGHING2 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x1C, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_GENERAL_BOING3 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x72, 0x00, 0) --- @type integer -SOUND_MARIO_COUGHING3 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x1D, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_GENERAL_GRAND_STAR = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x73, 0x00, SOUND_DISCRETE) --- @type integer -SOUND_MARIO_DOH = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x30, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_GENERAL_GRAND_STAR_JUMP = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x74, 0x00, SOUND_DISCRETE) --- @type integer -SOUND_MARIO_DROWNING = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x23, 0xF0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_GENERAL_BOAT_ROCK = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x75, 0x00, SOUND_DISCRETE) --- @type integer -SOUND_MARIO_DYING = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x15, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_GENERAL_VANISH_SFX = SOUND_ARG_LOAD(SOUND_BANK_GENERAL, 0x76, 0x20, SOUND_DISCRETE) --- @type integer -SOUND_MARIO_EEUH = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x09, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_WATERFALL1 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x00, 0x00, 0) --- @type integer -SOUND_MARIO_GAME_OVER = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x31, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_WATERFALL2 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x01, 0x00, 0) --- @type integer -SOUND_MARIO_GROUND_POUND_WAH = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x22, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_ELEVATOR1 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x02, 0x00, 0) --- @type integer -SOUND_MARIO_HAHA = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x11, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_DRONING1 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x03, 0x00, SOUND_NO_VOLUME_LOSS) --- @type integer -SOUND_MARIO_HAHA_2 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x11, 0xF0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_DRONING2 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x04, 0x00, 0) --- @type integer -SOUND_MARIO_HELLO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x32, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_WIND1 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x05, 0x00, 0) --- @type integer -SOUND_MARIO_HERE_WE_GO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x0C, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_MOVING_SAND_SNOW = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x06, 0x00, 0) --- @type integer -SOUND_MARIO_HOOHOO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x03, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_UNK07 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x07, 0x00, 0) --- @type integer -SOUND_MARIO_HRMM = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x06, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_ELEVATOR2 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x08, 0x00, 0) --- @type integer -SOUND_MARIO_IMA_TIRED = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x37, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_WATER = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x09, 0x00, 0) --- @type integer -SOUND_MARIO_LETS_A_GO = SOUND_MENU_STAR_SOUND_LETS_A_GO +SOUND_ENV_UNKNOWN2 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0A, 0x00, 0) --- @type integer -SOUND_MARIO_MAMA_MIA = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x20, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_BOAT_ROCKING1 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0B, 0x00, 0) --- @type integer -SOUND_MARIO_OKEY_DOKEY = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x21, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_ELEVATOR3 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0C, 0x00, 0) --- @type integer -SOUND_MARIO_ON_FIRE = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x14, 0xA0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_ELEVATOR4 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0D, 0x00, 0) --- @type integer -SOUND_MARIO_OOOF = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x0B, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_ELEVATOR4_2 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0D, 0x00, SOUND_NO_VOLUME_LOSS) --- @type integer -SOUND_MARIO_OOOF2 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x0B, 0xD0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_MOVINGSAND = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0E, 0x00, 0) --- @type integer -SOUND_MARIO_PANTING = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x18, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_MERRY_GO_ROUND_CREAKING = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x0F, 0x40, 0) --- @type integer -SOUND_MARIO_PANTING_COLD = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x16, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_WIND2 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x10, 0x80, 0) --- @type integer -SOUND_MARIO_PRESS_START_TO_PLAY = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x33, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_NO_ECHO | SOUND_DISCRETE) +SOUND_ENV_UNK12 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x12, 0x00, 0) --- @type integer -SOUND_MARIO_PUNCH_HOO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x1F, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_SLIDING = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x13, 0x00, 0) --- @type integer -SOUND_MARIO_PUNCH_WAH = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x24, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_STAR = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x14, 0x00, SOUND_LOWER_BACKGROUND_MUSIC) --- @type integer -SOUND_MARIO_PUNCH_YAH = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x1E, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_UNKNOWN4 = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x15, 0x00, SOUND_NO_VOLUME_LOSS) --- @type integer -SOUND_MARIO_SNORING1 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x0E, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_WATER_DRAIN = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x16, 0x00, SOUND_NO_VOLUME_LOSS) --- @type integer -SOUND_MARIO_SNORING2 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x0F, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_METAL_BOX_PUSH = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x17, 0x80, 0) --- @type integer -SOUND_MARIO_SNORING3 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x35, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_ENV_SINK_QUICKSAND = SOUND_ARG_LOAD(SOUND_BANK_ENV, 0x18, 0x80, 0) --- @type integer -SOUND_MARIO_SO_LONGA_BOWSER = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x36, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_OBJ_SUSHI_SHARK_WATER_SOUND = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x00, 0x80, SOUND_DISCRETE) --- @type integer -SOUND_MARIO_TWIRL_BOUNCE = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x34, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_MARIO_UH = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x05, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_MARIO_UH2 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x13, 0xD0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_MARIO_UH2_2 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x13, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_MARIO_WAAAOOOW = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x10, 0xC0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_MARIO_WAH2 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x07, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_MARIO_WHOA = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x08, 0xC0, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_MARIO_YAHOO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x04, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_MARIO_YAHOO_WAHA_YIPPEE = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x2B, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_MARIO_YAH_WAH_HOO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x00, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_MARIO_YAWNING = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x0D, 0x80, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_BOWSER_LAUGH = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x18, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_CAMERA_BUZZ = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0E, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_CAMERA_TURN = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0F, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_CAMERA_UNUSED1 = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1B, 0x00, 0) - ---- @type integer -SOUND_MENU_CAMERA_UNUSED2 = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1C, 0x00, 0) - ---- @type integer -SOUND_MENU_CAMERA_ZOOM_IN = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x06, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_CAMERA_ZOOM_OUT = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x07, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_CHANGE_SELECT = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x00, 0xF8, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_CLICK_CHANGE_VIEW = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1A, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_CLICK_FILE_SELECT = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x11, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_COIN_ITS_A_ME_MARIO = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x14, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_COLLECT_RED_COIN = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x28, 0x90, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_COLLECT_SECRET = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x30, 0x20, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_ENTER_HOLE = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x19, 0x80, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_ENTER_PIPE = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x16, 0xA0, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_EXIT_A_SIGN = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x21, 0x00, 0) - ---- @type integer -SOUND_MENU_EXIT_PIPE = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x17, 0xA0, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_HAND_APPEAR = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0A, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_HAND_DISAPPEAR = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0B, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_LET_GO_MARIO_FACE = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x09, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_MARIO_CASTLE_WARP = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1D, 0xB0, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_MARIO_CASTLE_WARP2 = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x22, 0x20, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_MESSAGE_APPEAR = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x04, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_MESSAGE_DISAPPEAR = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x05, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_MESSAGE_NEXT_PAGE = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x13, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_PAUSE = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x02, 0xF0, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_PAUSE_2 = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x03, 0xFF, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_PAUSE_HIGHPRIO = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x02, 0xFF, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_PINCH_MARIO_FACE = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x08, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_POWER_METER = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0D, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_READ_A_SIGN = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x20, 0x00, 0) - ---- @type integer -SOUND_MENU_REVERSE_PAUSE = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x01, 0x00, 0) - ---- @type integer -SOUND_MENU_STAR_SOUND = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1E, 0xFF, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_STAR_SOUND_LETS_A_GO = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x24, 0xFF, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_STAR_SOUND_OKEY_DOKEY = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x23, 0xFF, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_THANK_YOU_PLAYING_MY_GAME = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1F, 0xFF, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_UNK0C = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0C, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_MENU_UNK10 = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x10, 0x00, 0) - ---- @type integer -SOUND_MENU_YOSHI_GAIN_LIVES = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x15, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_MOVING_AIM_CANNON = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x19, 0x20, SOUND_NO_VOLUME_LOSS | SOUND_NO_PRIORITY_LOSS | SOUND_CONSTANT_FREQUENCY) - ---- @type integer -SOUND_MOVING_ALMOST_DROWNING = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x18, 0x00, SOUND_NO_PRIORITY_LOSS | SOUND_CONSTANT_FREQUENCY) - ---- @type integer -SOUND_MOVING_FLYING = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x17, 0x00, SOUND_NO_PRIORITY_LOSS) - ---- @type integer -SOUND_MOVING_LAVA_BURN = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x10, 0x00, SOUND_NO_PRIORITY_LOSS) - ---- @type integer -SOUND_MOVING_QUICKSAND_DEATH = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x14, 0x00, SOUND_NO_PRIORITY_LOSS) - ---- @type integer -SOUND_MOVING_RIDING_SHELL_LAVA = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x28, 0x00, SOUND_NO_PRIORITY_LOSS) - ---- @type integer -SOUND_MOVING_SHOCKED = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x16, 0x00, SOUND_NO_PRIORITY_LOSS) - ---- @type integer -SOUND_MOVING_SLIDE_DOWN_POLE = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x11, 0x00, SOUND_NO_PRIORITY_LOSS) - ---- @type integer -SOUND_MOVING_SLIDE_DOWN_TREE = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x12, 0x80, SOUND_NO_PRIORITY_LOSS) - ---- @type integer -SOUND_MOVING_TERRAIN_RIDING_SHELL = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x20, 0x00, SOUND_NO_PRIORITY_LOSS) - ---- @type integer -SOUND_MOVING_TERRAIN_SLIDE = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x00, 0x00, SOUND_NO_PRIORITY_LOSS) - ---- @type integer -SOUND_MOVING_UNK1A = SOUND_ARG_LOAD(SOUND_BANK_MOVING, 0x1A, 0x00, 0) - ---- @type integer -SOUND_NO_ECHO = 0x20 - ---- @type integer -SOUND_NO_PRIORITY_LOSS = 0x4000000 - ---- @type integer -SOUND_NO_VOLUME_LOSS = 0x1000000 - ---- @type integer -SOUND_OBJ2_BABY_PENGUIN_YELL = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x45, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ2_BIRD_CHIRP1 = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x52, 0x40, 0) - ---- @type integer -SOUND_OBJ2_BOSS_DIALOG_GRUNT = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x69, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ2_BOWSER_PUZZLE_PIECE_MOVE = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x19, 0x20, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ2_BOWSER_ROAR = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x04, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ2_BOWSER_TELEPORT = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x66, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ2_BULLY_ATTACKED = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x1C, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ2_EYEROK_SOUND_LONG = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x5B, 0x00, SOUND_VIBRATO | SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ2_EYEROK_SOUND_SHORT = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x5A, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_VIBRATO | SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ2_KING_BOBOMB_DAMAGE = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x42, 0x40, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ2_LARGE_BULLY_ATTACKED = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x57, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ2_MONTY_MOLE_APPEAR = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x67, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ2_MRI_SPINNING = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x6B, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ2_PIRANHA_PLANT_BITE = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x10, 0x50, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ2_PIRANHA_PLANT_DYING = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x11, 0x60, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ2_SCUTTLEBUG_ALERT = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x44, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ2_SCUTTLEBUG_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x43, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ2_SWOOP = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x49, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ2_WHOMP_SOUND_SHORT = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x5A, 0xC0, SOUND_NO_VOLUME_LOSS | SOUND_VIBRATO | SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_BABY_PENGUIN_DIVE = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x1F, 0x40, SOUND_DISCRETE) +SOUND_OBJ_MRI_SHOOT = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x01, 0x00, SOUND_DISCRETE) --- @type integer SOUND_OBJ_BABY_PENGUIN_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x02, 0x00, SOUND_DISCRETE) --- @type integer -SOUND_OBJ_BIG_PENGUIN_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x09, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_BIG_PENGUIN_YELL = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2D, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_BIRD_CHIRP3 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x51, 0x40, 0) - ---- @type integer -SOUND_OBJ_BOBOMB_BUDDY_TALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x58, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_BOBOMB_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x27, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_BOO_BOUNCE_TOP = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0A, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_BOO_LAUGH_LONG = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x48, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_BOO_LAUGH_SHORT = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0B, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_BOWSER_DEFEATED = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x06, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_BOWSER_INHALING = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x08, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_BOWSER_INTRO_LAUGH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x5F, 0x80, SOUND_LOWER_BACKGROUND_MUSIC | SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_BOWSER_LAUGH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x38, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_BOWSER_SPINNING = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x07, 0x00, SOUND_DISCRETE) +SOUND_OBJ_BOWSER_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x03, 0x00, SOUND_DISCRETE) --- @type integer SOUND_OBJ_BOWSER_TAIL_PICKUP = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x05, 0x00, SOUND_DISCRETE) --- @type integer -SOUND_OBJ_BOWSER_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x03, 0x00, SOUND_DISCRETE) +SOUND_OBJ_BOWSER_DEFEATED = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x06, 0x00, SOUND_DISCRETE) --- @type integer -SOUND_OBJ_BUBBA_CHOMP = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x73, 0x40, SOUND_DISCRETE) +SOUND_OBJ_BOWSER_SPINNING = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x07, 0x00, SOUND_DISCRETE) --- @type integer -SOUND_OBJ_BULLY_EXPLODE = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x18, 0xA0, SOUND_DISCRETE) +SOUND_OBJ_BOWSER_INHALING = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x08, 0x00, SOUND_DISCRETE) --- @type integer -SOUND_OBJ_BULLY_EXPLODE_2 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x18, 0xA0, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) +SOUND_OBJ_BIG_PENGUIN_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x09, 0x80, SOUND_DISCRETE) --- @type integer -SOUND_OBJ_BULLY_METAL = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x17, 0x80, SOUND_DISCRETE) +SOUND_OBJ_BOO_BOUNCE_TOP = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0A, 0x00, SOUND_DISCRETE) --- @type integer -SOUND_OBJ_BULLY_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x1B, 0x30, SOUND_DISCRETE) +SOUND_OBJ_BOO_LAUGH_SHORT = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0B, 0x00, SOUND_DISCRETE) --- @type integer -SOUND_OBJ_BULLY_WALKING = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x36, 0x60, SOUND_DISCRETE) +SOUND_OBJ_THWOMP = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0C, 0xA0, SOUND_DISCRETE) --- @type integer SOUND_OBJ_CANNON1 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0D, 0xF0, SOUND_DISCRETE) @@ -10922,203 +10712,41 @@ SOUND_OBJ_CANNON2 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0E, 0xF0, SOUND_DISCRETE) --- @type integer SOUND_OBJ_CANNON3 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0F, 0xF0, SOUND_DISCRETE) ---- @type integer -SOUND_OBJ_CANNON4 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x25, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_CHUCKYA_DEATH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6E, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_DEFAULT_DEATH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2C, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_DIVING_INTO_WATER = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x32, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_DIVING_IN_WATER = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x29, 0xA0, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_DORRIE = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x37, 0x60, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_DYING_ENEMY1 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x24, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_DYING_ENEMY2 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x26, 0x00, 0) - ---- @type integer -SOUND_OBJ_EEL = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4A, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_EEL_2 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4A, 0x00, SOUND_VIBRATO | SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_ENEMY_DEATH_HIGH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x60, 0xB0, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_ENEMY_DEATH_LOW = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x61, 0xB0, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_ENEMY_DEFEAT_SHRINK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x74, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_EVIL_LAKITU_THROW = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x22, 0x20, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_EYEROK_EXPLODE = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6D, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_EYEROK_SHOW_EYE = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4B, 0x00, SOUND_VIBRATO | SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_FLAME_BLOWN = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x55, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_GOOMBA_ALERT = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2F, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_GOOMBA_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x20, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_HEAVEHO_TOSSED = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x5D, 0x40, SOUND_DISCRETE) - --- @type integer SOUND_OBJ_JUMP_WALK_WATER = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x12, 0x00, 0) --- @type integer -SOUND_OBJ_KING_BOBOMB = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x16, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_KING_BOBOMB_JUMP = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x46, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_KING_BOBOMB_TALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x41, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_KING_WHOMP_DEATH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x47, 0xC0, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_KLEPTO1 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3F, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_KLEPTO2 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x40, 0x60, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_KOOPA_DAMAGE = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3E, 0xA0, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_KOOPA_FLYGUY_DEATH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x63, 0xB0, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_KOOPA_TALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3D, 0xA0, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_KOOPA_THE_QUICK_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x34, 0x20, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_KOOPA_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x35, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_MAD_PIANO_CHOMPING = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x56, 0x40, SOUND_VIBRATO | SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_MIPS_RABBIT = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6A, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_MIPS_RABBIT_WATER = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6C, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_MONTY_MOLE_ATTACK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x22, 0x00, SOUND_DISCRETE) +SOUND_OBJ_UNKNOWN2 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x13, 0x00, SOUND_DISCRETE) --- @type integer SOUND_OBJ_MRI_DEATH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x14, 0x00, SOUND_DISCRETE) ---- @type integer -SOUND_OBJ_MRI_SHOOT = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x01, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_MR_BLIZZARD_ALERT = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4C, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_PIRANHA_PLANT_APPEAR = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x54, 0x20, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_PIRANHA_PLANT_SHRINK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x33, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_POKEY_DEATH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x63, 0xC0, SOUND_DISCRETE) - --- @type integer SOUND_OBJ_POUNDING1 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x15, 0x50, SOUND_DISCRETE) --- @type integer SOUND_OBJ_POUNDING1_HIGHPRIO = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x15, 0x80, SOUND_DISCRETE) +--- @type integer +SOUND_OBJ_WHOMP_LOWPRIO = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x16, 0x60, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_KING_BOBOMB = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x16, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_BULLY_METAL = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x17, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_BULLY_EXPLODE = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x18, 0xA0, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_BULLY_EXPLODE_2 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x18, 0xA0, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) + --- @type integer SOUND_OBJ_POUNDING_CANNON = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x1A, 0x50, SOUND_DISCRETE) --- @type integer -SOUND_OBJ_POUNDING_LOUD = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x68, 0x40, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_SKEETER_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4E, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_SNOWMAN_BOUNCE = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x64, 0xC0, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_SNOWMAN_EXPLODE = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x65, 0xD0, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_SNOW_SAND1 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2A, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_SNOW_SAND2 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2B, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_SNUFIT_SHOOT = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4D, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_SNUFIT_SKEETER_DEATH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x72, 0xC0, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_SOMETHING_LANDING = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x28, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_SPINY_UNK59 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x59, 0x10, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_STOMPED = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x30, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_SUSHI_SHARK_WATER_SOUND = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x00, 0x80, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_SWOOP_DEATH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x62, 0xB0, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_THWOMP = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x0C, 0xA0, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_UKIKI_CHATTER_IDLE = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3A, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_UKIKI_CHATTER_LONG = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x21, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_UKIKI_CHATTER_SHORT = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x39, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_UKIKI_STEP_DEFAULT = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3B, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_UKIKI_STEP_LEAVES = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3C, 0x00, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_UNK23 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x23, 0x00, 0) - ---- @type integer -SOUND_OBJ_UNKNOWN2 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x13, 0x00, SOUND_DISCRETE) +SOUND_OBJ_BULLY_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x1B, 0x30, SOUND_DISCRETE) --- @type integer SOUND_OBJ_UNKNOWN3 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x1D, 0x80, SOUND_DISCRETE) @@ -11127,205 +10755,541 @@ SOUND_OBJ_UNKNOWN3 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x1D, 0x80, SOUND_DISCRETE) SOUND_OBJ_UNKNOWN4 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x1E, 0xA0, SOUND_DISCRETE) --- @type integer -SOUND_OBJ_UNKNOWN6 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x31, 0x00, SOUND_DISCRETE) +SOUND_OBJ_BABY_PENGUIN_DIVE = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x1F, 0x40, SOUND_DISCRETE) --- @type integer -SOUND_OBJ_WALKING_WATER = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4F, 0x00, SOUND_DISCRETE) +SOUND_OBJ_GOOMBA_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x20, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_UKIKI_CHATTER_LONG = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x21, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_MONTY_MOLE_ATTACK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x22, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_EVIL_LAKITU_THROW = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x22, 0x20, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_UNK23 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x23, 0x00, 0) + +--- @type integer +SOUND_OBJ_DYING_ENEMY1 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x24, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_CANNON4 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x25, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_DYING_ENEMY2 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x26, 0x00, 0) + +--- @type integer +SOUND_OBJ_BOBOMB_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x27, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_SOMETHING_LANDING = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x28, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_DIVING_IN_WATER = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x29, 0xA0, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_SNOW_SAND1 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2A, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_SNOW_SAND2 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2B, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_DEFAULT_DEATH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2C, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_BIG_PENGUIN_YELL = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2D, 0x00, SOUND_DISCRETE) --- @type integer SOUND_OBJ_WATER_BOMB_BOUNCING = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2E, 0x80, SOUND_DISCRETE) --- @type integer -SOUND_OBJ_WHOMP_LOWPRIO = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x16, 0x60, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_WIGGLER_ATTACKED = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x70, 0x60, SOUND_DISCRETE) - ---- @type integer -SOUND_OBJ_WIGGLER_DEATH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x5E, 0x00, 0) - ---- @type integer -SOUND_OBJ_WIGGLER_HIGH_PITCH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x5C, 0x40, SOUND_DISCRETE) +SOUND_OBJ_GOOMBA_ALERT = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2F, 0x00, SOUND_DISCRETE) --- @type integer SOUND_OBJ_WIGGLER_JUMP = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x2F, 0x60, SOUND_DISCRETE) --- @type integer -SOUND_OBJ_WIGGLER_LOW_PITCH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x71, 0x20, SOUND_DISCRETE) +SOUND_OBJ_STOMPED = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x30, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_UNKNOWN6 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x31, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_DIVING_INTO_WATER = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x32, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_PIRANHA_PLANT_SHRINK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x33, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_KOOPA_THE_QUICK_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x34, 0x20, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_KOOPA_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x35, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_BULLY_WALKING = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x36, 0x60, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_DORRIE = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x37, 0x60, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_BOWSER_LAUGH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x38, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_UKIKI_CHATTER_SHORT = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x39, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_UKIKI_CHATTER_IDLE = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3A, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_UKIKI_STEP_DEFAULT = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3B, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_UKIKI_STEP_LEAVES = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3C, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_KOOPA_TALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3D, 0xA0, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_KOOPA_DAMAGE = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3E, 0xA0, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_KLEPTO1 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x3F, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_KLEPTO2 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x40, 0x60, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_KING_BOBOMB_TALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x41, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_KING_BOBOMB_JUMP = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x46, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_KING_WHOMP_DEATH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x47, 0xC0, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_BOO_LAUGH_LONG = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x48, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_EEL = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4A, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_EEL_2 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4A, 0x00, SOUND_VIBRATO | SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_EYEROK_SHOW_EYE = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4B, 0x00, SOUND_VIBRATO | SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_MR_BLIZZARD_ALERT = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4C, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_SNUFIT_SHOOT = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4D, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_SKEETER_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4E, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_WALKING_WATER = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x4F, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_BIRD_CHIRP3 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x51, 0x40, 0) + +--- @type integer +SOUND_OBJ_PIRANHA_PLANT_APPEAR = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x54, 0x20, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_FLAME_BLOWN = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x55, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_MAD_PIANO_CHOMPING = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x56, 0x40, SOUND_VIBRATO | SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_BOBOMB_BUDDY_TALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x58, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_SPINY_UNK59 = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x59, 0x10, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_WIGGLER_HIGH_PITCH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x5C, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_HEAVEHO_TOSSED = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x5D, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_WIGGLER_DEATH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x5E, 0x00, 0) + +--- @type integer +SOUND_OBJ_BOWSER_INTRO_LAUGH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x5F, 0x80, SOUND_LOWER_BACKGROUND_MUSIC | SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_ENEMY_DEATH_HIGH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x60, 0xB0, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_ENEMY_DEATH_LOW = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x61, 0xB0, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_SWOOP_DEATH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x62, 0xB0, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_KOOPA_FLYGUY_DEATH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x63, 0xB0, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_POKEY_DEATH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x63, 0xC0, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_SNOWMAN_BOUNCE = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x64, 0xC0, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_SNOWMAN_EXPLODE = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x65, 0xD0, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_POUNDING_LOUD = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x68, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_MIPS_RABBIT = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6A, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_MIPS_RABBIT_WATER = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6C, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_EYEROK_EXPLODE = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6D, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ_CHUCKYA_DEATH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6E, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) --- @type integer SOUND_OBJ_WIGGLER_TALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x6F, 0x00, SOUND_DISCRETE) --- @type integer -SOUND_PEACH_BAKE_A_CAKE = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x3D, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_OBJ_WIGGLER_ATTACKED = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x70, 0x60, SOUND_DISCRETE) --- @type integer -SOUND_PEACH_DEAR_MARIO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x28, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_OBJ_WIGGLER_LOW_PITCH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x71, 0x20, SOUND_DISCRETE) --- @type integer -SOUND_PEACH_FOR_MARIO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x3E, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_OBJ_SNUFIT_SKEETER_DEATH = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x72, 0xC0, SOUND_DISCRETE) --- @type integer -SOUND_PEACH_MARIO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x38, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_OBJ_BUBBA_CHOMP = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x73, 0x40, SOUND_DISCRETE) --- @type integer -SOUND_PEACH_MARIO2 = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x3F, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_OBJ_ENEMY_DEFEAT_SHRINK = SOUND_ARG_LOAD(SOUND_BANK_OBJ, 0x74, 0x40, SOUND_DISCRETE) --- @type integer -SOUND_PEACH_POWER_OF_THE_STARS = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x39, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_AIR_BOWSER_SPIT_FIRE = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x00, 0x00, 0) --- @type integer -SOUND_PEACH_SOMETHING_SPECIAL = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x3C, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_AIR_UNK01 = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x01, 0x00, 0) --- @type integer -SOUND_PEACH_THANKS_TO_YOU = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x3A, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_AIR_LAKITU_FLY = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x02, 0x80, 0) --- @type integer -SOUND_PEACH_THANK_YOU_MARIO = SOUND_ARG_LOAD(SOUND_BANK_MARIO_VOICE, 0x3B, 0xFF, SOUND_NO_PRIORITY_LOSS | SOUND_DISCRETE) +SOUND_AIR_LAKITU_FLY_HIGHPRIO = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x02, 0xFF, 0) --- @type integer -SOUND_STATUS_PLAYING = 2 +SOUND_AIR_AMP_BUZZ = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x03, 0x40, 0) --- @type integer -SOUND_STATUS_STOPPED = 0 +SOUND_AIR_BLOW_FIRE = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x04, 0x80, 0) --- @type integer -SOUND_STATUS_WAITING = 1 +SOUND_AIR_BLOW_WIND = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x04, 0x40, 0) --- @type integer -SOUND_TERRAIN_DEFAULT = 0 +SOUND_AIR_ROUGH_SLIDE = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x05, 0x00, 0) --- @type integer -SOUND_TERRAIN_GRASS = 1 +SOUND_AIR_HEAVEHO_MOVE = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x06, 0x40, 0) --- @type integer -SOUND_TERRAIN_ICE = 6 +SOUND_AIR_UNK07 = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x07, 0x00, 0) --- @type integer -SOUND_TERRAIN_SAND = 7 +SOUND_AIR_BOBOMB_LIT_FUSE = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x08, 0x60, 0) --- @type integer -SOUND_TERRAIN_SNOW = 5 +SOUND_AIR_HOWLING_WIND = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x09, 0x80, 0) --- @type integer -SOUND_TERRAIN_SPOOKY = 4 +SOUND_AIR_CHUCKYA_MOVE = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x0A, 0x40, 0) --- @type integer -SOUND_TERRAIN_STONE = 3 +SOUND_AIR_PEACH_TWINKLE = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x0B, 0x40, 0) --- @type integer -SOUND_TERRAIN_WATER = 2 +SOUND_AIR_CASTLE_OUTDOORS_AMBIENT = SOUND_ARG_LOAD(SOUND_BANK_AIR, 0x10, 0x40, 0) --- @type integer -SOUND_VIBRATO = 0x2000000 +SOUND_MENU_CHANGE_SELECT = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x00, 0xF8, SOUND_DISCRETE) --- @type integer -HAZARD_TYPE_HORIZONTAL_WIND = 4 +SOUND_MENU_REVERSE_PAUSE = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x01, 0x00, 0) --- @type integer -HAZARD_TYPE_LAVA_FLOOR = 1 +SOUND_MENU_PAUSE = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x02, 0xF0, SOUND_DISCRETE) --- @type integer -HAZARD_TYPE_LAVA_WALL = 2 +SOUND_MENU_PAUSE_HIGHPRIO = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x02, 0xFF, SOUND_DISCRETE) --- @type integer -HAZARD_TYPE_QUICKSAND = 3 +SOUND_MENU_PAUSE_2 = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x03, 0xFF, SOUND_DISCRETE) --- @type integer -HAZARD_TYPE_VERTICAL_WIND = 5 +SOUND_MENU_MESSAGE_APPEAR = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x04, 0x00, SOUND_DISCRETE) --- @type integer -SURFACE_0004 = 0x0004 +SOUND_MENU_MESSAGE_DISAPPEAR = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x05, 0x00, SOUND_DISCRETE) --- @type integer -SURFACE_BOSS_FIGHT_CAMERA = 0x0065 +SOUND_MENU_CAMERA_ZOOM_IN = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x06, 0x00, SOUND_DISCRETE) --- @type integer -SURFACE_BURNING = 0x0001 +SOUND_MENU_CAMERA_ZOOM_OUT = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x07, 0x00, SOUND_DISCRETE) --- @type integer -SURFACE_CAMERA_8_DIR = 0x0069 +SOUND_MENU_PINCH_MARIO_FACE = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x08, 0x00, SOUND_DISCRETE) --- @type integer -SURFACE_CAMERA_BOUNDARY = 0x0072 +SOUND_MENU_LET_GO_MARIO_FACE = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x09, 0x00, SOUND_DISCRETE) --- @type integer -SURFACE_CAMERA_FREE_ROAM = 0x0066 +SOUND_MENU_HAND_APPEAR = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0A, 0x00, SOUND_DISCRETE) --- @type integer -SURFACE_CAMERA_MIDDLE = 0x006E +SOUND_MENU_HAND_DISAPPEAR = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0B, 0x00, SOUND_DISCRETE) --- @type integer -SURFACE_CAMERA_ROTATE_LEFT = 0x0070 +SOUND_MENU_UNK0C = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0C, 0x00, SOUND_DISCRETE) --- @type integer -SURFACE_CAMERA_ROTATE_RIGHT = 0x006F +SOUND_MENU_POWER_METER = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0D, 0x00, SOUND_DISCRETE) --- @type integer -SURFACE_CLASS_DEFAULT = 0x0000 +SOUND_MENU_CAMERA_BUZZ = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0E, 0x00, SOUND_DISCRETE) --- @type integer -SURFACE_CLASS_NOT_SLIPPERY = 0x0015 +SOUND_MENU_CAMERA_TURN = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x0F, 0x00, SOUND_DISCRETE) --- @type integer -SURFACE_CLASS_SLIPPERY = 0x0014 +SOUND_MENU_UNK10 = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x10, 0x00, 0) --- @type integer -SURFACE_CLASS_VERY_SLIPPERY = 0x0013 +SOUND_MENU_CLICK_FILE_SELECT = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x11, 0x00, SOUND_DISCRETE) --- @type integer -SURFACE_CLOSE_CAMERA = 0x000B +SOUND_MENU_MESSAGE_NEXT_PAGE = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x13, 0x00, SOUND_DISCRETE) --- @type integer -SURFACE_DEATH_PLANE = 0x000A +SOUND_MENU_COIN_ITS_A_ME_MARIO = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x14, 0x00, SOUND_DISCRETE) --- @type integer -SURFACE_DEEP_MOVING_QUICKSAND = 0x0024 +SOUND_MENU_YOSHI_GAIN_LIVES = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x15, 0x00, SOUND_DISCRETE) --- @type integer -SURFACE_DEEP_QUICKSAND = 0x0022 +SOUND_MENU_ENTER_PIPE = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x16, 0xA0, SOUND_DISCRETE) + +--- @type integer +SOUND_MENU_EXIT_PIPE = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x17, 0xA0, SOUND_DISCRETE) + +--- @type integer +SOUND_MENU_BOWSER_LAUGH = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x18, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_MENU_ENTER_HOLE = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x19, 0x80, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_MENU_CLICK_CHANGE_VIEW = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1A, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_MENU_CAMERA_UNUSED1 = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1B, 0x00, 0) + +--- @type integer +SOUND_MENU_CAMERA_UNUSED2 = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1C, 0x00, 0) + +--- @type integer +SOUND_MENU_MARIO_CASTLE_WARP = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1D, 0xB0, SOUND_DISCRETE) + +--- @type integer +SOUND_MENU_STAR_SOUND = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1E, 0xFF, SOUND_DISCRETE) + +--- @type integer +SOUND_MENU_THANK_YOU_PLAYING_MY_GAME = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x1F, 0xFF, SOUND_DISCRETE) + +--- @type integer +SOUND_MENU_READ_A_SIGN = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x20, 0x00, 0) + +--- @type integer +SOUND_MENU_EXIT_A_SIGN = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x21, 0x00, 0) + +--- @type integer +SOUND_MENU_MARIO_CASTLE_WARP2 = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x22, 0x20, SOUND_DISCRETE) + +--- @type integer +SOUND_MENU_STAR_SOUND_OKEY_DOKEY = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x23, 0xFF, SOUND_DISCRETE) + +--- @type integer +SOUND_MENU_STAR_SOUND_LETS_A_GO = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x24, 0xFF, SOUND_DISCRETE) + +--- @type integer +SOUND_MENU_COLLECT_RED_COIN = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x28, 0x90, SOUND_CONSTANT_FREQUENCY | SOUND_DISCRETE) + +--- @type integer +SOUND_MENU_COLLECT_SECRET = SOUND_ARG_LOAD(SOUND_BANK_MENU, 0x30, 0x20, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL2_BOBOMB_EXPLOSION = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x2E, 0x20, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL2_PURPLE_SWITCH = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x3E, 0xC0, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL2_ROTATING_BLOCK_CLICK = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x40, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL2_SPINDEL_ROLL = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x48, 0x20, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL2_PYRAMID_TOP_SPIN = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x4B, 0xE0, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL2_PYRAMID_TOP_EXPLOSION = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x4C, 0xF0, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL2_BIRD_CHIRP2 = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x50, 0x40, 0) + +--- @type integer +SOUND_GENERAL2_SWITCH_TICK_FAST = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x54, 0xF0, SOUND_LOWER_BACKGROUND_MUSIC) + +--- @type integer +SOUND_GENERAL2_SWITCH_TICK_SLOW = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x55, 0xF0, SOUND_LOWER_BACKGROUND_MUSIC) + +--- @type integer +SOUND_GENERAL2_STAR_APPEARS = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x57, 0xFF, SOUND_LOWER_BACKGROUND_MUSIC | SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL2_ROTATING_BLOCK_ALERT = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x59, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL2_BOWSER_EXPLODE = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x60, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL2_BOWSER_KEY = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x61, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL2_1UP_APPEAR = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x63, 0xD0, SOUND_DISCRETE) + +--- @type integer +SOUND_GENERAL2_RIGHT_ANSWER = SOUND_ARG_LOAD(SOUND_BANK_GENERAL2, 0x6A, 0xA0, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ2_BOWSER_ROAR = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x04, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ2_PIRANHA_PLANT_BITE = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x10, 0x50, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ2_PIRANHA_PLANT_DYING = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x11, 0x60, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ2_BOWSER_PUZZLE_PIECE_MOVE = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x19, 0x20, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ2_BULLY_ATTACKED = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x1C, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ2_KING_BOBOMB_DAMAGE = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x42, 0x40, SOUND_NO_VOLUME_LOSS | SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ2_SCUTTLEBUG_WALK = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x43, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ2_SCUTTLEBUG_ALERT = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x44, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ2_BABY_PENGUIN_YELL = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x45, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ2_SWOOP = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x49, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ2_BIRD_CHIRP1 = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x52, 0x40, 0) + +--- @type integer +SOUND_OBJ2_LARGE_BULLY_ATTACKED = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x57, 0x00, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ2_EYEROK_SOUND_SHORT = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x5A, 0x00, SOUND_NO_VOLUME_LOSS | SOUND_VIBRATO | SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ2_WHOMP_SOUND_SHORT = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x5A, 0xC0, SOUND_NO_VOLUME_LOSS | SOUND_VIBRATO | SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ2_EYEROK_SOUND_LONG = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x5B, 0x00, SOUND_VIBRATO | SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ2_BOWSER_TELEPORT = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x66, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ2_MONTY_MOLE_APPEAR = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x67, 0x80, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ2_BOSS_DIALOG_GRUNT = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x69, 0x40, SOUND_DISCRETE) + +--- @type integer +SOUND_OBJ2_MRI_SPINNING = SOUND_ARG_LOAD(SOUND_BANK_OBJ2, 0x6B, 0x00, SOUND_DISCRETE) --- @type integer SURFACE_DEFAULT = 0x0000 --- @type integer -SURFACE_FLAG_DYNAMIC = (1 << 0) +SURFACE_BURNING = 0x0001 --- @type integer -SURFACE_FLAG_NO_CAM_COLLISION = (1 << 1) +SURFACE_RAYCAST = 0x0003 --- @type integer -SURFACE_FLAG_X_PROJECTION = (1 << 3) - ---- @type integer -SURFACE_FLOWING_WATER = 0x000E +SURFACE_0004 = 0x0004 --- @type integer SURFACE_HANGABLE = 0x0005 --- @type integer -SURFACE_HARD = 0x0030 +SURFACE_SLOW = 0x0009 --- @type integer -SURFACE_HARD_NOT_SLIPPERY = 0x0037 +SURFACE_DEATH_PLANE = 0x000A --- @type integer -SURFACE_HARD_SLIPPERY = 0x0035 +SURFACE_CLOSE_CAMERA = 0x000B --- @type integer -SURFACE_HARD_VERY_SLIPPERY = 0x0036 +SURFACE_WATER = 0x000D --- @type integer -SURFACE_HORIZONTAL_WIND = 0x002C +SURFACE_FLOWING_WATER = 0x000E --- @type integer -SURFACE_ICE = 0x002E +SURFACE_INTANGIBLE = 0x0012 --- @type integer -SURFACE_INSTANT_MOVING_QUICKSAND = 0x002D +SURFACE_VERY_SLIPPERY = 0x0013 --- @type integer -SURFACE_INSTANT_QUICKSAND = 0x0023 +SURFACE_SLIPPERY = 0x0014 + +--- @type integer +SURFACE_NOT_SLIPPERY = 0x0015 + +--- @type integer +SURFACE_TTM_VINES = 0x0016 + +--- @type integer +SURFACE_MGR_MUSIC = 0x001A --- @type integer SURFACE_INSTANT_WARP_1B = 0x001B @@ -11340,17 +11304,29 @@ SURFACE_INSTANT_WARP_1D = 0x001D SURFACE_INSTANT_WARP_1E = 0x001E --- @type integer -SURFACE_INTANGIBLE = 0x0012 +SURFACE_SHALLOW_QUICKSAND = 0x0021 --- @type integer -SURFACE_LOOK_UP_WARP = 0x002F +SURFACE_DEEP_QUICKSAND = 0x0022 --- @type integer -SURFACE_MGR_MUSIC = 0x001A +SURFACE_INSTANT_QUICKSAND = 0x0023 + +--- @type integer +SURFACE_DEEP_MOVING_QUICKSAND = 0x0024 + +--- @type integer +SURFACE_SHALLOW_MOVING_QUICKSAND = 0x0025 + +--- @type integer +SURFACE_QUICKSAND = 0x0026 --- @type integer SURFACE_MOVING_QUICKSAND = 0x0027 +--- @type integer +SURFACE_WALL_MISC = 0x0028 + --- @type integer SURFACE_NOISE_DEFAULT = 0x0029 @@ -11358,7 +11334,64 @@ SURFACE_NOISE_DEFAULT = 0x0029 SURFACE_NOISE_SLIPPERY = 0x002A --- @type integer -SURFACE_NOISE_VERY_SLIPPERY = 0x0075 +SURFACE_HORIZONTAL_WIND = 0x002C + +--- @type integer +SURFACE_INSTANT_MOVING_QUICKSAND = 0x002D + +--- @type integer +SURFACE_ICE = 0x002E + +--- @type integer +SURFACE_LOOK_UP_WARP = 0x002F + +--- @type integer +SURFACE_HARD = 0x0030 + +--- @type integer +SURFACE_WARP = 0x0032 + +--- @type integer +SURFACE_TIMER_START = 0x0033 + +--- @type integer +SURFACE_TIMER_END = 0x0034 + +--- @type integer +SURFACE_HARD_SLIPPERY = 0x0035 + +--- @type integer +SURFACE_HARD_VERY_SLIPPERY = 0x0036 + +--- @type integer +SURFACE_HARD_NOT_SLIPPERY = 0x0037 + +--- @type integer +SURFACE_VERTICAL_WIND = 0x0038 + +--- @type integer +SURFACE_BOSS_FIGHT_CAMERA = 0x0065 + +--- @type integer +SURFACE_CAMERA_FREE_ROAM = 0x0066 + +--- @type integer +SURFACE_THI3_WALLKICK = 0x0068 + +--- @type integer +SURFACE_CAMERA_8_DIR = 0x0069 + +--- @type integer +SURFACE_CAMERA_MIDDLE = 0x006E + +--- @type integer +SURFACE_CAMERA_ROTATE_RIGHT = 0x006F + +--- @type integer +SURFACE_CAMERA_ROTATE_LEFT = 0x0070 + +--- @type integer +SURFACE_CAMERA_BOUNDARY = 0x0072 --- @type integer SURFACE_NOISE_VERY_SLIPPERY_73 = 0x0073 @@ -11367,7 +11400,7 @@ SURFACE_NOISE_VERY_SLIPPERY_73 = 0x0073 SURFACE_NOISE_VERY_SLIPPERY_74 = 0x0074 --- @type integer -SURFACE_NOT_SLIPPERY = 0x0015 +SURFACE_NOISE_VERY_SLIPPERY = 0x0075 --- @type integer SURFACE_NO_CAM_COLLISION = 0x0076 @@ -11375,128 +11408,17 @@ SURFACE_NO_CAM_COLLISION = 0x0076 --- @type integer SURFACE_NO_CAM_COLLISION_77 = 0x0077 ---- @type integer -SURFACE_NO_CAM_COL_SLIPPERY = 0x0079 - --- @type integer SURFACE_NO_CAM_COL_VERY_SLIPPERY = 0x0078 --- @type integer -SURFACE_PAINTING_WARP_D3 = 0x00D3 +SURFACE_NO_CAM_COL_SLIPPERY = 0x0079 --- @type integer -SURFACE_PAINTING_WARP_D4 = 0x00D4 +SURFACE_SWITCH = 0x007A --- @type integer -SURFACE_PAINTING_WARP_D5 = 0x00D5 - ---- @type integer -SURFACE_PAINTING_WARP_D6 = 0x00D6 - ---- @type integer -SURFACE_PAINTING_WARP_D7 = 0x00D7 - ---- @type integer -SURFACE_PAINTING_WARP_D8 = 0x00D8 - ---- @type integer -SURFACE_PAINTING_WARP_D9 = 0x00D9 - ---- @type integer -SURFACE_PAINTING_WARP_DA = 0x00DA - ---- @type integer -SURFACE_PAINTING_WARP_DB = 0x00DB - ---- @type integer -SURFACE_PAINTING_WARP_DC = 0x00DC - ---- @type integer -SURFACE_PAINTING_WARP_DD = 0x00DD - ---- @type integer -SURFACE_PAINTING_WARP_DE = 0x00DE - ---- @type integer -SURFACE_PAINTING_WARP_DF = 0x00DF - ---- @type integer -SURFACE_PAINTING_WARP_E0 = 0x00E0 - ---- @type integer -SURFACE_PAINTING_WARP_E1 = 0x00E1 - ---- @type integer -SURFACE_PAINTING_WARP_E2 = 0x00E2 - ---- @type integer -SURFACE_PAINTING_WARP_E3 = 0x00E3 - ---- @type integer -SURFACE_PAINTING_WARP_E4 = 0x00E4 - ---- @type integer -SURFACE_PAINTING_WARP_E5 = 0x00E5 - ---- @type integer -SURFACE_PAINTING_WARP_E6 = 0x00E6 - ---- @type integer -SURFACE_PAINTING_WARP_E7 = 0x00E7 - ---- @type integer -SURFACE_PAINTING_WARP_E8 = 0x00E8 - ---- @type integer -SURFACE_PAINTING_WARP_E9 = 0x00E9 - ---- @type integer -SURFACE_PAINTING_WARP_EA = 0x00EA - ---- @type integer -SURFACE_PAINTING_WARP_EB = 0x00EB - ---- @type integer -SURFACE_PAINTING_WARP_EC = 0x00EC - ---- @type integer -SURFACE_PAINTING_WARP_ED = 0x00ED - ---- @type integer -SURFACE_PAINTING_WARP_EE = 0x00EE - ---- @type integer -SURFACE_PAINTING_WARP_EF = 0x00EF - ---- @type integer -SURFACE_PAINTING_WARP_F0 = 0x00F0 - ---- @type integer -SURFACE_PAINTING_WARP_F1 = 0x00F1 - ---- @type integer -SURFACE_PAINTING_WARP_F2 = 0x00F2 - ---- @type integer -SURFACE_PAINTING_WARP_F3 = 0x00F3 - ---- @type integer -SURFACE_PAINTING_WARP_F7 = 0x00F7 - ---- @type integer -SURFACE_PAINTING_WARP_F8 = 0x00F8 - ---- @type integer -SURFACE_PAINTING_WARP_F9 = 0x00F9 - ---- @type integer -SURFACE_PAINTING_WARP_FA = 0x00FA - ---- @type integer -SURFACE_PAINTING_WARP_FB = 0x00FB - ---- @type integer -SURFACE_PAINTING_WARP_FC = 0x00FC +SURFACE_VANISH_CAP_WALLS = 0x007B --- @type integer SURFACE_PAINTING_WOBBLE_A6 = 0x00A6 @@ -11634,37 +11556,103 @@ SURFACE_PAINTING_WOBBLE_D1 = 0x00D1 SURFACE_PAINTING_WOBBLE_D2 = 0x00D2 --- @type integer -SURFACE_QUICKSAND = 0x0026 +SURFACE_PAINTING_WARP_D3 = 0x00D3 --- @type integer -SURFACE_RAYCAST = 0x0003 +SURFACE_PAINTING_WARP_D4 = 0x00D4 --- @type integer -SURFACE_SHALLOW_MOVING_QUICKSAND = 0x0025 +SURFACE_PAINTING_WARP_D5 = 0x00D5 --- @type integer -SURFACE_SHALLOW_QUICKSAND = 0x0021 +SURFACE_PAINTING_WARP_D6 = 0x00D6 --- @type integer -SURFACE_SLIPPERY = 0x0014 +SURFACE_PAINTING_WARP_D7 = 0x00D7 --- @type integer -SURFACE_SLOW = 0x0009 +SURFACE_PAINTING_WARP_D8 = 0x00D8 --- @type integer -SURFACE_SWITCH = 0x007A +SURFACE_PAINTING_WARP_D9 = 0x00D9 --- @type integer -SURFACE_THI3_WALLKICK = 0x0068 +SURFACE_PAINTING_WARP_DA = 0x00DA --- @type integer -SURFACE_TIMER_END = 0x0034 +SURFACE_PAINTING_WARP_DB = 0x00DB --- @type integer -SURFACE_TIMER_START = 0x0033 +SURFACE_PAINTING_WARP_DC = 0x00DC --- @type integer -SURFACE_TRAPDOOR = 0x00FF +SURFACE_PAINTING_WARP_DD = 0x00DD + +--- @type integer +SURFACE_PAINTING_WARP_DE = 0x00DE + +--- @type integer +SURFACE_PAINTING_WARP_DF = 0x00DF + +--- @type integer +SURFACE_PAINTING_WARP_E0 = 0x00E0 + +--- @type integer +SURFACE_PAINTING_WARP_E1 = 0x00E1 + +--- @type integer +SURFACE_PAINTING_WARP_E2 = 0x00E2 + +--- @type integer +SURFACE_PAINTING_WARP_E3 = 0x00E3 + +--- @type integer +SURFACE_PAINTING_WARP_E4 = 0x00E4 + +--- @type integer +SURFACE_PAINTING_WARP_E5 = 0x00E5 + +--- @type integer +SURFACE_PAINTING_WARP_E6 = 0x00E6 + +--- @type integer +SURFACE_PAINTING_WARP_E7 = 0x00E7 + +--- @type integer +SURFACE_PAINTING_WARP_E8 = 0x00E8 + +--- @type integer +SURFACE_PAINTING_WARP_E9 = 0x00E9 + +--- @type integer +SURFACE_PAINTING_WARP_EA = 0x00EA + +--- @type integer +SURFACE_PAINTING_WARP_EB = 0x00EB + +--- @type integer +SURFACE_PAINTING_WARP_EC = 0x00EC + +--- @type integer +SURFACE_PAINTING_WARP_ED = 0x00ED + +--- @type integer +SURFACE_PAINTING_WARP_EE = 0x00EE + +--- @type integer +SURFACE_PAINTING_WARP_EF = 0x00EF + +--- @type integer +SURFACE_PAINTING_WARP_F0 = 0x00F0 + +--- @type integer +SURFACE_PAINTING_WARP_F1 = 0x00F1 + +--- @type integer +SURFACE_PAINTING_WARP_F2 = 0x00F2 + +--- @type integer +SURFACE_PAINTING_WARP_F3 = 0x00F3 --- @type integer SURFACE_TTC_PAINTING_1 = 0x00F4 @@ -11676,31 +11664,67 @@ SURFACE_TTC_PAINTING_2 = 0x00F5 SURFACE_TTC_PAINTING_3 = 0x00F6 --- @type integer -SURFACE_TTM_VINES = 0x0016 +SURFACE_PAINTING_WARP_F7 = 0x00F7 --- @type integer -SURFACE_VANISH_CAP_WALLS = 0x007B +SURFACE_PAINTING_WARP_F8 = 0x00F8 --- @type integer -SURFACE_VERTICAL_WIND = 0x0038 +SURFACE_PAINTING_WARP_F9 = 0x00F9 --- @type integer -SURFACE_VERY_SLIPPERY = 0x0013 +SURFACE_PAINTING_WARP_FA = 0x00FA --- @type integer -SURFACE_WALL_MISC = 0x0028 +SURFACE_PAINTING_WARP_FB = 0x00FB --- @type integer -SURFACE_WARP = 0x0032 - ---- @type integer -SURFACE_WATER = 0x000D +SURFACE_PAINTING_WARP_FC = 0x00FC --- @type integer SURFACE_WOBBLING_WARP = 0x00FD --- @type integer -TERRAIN_GRASS = 0x0000 +SURFACE_TRAPDOOR = 0x00FF + +--- @type integer +SURFACE_CLASS_DEFAULT = 0x0000 + +--- @type integer +SURFACE_CLASS_VERY_SLIPPERY = 0x0013 + +--- @type integer +SURFACE_CLASS_SLIPPERY = 0x0014 + +--- @type integer +SURFACE_CLASS_NOT_SLIPPERY = 0x0015 + +--- @type integer +SURFACE_FLAG_DYNAMIC = (1 << 0) + +--- @type integer +SURFACE_FLAG_NO_CAM_COLLISION = (1 << 1) + +--- @type integer +SURFACE_FLAG_X_PROJECTION = (1 << 3) + +--- @type integer +HAZARD_TYPE_LAVA_FLOOR = 1 + +--- @type integer +HAZARD_TYPE_LAVA_WALL = 2 + +--- @type integer +HAZARD_TYPE_QUICKSAND = 3 + +--- @type integer +HAZARD_TYPE_HORIZONTAL_WIND = 4 + +--- @type integer +HAZARD_TYPE_VERTICAL_WIND = 5 + +--- @type integer +TERRAIN_LOAD_VERTICES = 0x0040 --- @type integer TERRAIN_LOAD_CONTINUE = 0x0041 @@ -11708,116 +11732,35 @@ TERRAIN_LOAD_CONTINUE = 0x0041 --- @type integer TERRAIN_LOAD_END = 0x0042 ---- @type integer -TERRAIN_LOAD_ENVIRONMENT = 0x0044 - --- @type integer TERRAIN_LOAD_OBJECTS = 0x0043 --- @type integer -TERRAIN_LOAD_VERTICES = 0x0040 +TERRAIN_LOAD_ENVIRONMENT = 0x0044 --- @type integer -TERRAIN_MASK = 0x0007 - ---- @type integer -TERRAIN_SAND = 0x0003 - ---- @type integer -TERRAIN_SLIDE = 0x0006 - ---- @type integer -TERRAIN_SNOW = 0x0002 - ---- @type integer -TERRAIN_SPOOKY = 0x0004 +TERRAIN_GRASS = 0x0000 --- @type integer TERRAIN_STONE = 0x0001 +--- @type integer +TERRAIN_SNOW = 0x0002 + +--- @type integer +TERRAIN_SAND = 0x0003 + +--- @type integer +TERRAIN_SPOOKY = 0x0004 + --- @type integer TERRAIN_WATER = 0x0005 --- @type integer -ANIM_FLAG_2 = (1 << 2) +TERRAIN_SLIDE = 0x0006 --- @type integer -ANIM_FLAG_5 = (1 << 5) - ---- @type integer -ANIM_FLAG_6 = (1 << 6) - ---- @type integer -ANIM_FLAG_7 = (1 << 7) - ---- @type integer -ANIM_FLAG_FORWARD = (1 << 1) - ---- @type integer -ANIM_FLAG_HOR_TRANS = (1 << 3) - ---- @type integer -ANIM_FLAG_NOLOOP = (1 << 0) - ---- @type integer -ANIM_FLAG_VERT_TRANS = (1 << 4) - ---- @type integer -COOP_OBJ_FLAG_INITIALIZED = (1 << 3) - ---- @type integer -COOP_OBJ_FLAG_LUA = (1 << 1) - ---- @type integer -COOP_OBJ_FLAG_NETWORK = (1 << 0) - ---- @type integer -COOP_OBJ_FLAG_NON_SYNC = (1 << 2) - ---- @type integer -GRAPH_NODE_GUARD = 0xAA - ---- @type integer -MAX_PLAYERS = 16 - ---- @type integer -OBJECT_CUSTOM_FIELDS_START = (OBJECT_NUM_REGULAR_FIELDS) - ---- @type integer -OBJECT_MAX_BHV_STACK = 16 - ---- @type integer -OBJECT_NUM_CUSTOM_FIELDS = 0x40 - ---- @type integer -OBJECT_NUM_FIELDS = (OBJECT_CUSTOM_FIELDS_START + OBJECT_NUM_CUSTOM_FIELDS) - ---- @type integer -OBJECT_NUM_REGULAR_FIELDS = 0x50 - ---- @type integer -PLAY_MODE_CHANGE_AREA = 3 - ---- @type integer -PLAY_MODE_CHANGE_LEVEL = 4 - ---- @type integer -PLAY_MODE_FRAME_ADVANCE = 5 - ---- @type integer -PLAY_MODE_NORMAL = 0 - ---- @type integer -PLAY_MODE_PAUSED = 2 - -AREA_TIMER_TYPE_NONE = 0 --- @type AreaTimerType -AREA_TIMER_TYPE_LOOP = 1 --- @type AreaTimerType -AREA_TIMER_TYPE_MAXIMUM = 2 --- @type AreaTimerType - ---- @alias AreaTimerType ---- | `AREA_TIMER_TYPE_NONE` ---- | `AREA_TIMER_TYPE_LOOP` ---- | `AREA_TIMER_TYPE_MAXIMUM` +TERRAIN_MASK = 0x0007 SPTASK_STATE_NOT_STARTED = 0 --- @type SpTaskState SPTASK_STATE_RUNNING = 1 --- @type SpTaskState @@ -11832,17 +11775,98 @@ SPTASK_STATE_FINISHED_DP = 4 --- @type SpTaskState --- | `SPTASK_STATE_FINISHED` --- | `SPTASK_STATE_FINISHED_DP` ---- @type integer -MAX_VERSION_LENGTH = 128 +AREA_TIMER_TYPE_NONE = 0 --- @type AreaTimerType +AREA_TIMER_TYPE_LOOP = 1 --- @type AreaTimerType +AREA_TIMER_TYPE_MAXIMUM = 2 --- @type AreaTimerType + +--- @alias AreaTimerType +--- | `AREA_TIMER_TYPE_NONE` +--- | `AREA_TIMER_TYPE_LOOP` +--- | `AREA_TIMER_TYPE_MAXIMUM` --- @type integer -MINOR_VERSION_NUMBER = 0 +ANIM_FLAG_NOLOOP = (1 << 0) + +--- @type integer +ANIM_FLAG_FORWARD = (1 << 1) + +--- @type integer +ANIM_FLAG_2 = (1 << 2) + +--- @type integer +ANIM_FLAG_HOR_TRANS = (1 << 3) + +--- @type integer +ANIM_FLAG_VERT_TRANS = (1 << 4) + +--- @type integer +ANIM_FLAG_5 = (1 << 5) + +--- @type integer +ANIM_FLAG_6 = (1 << 6) + +--- @type integer +ANIM_FLAG_7 = (1 << 7) + +--- @type integer +GRAPH_NODE_GUARD = 0xAA + +--- @type integer +OBJECT_MAX_BHV_STACK = 16 + +--- @type integer +OBJECT_NUM_REGULAR_FIELDS = 0x50 + +--- @type integer +OBJECT_NUM_CUSTOM_FIELDS = 0x40 + +--- @type integer +OBJECT_CUSTOM_FIELDS_START = (OBJECT_NUM_REGULAR_FIELDS) + +--- @type integer +OBJECT_NUM_FIELDS = (OBJECT_CUSTOM_FIELDS_START + OBJECT_NUM_CUSTOM_FIELDS) + +--- @type integer +PLAY_MODE_NORMAL = 0 + +--- @type integer +PLAY_MODE_PAUSED = 2 + +--- @type integer +PLAY_MODE_CHANGE_AREA = 3 + +--- @type integer +PLAY_MODE_CHANGE_LEVEL = 4 + +--- @type integer +PLAY_MODE_FRAME_ADVANCE = 5 + +--- @type integer +MAX_PLAYERS = 16 + +--- @type integer +COOP_OBJ_FLAG_NETWORK = (1 << 0) + +--- @type integer +COOP_OBJ_FLAG_LUA = (1 << 1) + +--- @type integer +COOP_OBJ_FLAG_NON_SYNC = (1 << 2) + +--- @type integer +COOP_OBJ_FLAG_INITIALIZED = (1 << 3) --- @type string SM64COOPDX_VERSION = "v1.3" +--- @type string +VERSION_TEXT = "v" + --- @type integer VERSION_NUMBER = 40 ---- @type string -VERSION_TEXT = "v" +--- @type integer +MINOR_VERSION_NUMBER = 0 + +--- @type integer +MAX_VERSION_LENGTH = 128 diff --git a/autogen/lua_definitions/functions.lua b/autogen/lua_definitions/functions.lua index 54f4d5e4c..32f93f298 100644 --- a/autogen/lua_definitions/functions.lua +++ b/autogen/lua_definitions/functions.lua @@ -14,6 +14,57 @@ function area_get_warp_node_from_params(o) -- ... end +--- @param count integer +--- @param offsetY integer +--- @param size number +--- Spawns mist particles around the current object +function spawn_mist_particles_variable(count, offsetY, size) + -- ... +end + +--- @param object Object +--- @param params integer +--- @param networkSendEvent integer +--- Spawns a Star parented to `object` that won't make Mario exit the level with an ID corresponding to `params`' first byte +function bhv_spawn_star_no_level_exit(object, params, networkSendEvent) + -- ... +end + +--- @param numTris integer +--- @param triModel integer +--- @param triSize number +--- @param triAnimState integer +--- Spawns triangle break particles around the current object +function spawn_triangle_break_particles(numTris, triModel, triSize, triAnimState) + -- ... +end + +--- Spawns mist particles around the current object +function spawn_mist_from_global() + -- ... +end + +--- @param flags integer +--- Clears the particle flags of the current object +function clear_particle_flags(flags) + -- ... +end + +--- @param pitch integer +--- @param yaw integer +--- Spawns wind particles around the current object +function spawn_wind_particles(pitch, yaw) + -- ... +end + +--- @param a0 number +--- @param a1 number +--- @return integer +--- Checks if the current object is moving `a1` units over a floor and within a threshold of `a0` +function check_if_moving_over_floor(a0, a1) + -- ... +end + --- @param goal Vec3f --- @param pos Vec3f --- @param yVel number @@ -24,143 +75,137 @@ function arc_to_goal_pos(goal, pos, yVel, gravity) -- ... end ---- Behavior init function for common 1-Up -function bhv_1up_common_init() +--- @param dest Vec3f +--- @param src Vec3f +--- Duplicate of vec3f_copy except without bad return +function vec3f_copy_2(dest, src) -- ... end ---- Behavior loop function for hidden 1-Up in pole (Green Demon) -function bhv_1up_hidden_in_pole_loop() +--- @param forwardVel number +--- @param a1 number +--- @param deltaPitch integer +--- @param deltaRoll integer +--- Moves Tox Box +function tox_box_move(forwardVel, a1, deltaPitch, deltaRoll) -- ... end ---- Behavior loop function for 1-Up hidden in pole spawner -function bhv_1up_hidden_in_pole_spawner_loop() +--- @param walk integer +--- Plays the penguin walking sound +function play_penguin_walking_sound(walk) -- ... end ---- Behavior loop function for 1-Up hidden in pole trigger -function bhv_1up_hidden_in_pole_trigger_loop() +--- @param angle Pointer_integer +--- @return integer +--- Updates the current object's angle from its move flags +function update_angle_from_move_flags(angle) -- ... end ---- Behavior loop function for hidden 1-Up -function bhv_1up_hidden_loop() +--- @param windSpread integer +--- @param scale number +--- @param relPosX number +--- @param relPosY number +--- @param relPosZ number +--- Spawns strong wind particles relative to the current object +function cur_obj_spawn_strong_wind_particles(windSpread, scale, relPosX, relPosY, relPosZ) -- ... end ---- Behavior loop function for hidden 1-Up trigger -function bhv_1up_hidden_trigger_loop() +--- Behavior loop function for Star Door +function bhv_star_door_loop_2() -- ... end ---- Behavior init function for 1-Up -function bhv_1up_init() +--- Behavior loop function for Cap Switch +function bhv_cap_switch_loop() -- ... end ---- Behavior loop function for jump on approach 1-Up -function bhv_1up_jump_on_approach_loop() +--- Behavior init function for tiny Star particles +function bhv_tiny_star_particles_init() -- ... end ---- Behavior loop function for 1-Up -function bhv_1up_loop() +--- Behavior loop function for Grindel and Thwomp +function bhv_grindel_thwomp_loop() -- ... end ---- Behavior loop function for running away 1-Up -function bhv_1up_running_away_loop() +--- Behavior loop function for Koopa Shell underwater +function bhv_koopa_shell_underwater_loop() -- ... end ---- Behavior loop function for sliding 1-Up -function bhv_1up_sliding_loop() +--- Behavior init function for door +function bhv_door_init() -- ... end ---- Behavior init function for 1-Up trigger -function bhv_1up_trigger_init() +--- Behavior loop function for door +function bhv_door_loop() -- ... end ---- Behavior loop function for walking 1-Up -function bhv_1up_walking_loop() +--- Behavior loop function for Star Door +function bhv_star_door_loop() -- ... end ---- Behavior init function for Act Selector -function bhv_act_selector_init() +--- Behavior loop function for Mr. I +function bhv_mr_i_loop() -- ... end ---- Behavior loop function for Act Selector -function bhv_act_selector_loop() +--- Behavior loop function for Mr. I body +function bhv_mr_i_body_loop() -- ... end ---- Behavior loop function for Act Selector star type -function bhv_act_selector_star_type_loop() +--- Behavior loop function for Mr. I particle +function bhv_mr_i_particle_loop() -- ... end ---- Behavior init function for activated back and forth platform in Bowser courses -function bhv_activated_back_and_forth_platform_init() +--- Behavior loop function for Piranha particle +function bhv_piranha_particle_loop() -- ... end ---- Behavior loop function for activated back and forth platform in Bowser courses -function bhv_activated_back_and_forth_platform_update() +--- Behavior loop function for giant pole +function bhv_giant_pole_loop() -- ... end ---- Behavior loop function for alpha boo key -function bhv_alpha_boo_key_loop() +--- Behavior init function for pole +function bhv_pole_init() -- ... end ---- Behavior loop function for the lighting engine ambient light. Takes the first 3 behavior parameter bytes for RGB color -function bhv_ambient_light_update() +--- Behavior loop function for pole base +function bhv_pole_base_loop() -- ... end ---- Behavior init function for ambient sounds -function bhv_ambient_sounds_init() +--- Behavior loop function for Tiny Huge Island huge island top +function bhv_thi_huge_island_top_loop() -- ... end ---- Behavior loop function for animated texture -function bhv_animated_texture_loop() +--- Behavior loop function for Tiny Huge Island tiny island top +function bhv_thi_tiny_island_top_loop() -- ... end ---- Behavior init function for animates on floor switch press in Rainbow Ride and Bowser courses -function bhv_animates_on_floor_switch_press_init() +--- Behavior loop function for King Bob-omb +function bhv_king_bobomb_loop() -- ... end ---- Behavior loop function for animates on floor switch press in Rainbow Ride and Bowser courses -function bhv_animates_on_floor_switch_press_loop() - -- ... -end - ---- Behavior loop function for Wet Dry World arrow lift -function bhv_arrow_lift_loop() - -- ... -end - ---- Behavior loop function for Big Boo's Haunt tilting trap platform -function bhv_bbh_tilting_trap_platform_loop() - -- ... -end - ---- Behavior loop function for beta boo key -function bhv_beta_boo_key_loop() - -- ... -end - ---- Behavior loop function for beta Bowser anchor -function bhv_beta_bowser_anchor_loop() +--- Behavior loop function for Bob-omb anchor mario +function bhv_bobomb_anchor_mario_loop() -- ... end @@ -179,403 +224,8 @@ function bhv_beta_chest_lid_loop() -- ... end ---- Behavior loop function for beta fish splash spawner -function bhv_beta_fish_splash_spawner_loop() - -- ... -end - ---- Behavior init function for beta holdable object -function bhv_beta_holdable_object_init() - -- ... -end - ---- Behavior loop function for beta holdable object -function bhv_beta_holdable_object_loop() - -- ... -end - ---- Behavior loop function for beta moving flames -function bhv_beta_moving_flames_loop() - -- ... -end - ---- Behavior loop function for beta moving flames spawn -function bhv_beta_moving_flames_spawn_loop() - -- ... -end - ---- Behavior loop function for beta trampoline spring -function bhv_beta_trampoline_spring_loop() - -- ... -end - ---- Behavior loop function for beta trampoline top -function bhv_beta_trampoline_top_loop() - -- ... -end - ---- Behavior loop function for Big Boo -function bhv_big_boo_loop() - -- ... -end - ---- Behavior loop function for big boulder generator -function bhv_big_boulder_generator_loop() - -- ... -end - ---- Behavior init function for big boulder -function bhv_big_boulder_init() - -- ... -end - ---- Behavior loop function for big boulder -function bhv_big_boulder_loop() - -- ... -end - ---- Behavior init function for Big Bully -function bhv_big_bully_init() - -- ... -end - ---- Behavior init function for Big Bully with minions -function bhv_big_bully_with_minions_init() - -- ... -end - ---- Behavior loop function for Big Bully with minions -function bhv_big_bully_with_minions_loop() - -- ... -end - ---- Behavior loop function for bird -function bhv_bird_update() - -- ... -end - ---- Behavior loop function for birds sound -function bhv_birds_sound_loop() - -- ... -end - ---- Behavior loop function for Bowser in the Fire Sea sinking cage platform -function bhv_bitfs_sinking_cage_platform_loop() - -- ... -end - ---- Behavior loop function for Bowser in the Fire Sea sinking platform -function bhv_bitfs_sinking_platform_loop() - -- ... -end - ---- Behavior loop function for black smoke Bowser -function bhv_black_smoke_bowser_loop() - -- ... -end - ---- Behavior loop function for black smoke Mario -function bhv_black_smoke_mario_loop() - -- ... -end - ---- Behavior loop function for black smoke upward -function bhv_black_smoke_upward_loop() - -- ... -end - ---- Behavior init function for Blue Bowser flame -function bhv_blue_bowser_flame_init() - -- ... -end - ---- Behavior loop function for Blue Bowser flame -function bhv_blue_bowser_flame_loop() - -- ... -end - ---- Behavior loop function for Blue Coin jumping -function bhv_blue_coin_jumping_loop() - -- ... -end - ---- Behavior loop function for Blue Coin number -function bhv_blue_coin_number_loop() - -- ... -end - ---- Behavior init function for Blue Coin sliding jumping -function bhv_blue_coin_sliding_jumping_init() - -- ... -end - ---- Behavior loop function for Blue Coin sliding -function bhv_blue_coin_sliding_loop() - -- ... -end - ---- Behavior init function for Blue Coin switch -function bhv_blue_coin_switch_init() - -- ... -end - ---- Behavior loop function for Blue Coin switch -function bhv_blue_coin_switch_loop() - -- ... -end - ---- Behavior loop function for blue fish movement -function bhv_blue_fish_movement_loop() - -- ... -end - ---- Behavior loop function for blue flames group -function bhv_blue_flames_group_loop() - -- ... -end - ---- Behavior init function for Bob-omb Battlefield pit bowling ball -function bhv_bob_pit_bowling_ball_init() - -- ... -end - ---- Behavior loop function for Bob-omb Battlefield pit bowling ball -function bhv_bob_pit_bowling_ball_loop() - -- ... -end - ---- Behavior loop function for Bob-omb anchor mario -function bhv_bobomb_anchor_mario_loop() - -- ... -end - ---- Behavior init function for Bob-omb buddy -function bhv_bobomb_buddy_init() - -- ... -end - ---- Behavior loop function for Bob-omb buddy -function bhv_bobomb_buddy_loop() - -- ... -end - ---- Behavior init function for Bob-omb and Bully death smoke -function bhv_bobomb_bully_death_smoke_init() - -- ... -end - ---- Behavior init function for Bob-omb explosion bubble -function bhv_bobomb_explosion_bubble_init() - -- ... -end - ---- Behavior loop function for Bob-omb explosion bubble -function bhv_bobomb_explosion_bubble_loop() - -- ... -end - ---- Behavior init function for Bob-omb fuse smoke -function bhv_bobomb_fuse_smoke_init() - -- ... -end - ---- Behavior init function for Bob-omb -function bhv_bobomb_init() - -- ... -end - ---- Behavior loop function for Bob-omb -function bhv_bobomb_loop() - -- ... -end - ---- Behavior loop function for Boo boss spawned bridge -function bhv_boo_boss_spawned_bridge_loop() - -- ... -end - ---- Behavior init function for Boo cage -function bhv_boo_cage_init() - -- ... -end - ---- Behavior loop function for Boo cage -function bhv_boo_cage_loop() - -- ... -end - ---- Behavior loop function for the Boo inside the Castle -function bhv_boo_in_castle_loop() - -- ... -end - ---- Behavior init function for Boo -function bhv_boo_init() - -- ... -end - ---- Behavior loop function for Boo -function bhv_boo_loop() - -- ... -end - ---- Behavior init function for Boo with cage -function bhv_boo_with_cage_init() - -- ... -end - ---- Behavior loop function for Boo with cage -function bhv_boo_with_cage_loop() - -- ... -end - ---- Behavior loop function for Book switch -function bhv_book_switch_loop() - -- ... -end - ---- Behavior loop function for Bookend spawn -function bhv_bookend_spawn_loop() - -- ... -end - ---- Behavior loop function for bouncing fireball flame -function bhv_bouncing_fireball_flame_loop() - -- ... -end - ---- Behavior loop function for bouncing fireball -function bhv_bouncing_fireball_loop() - -- ... -end - ---- Behavior init function for bowling ball -function bhv_bowling_ball_init() - -- ... -end - ---- Behavior loop function for bowling ball -function bhv_bowling_ball_loop() - -- ... -end - ---- Behavior init function for Bowser body anchor -function bhv_bowser_body_anchor_init() - -- ... -end - ---- Behavior loop function for Bowser body anchor -function bhv_bowser_body_anchor_loop() - -- ... -end - ---- Behavior loop function for Bowser bomb explosion -function bhv_bowser_bomb_explosion_loop() - -- ... -end - ---- Behavior loop function for Bowser bomb -function bhv_bowser_bomb_loop() - -- ... -end - ---- Behavior loop function for Bowser bomb smoke -function bhv_bowser_bomb_smoke_loop() - -- ... -end - ---- Behavior loop function for Bowser course Red Coin Star -function bhv_bowser_course_red_coin_star_loop() - -- ... -end - ---- Behavior loop function for Bowser flame spawn -function bhv_bowser_flame_spawn_loop() - -- ... -end - ---- Behavior init function for Bowser -function bhv_bowser_init() - -- ... -end - ---- Behavior loop function for Bowser key course exit -function bhv_bowser_key_course_exit_loop() - -- ... -end - ---- Behavior init function for Bowser key -function bhv_bowser_key_init() - -- ... -end - ---- Behavior loop function for Bowser key -function bhv_bowser_key_loop() - -- ... -end - ---- Behavior loop function for Bowser key unlock door -function bhv_bowser_key_unlock_door_loop() - -- ... -end - ---- Behavior loop function for Bowser -function bhv_bowser_loop() - -- ... -end - ---- Behavior loop function for Bowser shock wave -function bhv_bowser_shock_wave_loop() - -- ... -end - ---- Behavior init function for Bowser tail anchor -function bhv_bowser_tail_anchor_init() - -- ... -end - ---- Behavior loop function for Bowser tail anchor -function bhv_bowser_tail_anchor_loop() - -- ... -end - ---- Behavior loop function for Bowser's submarine -function bhv_bowsers_sub_loop() - -- ... -end - ---- Behavior loop function for breakable box -function bhv_breakable_box_loop() - -- ... -end - ---- Behavior init function for small breakable box -function bhv_breakable_box_small_init() - -- ... -end - ---- Behavior loop function for small breakable box -function bhv_breakable_box_small_loop() - -- ... -end - ---- Behavior loop function for Bub -function bhv_bub_loop() - -- ... -end - ---- Behavior loop function for Bub spawner -function bhv_bub_spawner_loop() - -- ... -end - ---- Behavior loop function for Bubba -function bhv_bubba_loop() - -- ... -end - ---- Behavior loop function for bubble cannon barrel -function bhv_bubble_cannon_barrel_loop() +--- Behavior init function for bubble wave +function bhv_bubble_wave_init() -- ... end @@ -589,13 +239,536 @@ function bhv_bubble_player_loop() -- ... end ---- Behavior init function for bubble splash -function bhv_bubble_splash_init() +--- Behavior init function for water air bubble +function bhv_water_air_bubble_init() -- ... end ---- Behavior init function for bubble wave -function bhv_bubble_wave_init() +--- Behavior loop function for water air bubble +function bhv_water_air_bubble_loop() + -- ... +end + +--- Behavior init function for particle +function bhv_particle_init() + -- ... +end + +--- Behavior loop function for particle +function bhv_particle_loop() + -- ... +end + +--- Behavior init function for water waves +function bhv_water_waves_init() + -- ... +end + +--- Behavior loop function for small bubbles +function bhv_small_bubbles_loop() + -- ... +end + +--- Behavior loop function for fish group +function bhv_fish_group_loop() + -- ... +end + +--- Behavior loop function for cannon base +function bhv_cannon_base_loop() + -- ... +end + +--- Behavior loop function for cannon barrel +function bhv_cannon_barrel_loop() + -- ... +end + +--- Behavior loop function for cannon base unused +function bhv_cannon_base_unused_loop() + -- ... +end + +--- @param sp28 number +--- @param sp2C number +--- @param sp30 integer +--- Common behavior for when Mario's anchoring when grabbed +function common_anchor_mario_behavior(sp28, sp2C, sp30) + -- ... +end + +--- Behavior loop function for Chuckya +function bhv_chuckya_loop() + -- ... +end + +--- Behavior loop function for Chuckya mario anchor +function bhv_chuckya_anchor_mario_loop() + -- ... +end + +--- Behavior loop function for rotating platform +function bhv_rotating_platform_loop() + -- ... +end + +--- Behavior loop function for Whomp's Fortress breakable wall +function bhv_wf_breakable_wall_loop() + -- ... +end + +--- Behavior loop function for Whomp's Fortress kickable board +function bhv_kickable_board_loop() + -- ... +end + +--- Behavior loop function for Whomp's Fortress tower door +function bhv_tower_door_loop() + -- ... +end + +--- Behavior init function for Whomp's Fortress rotating wooden platform +function bhv_wf_rotating_wooden_platform_init() + -- ... +end + +--- Behavior loop function for Whomp's Fortress rotating wooden platform +function bhv_wf_rotating_wooden_platform_loop() + -- ... +end + +--- Behavior loop function for fading warp +function bhv_fading_warp_loop() + -- ... +end + +--- Behavior loop function for warp +function bhv_warp_loop() + -- ... +end + +--- Behavior loop function for white puff exploding +function bhv_white_puff_exploding_loop() + -- ... +end + +--- Behavior init function for spawned star +function bhv_spawned_star_init() + -- ... +end + +--- Behavior loop function for Spawned star +function bhv_spawned_star_loop() + -- ... +end + +--- Behavior init function for Coin +function bhv_coin_init() + -- ... +end + +--- Behavior loop function for Coin +function bhv_coin_loop() + -- ... +end + +--- Behavior loop function for Coin inside Boo +function bhv_coin_inside_boo_loop() + -- ... +end + +--- Behavior init function for Coin formation +function bhv_coin_formation_init() + -- ... +end + +--- Behavior loop function for Coin formation spawn +function bhv_coin_formation_spawn_loop() + -- ... +end + +--- Behavior loop function for Coin formation +function bhv_coin_formation_loop() + -- ... +end + +--- Behavior loop function for despawning Coin +function bhv_temp_coin_loop() + -- ... +end + +--- Behavior loop function for Coin sparkles +function bhv_coin_sparkles_loop() + -- ... +end + +--- Behavior loop function for golden Coin sparkles +function bhv_golden_coin_sparkles_loop() + -- ... +end + +--- Behavior loop function for tiny wall star particle +function bhv_wall_tiny_star_particle_loop() + -- ... +end + +--- Behavior loop function for tiny pound star particle +function bhv_pound_tiny_star_particle_loop() + -- ... +end + +--- Behavior init function for tiny pound star particle +function bhv_pound_tiny_star_particle_init() + -- ... +end + +--- Behavior loop function for tiny punch triangle +function bhv_punch_tiny_triangle_loop() + -- ... +end + +--- Behavior init function for tiny punch triangle +function bhv_punch_tiny_triangle_init() + -- ... +end + +--- Behavior loop function for tumbling bridge platform +function bhv_tumbling_bridge_platform_loop() + -- ... +end + +--- Behavior loop function for tumbling bridge +function bhv_tumbling_bridge_loop() + -- ... +end + +--- Behavior init function for elevator +function bhv_elevator_init() + -- ... +end + +--- Behavior loop function for elevator +function bhv_elevator_loop() + -- ... +end + +--- Behavior loop function for water mist +function bhv_water_mist_loop() + -- ... +end + +--- Behavior loop function for water mist spawn +function bhv_water_mist_spawn_loop() + -- ... +end + +--- Behavior loop function for water mist 2 +function bhv_water_mist_2_loop() + -- ... +end + +--- Behavior init function for pound white puffs +function bhv_pound_white_puffs_init() + -- ... +end + +--- Behavior init function for ground sand +function bhv_ground_sand_init() + -- ... +end + +--- Behavior init function for ground snow +function bhv_ground_snow_init() + -- ... +end + +--- Behavior loop function for wind +function bhv_wind_loop() + -- ... +end + +--- Behavior loop function for unused particle spawn +function bhv_unused_particle_spawn_loop() + -- ... +end + +--- Behavior loop function for Ukiki cage Star +function bhv_ukiki_cage_star_loop() + -- ... +end + +--- Behavior loop function for Ukiki cage +function bhv_ukiki_cage_loop() + -- ... +end + +--- Behavior loop function for Bowser in the Fire Sea sinking platform +function bhv_bitfs_sinking_platform_loop() + -- ... +end + +--- Behavior loop function for Bowser in the Fire Sea sinking cage platform +function bhv_bitfs_sinking_cage_platform_loop() + -- ... +end + +--- Behavior loop function for Dire Dire Docks moving pole +function bhv_ddd_moving_pole_loop() + -- ... +end + +--- Behavior init function for Bowser in the Dark World, Lethal Lava Land, and Bowser in the Fire Sea platform normals +function bhv_platform_normals_init() + -- ... +end + +--- Behavior loop function for Lethal Lava Land and Bowser in the Fire Sea tilting inverted pyramid +function bhv_tilting_inverted_pyramid_loop() + -- ... +end + +--- Behavior loop function for squishable platform +function bhv_squishable_platform_loop() + -- ... +end + +--- Behavior loop function for beta moving flames spawn +function bhv_beta_moving_flames_spawn_loop() + -- ... +end + +--- Behavior loop function for beta moving flames +function bhv_beta_moving_flames_loop() + -- ... +end + +--- Behavior loop function for Rainbow Ride rotating bridge platform +function bhv_rr_rotating_bridge_platform_loop() + -- ... +end + +--- Behavior loop function for flamethrower +function bhv_flamethrower_loop() + -- ... +end + +--- Behavior loop function for flamethrower flame +function bhv_flamethrower_flame_loop() + -- ... +end + +--- Behavior loop function for bouncing fireball +function bhv_bouncing_fireball_loop() + -- ... +end + +--- Behavior loop function for bouncing fireball flame +function bhv_bouncing_fireball_flame_loop() + -- ... +end + +--- Behavior loop function for Bowser shock wave +function bhv_bowser_shock_wave_loop() + -- ... +end + +--- Behavior loop function for flame Mario +function bhv_flame_mario_loop() + -- ... +end + +--- Behavior loop function for black smoke Mario +function bhv_black_smoke_mario_loop() + -- ... +end + +--- Behavior loop function for black smoke Bowser +function bhv_black_smoke_bowser_loop() + -- ... +end + +--- Behavior loop function for black smoke upward +function bhv_black_smoke_upward_loop() + -- ... +end + +--- Behavior loop function for beta fish splash spawner +function bhv_beta_fish_splash_spawner_loop() + -- ... +end + +--- Behavior loop function for Spindrift +function bhv_spindrift_loop() + -- ... +end + +--- Behavior init function for Whomp's Fortress tower platform group +function bhv_tower_platform_group_init() + -- ... +end + +--- Behavior loop function for Whomp's Fortress tower platform group +function bhv_tower_platform_group_loop() + -- ... +end + +--- Behavior loop function for Whomp's Fortress sliding tower platform +function bhv_wf_sliding_tower_platform_loop() + -- ... +end + +--- Behavior loop function for Whomp's Fortress elevator tower platform +function bhv_wf_elevator_tower_platform_loop() + -- ... +end + +--- Behavior loop function for Whomp's Fortress solid tower platform +function bhv_wf_solid_tower_platform_loop() + -- ... +end + +--- Behavior init function for snow leaf particle spawn +function bhv_snow_leaf_particle_spawn_init() + -- ... +end + +--- Behavior loop function for tree snow or leaf particle +function bhv_tree_snow_or_leaf_loop() + -- ... +end + +--- Behavior loop function for Piranha Plant bubble +function bhv_piranha_plant_bubble_loop() + -- ... +end + +--- Behavior loop function for Piranha Plant waking bubbles +function bhv_piranha_plant_waking_bubbles_loop() + -- ... +end + +--- Behavior loop function for Purple Switch +function bhv_purple_switch_loop() + -- ... +end + +--- Behavior loop function for Wet Dry World hidden breakable box +function bhv_hidden_object_loop() + -- ... +end + +--- Behavior loop function for breakable box +function bhv_breakable_box_loop() + -- ... +end + +--- Behavior loop function for pushable metal box +function bhv_pushable_loop() + -- ... +end + +--- Behavior loop function for small water wave +function bhv_small_water_wave_loop() + -- ... +end + +--- Behavior init function for Yellow Coin +function bhv_yellow_coin_init() + -- ... +end + +--- Behavior loop function for Yellow Coin +function bhv_yellow_coin_loop() + -- ... +end + +--- Behavior loop function for Bowser in the Dark World squarish path moving +function bhv_squarish_path_moving_loop() + -- ... +end + +--- Behavior init function for Bowser in the Dark World squarish path parent +function bhv_squarish_path_parent_init() + -- ... +end + +--- Behavior loop function for Bowser in the Dark World Ssuarish path parent +function bhv_squarish_path_parent_loop() + -- ... +end + +--- Behavior loop function for Heave ho +function bhv_heave_ho_loop() + -- ... +end + +--- Behavior loop function for Heave ho throwing Mario +function bhv_heave_ho_throw_mario_loop() + -- ... +end + +--- Behavior loop function for Cool, Cool Mountain touched Star spawn +function bhv_ccm_touched_star_spawn_loop() + -- ... +end + +--- Behavior loop function for unused poundable platform +function bhv_unused_poundable_platform() + -- ... +end + +--- Behavior loop function for beta trampoline top +function bhv_beta_trampoline_top_loop() + -- ... +end + +--- Behavior loop function for beta trampoline spring +function bhv_beta_trampoline_spring_loop() + -- ... +end + +--- Behavior loop function for jumping box +function bhv_jumping_box_loop() + -- ... +end + +--- Behavior init function for Boo cage +function bhv_boo_cage_init() + -- ... +end + +--- Behavior loop function for Boo cage +function bhv_boo_cage_loop() + -- ... +end + +--- Behavior init function for Bowser key +function bhv_bowser_key_init() + -- ... +end + +--- Behavior loop function for Bowser key +function bhv_bowser_key_loop() + -- ... +end + +--- Behavior init function for Grand Star +function bhv_grand_star_init() + -- ... +end + +--- Behavior loop function for Grand Star +function bhv_grand_star_loop() + -- ... +end + +--- Behavior loop function for beta boo key +function bhv_beta_boo_key_loop() + -- ... +end + +--- Behavior loop function for alpha boo key +function bhv_alpha_boo_key_loop() -- ... end @@ -609,118 +782,123 @@ function bhv_bullet_bill_loop() -- ... end ---- Behavior loop function for Bully -function bhv_bully_loop() +--- Behavior init function for White puff smoke +function bhv_white_puff_smoke_init() -- ... end ---- Behavior init function for Butterfly -function bhv_butterfly_init() +--- Behavior init function for Bowser tail anchor +function bhv_bowser_tail_anchor_init() -- ... end ---- Behavior loop function for Butterfly -function bhv_butterfly_loop() +--- Behavior loop function for Bowser tail anchor +function bhv_bowser_tail_anchor_loop() -- ... end ---- Behavior init function for Camera Lakitu -function bhv_camera_lakitu_init() +--- Behavior init function for Bowser +function bhv_bowser_init() -- ... end ---- Behavior loop function for Camera Lakitu -function bhv_camera_lakitu_update() +--- Behavior loop function for Bowser +function bhv_bowser_loop() -- ... end ---- Behavior loop function for cannon barrel -function bhv_cannon_barrel_loop() +--- Behavior init function for Bowser body anchor +function bhv_bowser_body_anchor_init() -- ... end ---- Behavior loop function for cannon base -function bhv_cannon_base_loop() +--- Behavior loop function for Bowser body anchor +function bhv_bowser_body_anchor_loop() -- ... end ---- Behavior loop function for cannon base unused -function bhv_cannon_base_unused_loop() +--- Behavior loop function for Bowser flame spawn +function bhv_bowser_flame_spawn_loop() -- ... end ---- Behavior init function for cannon closed -function bhv_cannon_closed_init() +--- Behavior init function for tilting Bowser in the Fire Sea arena platform +function bhv_tilting_bowser_lava_platform_init() -- ... end ---- Behavior loop function for cannon closed -function bhv_cannon_closed_loop() +--- Behavior loop function for falling Bowser in the Sky arena platform +function bhv_falling_bowser_platform_loop() -- ... end ---- Behavior loop function for Cap Switch -function bhv_cap_switch_loop() +--- Behavior init function for Blue Bowser flame +function bhv_blue_bowser_flame_init() -- ... end ---- Behavior init function for Castle cannon grate -function bhv_castle_cannon_grate_init() +--- Behavior loop function for Blue Bowser flame +function bhv_blue_bowser_flame_loop() -- ... end ---- Behavior init function for castle flag -function bhv_castle_flag_init() +--- Behavior init function for flame floating landing +function bhv_flame_floating_landing_init() -- ... end ---- Behavior init function for Bowser in the Dark World floor trap manager -function bhv_castle_floor_trap_init() +--- Behavior loop function for flame floating landing +function bhv_flame_floating_landing_loop() -- ... end ---- Behavior loop function for Bowser in the Dark World floor trap manager -function bhv_castle_floor_trap_loop() +--- Behavior loop function for blue flames group +function bhv_blue_flames_group_loop() -- ... end ---- Behavior loop function for Cool, Cool Mountain touched Star spawn -function bhv_ccm_touched_star_spawn_loop() +--- Behavior init function for flame bouncing +function bhv_flame_bouncing_init() -- ... end ---- Behavior init function for Celebration Star -function bhv_celebration_star_init() +--- Behavior loop function for flame bouncing +function bhv_flame_bouncing_loop() -- ... end ---- Behavior loop function for Celebration Star -function bhv_celebration_star_loop() +--- Behavior init function for flame moving forward growing +function bhv_flame_moving_forward_growing_init() -- ... end ---- Behavior loop function for Celebration Star sparkle -function bhv_celebration_star_sparkle_loop() +--- Behavior loop function for flame moving forward growing +function bhv_flame_moving_forward_growing_loop() -- ... end ---- Behavior loop function for Chain Chomp chain part -function bhv_chain_chomp_chain_part_update() +--- Behavior init function for Bowser flame +function bhv_flame_bowser_init() -- ... end ---- Behavior init function for Chain Chomp gate -function bhv_chain_chomp_gate_init() +--- Behavior loop function for Bowser flame +function bhv_flame_bowser_loop() -- ... end ---- Behavior loop function for Chain Chomp gate -function bhv_chain_chomp_gate_update() +--- Behavior init function for large flame burning out +function bhv_flame_large_burning_out_init() -- ... end ---- Behavior loop function for Chain Chomp -function bhv_chain_chomp_update() +--- Behavior loop function for blue fish movement +function bhv_blue_fish_movement_loop() + -- ... +end + +--- Behavior loop function for tank fish group +function bhv_tank_fish_group_loop() -- ... end @@ -744,573 +922,13 @@ function bhv_checkerboard_platform_loop() -- ... end ---- Behavior loop function for Chuckya mario anchor -function bhv_chuckya_anchor_mario_loop() +--- Behavior loop function for Bowser key unlock door +function bhv_bowser_key_unlock_door_loop() -- ... end ---- Behavior loop function for Chuckya -function bhv_chuckya_loop() - -- ... -end - ---- Behavior init function for Circling Amp -function bhv_circling_amp_init() - -- ... -end - ---- Behavior loop function for Circling Amp -function bhv_circling_amp_loop() - -- ... -end - ---- Behavior loop function for Clam -function bhv_clam_loop() - -- ... -end - ---- Behavior loop function for cloud part -function bhv_cloud_part_update() - -- ... -end - ---- Behavior loop function for cloud -function bhv_cloud_update() - -- ... -end - ---- Behavior loop function for coffin -function bhv_coffin_loop() - -- ... -end - ---- Behavior loop function for coffin spawner -function bhv_coffin_spawner_loop() - -- ... -end - ---- Behavior init function for Coin formation -function bhv_coin_formation_init() - -- ... -end - ---- Behavior loop function for Coin formation -function bhv_coin_formation_loop() - -- ... -end - ---- Behavior loop function for Coin formation spawn -function bhv_coin_formation_spawn_loop() - -- ... -end - ---- Behavior init function for Coin -function bhv_coin_init() - -- ... -end - ---- Behavior loop function for Coin inside Boo -function bhv_coin_inside_boo_loop() - -- ... -end - ---- Behavior loop function for Coin -function bhv_coin_loop() - -- ... -end - ---- Behavior loop function for Coin sparkles -function bhv_coin_sparkles_loop() - -- ... -end - ---- Behavior init function for collectable Star -function bhv_collect_star_init() - -- ... -end - ---- Behavior loop function for collectable Star -function bhv_collect_star_loop() - -- ... -end - ---- Behavior init function for controllable platform -function bhv_controllable_platform_init() - -- ... -end - ---- Behavior loop function for controllable platform -function bhv_controllable_platform_loop() - -- ... -end - ---- Behavior loop function for controllable sub platform -function bhv_controllable_platform_sub_loop() - -- ... -end - ---- Behavior init function for Courtyard Boo triplet -function bhv_courtyard_boo_triplet_init() - -- ... -end - ---- Behavior loop function for Dire Dire Docks moving pole -function bhv_ddd_moving_pole_loop() - -- ... -end - ---- Behavior init function for Dire Dire Docks pole -function bhv_ddd_pole_init() - -- ... -end - ---- Behavior loop function for Dire Dire Docks pole -function bhv_ddd_pole_update() - -- ... -end - ---- Behavior loop function for Castle Basement Dire Dire Docks warp collision -function bhv_ddd_warp_loop() - -- ... -end - ---- Behavior init function for decorative pendulum -function bhv_decorative_pendulum_init() - -- ... -end - ---- Behavior loop function for decorative pendulum -function bhv_decorative_pendulum_loop() - -- ... -end - ---- Behavior loop function for donut platform spawner -function bhv_donut_platform_spawner_update() - -- ... -end - ---- Behavior loop function for donut platform -function bhv_donut_platform_update() - -- ... -end - ---- Behavior init function for door -function bhv_door_init() - -- ... -end - ---- Behavior loop function for door -function bhv_door_loop() - -- ... -end - ---- Behavior loop function for Dorrie -function bhv_dorrie_update() - -- ... -end - ---- Behavior init function for elevator -function bhv_elevator_init() - -- ... -end - ---- Behavior loop function for elevator -function bhv_elevator_loop() - -- ... -end - ---- Behavior loop function for first end birds -function bhv_end_birds_1_loop() - -- ... -end - ---- Behavior loop function for second end birds -function bhv_end_birds_2_loop() - -- ... -end - ---- Behavior loop function for Enemy Lakitu -function bhv_enemy_lakitu_update() - -- ... -end - ---- Behavior init function for Exclamation Box -function bhv_exclamation_box_init() - -- ... -end - ---- Behavior loop function for Exclamation Box -function bhv_exclamation_box_loop() - -- ... -end - ---- Behavior init function for explosion -function bhv_explosion_init() - -- ... -end - ---- Behavior loop function for explosion -function bhv_explosion_loop() - -- ... -end - ---- Behavior init function for Eyerok boss -function bhv_eyerok_boss_init() - -- ... -end - ---- Behavior loop function for Eyerok boss -function bhv_eyerok_boss_loop() - -- ... -end - ---- Behavior loop function for Eyerok hand -function bhv_eyerok_hand_loop() - -- ... -end - ---- Behavior loop function for fading warp -function bhv_fading_warp_loop() - -- ... -end - ---- Behavior loop function for falling Bowser in the Sky arena platform -function bhv_falling_bowser_platform_loop() - -- ... -end - ---- Behavior loop function for Jolly Roger Bay falling pillar hitbox -function bhv_falling_pillar_hitbox_loop() - -- ... -end - ---- Behavior init function for Jolly Roger Bay falling pillar -function bhv_falling_pillar_init() - -- ... -end - ---- Behavior loop function for Jolly Roger Bay falling pillar -function bhv_falling_pillar_loop() - -- ... -end - ---- Behavior init function for ferris wheel axle -function bhv_ferris_wheel_axle_init() - -- ... -end - ---- Behavior init function for ferris wheel platform -function bhv_ferris_wheel_platform_init() - -- ... -end - ---- Behavior loop function for ferris wheel platform -function bhv_ferris_wheel_platform_update() - -- ... -end - ---- Behavior init function for Fire Piranha Plant -function bhv_fire_piranha_plant_init() - -- ... -end - ---- Behavior loop function for Fire Piranha Plant -function bhv_fire_piranha_plant_update() - -- ... -end - ---- Behavior loop function for Fire spitter -function bhv_fire_spitter_update() - -- ... -end - ---- Behavior loop function for fish group -function bhv_fish_group_loop() - -- ... -end - ---- Behavior loop function for fish -function bhv_fish_loop() - -- ... -end - ---- Behavior loop function for fish spawner -function bhv_fish_spawner_loop() - -- ... -end - ---- Behavior init function for flame bouncing -function bhv_flame_bouncing_init() - -- ... -end - ---- Behavior loop function for flame bouncing -function bhv_flame_bouncing_loop() - -- ... -end - ---- Behavior init function for Bowser flame -function bhv_flame_bowser_init() - -- ... -end - ---- Behavior loop function for Bowser flame -function bhv_flame_bowser_loop() - -- ... -end - ---- Behavior init function for flame floating landing -function bhv_flame_floating_landing_init() - -- ... -end - ---- Behavior loop function for flame floating landing -function bhv_flame_floating_landing_loop() - -- ... -end - ---- Behavior init function for large flame burning out -function bhv_flame_large_burning_out_init() - -- ... -end - ---- Behavior loop function for flame Mario -function bhv_flame_mario_loop() - -- ... -end - ---- Behavior init function for flame moving forward growing -function bhv_flame_moving_forward_growing_init() - -- ... -end - ---- Behavior loop function for flame moving forward growing -function bhv_flame_moving_forward_growing_loop() - -- ... -end - ---- Behavior loop function for flamethrower flame -function bhv_flamethrower_flame_loop() - -- ... -end - ---- Behavior loop function for flamethrower -function bhv_flamethrower_loop() - -- ... -end - ---- Behavior loop function for floating platform -function bhv_floating_platform_loop() - -- ... -end - ---- Behavior loop function for Bowser in the Dark World floor trap -function bhv_floor_trap_in_castle_loop() - -- ... -end - ---- Behavior loop function for Fly Guy flame -function bhv_fly_guy_flame_loop() - -- ... -end - ---- Behavior loop function for Fly Guy -function bhv_fly_guy_update() - -- ... -end - ---- Behavior loop function for flying bookend -function bhv_flying_bookend_loop() - -- ... -end - ---- Behavior init function for free bowling ball -function bhv_free_bowling_ball_init() - -- ... -end - ---- Behavior loop function for free bowling ball -function bhv_free_bowling_ball_loop() - -- ... -end - ---- Behavior init function for generic bowling ball spawner -function bhv_generic_bowling_ball_spawner_init() - -- ... -end - ---- Behavior loop function for generic bowling ball spawner -function bhv_generic_bowling_ball_spawner_loop() - -- ... -end - ---- Behavior loop function for giant pole -function bhv_giant_pole_loop() - -- ... -end - ---- Behavior loop function for golden Coin sparkles -function bhv_golden_coin_sparkles_loop() - -- ... -end - ---- Behavior init function for Goomba -function bhv_goomba_init() - -- ... -end - ---- Behavior loop function for Goomba triplet spawner -function bhv_goomba_triplet_spawner_update() - -- ... -end - ---- Behavior loop function for Goomba -function bhv_goomba_update() - -- ... -end - ---- Behavior init function for Grand Star -function bhv_grand_star_init() - -- ... -end - ---- Behavior loop function for Grand Star -function bhv_grand_star_loop() - -- ... -end - ---- Behavior loop function for Grindel and Thwomp -function bhv_grindel_thwomp_loop() - -- ... -end - ---- Behavior init function for ground sand -function bhv_ground_sand_init() - -- ... -end - ---- Behavior init function for ground snow -function bhv_ground_snow_init() - -- ... -end - ---- Behavior loop function for Big Boo's Haunt haunted bookshelf -function bhv_haunted_bookshelf_loop() - -- ... -end - ---- Behavior loop function for haunted bookshelf manager -function bhv_haunted_bookshelf_manager_loop() - -- ... -end - ---- Behavior init function for Haunted Chair -function bhv_haunted_chair_init() - -- ... -end - ---- Behavior loop function for Haunted Chair -function bhv_haunted_chair_loop() - -- ... -end - ---- Behavior loop function for Heave ho -function bhv_heave_ho_loop() - -- ... -end - ---- Behavior loop function for Heave ho throwing Mario -function bhv_heave_ho_throw_mario_loop() - -- ... -end - ---- Behavior loop function for hidden Blue Coin -function bhv_hidden_blue_coin_loop() - -- ... -end - ---- Behavior loop function for Wet Dry World hidden breakable box -function bhv_hidden_object_loop() - -- ... -end - ---- Behavior init function for Hidden Red Coin Star -function bhv_hidden_red_coin_star_init() - -- ... -end - ---- Behavior loop function for Hidden Red Coin Star -function bhv_hidden_red_coin_star_loop() - -- ... -end - ---- Behavior init function for Secret Star -function bhv_hidden_star_init() - -- ... -end - ---- Behavior loop function for Secret Star -function bhv_hidden_star_loop() - -- ... -end - ---- Behavior loop function for Secrets -function bhv_hidden_star_trigger_loop() - -- ... -end - ---- Behavior init function for Homing Amp -function bhv_homing_amp_init() - -- ... -end - ---- Behavior loop function for Homing Amp -function bhv_homing_amp_loop() - -- ... -end - ---- Behavior init function for Hoot -function bhv_hoot_init() - -- ... -end - ---- Behavior loop function for Hoot -function bhv_hoot_loop() - -- ... -end - ---- Behavior init function for horizontal Grindel -function bhv_horizontal_grindel_init() - -- ... -end - ---- Behavior loop function for horizontal Grindel -function bhv_horizontal_grindel_update() - -- ... -end - ---- Behavior loop function for idle water wave -function bhv_idle_water_wave_loop() - -- ... -end - ---- Behavior init function for changing water level, called when Wet Dry World is loaded -function bhv_init_changing_water_level_loop() - -- ... -end - ---- Behavior loop function for intro Lakitu -function bhv_intro_lakitu_loop() - -- ... -end - ---- Behavior loop function for intro Peach -function bhv_intro_peach_loop() - -- ... -end - ---- Behavior loop function for intro scene -function bhv_intro_scene_loop() +--- Behavior loop function for Bowser key course exit +function bhv_bowser_key_course_exit_loop() -- ... end @@ -1324,128 +942,43 @@ function bhv_invisible_objects_under_bridge_loop() -- ... end ---- Behavior loop function for jet stream -function bhv_jet_stream_loop() +--- Behavior init function for Castle Basement water level pillar +function bhv_water_level_pillar_init() -- ... end ---- Behavior loop function for jet stream ring spawner -function bhv_jet_stream_ring_spawner_loop() +--- Behavior loop function for Castle Basement water level pillar +function bhv_water_level_pillar_loop() -- ... end ---- Behavior init function for jet stream water ring -function bhv_jet_stream_water_ring_init() +--- Behavior loop function for Castle Basement Dire Dire Docks warp collision +function bhv_ddd_warp_loop() -- ... end ---- Behavior loop function for jet stream water ring -function bhv_jet_stream_water_ring_loop() +--- Behavior loop function for moat grills +function bhv_moat_grills_loop() -- ... end ---- Behavior loop function for Jolly Roger Bay floating box -function bhv_jrb_floating_box_loop() +--- Behavior loop function for rotating clock arm +function bhv_rotating_clock_arm_loop() -- ... end ---- Behavior loop function for Jolly Roger Bay sliding box -function bhv_jrb_sliding_box_loop() +--- Behavior init function for Ukiki +function bhv_ukiki_init() -- ... end ---- Behavior loop function for jumping box -function bhv_jumping_box_loop() +--- Behavior loop function for Ukiki +function bhv_ukiki_loop() -- ... end ---- Behavior loop function for Whomp's Fortress kickable board -function bhv_kickable_board_loop() - -- ... -end - ---- Behavior loop function for King Bob-omb -function bhv_king_bobomb_loop() - -- ... -end - ---- Behavior init function for Klepto -function bhv_klepto_init() - -- ... -end - ---- Behavior loop function for Klepto -function bhv_klepto_update() - -- ... -end - ---- Behavior init function for Koopa -function bhv_koopa_init() - -- ... -end - ---- Behavior loop function for Koopa race endpoint -function bhv_koopa_race_endpoint_update() - -- ... -end - ---- Behavior loop function for Koopa Shell flame -function bhv_koopa_shell_flame_loop() - -- ... -end - ---- Behavior loop function for Koopa Shell -function bhv_koopa_shell_loop() - -- ... -end - ---- Behavior loop function for Koopa Shell underwater -function bhv_koopa_shell_underwater_loop() - -- ... -end - ---- Behavior loop function for Koopa -function bhv_koopa_update() - -- ... -end - ---- Behavior init function for Large Bomp (Whomp's Fortress moving wall with eyes) -function bhv_large_bomp_init() - -- ... -end - ---- Behavior loop function for Large Bomp (Whomp's Fortress moving wall with eyes) -function bhv_large_bomp_loop() - -- ... -end - ---- Behavior loop function for Lethal Lava Land bowser puzzle -function bhv_lll_bowser_puzzle_loop() - -- ... -end - ---- Behavior loop function for Lethal Lava Land bowser puzzle piece -function bhv_lll_bowser_puzzle_piece_loop() - -- ... -end - ---- Behavior loop function for Lethal Lava Land drawbridge -function bhv_lll_drawbridge_loop() - -- ... -end - ---- Behavior init function for Lethal Lava Land drawbridge spawner -function bhv_lll_drawbridge_spawner_init() - -- ... -end - ---- Behavior loop function for Lethal Lava Land drawbridge spawner -function bhv_lll_drawbridge_spawner_loop() - -- ... -end - ---- Behavior loop function for Lethal Lava Land floating wood bridge -function bhv_lll_floating_wood_bridge_loop() +--- Behavior loop function for Lethal Lava Land sinking rock block +function bhv_lll_sinking_rock_block_loop() -- ... end @@ -1454,11 +987,6 @@ function bhv_lll_moving_octagonal_mesh_platform_loop() -- ... end ---- Behavior init function for Lethal Lava Land rolling log -function bhv_lll_rolling_log_init() - -- ... -end - --- Behavior loop function for Lethal Lava Land rotating block fire bars function bhv_lll_rotating_block_fire_bars_loop() -- ... @@ -1469,6 +997,21 @@ function bhv_lll_rotating_hex_flame_loop() -- ... end +--- Behavior loop function for Lethal Lava Land wood piece +function bhv_lll_wood_piece_loop() + -- ... +end + +--- Behavior loop function for Lethal Lava Land floating wood bridge +function bhv_lll_floating_wood_bridge_loop() + -- ... +end + +--- Behavior loop function for Volcano flames +function bhv_volcano_flames_loop() + -- ... +end + --- Behavior loop function for Lethal Lava Land rotating hexagonal ring function bhv_lll_rotating_hexagonal_ring_loop() -- ... @@ -1479,43 +1022,359 @@ function bhv_lll_sinking_rectangular_platform_loop() -- ... end ---- Behavior loop function for Lethal Lava Land sinking rock block -function bhv_lll_sinking_rock_block_loop() - -- ... -end - --- Behavior loop function for Lethal Lava Land sinking square platforms function bhv_lll_sinking_square_platforms_loop() -- ... end ---- Behavior loop function for Lethal Lava Land wood piece -function bhv_lll_wood_piece_loop() +--- Behavior loop function for Koopa Shell +function bhv_koopa_shell_loop() -- ... end ---- Behavior loop function for Mad Piano -function bhv_mad_piano_update() +--- Behavior loop function for Koopa Shell flame +function bhv_koopa_shell_flame_loop() -- ... end ---- Behavior init function for Manta Ray -function bhv_manta_ray_init() +--- Behavior loop function for Tox Box +function bhv_tox_box_loop() -- ... end ---- Behavior loop function for Manta Ray -function bhv_manta_ray_loop() +--- @return integer +--- Checks if Mario is moving fast enough to make Piranha Plant bite. This one is a mouthful +function mario_moving_fast_enough_to_make_piranha_plant_bite() -- ... end ---- Behavior init function for Manta Ray water ring -function bhv_manta_ray_water_ring_init() +--- Behavior loop function for Piranha Plant +function bhv_piranha_plant_loop() -- ... end ---- Behavior loop function for Manta Ray water ring -function bhv_manta_ray_water_ring_loop() +--- Behavior loop function for Lethal Lava Land bowser puzzle piece +function bhv_lll_bowser_puzzle_piece_loop() + -- ... +end + +--- Behavior loop function for Lethal Lava Land bowser puzzle +function bhv_lll_bowser_puzzle_loop() + -- ... +end + +--- Behavior loop function for Tuxie's mother +function bhv_tuxies_mother_loop() + -- ... +end + +--- Behavior loop function for small penguin +function bhv_small_penguin_loop() + -- ... +end + +--- Behavior loop function for fish spawner +function bhv_fish_spawner_loop() + -- ... +end + +--- Behavior loop function for fish +function bhv_fish_loop() + -- ... +end + +--- Behavior loop function for Wet Dry World express elevator +function bhv_wdw_express_elevator_loop() + -- ... +end + +--- Behavior loop function for Bub spawner +function bhv_bub_spawner_loop() + -- ... +end + +--- Behavior loop function for Bub +function bhv_bub_loop() + -- ... +end + +--- Behavior init function for Exclamation Box +function bhv_exclamation_box_init() + -- ... +end + +--- Behavior loop function for Exclamation Box +function bhv_exclamation_box_loop() + -- ... +end + +--- Behavior loop function for rotating exclamation mark +function bhv_rotating_exclamation_box_loop() + -- ... +end + +--- Behavior init function for sound spawner +function bhv_sound_spawner_init() + -- ... +end + +--- Behavior loop function for Bowser's submarine +function bhv_bowsers_sub_loop() + -- ... +end + +--- Behavior loop function for Sushi Shark +function bhv_sushi_shark_loop() + -- ... +end + +--- Behavior loop function for Sushi Shark collision +function bhv_sushi_shark_collision_loop() + -- ... +end + +--- Behavior loop function for Jolly Roger Bay sliding box +function bhv_jrb_sliding_box_loop() + -- ... +end + +--- Behavior loop function for Jolly Roger Bay ship part 3 +function bhv_ship_part_3_loop() + -- ... +end + +--- Behavior loop function for Jolly Roger Bay sunken ship part +function bhv_sunken_ship_part_loop() + -- ... +end + +--- Behavior loop function for white puff 1 +function bhv_white_puff_1_loop() + -- ... +end + +--- Behavior loop function for white puff 2 +function bhv_white_puff_2_loop() + -- ... +end + +--- Behavior loop function for Blue Coin number +function bhv_blue_coin_number_loop() + -- ... +end + +--- Behavior init function for Blue Coin switch +function bhv_blue_coin_switch_init() + -- ... +end + +--- Behavior loop function for Blue Coin switch +function bhv_blue_coin_switch_loop() + -- ... +end + +--- Behavior loop function for hidden Blue Coin +function bhv_hidden_blue_coin_loop() + -- ... +end + +--- Behavior loop function for openable cage door +function bhv_openable_cage_door_loop() + -- ... +end + +--- Behavior loop function for openable grill +function bhv_openable_grill_loop() + -- ... +end + +--- Behavior loop function for Wet Dry World water level diamond +function bhv_water_level_diamond_loop() + -- ... +end + +--- Behavior init function for changing water level, called when Wet Dry World is loaded +function bhv_init_changing_water_level_loop() + -- ... +end + +--- Behavior loop function for Tweester sand particle +function bhv_tweester_sand_particle_loop() + -- ... +end + +--- Behavior loop function for Tweester +function bhv_tweester_loop() + -- ... +end + +--- Behavior loop function for Merry Go Round Boo manager +function bhv_merry_go_round_boo_manager_loop() + -- ... +end + +--- Behavior loop function for animated texture +function bhv_animated_texture_loop() + -- ... +end + +--- Behavior loop function for the Boo inside the Castle +function bhv_boo_in_castle_loop() + -- ... +end + +--- Behavior init function for Boo with cage +function bhv_boo_with_cage_init() + -- ... +end + +--- Behavior loop function for Boo with cage +function bhv_boo_with_cage_loop() + -- ... +end + +--- Behavior init function for Boo +function bhv_boo_init() + -- ... +end + +--- Behavior loop function for Big Boo +function bhv_big_boo_loop() + -- ... +end + +--- Behavior init function for Courtyard Boo triplet +function bhv_courtyard_boo_triplet_init() + -- ... +end + +--- Sets the secondary camera focus +function obj_set_secondary_camera_focus() + -- ... +end + +--- Behavior loop function for Boo +function bhv_boo_loop() + -- ... +end + +--- Behavior loop function for Boo boss spawned bridge +function bhv_boo_boss_spawned_bridge_loop() + -- ... +end + +--- Behavior loop function for Big Boo's Haunt tilting trap platform +function bhv_bbh_tilting_trap_platform_loop() + -- ... +end + +--- Behavior loop function for Big Boo's Haunt haunted bookshelf +function bhv_haunted_bookshelf_loop() + -- ... +end + +--- Behavior loop function for Big Boo's Haunt Merry Go Round +function bhv_merry_go_round_loop() + -- ... +end + +--- Behavior loop function for playing a jingle when in a 200 unit radius +function bhv_play_music_track_when_touched_loop() + -- ... +end + +--- Behavior loop function for beta Bowser anchor +function bhv_beta_bowser_anchor_loop() + -- ... +end + +--- Behavior loop function for static checkered platform +function bhv_static_checkered_platform_loop() + -- ... +end + +--- Behavior init function for Bowser in the Dark World floor trap manager +function bhv_castle_floor_trap_init() + -- ... +end + +--- Behavior loop function for Bowser in the Dark World floor trap manager +function bhv_castle_floor_trap_loop() + -- ... +end + +--- Behavior loop function for Bowser in the Dark World floor trap +function bhv_floor_trap_in_castle_loop() + -- ... +end + +--- Behavior loop function for sparkle spawner +function bhv_sparkle_spawn_loop() + -- ... +end + +--- Behavior loop function for Scuttlebug +function bhv_scuttlebug_loop() + -- ... +end + +--- Behavior loop function for Scuttlebug spawner +function bhv_scuttlebug_spawn_loop() + -- ... +end + +--- Behavior loop function for Whomp +function bhv_whomp_loop() + -- ... +end + +--- Behavior init function for spawning water splash droplets +function bhv_water_splash_spawn_droplets() + -- ... +end + +--- Behavior loop function for water droplet +function bhv_water_droplet_loop() + -- ... +end + +--- Behavior init function for water droplet splash +function bhv_water_droplet_splash_init() + -- ... +end + +--- Behavior init function for bubble splash +function bhv_bubble_splash_init() + -- ... +end + +--- Behavior loop function for idle water wave +function bhv_idle_water_wave_loop() + -- ... +end + +--- Behavior init function for shallow water splash +function bhv_shallow_water_splash_init() + -- ... +end + +--- Behavior loop function for shrinking water trail +function bhv_wave_trail_shrink() + -- ... +end + +--- Behavior loop function for strong wind particle +function bhv_strong_wind_particle_loop() + -- ... +end + +--- Behavior loop function for Snowman's Land snowman wind +function bhv_sl_snowman_wind_loop() + -- ... +end + +--- Behavior loop function for Snowman's Land walking penguin +function bhv_sl_walking_penguin_loop() -- ... end @@ -1539,83 +1398,18 @@ function bhv_menu_button_manager_loop() -- ... end ---- Behavior loop function for Merry Go Round Boo manager -function bhv_merry_go_round_boo_manager_loop() +--- Behavior loop function for Act Selector star type +function bhv_act_selector_star_type_loop() -- ... end ---- Behavior loop function for Big Boo's Haunt Merry Go Round -function bhv_merry_go_round_loop() +--- Behavior init function for Act Selector +function bhv_act_selector_init() -- ... end ---- Behavior init function for Metal Cap -function bhv_metal_cap_init() - -- ... -end - ---- Behavior loop function for Metal Cap -function bhv_metal_cap_loop() - -- ... -end - ---- Behavior init function for Mips -function bhv_mips_init() - -- ... -end - ---- Behavior loop function for Mips -function bhv_mips_loop() - -- ... -end - ---- Behavior loop function for moat grills -function bhv_moat_grills_loop() - -- ... -end - ---- Behavior loop function for Moneybag hidden -function bhv_moneybag_hidden_loop() - -- ... -end - ---- Behavior init function for Moneybag -function bhv_moneybag_init() - -- ... -end - ---- Behavior loop function for Moneybag -function bhv_moneybag_loop() - -- ... -end - ---- Behavior loop function for Monty Mole hole -function bhv_monty_mole_hole_update() - -- ... -end - ---- Behavior init function for Monty Mole -function bhv_monty_mole_init() - -- ... -end - ---- Behavior loop function for Monty Mole rock -function bhv_monty_mole_rock_update() - -- ... -end - ---- Behavior loop function for Monty Mole -function bhv_monty_mole_update() - -- ... -end - ---- Behavior init function for moving Blue Coin -function bhv_moving_blue_coin_init() - -- ... -end - ---- Behavior loop function for moving Blue Coin -function bhv_moving_blue_coin_loop() +--- Behavior loop function for Act Selector +function bhv_act_selector_loop() -- ... end @@ -1629,43 +1423,138 @@ function bhv_moving_yellow_coin_loop() -- ... end ---- Behavior init function for Mr. Blizzard -function bhv_mr_blizzard_init() +--- Behavior init function for moving Blue Coin +function bhv_moving_blue_coin_init() -- ... end ---- Behavior loop function for Mr. Blizzard's snowball -function bhv_mr_blizzard_snowball() +--- Behavior loop function for moving Blue Coin +function bhv_moving_blue_coin_loop() -- ... end ---- Behavior loop function for Mr. Blizzard -function bhv_mr_blizzard_update() +--- Behavior init function for Blue Coin sliding jumping +function bhv_blue_coin_sliding_jumping_init() -- ... end ---- Behavior loop function for Mr. I body -function bhv_mr_i_body_loop() +--- Behavior loop function for Blue Coin sliding +function bhv_blue_coin_sliding_loop() -- ... end ---- Behavior loop function for Mr. I -function bhv_mr_i_loop() +--- Behavior loop function for Blue Coin jumping +function bhv_blue_coin_jumping_loop() -- ... end ---- Behavior loop function for Mr. I particle -function bhv_mr_i_particle_loop() +--- Behavior init function for seaweed +function bhv_seaweed_init() -- ... end ---- Behavior init function for Normal Cap -function bhv_normal_cap_init() +--- Behavior init function for seaweed bundle +function bhv_seaweed_bundle_init() -- ... end ---- Behavior loop function for Normal Cap -function bhv_normal_cap_loop() +--- Behavior init function for Bob-omb +function bhv_bobomb_init() + -- ... +end + +--- Behavior loop function for Bob-omb +function bhv_bobomb_loop() + -- ... +end + +--- Behavior init function for Bob-omb fuse smoke +function bhv_bobomb_fuse_smoke_init() + -- ... +end + +--- Behavior init function for Bob-omb buddy +function bhv_bobomb_buddy_init() + -- ... +end + +--- Behavior loop function for Bob-omb buddy +function bhv_bobomb_buddy_loop() + -- ... +end + +--- Behavior init function for cannon closed +function bhv_cannon_closed_init() + -- ... +end + +--- Behavior loop function for cannon closed +function bhv_cannon_closed_loop() + -- ... +end + +--- Behavior init function for whirlpool +function bhv_whirlpool_init() + -- ... +end + +--- Behavior loop function for whirlpool +function bhv_whirlpool_loop() + -- ... +end + +--- Behavior loop function for jet stream +function bhv_jet_stream_loop() + -- ... +end + +--- Behavior init function for Homing Amp +function bhv_homing_amp_init() + -- ... +end + +--- Behavior loop function for Homing Amp +function bhv_homing_amp_loop() + -- ... +end + +--- Behavior init function for Circling Amp +function bhv_circling_amp_init() + -- ... +end + +--- Behavior loop function for Circling Amp +function bhv_circling_amp_loop() + -- ... +end + +--- Behavior init function for Butterfly +function bhv_butterfly_init() + -- ... +end + +--- Behavior loop function for Butterfly +function bhv_butterfly_loop() + -- ... +end + +--- Behavior init function for Hoot +function bhv_hoot_init() + -- ... +end + +--- Behavior loop function for Hoot +function bhv_hoot_loop() + -- ... +end + +--- Behavior init function for beta holdable object +function bhv_beta_holdable_object_init() + -- ... +end + +--- Behavior loop function for beta holdable object +function bhv_beta_holdable_object_loop() -- ... end @@ -1689,148 +1578,253 @@ function bhv_object_water_wave_loop() -- ... end ---- Behavior loop function for openable cage door -function bhv_openable_cage_door_loop() +--- Behavior init function for explosion +function bhv_explosion_init() -- ... end ---- Behavior loop function for openable grill -function bhv_openable_grill_loop() +--- Behavior loop function for explosion +function bhv_explosion_loop() -- ... end ---- Behavior init function for orange number -function bhv_orange_number_init() +--- Behavior init function for Bob-omb and Bully death smoke +function bhv_bobomb_bully_death_smoke_init() -- ... end ---- Behavior loop function for orange number -function bhv_orange_number_loop() +--- Behavior init function for Bob-omb explosion bubble +function bhv_bobomb_explosion_bubble_init() -- ... end ---- Behavior init function for particle -function bhv_particle_init() +--- Behavior loop function for Bob-omb explosion bubble +function bhv_bobomb_explosion_bubble_loop() -- ... end ---- Behavior loop function for particle -function bhv_particle_loop() +--- Behavior loop function for respawner +function bhv_respawner_loop() -- ... end ---- Behavior loop function for Penguin race finish line -function bhv_penguin_race_finish_line_update() +--- Behavior init function for Small Bully +function bhv_small_bully_init() -- ... end ---- Behavior loop function for Penguin race shortcut check -function bhv_penguin_race_shortcut_check_update() +--- Behavior loop function for Bully +function bhv_bully_loop() -- ... end ---- Behavior loop function for Piranha particle -function bhv_piranha_particle_loop() +--- Behavior init function for Big Bully +function bhv_big_bully_init() -- ... end ---- Behavior loop function for Piranha Plant bubble -function bhv_piranha_plant_bubble_loop() +--- Behavior init function for Big Bully with minions +function bhv_big_bully_with_minions_init() -- ... end ---- Behavior loop function for Piranha Plant -function bhv_piranha_plant_loop() +--- Behavior loop function for Big Bully with minions +function bhv_big_bully_with_minions_loop() -- ... end ---- Behavior loop function for Piranha Plant waking bubbles -function bhv_piranha_plant_waking_bubbles_loop() +--- Behavior loop function for jet stream ring spawner +function bhv_jet_stream_ring_spawner_loop() -- ... end ---- Behavior init function for Bowser in the Dark World, Lethal Lava Land, and Bowser in the Fire Sea platform normals -function bhv_platform_normals_init() +--- Behavior init function for jet stream water ring +function bhv_jet_stream_water_ring_init() -- ... end ---- Behavior init function for platform on track -function bhv_platform_on_track_init() +--- Behavior loop function for jet stream water ring +function bhv_jet_stream_water_ring_loop() -- ... end ---- Behavior loop function for platform on track -function bhv_platform_on_track_update() +--- Behavior init function for Manta Ray water ring +function bhv_manta_ray_water_ring_init() -- ... end ---- Behavior loop function for playing a jingle when in a 200 unit radius -function bhv_play_music_track_when_touched_loop() +--- Behavior loop function for Manta Ray water ring +function bhv_manta_ray_water_ring_loop() -- ... end ---- Behavior init function for the lighting engine point light. Takes the first 3 behavior parameter bytes for RGB color and the last for radius -function bhv_point_light_init() +--- Behavior loop function for Bowser bomb +function bhv_bowser_bomb_loop() -- ... end ---- Behavior loop function for the lighting engine point light -function bhv_point_light_loop() +--- Behavior loop function for Bowser bomb explosion +function bhv_bowser_bomb_explosion_loop() -- ... end ---- Behavior loop function for Pokey body part -function bhv_pokey_body_part_update() +--- Behavior loop function for Bowser bomb smoke +function bhv_bowser_bomb_smoke_loop() -- ... end ---- Behavior loop function for Pokey -function bhv_pokey_update() +--- Behavior init function for Celebration Star +function bhv_celebration_star_init() -- ... end ---- Behavior loop function for pole base -function bhv_pole_base_loop() +--- Behavior loop function for Celebration Star +function bhv_celebration_star_loop() -- ... end ---- Behavior init function for pole -function bhv_pole_init() +--- Behavior loop function for Celebration Star sparkle +function bhv_celebration_star_sparkle_loop() -- ... end ---- Behavior init function for tiny pound star particle -function bhv_pound_tiny_star_particle_init() +--- Behavior loop function for Star and key collection puff spawner +function bhv_star_key_collection_puff_spawner_loop() -- ... end ---- Behavior loop function for tiny pound star particle -function bhv_pound_tiny_star_particle_loop() +--- Behavior init function for Lethal Lava Land drawbridge spawner +function bhv_lll_drawbridge_spawner_init() -- ... end ---- Behavior init function for pound white puffs -function bhv_pound_white_puffs_init() +--- Behavior loop function for Lethal Lava Land drawbridge spawner +function bhv_lll_drawbridge_spawner_loop() -- ... end ---- Behavior init function for tiny punch triangle -function bhv_punch_tiny_triangle_init() +--- Behavior loop function for Lethal Lava Land drawbridge +function bhv_lll_drawbridge_loop() -- ... end ---- Behavior loop function for tiny punch triangle -function bhv_punch_tiny_triangle_loop() +--- Behavior init function for Small Bomp (Whomp's Fortress moving wall with eyes) +function bhv_small_bomp_init() -- ... end ---- Behavior loop function for Purple Switch -function bhv_purple_switch_loop() +--- Behavior loop function for Small Bomp (Whomp's Fortress moving wall with eyes) +function bhv_small_bomp_loop() -- ... end ---- Behavior loop function for pushable metal box -function bhv_pushable_loop() +--- Behavior init function for Large Bomp (Whomp's Fortress moving wall with eyes) +function bhv_large_bomp_init() + -- ... +end + +--- Behavior loop function for Large Bomp (Whomp's Fortress moving wall with eyes) +function bhv_large_bomp_loop() + -- ... +end + +--- Behavior init function for Whomp's Fortress sliding platform +function bhv_wf_sliding_platform_init() + -- ... +end + +--- Behavior loop function for Whomp's Fortress sliding platform +function bhv_wf_sliding_platform_loop() + -- ... +end + +--- Behavior init function for Moneybag +function bhv_moneybag_init() + -- ... +end + +--- Behavior loop function for Moneybag +function bhv_moneybag_loop() + -- ... +end + +--- Behavior loop function for Moneybag hidden +function bhv_moneybag_hidden_loop() + -- ... +end + +--- Behavior init function for Bob-omb Battlefield pit bowling ball +function bhv_bob_pit_bowling_ball_init() + -- ... +end + +--- Behavior loop function for Bob-omb Battlefield pit bowling ball +function bhv_bob_pit_bowling_ball_loop() + -- ... +end + +--- Behavior init function for free bowling ball +function bhv_free_bowling_ball_init() + -- ... +end + +--- Behavior loop function for free bowling ball +function bhv_free_bowling_ball_loop() + -- ... +end + +--- Behavior init function for bowling ball +function bhv_bowling_ball_init() + -- ... +end + +--- Behavior loop function for bowling ball +function bhv_bowling_ball_loop() + -- ... +end + +--- Behavior init function for generic bowling ball spawner +function bhv_generic_bowling_ball_spawner_init() + -- ... +end + +--- Behavior loop function for generic bowling ball spawner +function bhv_generic_bowling_ball_spawner_loop() + -- ... +end + +--- Behavior loop function for Tiny Huge Island bowling ball spawner +function bhv_thi_bowling_ball_spawner_loop() + -- ... +end + +--- Behavior init function for Rainbow Ride cruiser wing +function bhv_rr_cruiser_wing_init() + -- ... +end + +--- Behavior loop function for Rainbow Ride cruiser wing +function bhv_rr_cruiser_wing_loop() + -- ... +end + +--- Behavior init function for Spindel +function bhv_spindel_init() + -- ... +end + +--- Behavior loop function for Spindel +function bhv_spindel_loop() + -- ... +end + +--- Behavior init function for Ssl moving pyramid wall +function bhv_ssl_moving_pyramid_wall_init() + -- ... +end + +--- Behavior loop function for Ssl moving pyramid wall +function bhv_ssl_moving_pyramid_wall_loop() -- ... end @@ -1849,8 +1843,13 @@ function bhv_pyramid_elevator_trajectory_marker_ball_loop() -- ... end ---- Behavior loop function for Pyramid pillar touch detector -function bhv_pyramid_pillar_touch_detector_loop() +--- Behavior init function for Pyramid top +function bhv_pyramid_top_init() + -- ... +end + +--- Behavior loop function for Pyramid top +function bhv_pyramid_top_loop() -- ... end @@ -1864,93 +1863,33 @@ function bhv_pyramid_top_fragment_loop() -- ... end ---- Behavior init function for Pyramid top -function bhv_pyramid_top_init() +--- Behavior loop function for Pyramid pillar touch detector +function bhv_pyramid_pillar_touch_detector_loop() -- ... end ---- Behavior loop function for Pyramid top -function bhv_pyramid_top_loop() +--- Behavior loop function for waterfall sound +function bhv_waterfall_sound_loop() -- ... end ---- Behavior init function for Racing Penguin -function bhv_racing_penguin_init() +--- Behavior loop function for volcano sound +function bhv_volcano_sound_loop() -- ... end ---- Behavior loop function for Racing Penguin -function bhv_racing_penguin_update() +--- Behavior init function for castle flag +function bhv_castle_flag_init() -- ... end ---- Behavior loop function for Recovery Heart -function bhv_recovery_heart_loop() +--- Behavior loop function for birds sound +function bhv_birds_sound_loop() -- ... end ---- Behavior init function for Red Coin -function bhv_red_coin_init() - -- ... -end - ---- Behavior loop function for Red Coin -function bhv_red_coin_loop() - -- ... -end - ---- Behavior init function for Red Coin Star marker -function bhv_red_coin_star_marker_init() - -- ... -end - ---- Behavior loop function for respawner -function bhv_respawner_loop() - -- ... -end - ---- Behavior loop function for rolling log -function bhv_rolling_log_loop() - -- ... -end - ---- Behavior loop function for rotating clock arm -function bhv_rotating_clock_arm_loop() - -- ... -end - ---- Behavior loop function for rotating exclamation mark -function bhv_rotating_exclamation_box_loop() - -- ... -end - ---- Behavior init function for Rotating octagonal platform in Rainbow Ride and Bowser in the Sky -function bhv_rotating_octagonal_plat_init() - -- ... -end - ---- Behavior loop function for Rotating octagonal platform in Rainbow Ride and Bowser in the Sky -function bhv_rotating_octagonal_plat_loop() - -- ... -end - ---- Behavior loop function for rotating platform -function bhv_rotating_platform_loop() - -- ... -end - ---- Behavior init function for Rainbow Ride cruiser wing -function bhv_rr_cruiser_wing_init() - -- ... -end - ---- Behavior loop function for Rainbow Ride cruiser wing -function bhv_rr_cruiser_wing_loop() - -- ... -end - ---- Behavior loop function for Rainbow Ride rotating bridge platform -function bhv_rr_rotating_bridge_platform_loop() +--- Behavior init function for ambient sounds +function bhv_ambient_sounds_init() -- ... end @@ -1959,128 +1898,8 @@ function bhv_sand_sound_loop() -- ... end ---- Behavior loop function for Scuttlebug -function bhv_scuttlebug_loop() - -- ... -end - ---- Behavior loop function for Scuttlebug spawner -function bhv_scuttlebug_spawn_loop() - -- ... -end - ---- Behavior init function for seaweed bundle -function bhv_seaweed_bundle_init() - -- ... -end - ---- Behavior init function for seaweed -function bhv_seaweed_init() - -- ... -end - ---- Behavior init function for seesaw platform -function bhv_seesaw_platform_init() - -- ... -end - ---- Behavior loop function for seesaw platform -function bhv_seesaw_platform_update() - -- ... -end - ---- Behavior init function for shallow water splash -function bhv_shallow_water_splash_init() - -- ... -end - ---- Behavior loop function for Jolly Roger Bay ship part 3 -function bhv_ship_part_3_loop() - -- ... -end - ---- Behavior loop function for Skeeter -function bhv_skeeter_update() - -- ... -end - ---- Behavior loop function for Skeeter wave -function bhv_skeeter_wave_update() - -- ... -end - ---- Behavior loop function for Snowman's Land snowman wind -function bhv_sl_snowman_wind_loop() - -- ... -end - ---- Behavior loop function for Snowman's Land walking penguin -function bhv_sl_walking_penguin_loop() - -- ... -end - ---- Behavior init function for sliding platform 2 in Rainbow Ride and Bowser courses -function bhv_sliding_plat_2_init() - -- ... -end - ---- Behavior loop function for sliding platform 2 in Rainbow Ride and Bowser courses -function bhv_sliding_plat_2_loop() - -- ... -end - ---- Behavior loop function for sliding snow mound -function bhv_sliding_snow_mound_loop() - -- ... -end - ---- Behavior init function for Small Bomp (Whomp's Fortress moving wall with eyes) -function bhv_small_bomp_init() - -- ... -end - ---- Behavior loop function for Small Bomp (Whomp's Fortress moving wall with eyes) -function bhv_small_bomp_loop() - -- ... -end - ---- Behavior loop function for small bubbles -function bhv_small_bubbles_loop() - -- ... -end - ---- Behavior init function for Small Bully -function bhv_small_bully_init() - -- ... -end - ---- Behavior loop function for small penguin -function bhv_small_penguin_loop() - -- ... -end - ---- Behavior loop function for Small Piranha flame -function bhv_small_piranha_flame_loop() - -- ... -end - ---- Behavior loop function for small water wave -function bhv_small_water_wave_loop() - -- ... -end - ---- Behavior init function for snow leaf particle spawn -function bhv_snow_leaf_particle_spawn_init() - -- ... -end - ---- Behavior loop function for snow mound spawn -function bhv_snow_mound_spawn_loop() - -- ... -end - ---- Behavior loop function for Snowman's body checkpoint -function bhv_snowmans_body_checkpoint_loop() +--- Behavior init function for Castle cannon grate +function bhv_castle_cannon_grate_init() -- ... end @@ -2104,106 +1923,58 @@ function bhv_snowmans_head_loop() -- ... end ---- Behavior loop function for Snufit balls -function bhv_snufit_balls_loop() +--- Behavior loop function for Snowman's body checkpoint +function bhv_snowmans_body_checkpoint_loop() -- ... end ---- Behavior loop function for Snufit -function bhv_snufit_loop() +--- Behavior init function for big boulder +function bhv_big_boulder_init() -- ... end ---- Behavior init function for sound spawner -function bhv_sound_spawner_init() +--- Behavior loop function for big boulder +function bhv_big_boulder_loop() -- ... end ---- Behavior loop function for sparkle spawner -function bhv_sparkle_spawn_loop() +--- Behavior loop function for big boulder generator +function bhv_big_boulder_generator_loop() -- ... end ---- @param object Object ---- @param params integer ---- @param networkSendEvent integer ---- Spawns a Star parented to `object` that won't make Mario exit the level with an ID corresponding to `params`' first byte -function bhv_spawn_star_no_level_exit(object, params, networkSendEvent) +--- Behavior init function for Wing Cap +function bhv_wing_cap_init() -- ... end ---- Behavior init function for spawned star -function bhv_spawned_star_init() +--- Behavior loop function for Wing and Vanish caps +function bhv_wing_vanish_cap_loop() -- ... end ---- Behavior loop function for Spawned star -function bhv_spawned_star_loop() +--- Behavior init function for Metal Cap +function bhv_metal_cap_init() -- ... end ---- Behavior init function for Spindel -function bhv_spindel_init() +--- Behavior loop function for Metal Cap +function bhv_metal_cap_loop() -- ... end ---- Behavior loop function for Spindel -function bhv_spindel_loop() +--- Behavior init function for Normal Cap +function bhv_normal_cap_init() -- ... end ---- Behavior loop function for Spindrift -function bhv_spindrift_loop() +--- Behavior loop function for Normal Cap +function bhv_normal_cap_loop() -- ... end ---- Behavior loop function for Spiny -function bhv_spiny_update() - -- ... -end - ---- Behavior loop function for Bowser in the Dark World squarish path moving -function bhv_squarish_path_moving_loop() - -- ... -end - ---- Behavior init function for Bowser in the Dark World squarish path parent -function bhv_squarish_path_parent_init() - -- ... -end - ---- Behavior loop function for Bowser in the Dark World Ssuarish path parent -function bhv_squarish_path_parent_loop() - -- ... -end - ---- Behavior loop function for squishable platform -function bhv_squishable_platform_loop() - -- ... -end - ---- Behavior init function for Ssl moving pyramid wall -function bhv_ssl_moving_pyramid_wall_init() - -- ... -end - ---- Behavior loop function for Ssl moving pyramid wall -function bhv_ssl_moving_pyramid_wall_loop() - -- ... -end - ---- Behavior loop function for Star Door -function bhv_star_door_loop() - -- ... -end - ---- Behavior loop function for Star Door -function bhv_star_door_loop_2() - -- ... -end - ---- Behavior loop function for Star and key collection puff spawner -function bhv_star_key_collection_puff_spawner_loop() +--- Behavior init function for Vanish Cap +function bhv_vanish_cap_init() -- ... end @@ -2212,6 +1983,21 @@ function bhv_star_number_loop() -- ... end +--- Spawns a star number +function spawn_star_number() + -- ... +end + +--- Behavior init function for collectable Star +function bhv_collect_star_init() + -- ... +end + +--- Behavior loop function for collectable Star +function bhv_collect_star_loop() + -- ... +end + --- Behavior init function for Star spawn function bhv_star_spawn_init() -- ... @@ -2222,138 +2008,218 @@ function bhv_star_spawn_loop() -- ... end ---- Behavior loop function for static checkered platform -function bhv_static_checkered_platform_loop() +--- Behavior init function for Hidden Red Coin Star +function bhv_hidden_red_coin_star_init() -- ... end ---- Behavior loop function for strong wind particle -function bhv_strong_wind_particle_loop() +--- Behavior loop function for Hidden Red Coin Star +function bhv_hidden_red_coin_star_loop() -- ... end ---- Behavior loop function for Jolly Roger Bay sunken ship part -function bhv_sunken_ship_part_loop() +--- Behavior init function for Red Coin +function bhv_red_coin_init() -- ... end ---- Behavior loop function for Sushi Shark collision -function bhv_sushi_shark_collision_loop() +--- Behavior loop function for Red Coin +function bhv_red_coin_loop() -- ... end ---- Behavior loop function for Sushi Shark -function bhv_sushi_shark_loop() +--- Behavior loop function for Bowser course Red Coin Star +function bhv_bowser_course_red_coin_star_loop() -- ... end ---- Behavior init function for swing platform -function bhv_swing_platform_init() +--- Behavior init function for Secret Star +function bhv_hidden_star_init() -- ... end ---- Behavior loop function for swing platform -function bhv_swing_platform_update() +--- Behavior loop function for Secret Star +function bhv_hidden_star_loop() -- ... end ---- Behavior loop function for Swoop -function bhv_swoop_update() +--- Behavior loop function for Secrets +function bhv_hidden_star_trigger_loop() -- ... end ---- Behavior loop function for tank fish group -function bhv_tank_fish_group_loop() +--- Behavior init function for Tall, Tall Mountain rolling log +function bhv_ttm_rolling_log_init() -- ... end ---- Behavior loop function for despawning Coin -function bhv_temp_coin_loop() +--- Behavior loop function for rolling log +function bhv_rolling_log_loop() -- ... end ---- Behavior loop function for Tiny Huge Island bowling ball spawner -function bhv_thi_bowling_ball_spawner_loop() +--- Behavior init function for Lethal Lava Land rolling log +function bhv_lll_rolling_log_init() -- ... end ---- Behavior loop function for Tiny Huge Island huge island top -function bhv_thi_huge_island_top_loop() +--- Behavior init function for 1-Up trigger +function bhv_1up_trigger_init() -- ... end ---- Behavior loop function for Tiny Huge Island tiny island top -function bhv_thi_tiny_island_top_loop() +--- Behavior init function for common 1-Up +function bhv_1up_common_init() -- ... end ---- Behavior init function for tilting Bowser in the Fire Sea arena platform -function bhv_tilting_bowser_lava_platform_init() +--- Behavior loop function for walking 1-Up +function bhv_1up_walking_loop() -- ... end ---- Behavior loop function for Lethal Lava Land and Bowser in the Fire Sea tilting inverted pyramid -function bhv_tilting_inverted_pyramid_loop() +--- Behavior loop function for running away 1-Up +function bhv_1up_running_away_loop() -- ... end ---- Behavior init function for tiny Star particles -function bhv_tiny_star_particles_init() +--- Behavior loop function for sliding 1-Up +function bhv_1up_sliding_loop() -- ... end ---- Behavior loop function for Whomp's Fortress tower door -function bhv_tower_door_loop() +--- Behavior init function for 1-Up +function bhv_1up_init() -- ... end ---- Behavior init function for Whomp's Fortress tower platform group -function bhv_tower_platform_group_init() +--- Behavior loop function for 1-Up +function bhv_1up_loop() -- ... end ---- Behavior loop function for Whomp's Fortress tower platform group -function bhv_tower_platform_group_loop() +--- Behavior loop function for jump on approach 1-Up +function bhv_1up_jump_on_approach_loop() -- ... end ---- Behavior loop function for Tox Box -function bhv_tox_box_loop() +--- Behavior loop function for hidden 1-Up +function bhv_1up_hidden_loop() -- ... end ---- Behavior loop function for track ball -function bhv_track_ball_update() +--- Behavior loop function for hidden 1-Up trigger +function bhv_1up_hidden_trigger_loop() -- ... end ---- Behavior init function for treasure chest bottom -function bhv_treasure_chest_bottom_init() +--- Behavior loop function for hidden 1-Up in pole (Green Demon) +function bhv_1up_hidden_in_pole_loop() -- ... end ---- Behavior loop function for treasure chest bottom -function bhv_treasure_chest_bottom_loop() +--- Behavior loop function for 1-Up hidden in pole trigger +function bhv_1up_hidden_in_pole_trigger_loop() -- ... end ---- Behavior init function for treasure chest -function bhv_treasure_chest_init() +--- Behavior loop function for 1-Up hidden in pole spawner +function bhv_1up_hidden_in_pole_spawner_loop() -- ... end ---- Behavior init function for treasure chest jrb -function bhv_treasure_chest_jrb_init() +--- Behavior init function for controllable platform +function bhv_controllable_platform_init() -- ... end ---- Behavior loop function for treasure chest jrb -function bhv_treasure_chest_jrb_loop() +--- Behavior loop function for controllable platform +function bhv_controllable_platform_loop() -- ... end ---- Behavior loop function for treasure chest -function bhv_treasure_chest_loop() +--- Behavior loop function for controllable sub platform +function bhv_controllable_platform_sub_loop() + -- ... +end + +--- Behavior init function for small breakable box +function bhv_breakable_box_small_init() + -- ... +end + +--- Behavior loop function for small breakable box +function bhv_breakable_box_small_loop() + -- ... +end + +--- Behavior loop function for sliding snow mound +function bhv_sliding_snow_mound_loop() + -- ... +end + +--- Behavior loop function for snow mound spawn +function bhv_snow_mound_spawn_loop() + -- ... +end + +--- Behavior loop function for floating platform +function bhv_floating_platform_loop() + -- ... +end + +--- Behavior loop function for Wet Dry World arrow lift +function bhv_arrow_lift_loop() + -- ... +end + +--- Behavior init function for orange number +function bhv_orange_number_init() + -- ... +end + +--- Behavior loop function for orange number +function bhv_orange_number_loop() + -- ... +end + +--- Behavior init function for Manta Ray +function bhv_manta_ray_init() + -- ... +end + +--- Behavior loop function for Manta Ray +function bhv_manta_ray_loop() + -- ... +end + +--- Behavior init function for Jolly Roger Bay falling pillar +function bhv_falling_pillar_init() + -- ... +end + +--- Behavior loop function for Jolly Roger Bay falling pillar +function bhv_falling_pillar_loop() + -- ... +end + +--- Behavior loop function for Jolly Roger Bay falling pillar hitbox +function bhv_falling_pillar_hitbox_loop() + -- ... +end + +--- Behavior loop function for Jolly Roger Bay floating box +function bhv_jrb_floating_box_loop() + -- ... +end + +--- Behavior init function for decorative pendulum +function bhv_decorative_pendulum_init() + -- ... +end + +--- Behavior loop function for decorative pendulum +function bhv_decorative_pendulum_loop() -- ... end @@ -2367,78 +2233,243 @@ function bhv_treasure_chest_ship_loop() -- ... end +--- Behavior init function for treasure chest jrb +function bhv_treasure_chest_jrb_init() + -- ... +end + +--- Behavior loop function for treasure chest jrb +function bhv_treasure_chest_jrb_loop() + -- ... +end + +--- Behavior init function for treasure chest +function bhv_treasure_chest_init() + -- ... +end + +--- Behavior loop function for treasure chest +function bhv_treasure_chest_loop() + -- ... +end + +--- Behavior init function for treasure chest bottom +function bhv_treasure_chest_bottom_init() + -- ... +end + +--- Behavior loop function for treasure chest bottom +function bhv_treasure_chest_bottom_loop() + -- ... +end + --- Behavior loop function for treasure chest top function bhv_treasure_chest_top_loop() -- ... end ---- Behavior loop function for tree snow or leaf particle -function bhv_tree_snow_or_leaf_loop() +--- Behavior init function for Mips +function bhv_mips_init() -- ... end ---- Behavior loop function for a triplet of butterflies -function bhv_triplet_butterfly_update() +--- Behavior loop function for Mips +function bhv_mips_loop() -- ... end ---- Behavior init function for Tick Tock Clock 2D rotator -function bhv_ttc_2d_rotator_init() +--- Behavior init function for Yoshi +function bhv_yoshi_init() -- ... end ---- Behavior loop function for Tick Tock Clock 2D rotator -function bhv_ttc_2d_rotator_update() +--- Behavior init function for Koopa +function bhv_koopa_init() -- ... end ---- Behavior init function for Tick Tock Clock cog -function bhv_ttc_cog_init() +--- Behavior loop function for Koopa +function bhv_koopa_update() -- ... end ---- Behavior loop function for Tick Tock Clock cog -function bhv_ttc_cog_update() +--- Behavior loop function for Koopa race endpoint +function bhv_koopa_race_endpoint_update() -- ... end ---- Behavior init function for Tick Tock Clock elevator -function bhv_ttc_elevator_init() +--- Behavior loop function for Pokey +function bhv_pokey_update() -- ... end ---- Behavior loop function for Tick Tock Clock elevator -function bhv_ttc_elevator_update() +--- Behavior loop function for Pokey body part +function bhv_pokey_body_part_update() -- ... end ---- Behavior init function for Tick Tock Clock moving bar -function bhv_ttc_moving_bar_init() +--- Behavior loop function for Swoop +function bhv_swoop_update() -- ... end ---- Behavior loop function for Tick Tock Clock moving bar -function bhv_ttc_moving_bar_update() +--- Behavior loop function for Fly Guy +function bhv_fly_guy_update() -- ... end ---- Behavior init function for Tick Tock Clock pendulum -function bhv_ttc_pendulum_init() +--- Behavior init function for Goomba +function bhv_goomba_init() -- ... end ---- Behavior loop function for Tick Tock Clock pendulum -function bhv_ttc_pendulum_update() +--- Behavior loop function for Goomba +function bhv_goomba_update() -- ... end ---- Behavior init function for Tick Tock Clock pit block -function bhv_ttc_pit_block_init() +--- Behavior loop function for Goomba triplet spawner +function bhv_goomba_triplet_spawner_update() -- ... end ---- Behavior loop function for Tick Tock Clock pit block -function bhv_ttc_pit_block_update() +--- Behavior loop function for Chain Chomp +function bhv_chain_chomp_update() + -- ... +end + +--- Behavior loop function for Chain Chomp chain part +function bhv_chain_chomp_chain_part_update() + -- ... +end + +--- Behavior loop function for ground poundable wooden post +function bhv_wooden_post_update() + -- ... +end + +--- Behavior init function for Chain Chomp gate +function bhv_chain_chomp_gate_init() + -- ... +end + +--- Behavior loop function for Chain Chomp gate +function bhv_chain_chomp_gate_update() + -- ... +end + +--- Behavior loop function for Wiggler +function bhv_wiggler_update() + -- ... +end + +--- Behavior loop function for Wiggler body part +function bhv_wiggler_body_part_update() + -- ... +end + +--- Behavior loop function for Enemy Lakitu +function bhv_enemy_lakitu_update() + -- ... +end + +--- Behavior init function for Camera Lakitu +function bhv_camera_lakitu_init() + -- ... +end + +--- Behavior loop function for Camera Lakitu +function bhv_camera_lakitu_update() + -- ... +end + +--- Behavior loop function for cloud +function bhv_cloud_update() + -- ... +end + +--- Behavior loop function for cloud part +function bhv_cloud_part_update() + -- ... +end + +--- Behavior loop function for Spiny +function bhv_spiny_update() + -- ... +end + +--- Behavior init function for Monty Mole +function bhv_monty_mole_init() + -- ... +end + +--- Behavior loop function for Monty Mole +function bhv_monty_mole_update() + -- ... +end + +--- Behavior loop function for Monty Mole hole +function bhv_monty_mole_hole_update() + -- ... +end + +--- Behavior loop function for Monty Mole rock +function bhv_monty_mole_rock_update() + -- ... +end + +--- Behavior init function for platform on track +function bhv_platform_on_track_init() + -- ... +end + +--- Behavior loop function for platform on track +function bhv_platform_on_track_update() + -- ... +end + +--- Behavior loop function for track ball +function bhv_track_ball_update() + -- ... +end + +--- Behavior init function for seesaw platform +function bhv_seesaw_platform_init() + -- ... +end + +--- Behavior loop function for seesaw platform +function bhv_seesaw_platform_update() + -- ... +end + +--- Behavior init function for ferris wheel axle +function bhv_ferris_wheel_axle_init() + -- ... +end + +--- Behavior init function for ferris wheel platform +function bhv_ferris_wheel_platform_init() + -- ... +end + +--- Behavior loop function for ferris wheel platform +function bhv_ferris_wheel_platform_update() + -- ... +end + +--- Behavior loop function for water bomb spawner +function bhv_water_bomb_spawner_update() + -- ... +end + +--- Behavior loop function for water bomb +function bhv_water_bomb_update() + -- ... +end + +--- Behavior loop function for water bomb shadow +function bhv_water_bomb_shadow_update() -- ... end @@ -2452,8 +2483,13 @@ function bhv_ttc_rotating_solid_update() -- ... end ---- Behavior loop function for Tick Tock Clock spinner -function bhv_ttc_spinner_update() +--- Behavior init function for Tick Tock Clock pendulum +function bhv_ttc_pendulum_init() + -- ... +end + +--- Behavior loop function for Tick Tock Clock pendulum +function bhv_ttc_pendulum_update() -- ... end @@ -2467,53 +2503,128 @@ function bhv_ttc_treadmill_update() -- ... end ---- Behavior init function for Tall, Tall Mountain rolling log -function bhv_ttm_rolling_log_init() +--- Behavior init function for Tick Tock Clock moving bar +function bhv_ttc_moving_bar_init() -- ... end ---- Behavior loop function for tumbling bridge -function bhv_tumbling_bridge_loop() +--- Behavior loop function for Tick Tock Clock moving bar +function bhv_ttc_moving_bar_update() -- ... end ---- Behavior loop function for tumbling bridge platform -function bhv_tumbling_bridge_platform_loop() +--- Behavior init function for Tick Tock Clock cog +function bhv_ttc_cog_init() -- ... end ---- Behavior loop function for Tuxie's mother -function bhv_tuxies_mother_loop() +--- Behavior loop function for Tick Tock Clock cog +function bhv_ttc_cog_update() -- ... end ---- Behavior loop function for Tweester -function bhv_tweester_loop() +--- Behavior init function for Tick Tock Clock pit block +function bhv_ttc_pit_block_init() -- ... end ---- Behavior loop function for Tweester sand particle -function bhv_tweester_sand_particle_loop() +--- Behavior loop function for Tick Tock Clock pit block +function bhv_ttc_pit_block_update() -- ... end ---- Behavior loop function for Ukiki cage -function bhv_ukiki_cage_loop() +--- Behavior init function for Tick Tock Clock elevator +function bhv_ttc_elevator_init() -- ... end ---- Behavior loop function for Ukiki cage Star -function bhv_ukiki_cage_star_loop() +--- Behavior loop function for Tick Tock Clock elevator +function bhv_ttc_elevator_update() -- ... end ---- Behavior init function for Ukiki -function bhv_ukiki_init() +--- Behavior init function for Tick Tock Clock 2D rotator +function bhv_ttc_2d_rotator_init() -- ... end ---- Behavior loop function for Ukiki -function bhv_ukiki_loop() +--- Behavior loop function for Tick Tock Clock 2D rotator +function bhv_ttc_2d_rotator_update() + -- ... +end + +--- Behavior loop function for Tick Tock Clock spinner +function bhv_ttc_spinner_update() + -- ... +end + +--- Behavior init function for Mr. Blizzard +function bhv_mr_blizzard_init() + -- ... +end + +--- Behavior loop function for Mr. Blizzard +function bhv_mr_blizzard_update() + -- ... +end + +--- Behavior loop function for Mr. Blizzard's snowball +function bhv_mr_blizzard_snowball() + -- ... +end + +--- Behavior init function for sliding platform 2 in Rainbow Ride and Bowser courses +function bhv_sliding_plat_2_init() + -- ... +end + +--- Behavior loop function for sliding platform 2 in Rainbow Ride and Bowser courses +function bhv_sliding_plat_2_loop() + -- ... +end + +--- Behavior init function for Rotating octagonal platform in Rainbow Ride and Bowser in the Sky +function bhv_rotating_octagonal_plat_init() + -- ... +end + +--- Behavior loop function for Rotating octagonal platform in Rainbow Ride and Bowser in the Sky +function bhv_rotating_octagonal_plat_loop() + -- ... +end + +--- Behavior init function for animates on floor switch press in Rainbow Ride and Bowser courses +function bhv_animates_on_floor_switch_press_init() + -- ... +end + +--- Behavior loop function for animates on floor switch press in Rainbow Ride and Bowser courses +function bhv_animates_on_floor_switch_press_loop() + -- ... +end + +--- Behavior init function for activated back and forth platform in Bowser courses +function bhv_activated_back_and_forth_platform_init() + -- ... +end + +--- Behavior loop function for activated back and forth platform in Bowser courses +function bhv_activated_back_and_forth_platform_update() + -- ... +end + +--- Behavior loop function for Recovery Heart +function bhv_recovery_heart_loop() + -- ... +end + +--- Behavior loop function for water bomb cannon +function bhv_water_bomb_cannon_loop() + -- ... +end + +--- Behavior loop function for bubble cannon barrel +function bhv_bubble_cannon_barrel_loop() -- ... end @@ -2532,258 +2643,233 @@ function bhv_unagi_subobject_loop() -- ... end ---- Behavior loop function for unused particle spawn -function bhv_unused_particle_spawn_loop() +--- Behavior loop function for Dorrie +function bhv_dorrie_update() -- ... end ---- Behavior loop function for unused poundable platform -function bhv_unused_poundable_platform() +--- Behavior init function for Haunted Chair +function bhv_haunted_chair_init() -- ... end ---- Behavior init function for Vanish Cap -function bhv_vanish_cap_init() +--- Behavior loop function for Haunted Chair +function bhv_haunted_chair_loop() -- ... end ---- Behavior loop function for Volcano flames -function bhv_volcano_flames_loop() +--- Behavior loop function for Mad Piano +function bhv_mad_piano_update() -- ... end ---- Behavior loop function for volcano sound -function bhv_volcano_sound_loop() +--- Behavior loop function for flying bookend +function bhv_flying_bookend_loop() -- ... end ---- Behavior loop function for volcano trap -function bhv_volcano_trap_loop() +--- Behavior loop function for Bookend spawn +function bhv_bookend_spawn_loop() -- ... end ---- Behavior loop function for tiny wall star particle -function bhv_wall_tiny_star_particle_loop() +--- Behavior loop function for haunted bookshelf manager +function bhv_haunted_bookshelf_manager_loop() -- ... end ---- Behavior loop function for warp -function bhv_warp_loop() +--- Behavior loop function for Book switch +function bhv_book_switch_loop() -- ... end ---- Behavior init function for water air bubble -function bhv_water_air_bubble_init() +--- Behavior init function for Fire Piranha Plant +function bhv_fire_piranha_plant_init() -- ... end ---- Behavior loop function for water air bubble -function bhv_water_air_bubble_loop() +--- Behavior loop function for Fire Piranha Plant +function bhv_fire_piranha_plant_update() -- ... end ---- Behavior loop function for water bomb cannon -function bhv_water_bomb_cannon_loop() +--- Behavior loop function for Small Piranha flame +function bhv_small_piranha_flame_loop() -- ... end ---- Behavior loop function for water bomb shadow -function bhv_water_bomb_shadow_update() +--- Behavior loop function for Fire spitter +function bhv_fire_spitter_update() -- ... end ---- Behavior loop function for water bomb spawner -function bhv_water_bomb_spawner_update() +--- Behavior loop function for Fly Guy flame +function bhv_fly_guy_flame_loop() -- ... end ---- Behavior loop function for water bomb -function bhv_water_bomb_update() +--- Behavior loop function for Snufit +function bhv_snufit_loop() -- ... end ---- Behavior loop function for water droplet -function bhv_water_droplet_loop() +--- Behavior loop function for Snufit balls +function bhv_snufit_balls_loop() -- ... end ---- Behavior init function for water droplet splash -function bhv_water_droplet_splash_init() +--- Behavior init function for horizontal Grindel +function bhv_horizontal_grindel_init() -- ... end ---- Behavior loop function for Wet Dry World water level diamond -function bhv_water_level_diamond_loop() +--- Behavior loop function for horizontal Grindel +function bhv_horizontal_grindel_update() -- ... end ---- Behavior init function for Castle Basement water level pillar -function bhv_water_level_pillar_init() +--- Behavior init function for Eyerok boss +function bhv_eyerok_boss_init() -- ... end ---- Behavior loop function for Castle Basement water level pillar -function bhv_water_level_pillar_loop() +--- Behavior loop function for Eyerok boss +function bhv_eyerok_boss_loop() -- ... end ---- Behavior loop function for water mist 2 -function bhv_water_mist_2_loop() +--- Behavior loop function for Eyerok hand +function bhv_eyerok_hand_loop() -- ... end ---- Behavior loop function for water mist -function bhv_water_mist_loop() +--- Behavior init function for Klepto +function bhv_klepto_init() -- ... end ---- Behavior loop function for water mist spawn -function bhv_water_mist_spawn_loop() +--- Behavior loop function for Klepto +function bhv_klepto_update() -- ... end ---- Behavior init function for spawning water splash droplets -function bhv_water_splash_spawn_droplets() +--- Behavior loop function for bird +function bhv_bird_update() -- ... end ---- Behavior init function for water waves -function bhv_water_waves_init() +--- Behavior init function for Racing Penguin +function bhv_racing_penguin_init() -- ... end ---- Behavior loop function for waterfall sound -function bhv_waterfall_sound_loop() +--- Behavior loop function for Racing Penguin +function bhv_racing_penguin_update() -- ... end ---- Behavior loop function for shrinking water trail -function bhv_wave_trail_shrink() +--- Behavior loop function for Penguin race finish line +function bhv_penguin_race_finish_line_update() -- ... end ---- Behavior loop function for Wet Dry World express elevator -function bhv_wdw_express_elevator_loop() +--- Behavior loop function for Penguin race shortcut check +function bhv_penguin_race_shortcut_check_update() -- ... end ---- Behavior loop function for Whomp's Fortress breakable wall -function bhv_wf_breakable_wall_loop() +--- Behavior loop function for coffin spawner +function bhv_coffin_spawner_loop() -- ... end ---- Behavior loop function for Whomp's Fortress elevator tower platform -function bhv_wf_elevator_tower_platform_loop() +--- Behavior loop function for coffin +function bhv_coffin_loop() -- ... end ---- Behavior init function for Whomp's Fortress rotating wooden platform -function bhv_wf_rotating_wooden_platform_init() +--- Behavior loop function for Clam +function bhv_clam_loop() -- ... end ---- Behavior loop function for Whomp's Fortress rotating wooden platform -function bhv_wf_rotating_wooden_platform_loop() +--- Behavior loop function for Skeeter +function bhv_skeeter_update() -- ... end ---- Behavior init function for Whomp's Fortress sliding platform -function bhv_wf_sliding_platform_init() +--- Behavior loop function for Skeeter wave +function bhv_skeeter_wave_update() -- ... end ---- Behavior loop function for Whomp's Fortress sliding platform -function bhv_wf_sliding_platform_loop() +--- Behavior init function for swing platform +function bhv_swing_platform_init() -- ... end ---- Behavior loop function for Whomp's Fortress sliding tower platform -function bhv_wf_sliding_tower_platform_loop() +--- Behavior loop function for swing platform +function bhv_swing_platform_update() -- ... end ---- Behavior loop function for Whomp's Fortress solid tower platform -function bhv_wf_solid_tower_platform_loop() +--- Behavior loop function for donut platform spawner +function bhv_donut_platform_spawner_update() -- ... end ---- Behavior init function for whirlpool -function bhv_whirlpool_init() +--- Behavior loop function for donut platform +function bhv_donut_platform_update() -- ... end ---- Behavior loop function for whirlpool -function bhv_whirlpool_loop() +--- Behavior init function for Dire Dire Docks pole +function bhv_ddd_pole_init() -- ... end ---- Behavior loop function for white puff 1 -function bhv_white_puff_1_loop() +--- Behavior loop function for Dire Dire Docks pole +function bhv_ddd_pole_update() -- ... end ---- Behavior loop function for white puff 2 -function bhv_white_puff_2_loop() +--- Behavior init function for Red Coin Star marker +function bhv_red_coin_star_marker_init() -- ... end ---- Behavior loop function for white puff exploding -function bhv_white_puff_exploding_loop() +--- Behavior loop function for a triplet of butterflies +function bhv_triplet_butterfly_update() -- ... end ---- Behavior init function for White puff smoke -function bhv_white_puff_smoke_init() +--- Behavior loop function for Bubba +function bhv_bubba_loop() -- ... end ---- Behavior loop function for Whomp -function bhv_whomp_loop() +--- Behavior loop function for intro Lakitu +function bhv_intro_lakitu_loop() -- ... end ---- Behavior loop function for Wiggler body part -function bhv_wiggler_body_part_update() +--- Behavior loop function for intro Peach +function bhv_intro_peach_loop() -- ... end ---- Behavior loop function for Wiggler -function bhv_wiggler_update() +--- Behavior loop function for first end birds +function bhv_end_birds_1_loop() -- ... end ---- Behavior loop function for wind -function bhv_wind_loop() +--- Behavior loop function for second end birds +function bhv_end_birds_2_loop() -- ... end ---- Behavior init function for Wing Cap -function bhv_wing_cap_init() - -- ... -end - ---- Behavior loop function for Wing and Vanish caps -function bhv_wing_vanish_cap_loop() - -- ... -end - ---- Behavior loop function for ground poundable wooden post -function bhv_wooden_post_update() - -- ... -end - ---- Behavior init function for Yellow Coin -function bhv_yellow_coin_init() - -- ... -end - ---- Behavior loop function for Yellow Coin -function bhv_yellow_coin_loop() - -- ... -end - ---- Behavior init function for Yoshi -function bhv_yoshi_init() +--- Behavior loop function for intro scene +function bhv_intro_scene_loop() -- ... end @@ -2792,52 +2878,13 @@ function bhv_yoshi_loop() -- ... end ---- @param a0 number ---- @param a1 number ---- @return integer ---- Checks if the current object is moving `a1` units over a floor and within a threshold of `a0` -function check_if_moving_over_floor(a0, a1) +--- Behavior loop function for volcano trap +function bhv_volcano_trap_loop() -- ... end ---- @param flags integer ---- Clears the particle flags of the current object -function clear_particle_flags(flags) - -- ... -end - ---- @param sp28 number ---- @param sp2C number ---- @param sp30 integer ---- Common behavior for when Mario's anchoring when grabbed -function common_anchor_mario_behavior(sp28, sp2C, sp30) - -- ... -end - ---- @param windSpread integer ---- @param scale number ---- @param relPosX number ---- @param relPosY number ---- @param relPosZ number ---- Spawns strong wind particles relative to the current object -function cur_obj_spawn_strong_wind_particles(windSpread, scale, relPosX, relPosY, relPosZ) - -- ... -end - ---- @return integer ---- Checks if Mario is moving fast enough to make Piranha Plant bite. This one is a mouthful -function mario_moving_fast_enough_to_make_piranha_plant_bite() - -- ... -end - ---- Sets the secondary camera focus -function obj_set_secondary_camera_focus() - -- ... -end - ---- @param walk integer ---- Plays the penguin walking sound -function play_penguin_walking_sound(walk) +--- Behavior loop function for UV texture scrolling +function uv_update_scroll() -- ... end @@ -2853,37 +2900,6 @@ function spawn_ambient_light(x, y, z, r, g, b) -- ... end ---- @param x number ---- @param y number ---- @param z number ---- @return Object ---- Spawns a Star with an ID corresponding to the current object's first behavior parameter byte -function spawn_default_star(x, y, z) - -- ... -end - ---- Spawns mist particles around the current object -function spawn_mist_from_global() - -- ... -end - ---- @param count integer ---- @param offsetY integer ---- @param size number ---- Spawns mist particles around the current object -function spawn_mist_particles_variable(count, offsetY, size) - -- ... -end - ---- @param x number ---- @param y number ---- @param z number ---- @return Object ---- Spawns a Star that won't make Mario exit the level with an ID corresponding to the current object's first behavior parameter byte -function spawn_no_exit_star(x, y, z) - -- ... -end - --- @param x number --- @param y number --- @param z number @@ -2897,6 +2913,30 @@ function spawn_point_light(x, y, z, r, g, b, radius) -- ... end +--- Behavior loop function for the lighting engine ambient light. Takes the first 3 behavior parameter bytes for RGB color +function bhv_ambient_light_update() + -- ... +end + +--- Behavior init function for the lighting engine point light. Takes the first 3 behavior parameter bytes for RGB color and the last for radius +function bhv_point_light_init() + -- ... +end + +--- Behavior loop function for the lighting engine point light +function bhv_point_light_loop() + -- ... +end + +--- @param x number +--- @param y number +--- @param z number +--- @return Object +--- Spawns a Star with an ID corresponding to the current object's first behavior parameter byte +function spawn_default_star(x, y, z) + -- ... +end + --- @param x number --- @param y number --- @param z number @@ -2906,76 +2946,18 @@ function spawn_red_coin_cutscene_star(x, y, z) -- ... end ---- Spawns a star number -function spawn_star_number() - -- ... -end - ---- @param numTris integer ---- @param triModel integer ---- @param triSize number ---- @param triAnimState integer ---- Spawns triangle break particles around the current object -function spawn_triangle_break_particles(numTris, triModel, triSize, triAnimState) - -- ... -end - ---- @param pitch integer ---- @param yaw integer ---- Spawns wind particles around the current object -function spawn_wind_particles(pitch, yaw) - -- ... -end - ---- @param forwardVel number ---- @param a1 number ---- @param deltaPitch integer ---- @param deltaRoll integer ---- Moves Tox Box -function tox_box_move(forwardVel, a1, deltaPitch, deltaRoll) - -- ... -end - ---- @param angle Pointer_integer ---- @return integer ---- Updates the current object's angle from its move flags -function update_angle_from_move_flags(angle) - -- ... -end - ---- Behavior loop function for UV texture scrolling -function uv_update_scroll() - -- ... -end - ---- @param dest Vec3f ---- @param src Vec3f ---- Duplicate of vec3f_copy except without bad return -function vec3f_copy_2(dest, src) - -- ... -end - ---- @return number ---- Gets the draw distance scalar -function draw_distance_scalar() - -- ... -end - ---- @param obj Object ---- Updates an object's graphical position and angle -function obj_update_gfx_pos_and_angle(obj) - -- ... -end - ---- @return number ---- Sets the current object's position to random floats between 0.0 and 1.0 -function position_based_random_float_position() +--- @param x number +--- @param y number +--- @param z number +--- @return Object +--- Spawns a Star that won't make Mario exit the level with an ID corresponding to the current object's first behavior parameter byte +function spawn_no_exit_star(x, y, z) -- ... end --- @return integer ---- Sets the current object's position to random integers between 0 and 65536 -function position_based_random_u16() +--- Generates a pseudo random integer between 0 and 65535 +function random_u16() -- ... end @@ -2991,9 +2973,41 @@ function random_sign() -- ... end +--- @param obj Object +--- Updates an object's graphical position and angle +function obj_update_gfx_pos_and_angle(obj) + -- ... +end + --- @return integer ---- Generates a pseudo random integer between 0 and 65535 -function random_u16() +--- Sets the current object's position to random integers between 0 and 65536 +function position_based_random_u16() + -- ... +end + +--- @return number +--- Sets the current object's position to random floats between 0.0 and 1.0 +function position_based_random_float_position() + -- ... +end + +--- @return number +--- Gets the draw distance scalar +function draw_distance_scalar() + -- ... +end + +--- @param behavior Pointer_BehaviorScript +--- @return BehaviorId +--- Gets a behavior ID from a behavior script +function get_id_from_behavior(behavior) + -- ... +end + +--- @param behavior Pointer_BehaviorScript +--- @return BehaviorId +--- Gets a behavior ID from only vanilla behavior scripts +function get_id_from_vanilla_behavior(behavior) -- ... end @@ -3011,13 +3025,6 @@ function get_behavior_name_from_id(id) -- ... end ---- @param behavior Pointer_BehaviorScript ---- @return BehaviorId ---- Gets a behavior ID from a behavior script -function get_id_from_behavior(behavior) - -- ... -end - --- @param name string --- @return BehaviorId --- gets a behavior ID from a behavior name @@ -3025,27 +3032,161 @@ function get_id_from_behavior_name(name) -- ... end ---- @param behavior Pointer_BehaviorScript ---- @return BehaviorId ---- Gets a behavior ID from only vanilla behavior scripts -function get_id_from_vanilla_behavior(behavior) +--- Skips camera interpolation for a frame, locking the camera instantly to the target position. Useful for immediate changes in camera state or position without smooth transitions +function skip_camera_interpolation() + -- ... +end + +--- @param shake integer +--- Applies a shake effect to the camera based on a hit type. Different shake types simulate various impacts, such as attacks, falls, or shocks +function set_camera_shake_from_hit(shake) + -- ... +end + +--- @param shake integer +--- Applies an environmental shake effect to the camera. Handles predefined shake types triggered by environmental events like explosions or platform movements +function set_environmental_camera_shake(shake) + -- ... +end + +--- @param shake integer +--- @param posX number +--- @param posY number +--- @param posZ number +--- Applies a shake effect to the camera, scaled by its proximity to a specified point. The intensity decreases with distance from the point +function set_camera_shake_from_point(shake, posX, posY, posZ) -- ... end --- @param c Camera ---- @param goal number ---- @param inc number ---- Adjusts the camera's height toward a target value (`goalHeight`) while respecting terrain and obstructions. This is really wonky and probably shouldn't be used, prefer `gLakituStates` -function approach_camera_height(c, goal, inc) +--- Moves Mario's head slightly upward when the C-Up button is pressed. This function aligns the camera to match the head movement for consistency +function move_mario_head_c_up(c) -- ... end ---- @param current number ---- @param target number ---- @param multiplier number ---- @return number ---- Gradually approaches a floating-point value (`target`) using asymptotic smoothing. The rate of approach is controlled by the `multiplier`. Useful for smoothly adjusting camera parameters like field-of-view or position -function approach_f32_asymptotic(current, target, multiplier) +--- @param c Camera +--- @param frames integer +--- Transitions the camera to the next state over a specified number of frames. This is typically used for cutscenes or scripted sequences +function transition_next_state(c, frames) + -- ... +end + +--- @param c Camera +--- @param mode integer +--- @param frames integer +--- Changes the camera to a new mode, optionally interpolating over a specified number of frames. Useful for transitioning between different camera behaviors dynamically +function set_camera_mode(c, mode, frames) + -- ... +end + +--- @param c Camera +--- Resets the camera's state while retaining some settings, such as position or mode. This is often used when soft-resetting gameplay without reinitialization +function soft_reset_camera(c) + -- ... +end + +--- @param c Camera +--- Fully resets the camera to its default state and reinitializes all settings. This is typically used when restarting gameplay or loading a new area +function reset_camera(c) + -- ... +end + +--- Selects the appropriate camera mode for Mario based on the current gameplay context. Adapts camera behavior dynamically to match Mario's environment or state +function select_mario_cam_mode() + -- ... +end + +--- @param dst Vec3f +--- @param src Vec3f +--- Subtracts one 3D vector (`src`) from another (`dst`). Stores the result in the destination vector +function vec3f_sub(dst, src) + -- ... +end + +--- @param dst Vec3f +--- @param o Object +--- Converts an object's position to a `Vec3f` format. Useful for aligning object behaviors or interactions with the camera system +function object_pos_to_vec3f(dst, o) + -- ... +end + +--- @param o Object +--- @param src Vec3f +--- Converts a `Vec3f` position to an object's internal format. Useful for syncing 3D positions between objects and the game world +function vec3f_to_object_pos(o, src) + -- ... +end + +--- @param angle integer +--- @return integer +--- Selects an alternate camera mode based on the given angle. Used to toggle between predefined camera modes dynamically +function cam_select_alt_mode(angle) + -- ... +end + +--- @param mode integer +--- @return integer +--- Sets the camera's angle based on the specified mode. Handles rotation and focus adjustments for predefined camera behaviors +function set_cam_angle(mode) + -- ... +end + +--- @param mode integer +--- Applies a handheld camera shake effect with configurable parameters. Can be used to simulate dynamic, realistic camera movement +function set_handheld_shake(mode) + -- ... +end + +--- @param pos Vec3f +--- @param focus Vec3f +--- Activates a handheld camera shake effect. Calculates positional and focus adjustments to simulate manual movement +function shake_camera_handheld(pos, focus) + -- ... +end + +--- @param currentState integer +--- @param buttonsPressed integer +--- @param buttonsDown integer +--- @return integer +--- Determines which C-buttons are currently pressed by the player. Returns a bitmask indicating the active buttons for camera control +function find_c_buttons_pressed(currentState, buttonsPressed, buttonsDown) + -- ... +end + +--- @param pos Vec3f +--- @param offsetY number +--- @param radius number +--- @return integer +--- Checks for collisions between the camera and level geometry. Adjusts the camera's position to avoid clipping into walls or obstacles +function collide_with_walls(pos, offsetY, radius) + -- ... +end + +--- @param from Vec3f +--- @param to Vec3f +--- @param maxPitch integer +--- @param minPitch integer +--- @return integer +--- Clamps the camera's pitch angle between a maximum and minimum value. Prevents over-rotation and maintains a consistent viewing angle +function clamp_pitch(from, to, maxPitch, minPitch) + -- ... +end + +--- @param posX number +--- @param posY number +--- @param posZ number +--- @return integer +--- Checks if a position is within 100 units of Mario's current position. Returns true if the position is within the specified radius and false otherwise +function is_within_100_units_of_mario(posX, posY, posZ) + -- ... +end + +--- @param dst Pointer_number +--- @param goal number +--- @param scale number +--- @return integer +--- Smoothly transitions or directly sets a floating-point value (`dst`) to approach a target (`goal`). Uses asymptotic scaling for gradual adjustments or direct assignment +function set_or_approach_f32_asymptotic(dst, goal, scale) -- ... end @@ -3058,12 +3199,12 @@ function approach_f32_asymptotic_bool(current, target, multiplier) -- ... end ---- @param current integer ---- @param target integer ---- @param divisor integer ---- @return integer ---- Gradually approaches a signed 16-bit integer (`target`) using asymptotic smoothing. The divisor controls the rate of the adjustment. Useful for adjusting angles or positions smoothly -function approach_s16_asymptotic(current, target, divisor) +--- @param current number +--- @param target number +--- @param multiplier number +--- @return number +--- Gradually approaches a floating-point value (`target`) using asymptotic smoothing. The rate of approach is controlled by the `multiplier`. Useful for smoothly adjusting camera parameters like field-of-view or position +function approach_f32_asymptotic(current, target, multiplier) -- ... end @@ -3076,6 +3217,15 @@ function approach_s16_asymptotic_bool(current, target, divisor) -- ... end +--- @param current integer +--- @param target integer +--- @param divisor integer +--- @return integer +--- Gradually approaches a signed 16-bit integer (`target`) using asymptotic smoothing. The divisor controls the rate of the adjustment. Useful for adjusting angles or positions smoothly +function approach_s16_asymptotic(current, target, divisor) + -- ... +end + --- @param current Vec3f --- @param target Vec3f --- @param xMul number @@ -3086,28 +3236,90 @@ function approach_vec3f_asymptotic(current, target, xMul, yMul, zMul) -- ... end ---- @param a Vec3f ---- @param b Vec3f ---- @return number ---- Calculates the absolute distance between two 3D points (`a` and `b`). Returns the distance as a floating-point value. Useful for determining proximity between objects in 3D space -function calc_abs_dist(a, b) +--- @param dst Vec3f +--- @param goal Vec3f +--- @param xMul number +--- @param yMul number +--- @param zMul number +--- Smoothly transitions a 3D vector (`current`) toward a target vector (`goal`) using asymptotic scaling. Allows gradual or instantaneous alignment of 3D positions. Scaling values (the `Mul` variables) for x, y, and z axes determine the speed of adjustment for each component +function set_or_approach_vec3f_asymptotic(dst, goal, xMul, yMul, zMul) -- ... end ---- @param a Vec3f ---- @param b Vec3f +--- @param current Pointer_integer +--- @param target integer +--- @param increment integer +--- @return integer +--- Adjusts a signed 16-bit integer (`current`) towards a target (`target`) symmetrically with a fixed increment (`increment`). Returns true if the value reaches the target and false otherwise +function camera_approach_s16_symmetric_bool(current, target, increment) + -- ... +end + +--- @param current Pointer_integer +--- @param target integer +--- @param increment integer +--- @return integer +--- Smoothly transitions or directly sets a signed 16-bit value (`current`) to approach a target (`target`). Uses symmetric scaling for gradual or immediate adjustments +function set_or_approach_s16_symmetric(current, target, increment) + -- ... +end + +--- @param current Pointer_number +--- @param target number +--- @param increment number +--- @return integer +--- Adjusts a floating-point value (`current`) towards a target (`target`) symmetrically with a fixed increment (`increment`). Returns true if the value reaches the target and false otherwise +function camera_approach_f32_symmetric_bool(current, target, increment) + -- ... +end + +--- @param value number +--- @param target number +--- @param increment number --- @return number ---- Calculates the horizontal (XZ-plane) distance between two 3D points (`a` and `b`). Returns the distance as a floating-point value. Useful for terrain navigation or collision detection -function calc_hor_dist(a, b) +--- Symmetrically approaches a floating-point value (`target`) with a fixed increment (`increment`) per frame. Limits the rate of change to ensure gradual transitions +function camera_approach_f32_symmetric(value, target, increment) + -- ... +end + +--- @param dst Vec3s +--- @param xRange integer +--- @param yRange integer +--- @param zRange integer +--- Generates a random 3D vector with short integer components. Useful for randomized offsets or environmental effects +function random_vec3s(dst, xRange, yRange, zRange) + -- ... +end + +--- @param pos Vec3f +--- @param origin Vec3f +--- @param xMax number +--- @param xMin number +--- @param zMax number +--- @param zMin number +--- @return integer +--- Clamps a position within specified X and Z bounds and calculates the yaw angle from the origin. Prevents the camera from moving outside of the designated area +function clamp_positions_and_find_yaw(pos, origin, xMax, xMin, zMax, zMin) -- ... end --- @param from Vec3f --- @param to Vec3f ---- @param pitch Pointer_integer ---- @param yaw Pointer_integer ---- Calculates the pitch and yaw angles from one 3D position (`from`) to another (`to`). Updates the provided pointers with the computed pitch and yaw values -function calculate_angles(from, to, pitch, yaw) +--- @param surf Surface +--- @param range integer +--- @param surfType integer +--- @return integer +--- Determines if a range is obstructed by a surface relative to the camera. Returns true if the range is behind the specified surface +function is_range_behind_surface(from, to, surf, range, surfType) + -- ... +end + +--- @param dest Vec3f +--- @param from Vec3f +--- @param to Vec3f +--- @param scale number +--- Scales a point along a line between two 3D points (`from` and `to`). The scaling factor determines how far along the line the resulting point will be. The result is stored in the destination vector (`dest`) +function scale_along_line(dest, from, to, scale) -- ... end @@ -3127,140 +3339,181 @@ function calculate_yaw(from, to) -- ... end ---- @param angle integer ---- @return integer ---- Selects an alternate camera mode based on the given angle. Used to toggle between predefined camera modes dynamically -function cam_select_alt_mode(angle) +--- @param from Vec3f +--- @param to Vec3f +--- @param pitch Pointer_integer +--- @param yaw Pointer_integer +--- Calculates the pitch and yaw angles from one 3D position (`from`) to another (`to`). Updates the provided pointers with the computed pitch and yaw values +function calculate_angles(from, to, pitch, yaw) -- ... end ---- @param value number ---- @param target number ---- @param increment number +--- @param a Vec3f +--- @param b Vec3f --- @return number ---- Symmetrically approaches a floating-point value (`target`) with a fixed increment (`increment`) per frame. Limits the rate of change to ensure gradual transitions -function camera_approach_f32_symmetric(value, target, increment) +--- Calculates the absolute distance between two 3D points (`a` and `b`). Returns the distance as a floating-point value. Useful for determining proximity between objects in 3D space +function calc_abs_dist(a, b) -- ... end ---- @param current Pointer_number ---- @param target number ---- @param increment number ---- @return integer ---- Adjusts a floating-point value (`current`) towards a target (`target`) symmetrically with a fixed increment (`increment`). Returns true if the value reaches the target and false otherwise -function camera_approach_f32_symmetric_bool(current, target, increment) +--- @param a Vec3f +--- @param b Vec3f +--- @return number +--- Calculates the horizontal (XZ-plane) distance between two 3D points (`a` and `b`). Returns the distance as a floating-point value. Useful for terrain navigation or collision detection +function calc_hor_dist(a, b) -- ... end ---- @param current Pointer_integer ---- @param target integer ---- @param increment integer ---- @return integer ---- Adjusts a signed 16-bit integer (`current`) towards a target (`target`) symmetrically with a fixed increment (`increment`). Returns true if the value reaches the target and false otherwise -function camera_approach_s16_symmetric_bool(current, target, increment) +--- @param dst Vec3f +--- @param src Vec3f +--- @param yaw integer +--- Rotates a vector around the XZ-plane by a specified yaw angle. The result is stored in the destination vector (`dst`). Useful for rotating camera positions or object coordinates horizontally +function rotate_in_xz(dst, src, yaw) + -- ... +end + +--- @param dst Vec3f +--- @param src Vec3f +--- @param pitch integer +--- Rotates a vector around the YZ-plane by a specified pitch angle. The result is stored in the destination vector (`dst`). Useful for vertical camera rotations or object transformations +function rotate_in_yz(dst, src, pitch) + -- ... +end + +--- @param mag integer +--- @param decay integer +--- @param inc integer +--- Applies a pitch-based shake effect to the camera. The shake's magnitude, decay, and increment are configurable. Simulates vertical disturbances like impacts or explosions +function set_camera_pitch_shake(mag, decay, inc) + -- ... +end + +--- @param mag integer +--- @param decay integer +--- @param inc integer +--- Applies a yaw-based shake effect to the camera. Simulates horizontal vibrations or rotational impacts +function set_camera_yaw_shake(mag, decay, inc) + -- ... +end + +--- @param mag integer +--- @param decay integer +--- @param inc integer +--- Applies a roll-based shake effect to the camera. Simulates rotational disturbances for dynamic camera effects +function set_camera_roll_shake(mag, decay, inc) + -- ... +end + +--- @param mag integer +--- @param decay integer +--- @param inc integer +--- @param maxDist number +--- @param posX number +--- @param posY number +--- @param posZ number +--- Applies a pitch shake effect to the camera, scaled by proximity to a specified point. Simulates vibrations with intensity decreasing further from the point +function set_pitch_shake_from_point(mag, decay, inc, maxDist, posX, posY, posZ) + -- ... +end + +--- @param pos Vec3f +--- @param focus Vec3f +--- Activates a pitch-based shake effect. Adds vertical vibrational movement to the camera's behavior +function shake_camera_pitch(pos, focus) + -- ... +end + +--- @param pos Vec3f +--- @param focus Vec3f +--- Activates a yaw-based shake effect. Adds horizontal vibrational movement to the camera's behavior +function shake_camera_yaw(pos, focus) + -- ... +end + +--- @param roll Pointer_integer +--- Applies a roll-based shake effect to the camera. Simulates rotational disturbances caused by impacts or other events +function shake_camera_roll(roll) -- ... end --- @param c Camera +--- @param areaYaw integer --- @return integer ---- Processes course-specific camera settings, such as predefined positions or modes. Adjusts the camera to match the design and gameplay requirements of the current course -function camera_course_processing(c) +--- Calculates an outward radial offset based on the camera's yaw angle. Returns the offset yaw, used for positioning or alignment +function offset_yaw_outward_radial(c, areaYaw) -- ... end ---- @param enable integer ---- Toggles whether the camera uses course-specific settings. This is useful for enabling or disabling custom behaviors in specific courses or areas -function camera_set_use_course_specific_settings(enable) +--- Plays a buzzing sound effect when the camera attempts to move downward but is restricted. Provides feedback for invalid C-Down input actions +function play_camera_buzz_if_cdown() -- ... end ---- Centers the ROM hack camera. This function is designed for non-standard level layouts and modded game environments -function center_rom_hack_camera() +--- Plays a buzzing sound effect when a blocked C-button action is attempted. Used to signal invalid input or restricted camera movement +function play_camera_buzz_if_cbutton() -- ... end ---- @param from Vec3f ---- @param to Vec3f ---- @param maxPitch integer ---- @param minPitch integer +--- Plays a buzzing sound effect when the camera's position is misaligned with the player's perspective. Used as audio feedback for incorrect camera behavior +function play_camera_buzz_if_c_sideways() + -- ... +end + +--- Plays a sound effect when the C-Up button is pressed for camera movement. Provides feedback for vertical camera adjustments +function play_sound_cbutton_up() + -- ... +end + +--- Plays a sound effect when the C-Down button is pressed for camera movement. Provides auditory feedback for valid camera input +function play_sound_cbutton_down() + -- ... +end + +--- Plays a sound effect when the C-Side button (left or right) is pressed for camera movement. Used as audio feedback for horizontal adjustments to the camera +function play_sound_cbutton_side() + -- ... +end + +--- Plays a sound effect when a blocked action changes the camera mode. This provides feedback for invalid attempts to switch the camera state +function play_sound_button_change_blocked() + -- ... +end + +--- Plays a sound effect when the R-Button camera mode is changed. Provides feedback for toggling camera behaviors +function play_sound_rbutton_changed() + -- ... +end + +--- Plays a sound effect when the camera switches between Lakitu and Mario perspectives. Signals a successful change in camera mode +function play_sound_if_cam_switched_to_lakitu_or_mario() + -- ... +end + +--- @param c Camera +--- @param unused number --- @return integer ---- Clamps the camera's pitch angle between a maximum and minimum value. Prevents over-rotation and maintains a consistent viewing angle -function clamp_pitch(from, to, maxPitch, minPitch) +--- Handles radial camera movement based on player input. Updates the camera's position or orientation accordingly +function radial_camera_input(c, unused) -- ... end ---- @param pos Vec3f ---- @param origin Vec3f ---- @param xMax number ---- @param xMin number ---- @param zMax number ---- @param zMin number +--- @param trigger integer --- @return integer ---- Clamps a position within specified X and Z bounds and calculates the yaw angle from the origin. Prevents the camera from moving outside of the designated area -function clamp_positions_and_find_yaw(pos, origin, xMax, xMin, zMax, zMin) +--- Triggers a dialog sequence during a cutscene. The dialog is synchronized with the camera's position and movement +function trigger_cutscene_dialog(trigger) -- ... end ---- @param pos Vec3f ---- @param offsetY number ---- @param radius number ---- @return integer ---- Checks for collisions between the camera and level geometry. Adjusts the camera's position to avoid clipping into walls or obstacles -function collide_with_walls(pos, offsetY, radius) +--- @param c Camera +--- Handles camera movement based on input from the C-buttons. Updates the camera's position or angle to match directional player input +function handle_c_button_movement(c) -- ... end +--- @param c Camera --- @param cutscene integer ---- @param o Object ---- @return integer ---- Initiates a cutscene focusing on a specific object in the game world. The camera transitions smoothly to the object, adapting its position as needed -function cutscene_object(cutscene, o) - -- ... -end - ---- @param cutscene integer ---- @param o Object ---- @param dialogID integer ---- @return integer ---- Starts a cutscene involving an object and displays dialog during the sequence. The camera focuses on the object while synchronizing dialog with the scene -function cutscene_object_with_dialog(cutscene, o, dialogID) - -- ... -end - ---- @param cutscene integer ---- @param o Object ---- @return integer ---- Starts a cutscene involving an object without dialog. The camera transitions smoothly to focus on the object -function cutscene_object_without_dialog(cutscene, o) - -- ... -end - ---- @param preset integer ---- Applies a preset field-of-view shake effect during a cutscene. This creates dynamic visual effects, such as zoom or focus disruptions -function cutscene_set_fov_shake_preset(preset) - -- ... -end - ---- @param obj integer ---- @param frame integer ---- @return integer ---- Spawns an object as part of a cutscene, such as props or interactive elements. Returns the spawned object's reference for further manipulation -function cutscene_spawn_obj(obj, frame) - -- ... -end - ---- @param currentState integer ---- @param buttonsPressed integer ---- @param buttonsDown integer ---- @return integer ---- Determines which C-buttons are currently pressed by the player. Returns a bitmask indicating the active buttons for camera control -function find_c_buttons_pressed(currentState, buttonsPressed, buttonsDown) - -- ... -end - ---- @param pg PlayerGeometry ---- Finds the floor and ceiling directly above and below Mario's position. Updates Mario's geometry information for camera calculations -function find_mario_floor_and_ceil(pg) +--- Starts a cutscene based on the provided ID. The camera transitions to predefined behaviors for the duration of the cutscene +function start_cutscene(c, cutscene) -- ... end @@ -3271,35 +3524,28 @@ function get_cutscene_from_mario_status(c) -- ... end ---- @param c Camera ---- Handles camera movement based on input from the C-buttons. Updates the camera's position or angle to match directional player input -function handle_c_button_movement(c) +--- @param displacementX number +--- @param displacementY number +--- @param displacementZ number +--- Moves the camera to a specified warp destination. This function handles transitions between levels or areas seamlessly +function warp_camera(displacementX, displacementY, displacementZ) -- ... end +--- @param c Camera +--- @param goal number +--- @param inc number +--- Adjusts the camera's height toward a target value (`goalHeight`) while respecting terrain and obstructions. This is really wonky and probably shouldn't be used, prefer `gLakituStates` +function approach_camera_height(c, goal, inc) + -- ... +end + +--- @param dst Vec3f --- @param from Vec3f --- @param to Vec3f ---- @param surf Surface ---- @param range integer ---- @param surfType integer ---- @return integer ---- Determines if a range is obstructed by a surface relative to the camera. Returns true if the range is behind the specified surface -function is_range_behind_surface(from, to, surf, range, surfType) - -- ... -end - ---- @param posX number ---- @param posY number ---- @param posZ number ---- @return integer ---- Checks if a position is within 100 units of Mario's current position. Returns true if the position is within the specified radius and false otherwise -function is_within_100_units_of_mario(posX, posY, posZ) - -- ... -end - ---- @param c Camera ---- Moves Mario's head slightly upward when the C-Up button is pressed. This function aligns the camera to match the head movement for consistency -function move_mario_head_c_up(c) +--- @param rotation Vec3s +--- Offsets a vector by rotating it in 3D space relative to a reference position. This is useful for creating radial effects or dynamic transformations +function offset_rotated(dst, from, to, rotation) -- ... end @@ -3316,112 +3562,15 @@ function next_lakitu_state(newPos, newFoc, curPos, curFoc, oldPos, oldFoc, yaw) -- ... end ---- @param o Object ---- @param point Vec3f ---- @param pitchOff integer ---- @param yawOff integer ---- @param pitchDiv integer ---- @param yawDiv integer ---- Rotates an object toward a specific point in 3D space. Gradually updates the object's pitch and yaw angles to face the target -function obj_rotate_towards_point(o, point, pitchOff, yawOff, pitchDiv, yawDiv) - -- ... -end - ---- @param dst Vec3f ---- @param o Object ---- Converts an object's position to a `Vec3f` format. Useful for aligning object behaviors or interactions with the camera system -function object_pos_to_vec3f(dst, o) - -- ... -end - ---- @param dst Vec3f ---- @param from Vec3f ---- @param to Vec3f ---- @param rotation Vec3s ---- Offsets a vector by rotating it in 3D space relative to a reference position. This is useful for creating radial effects or dynamic transformations -function offset_rotated(dst, from, to, rotation) +--- @param preset integer +function set_fixed_cam_axis_sa_lobby(preset) -- ... end --- @param c Camera ---- @param areaYaw integer --- @return integer ---- Calculates an outward radial offset based on the camera's yaw angle. Returns the offset yaw, used for positioning or alignment -function offset_yaw_outward_radial(c, areaYaw) - -- ... -end - ---- Plays a buzzing sound effect when the camera's position is misaligned with the player's perspective. Used as audio feedback for incorrect camera behavior -function play_camera_buzz_if_c_sideways() - -- ... -end - ---- Plays a buzzing sound effect when a blocked C-button action is attempted. Used to signal invalid input or restricted camera movement -function play_camera_buzz_if_cbutton() - -- ... -end - ---- Plays a buzzing sound effect when the camera attempts to move downward but is restricted. Provides feedback for invalid C-Down input actions -function play_camera_buzz_if_cdown() - -- ... -end - ---- @param c Camera ---- Starts the execution of a predefined cutscene. The camera transitions dynamically to follow the scripted sequence -function play_cutscene(c) - -- ... -end - ---- Plays a sound effect when a blocked action changes the camera mode. This provides feedback for invalid attempts to switch the camera state -function play_sound_button_change_blocked() - -- ... -end - ---- Plays a sound effect when the C-Down button is pressed for camera movement. Provides auditory feedback for valid camera input -function play_sound_cbutton_down() - -- ... -end - ---- Plays a sound effect when the C-Side button (left or right) is pressed for camera movement. Used as audio feedback for horizontal adjustments to the camera -function play_sound_cbutton_side() - -- ... -end - ---- Plays a sound effect when the C-Up button is pressed for camera movement. Provides feedback for vertical camera adjustments -function play_sound_cbutton_up() - -- ... -end - ---- Plays a sound effect when the camera switches between Lakitu and Mario perspectives. Signals a successful change in camera mode -function play_sound_if_cam_switched_to_lakitu_or_mario() - -- ... -end - ---- Plays a sound effect when the R-Button camera mode is changed. Provides feedback for toggling camera behaviors -function play_sound_rbutton_changed() - -- ... -end - ---- @param c Camera ---- @param unused number ---- @return integer ---- Handles radial camera movement based on player input. Updates the camera's position or orientation accordingly -function radial_camera_input(c, unused) - -- ... -end - ---- @param dst Vec3s ---- @param xRange integer ---- @param yRange integer ---- @param zRange integer ---- Generates a random 3D vector with short integer components. Useful for randomized offsets or environmental effects -function random_vec3s(dst, xRange, yRange, zRange) - -- ... -end - ---- @param c Camera ---- Fully resets the camera to its default state and reinitializes all settings. This is typically used when restarting gameplay or loading a new area -function reset_camera(c) +--- Processes course-specific camera settings, such as predefined positions or modes. Adjusts the camera to match the design and gameplay requirements of the current course +function camera_course_processing(c) -- ... end @@ -3442,48 +3591,95 @@ function rotate_camera_around_walls(c, cPos, avoidYaw, yawRange) -- ... end ---- @param dst Vec3f ---- @param src Vec3f ---- @param yaw integer ---- Rotates a vector around the XZ-plane by a specified yaw angle. The result is stored in the destination vector (`dst`). Useful for rotating camera positions or object coordinates horizontally -function rotate_in_xz(dst, src, yaw) +--- @param pg PlayerGeometry +--- Finds the floor and ceiling directly above and below Mario's position. Updates Mario's geometry information for camera calculations +function find_mario_floor_and_ceil(pg) -- ... end ---- @param dst Vec3f ---- @param src Vec3f ---- @param pitch integer ---- Rotates a vector around the YZ-plane by a specified pitch angle. The result is stored in the destination vector (`dst`). Useful for vertical camera rotations or object transformations -function rotate_in_yz(dst, src, pitch) - -- ... -end - ---- @param dest Vec3f ---- @param from Vec3f ---- @param to Vec3f ---- @param scale number ---- Scales a point along a line between two 3D points (`from` and `to`). The scaling factor determines how far along the line the resulting point will be. The result is stored in the destination vector (`dest`) -function scale_along_line(dest, from, to, scale) - -- ... -end - ---- Selects the appropriate camera mode for Mario based on the current gameplay context. Adapts camera behavior dynamically to match Mario's environment or state -function select_mario_cam_mode() - -- ... -end - ---- @param mode integer +--- @param cutscene integer --- @return integer ---- Sets the camera's angle based on the specified mode. Handles rotation and focus adjustments for predefined camera behaviors -function set_cam_angle(mode) +--- Starts a cutscene focused on an object without requiring focus to remain locked. This is useful for dynamic events where the camera adjusts freely +function start_object_cutscene_without_focus(cutscene) + -- ... +end + +--- @param cutscene integer +--- @param o Object +--- @param dialogID integer +--- @return integer +--- Starts a cutscene involving an object and displays dialog during the sequence. The camera focuses on the object while synchronizing dialog with the scene +function cutscene_object_with_dialog(cutscene, o, dialogID) + -- ... +end + +--- @param cutscene integer +--- @param o Object +--- @return integer +--- Starts a cutscene involving an object without dialog. The camera transitions smoothly to focus on the object +function cutscene_object_without_dialog(cutscene, o) + -- ... +end + +--- @param cutscene integer +--- @param o Object +--- @return integer +--- Initiates a cutscene focusing on a specific object in the game world. The camera transitions smoothly to the object, adapting its position as needed +function cutscene_object(cutscene, o) -- ... end --- @param c Camera ---- @param mode integer ---- @param frames integer ---- Changes the camera to a new mode, optionally interpolating over a specified number of frames. Useful for transitioning between different camera behaviors dynamically -function set_camera_mode(c, mode, frames) +--- Starts the execution of a predefined cutscene. The camera transitions dynamically to follow the scripted sequence +function play_cutscene(c) + -- ... +end + +--- @param obj integer +--- @param frame integer +--- @return integer +--- Spawns an object as part of a cutscene, such as props or interactive elements. Returns the spawned object's reference for further manipulation +function cutscene_spawn_obj(obj, frame) + -- ... +end + +--- @param amplitude integer +--- @param decay integer +--- @param shakeSpeed integer +--- Applies a field-of-view shake effect to simulate zoom or focus disruptions. Shake parameters, such as amplitude and decay, control the intensity +function set_fov_shake(amplitude, decay, shakeSpeed) + -- ... +end + +--- @param func integer +--- Assigns a custom function for dynamic field-of-view adjustments. This allows precise control over the camera's zoom behavior during gameplay +function set_fov_function(func) + -- ... +end + +--- @param preset integer +--- Applies a preset field-of-view shake effect during a cutscene. This creates dynamic visual effects, such as zoom or focus disruptions +function cutscene_set_fov_shake_preset(preset) + -- ... +end + +--- @param preset integer +--- @param posX number +--- @param posY number +--- @param posZ number +--- Applies a preset field-of-view shake effect relative to a specific point. The intensity diminishes as the distance from the point increases +function set_fov_shake_from_point_preset(preset, posX, posY, posZ) + -- ... +end + +--- @param o Object +--- @param point Vec3f +--- @param pitchOff integer +--- @param yawOff integer +--- @param pitchDiv integer +--- @param yawDiv integer +--- Rotates an object toward a specific point in 3D space. Gradually updates the object's pitch and yaw angles to face the target +function obj_rotate_towards_point(o, point, pitchOff, yawOff, pitchDiv, yawDiv) -- ... end @@ -3497,157 +3693,6 @@ function set_camera_mode_fixed(c, x, y, z) -- ... end ---- @param mag integer ---- @param decay integer ---- @param inc integer ---- Applies a pitch-based shake effect to the camera. The shake's magnitude, decay, and increment are configurable. Simulates vertical disturbances like impacts or explosions -function set_camera_pitch_shake(mag, decay, inc) - -- ... -end - ---- @param mag integer ---- @param decay integer ---- @param inc integer ---- Applies a roll-based shake effect to the camera. Simulates rotational disturbances for dynamic camera effects -function set_camera_roll_shake(mag, decay, inc) - -- ... -end - ---- @param shake integer ---- Applies a shake effect to the camera based on a hit type. Different shake types simulate various impacts, such as attacks, falls, or shocks -function set_camera_shake_from_hit(shake) - -- ... -end - ---- @param shake integer ---- @param posX number ---- @param posY number ---- @param posZ number ---- Applies a shake effect to the camera, scaled by its proximity to a specified point. The intensity decreases with distance from the point -function set_camera_shake_from_point(shake, posX, posY, posZ) - -- ... -end - ---- @param mag integer ---- @param decay integer ---- @param inc integer ---- Applies a yaw-based shake effect to the camera. Simulates horizontal vibrations or rotational impacts -function set_camera_yaw_shake(mag, decay, inc) - -- ... -end - ---- @param shake integer ---- Applies an environmental shake effect to the camera. Handles predefined shake types triggered by environmental events like explosions or platform movements -function set_environmental_camera_shake(shake) - -- ... -end - ---- @param preset integer -function set_fixed_cam_axis_sa_lobby(preset) - -- ... -end - ---- @param func integer ---- Assigns a custom function for dynamic field-of-view adjustments. This allows precise control over the camera's zoom behavior during gameplay -function set_fov_function(func) - -- ... -end - ---- @param amplitude integer ---- @param decay integer ---- @param shakeSpeed integer ---- Applies a field-of-view shake effect to simulate zoom or focus disruptions. Shake parameters, such as amplitude and decay, control the intensity -function set_fov_shake(amplitude, decay, shakeSpeed) - -- ... -end - ---- @param preset integer ---- @param posX number ---- @param posY number ---- @param posZ number ---- Applies a preset field-of-view shake effect relative to a specific point. The intensity diminishes as the distance from the point increases -function set_fov_shake_from_point_preset(preset, posX, posY, posZ) - -- ... -end - ---- @param mode integer ---- Applies a handheld camera shake effect with configurable parameters. Can be used to simulate dynamic, realistic camera movement -function set_handheld_shake(mode) - -- ... -end - ---- @param dst Pointer_number ---- @param goal number ---- @param scale number ---- @return integer ---- Smoothly transitions or directly sets a floating-point value (`dst`) to approach a target (`goal`). Uses asymptotic scaling for gradual adjustments or direct assignment -function set_or_approach_f32_asymptotic(dst, goal, scale) - -- ... -end - ---- @param current Pointer_integer ---- @param target integer ---- @param increment integer ---- @return integer ---- Smoothly transitions or directly sets a signed 16-bit value (`current`) to approach a target (`target`). Uses symmetric scaling for gradual or immediate adjustments -function set_or_approach_s16_symmetric(current, target, increment) - -- ... -end - ---- @param dst Vec3f ---- @param goal Vec3f ---- @param xMul number ---- @param yMul number ---- @param zMul number ---- Smoothly transitions a 3D vector (`current`) toward a target vector (`goal`) using asymptotic scaling. Allows gradual or instantaneous alignment of 3D positions. Scaling values (the `Mul` variables) for x, y, and z axes determine the speed of adjustment for each component -function set_or_approach_vec3f_asymptotic(dst, goal, xMul, yMul, zMul) - -- ... -end - ---- @param mag integer ---- @param decay integer ---- @param inc integer ---- @param maxDist number ---- @param posX number ---- @param posY number ---- @param posZ number ---- Applies a pitch shake effect to the camera, scaled by proximity to a specified point. Simulates vibrations with intensity decreasing further from the point -function set_pitch_shake_from_point(mag, decay, inc, maxDist, posX, posY, posZ) - -- ... -end - ---- @param pos Vec3f ---- @param focus Vec3f ---- Activates a handheld camera shake effect. Calculates positional and focus adjustments to simulate manual movement -function shake_camera_handheld(pos, focus) - -- ... -end - ---- @param pos Vec3f ---- @param focus Vec3f ---- Activates a pitch-based shake effect. Adds vertical vibrational movement to the camera's behavior -function shake_camera_pitch(pos, focus) - -- ... -end - ---- @param roll Pointer_integer ---- Applies a roll-based shake effect to the camera. Simulates rotational disturbances caused by impacts or other events -function shake_camera_roll(roll) - -- ... -end - ---- @param pos Vec3f ---- @param focus Vec3f ---- Activates a yaw-based shake effect. Adds horizontal vibrational movement to the camera's behavior -function shake_camera_yaw(pos, focus) - -- ... -end - ---- Skips camera interpolation for a frame, locking the camera instantly to the target position. Useful for immediate changes in camera state or position without smooth transitions -function skip_camera_interpolation() - -- ... -end - --- @param angle integer --- @return integer --- Takes in an SM64 angle unit and returns the nearest 45 degree angle, also in SM64 angle units. Useful when needing to align angles (camera, yaw, etc.) @@ -3655,59 +3700,14 @@ function snap_to_45_degrees(angle) -- ... end ---- @param c Camera ---- Resets the camera's state while retaining some settings, such as position or mode. This is often used when soft-resetting gameplay without reinitialization -function soft_reset_camera(c) +--- @param enable integer +--- Toggles whether the camera uses course-specific settings. This is useful for enabling or disabling custom behaviors in specific courses or areas +function camera_set_use_course_specific_settings(enable) -- ... end ---- @param c Camera ---- @param cutscene integer ---- Starts a cutscene based on the provided ID. The camera transitions to predefined behaviors for the duration of the cutscene -function start_cutscene(c, cutscene) - -- ... -end - ---- @param cutscene integer ---- @return integer ---- Starts a cutscene focused on an object without requiring focus to remain locked. This is useful for dynamic events where the camera adjusts freely -function start_object_cutscene_without_focus(cutscene) - -- ... -end - ---- @param c Camera ---- @param frames integer ---- Transitions the camera to the next state over a specified number of frames. This is typically used for cutscenes or scripted sequences -function transition_next_state(c, frames) - -- ... -end - ---- @param trigger integer ---- @return integer ---- Triggers a dialog sequence during a cutscene. The dialog is synchronized with the camera's position and movement -function trigger_cutscene_dialog(trigger) - -- ... -end - ---- @param dst Vec3f ---- @param src Vec3f ---- Subtracts one 3D vector (`src`) from another (`dst`). Stores the result in the destination vector -function vec3f_sub(dst, src) - -- ... -end - ---- @param o Object ---- @param src Vec3f ---- Converts a `Vec3f` position to an object's internal format. Useful for syncing 3D positions between objects and the game world -function vec3f_to_object_pos(o, src) - -- ... -end - ---- @param displacementX number ---- @param displacementY number ---- @param displacementZ number ---- Moves the camera to a specified warp destination. This function handles transitions between levels or areas seamlessly -function warp_camera(displacementX, displacementY, displacementZ) +--- Centers the ROM hack camera. This function is designed for non-standard level layouts and modded game environments +function center_rom_hack_camera() -- ... end @@ -3717,21 +3717,6 @@ function get_character(m) -- ... end ---- @param m MarioState ---- @param characterAnim CharacterAnimID ---- @return integer ---- Gets the animation ID to use for a specific character and animation combination. The ID is based on `characterAnim` and the character currently controlled by Mario (`m`). Useful for determining which animation to play for actions like walking, jumping, or idle states -function get_character_anim(m, characterAnim) - -- ... -end - ---- @param m MarioState ---- @return number ---- Calculates the animation offset for Mario's current animation. The offset is determined by the type of animation being played (e.g., hand, feet, or torso movement). Useful for smoothly syncing Mario's model height or positional adjustments during animations -function get_character_anim_offset(m) - -- ... -end - --- @param m MarioState --- @param characterSound CharacterSound --- Plays a character-specific sound based on the given `characterSound` value. The sound is tied to Mario's current state (`m`). Useful for triggering sound effects for actions like jumping or interacting with the environment @@ -3739,6 +3724,14 @@ function play_character_sound(m, characterSound) -- ... end +--- @param m MarioState +--- @param characterSound CharacterSound +--- @param offset integer +--- Plays a character-specific sound with an additional `offset`, allowing variations or delays in the sound effect. Uses Mario's current state (`m`). Useful for adding dynamic sound effects or syncing sounds to specific animations or events +function play_character_sound_offset(m, characterSound, offset) + -- ... +end + --- @param m MarioState --- @param characterSound CharacterSound --- @param flags integer @@ -3748,10 +3741,17 @@ function play_character_sound_if_no_flag(m, characterSound, flags) end --- @param m MarioState ---- @param characterSound CharacterSound ---- @param offset integer ---- Plays a character-specific sound with an additional `offset`, allowing variations or delays in the sound effect. Uses Mario's current state (`m`). Useful for adding dynamic sound effects or syncing sounds to specific animations or events -function play_character_sound_offset(m, characterSound, offset) +--- @return number +--- Calculates the animation offset for Mario's current animation. The offset is determined by the type of animation being played (e.g., hand, feet, or torso movement). Useful for smoothly syncing Mario's model height or positional adjustments during animations +function get_character_anim_offset(m) + -- ... +end + +--- @param m MarioState +--- @param characterAnim CharacterAnimID +--- @return integer +--- Gets the animation ID to use for a specific character and animation combination. The ID is based on `characterAnim` and the character currently controlled by Mario (`m`). Useful for determining which animation to play for actions like walking, jumping, or idle states +function get_character_anim(m, characterAnim) -- ... end @@ -3772,9 +3772,15 @@ function djui_console_toggle() -- ... end ---- @return DjuiColor ---- Gets the current DJUI HUD color -function djui_hud_get_color() +--- @return integer +--- Gets the current DJUI HUD resolution +function djui_hud_get_resolution() + -- ... +end + +--- @param resolutionType HudUtilsResolution +--- Sets the current DJUI HUD resolution +function djui_hud_set_resolution(resolutionType) -- ... end @@ -3784,15 +3790,78 @@ function djui_hud_get_filter() -- ... end +--- @param filterType HudUtilsFilter +--- Sets the current DJUI HUD texture filter +function djui_hud_set_filter(filterType) + -- ... +end + --- @return integer --- Gets the current DJUI HUD font function djui_hud_get_font() -- ... end ---- @return number ---- Gets the camera FOV coefficient -function djui_hud_get_fov_coeff() +--- @param fontType integer +--- Sets the current DJUI HUD font +function djui_hud_set_font(fontType) + -- ... +end + +--- @return DjuiColor +--- Gets the current DJUI HUD color +function djui_hud_get_color() + -- ... +end + +--- @param r integer +--- @param g integer +--- @param b integer +--- @param a integer +--- Sets the current DJUI HUD color +function djui_hud_set_color(r, g, b, a) + -- ... +end + +--- Resets the current DJUI HUD color +function djui_hud_reset_color() + -- ... +end + +--- @return HudUtilsRotation +--- Gets the current DJUI HUD rotation +function djui_hud_get_rotation() + -- ... +end + +--- @param rotation integer +--- @param pivotX number +--- @param pivotY number +--- Sets the current DJUI HUD rotation +function djui_hud_set_rotation(rotation, pivotX, pivotY) + -- ... +end + +--- @param prevRotation integer +--- @param prevPivotX number +--- @param prevPivotY number +--- @param rotation integer +--- @param pivotX number +--- @param pivotY number +--- Sets the current DJUI HUD rotation interpolated +function djui_hud_set_rotation_interpolated(prevRotation, prevPivotX, prevPivotY, rotation, pivotX, pivotY) + -- ... +end + +--- @return integer +--- Gets the screen width in the current DJUI HUD resolution +function djui_hud_get_screen_width() + -- ... +end + +--- @return integer +--- Gets the screen height in the current DJUI HUD resolution +function djui_hud_get_screen_height() -- ... end @@ -3820,33 +3889,39 @@ function djui_hud_get_raw_mouse_y() -- ... end ---- @return integer ---- Gets the current DJUI HUD resolution -function djui_hud_get_resolution() - -- ... -end - ---- @return HudUtilsRotation ---- Gets the current DJUI HUD rotation -function djui_hud_get_rotation() +--- @param locked boolean +--- Sets if the cursor is hidden and constrainted to the window +function djui_hud_set_mouse_locked(locked) -- ... end --- @return integer ---- Gets the screen height in the current DJUI HUD resolution -function djui_hud_get_screen_height() +--- Returns the flags of the mouse buttons held down +function djui_hud_get_mouse_buttons_down() -- ... end --- @return integer ---- Gets the screen width in the current DJUI HUD resolution -function djui_hud_get_screen_width() +--- Returns the flags of the mouse buttons clicked +function djui_hud_get_mouse_buttons_pressed() -- ... end ---- @return boolean ---- Checks if the DJUI pause menu is created -function djui_hud_is_pause_menu_created() +--- @return integer +--- Returns the flags of the mouse buttons released +function djui_hud_get_mouse_buttons_released() + -- ... +end + +--- @return number +--- Returns the amount scrolled horizontally (-left/right+) +function djui_hud_get_mouse_scroll_x() + -- ... +end + +--- @return number +--- Returns the amount scrolled vertically (-down/up+) +function djui_hud_get_mouse_scroll_y() -- ... end @@ -3900,60 +3975,15 @@ function djui_hud_render_rect_interpolated(prevX, prevY, prevWidth, prevHeight, -- ... end ---- Resets the current DJUI HUD color -function djui_hud_reset_color() +--- @return number +--- Gets the current camera FOV +function get_current_fov() -- ... end ---- @param r integer ---- @param g integer ---- @param b integer ---- @param a integer ---- Sets the current DJUI HUD color -function djui_hud_set_color(r, g, b, a) - -- ... -end - ---- @param filterType HudUtilsFilter ---- Sets the current DJUI HUD texture filter -function djui_hud_set_filter(filterType) - -- ... -end - ---- @param fontType integer ---- Sets the current DJUI HUD font -function djui_hud_set_font(fontType) - -- ... -end - ---- @param locked boolean ---- Sets if the cursor is hidden and constrainted to the window -function djui_hud_set_mouse_locked(locked) - -- ... -end - ---- @param resolutionType HudUtilsResolution ---- Sets the current DJUI HUD resolution -function djui_hud_set_resolution(resolutionType) - -- ... -end - ---- @param rotation integer ---- @param pivotX number ---- @param pivotY number ---- Sets the current DJUI HUD rotation -function djui_hud_set_rotation(rotation, pivotX, pivotY) - -- ... -end - ---- @param prevRotation integer ---- @param prevPivotX number ---- @param prevPivotY number ---- @param rotation integer ---- @param pivotX number ---- @param pivotY number ---- Sets the current DJUI HUD rotation interpolated -function djui_hud_set_rotation_interpolated(prevRotation, prevPivotX, prevPivotY, rotation, pivotX, pivotY) +--- @return number +--- Gets the camera FOV coefficient +function djui_hud_get_fov_coeff() -- ... end @@ -3965,14 +3995,14 @@ function djui_hud_world_pos_to_screen_pos(pos, out) -- ... end ---- Opens the DJUI pause menu -function djui_open_pause_menu() +--- @return boolean +--- Checks if the DJUI pause menu is created +function djui_hud_is_pause_menu_created() -- ... end ---- @return number ---- Gets the current camera FOV -function get_current_fov() +--- Opens the DJUI pause menu +function djui_open_pause_menu() -- ... end @@ -3998,112 +4028,6 @@ function djui_popup_create(message, lines) -- ... end ---- Drops any queued background music -function drop_queued_background_music() - -- ... -end - ---- @param player integer ---- @param targetScale integer ---- @param fadeDuration integer ---- Fades the volume of `player` to `targetScale` (0-127) over `fadeDuration` -function fade_volume_scale(player, targetScale, fadeDuration) - -- ... -end - ---- @param seqId integer ---- @param fadeOut integer ---- Fades out background music `seqId` over `fadeOut` -function fadeout_background_music(seqId, fadeOut) - -- ... -end - ---- @return integer ---- Gets the current background music -function get_current_background_music() - -- ... -end - ---- @return integer ---- Gets the current background music's default volume -function get_current_background_music_default_volume() - -- ... -end - ---- @return integer ---- Gets the current max target volume -function get_current_background_music_max_target_volume() - -- ... -end - ---- @return integer ---- Gets the current target volume -function get_current_background_music_target_volume() - -- ... -end - ---- @param x number ---- @param z number ---- @return number -function get_sound_pan(x, z) - -- ... -end - ---- @return integer ---- Checks if the current background music is lowered -function is_current_background_music_volume_lowered() - -- ... -end - ---- Plays the star collect fanfare (this function's name was mixed up with the other) -function play_course_clear() - -- ... -end - ---- @param dialogID integer ---- Plays a dialog sound corresponding to `dialogID` -function play_dialog_sound(dialogID) - -- ... -end - ---- @param player integer ---- @param seqArgs integer ---- @param fadeTimer integer ---- Plays fading in music (`seqArgs`) on `player` over `fadeTimer` -function play_music(player, seqArgs, fadeTimer) - -- ... -end - ---- Plays Peach's letter jingle -function play_peachs_jingle() - -- ... -end - ---- @param keepBackgroundMusic integer ---- Plays the power star jingle, set `keepBackgroundMusic` to 0 to mute background music -function play_power_star_jingle(keepBackgroundMusic) - -- ... -end - ---- Plays the puzzle jingle -function play_puzzle_jingle() - -- ... -end - ---- Plays the race fanfare when a race is started -function play_race_fanfare() - -- ... -end - ---- @param seqId integer ---- @param bgMusicVolume integer ---- @param volume integer ---- @param fadeTimer integer ---- Plays fading in secondary music `seqId` at `volume` over `fadeTimer` and sets the current background music's volume to `bgMusicVolume` -function play_secondary_music(seqId, bgMusicVolume, volume, fadeTimer) - -- ... -end - --- @param soundBits integer --- @param pos Vec3f --- Plays a sound (`soundBits`) at `pos` (usually `gGlobalSoundSource` or `m.header.gfx.cameraToObject`) @@ -4119,16 +4043,6 @@ function play_sound_with_freq_scale(soundBits, pos, freqScale) -- ... end ---- Plays the course clear fanfare (this function's name was mixed up with the other) -function play_star_fanfare() - -- ... -end - ---- Plays Toad's jingle -function play_toads_jingle() - -- ... -end - --- @param player integer --- @param fadeDuration integer --- Fades out `player` with `fadeDuration` @@ -4136,6 +4050,14 @@ function seq_player_fade_out(player, fadeDuration) -- ... end +--- @param player integer +--- @param targetScale integer +--- @param fadeDuration integer +--- Fades the volume of `player` to `targetScale` (0-127) over `fadeDuration` +function fade_volume_scale(player, targetScale, fadeDuration) + -- ... +end + --- @param player integer --- @param fadeDuration integer --- @param percentage integer @@ -4151,68 +4073,12 @@ function seq_player_unlower_volume(player, fadeDuration) -- ... end ---- @param fadeOutTime integer ---- Sets the `fadeOutTime` of audio -function set_audio_fadeout(fadeOutTime) - -- ... -end - --- @param muted integer --- Sets the muted status of all sequence players function set_audio_muted(muted) -- ... end ---- @param bank integer ---- @param speed integer ---- Sets the `speed` of moving `bank` -function set_sound_moving_speed(bank, speed) - -- ... -end - ---- @param player integer ---- @param bankMask integer ---- Enables `bankMask` soundbanks in `player` -function sound_banks_disable(player, bankMask) - -- ... -end - ---- @param player integer ---- @param bankMask integer ---- Disables `bankMask` soundbanks in `player` -function sound_banks_enable(player, bankMask) - -- ... -end - ---- @param distance number ---- @return number -function sound_get_level_intensity(distance) - -- ... -end - ---- @param seqId integer -function sound_reset_background_music_default_volume(seqId) - -- ... -end - ---- @param seqId integer ---- @param volume integer -function sound_set_background_music_default_volume(seqId, volume) - -- ... -end - ---- @param seqId integer ---- Stops background music `seqId` -function stop_background_music(seqId) - -- ... -end - ---- @param fadeTimer integer ---- Fades out secondary music over `fadeTimer` -function stop_secondary_music(fadeTimer) - -- ... -end - --- @param soundBits integer --- @param pos Vec3f --- Stops a sound (`soundBits`) at `pos` (usually `gGlobalSoundSource` or `m.header.gfx.cameraToObject`) @@ -4231,6 +4097,170 @@ function stop_sounds_in_continuous_banks() -- ... end +--- @param player integer +--- @param bankMask integer +--- Enables `bankMask` soundbanks in `player` +function sound_banks_disable(player, bankMask) + -- ... +end + +--- @param player integer +--- @param bankMask integer +--- Disables `bankMask` soundbanks in `player` +function sound_banks_enable(player, bankMask) + -- ... +end + +--- @param bank integer +--- @param speed integer +--- Sets the `speed` of moving `bank` +function set_sound_moving_speed(bank, speed) + -- ... +end + +--- @param dialogID integer +--- Plays a dialog sound corresponding to `dialogID` +function play_dialog_sound(dialogID) + -- ... +end + +--- @param player integer +--- @param seqArgs integer +--- @param fadeTimer integer +--- Plays fading in music (`seqArgs`) on `player` over `fadeTimer` +function play_music(player, seqArgs, fadeTimer) + -- ... +end + +--- @param seqId integer +--- Stops background music `seqId` +function stop_background_music(seqId) + -- ... +end + +--- @param seqId integer +--- @param fadeOut integer +--- Fades out background music `seqId` over `fadeOut` +function fadeout_background_music(seqId, fadeOut) + -- ... +end + +--- Drops any queued background music +function drop_queued_background_music() + -- ... +end + +--- @return integer +--- Gets the current background music +function get_current_background_music() + -- ... +end + +--- @return integer +--- Gets the current background music's default volume +function get_current_background_music_default_volume() + -- ... +end + +--- @return integer +--- Gets the current target volume +function get_current_background_music_target_volume() + -- ... +end + +--- @return integer +--- Gets the current max target volume +function get_current_background_music_max_target_volume() + -- ... +end + +--- @return integer +--- Checks if the current background music is lowered +function is_current_background_music_volume_lowered() + -- ... +end + +--- @param seqId integer +--- @param bgMusicVolume integer +--- @param volume integer +--- @param fadeTimer integer +--- Plays fading in secondary music `seqId` at `volume` over `fadeTimer` and sets the current background music's volume to `bgMusicVolume` +function play_secondary_music(seqId, bgMusicVolume, volume, fadeTimer) + -- ... +end + +--- @param fadeTimer integer +--- Fades out secondary music over `fadeTimer` +function stop_secondary_music(fadeTimer) + -- ... +end + +--- @param fadeOutTime integer +--- Sets the `fadeOutTime` of audio +function set_audio_fadeout(fadeOutTime) + -- ... +end + +--- Plays the star collect fanfare (this function's name was mixed up with the other) +function play_course_clear() + -- ... +end + +--- Plays Peach's letter jingle +function play_peachs_jingle() + -- ... +end + +--- Plays the puzzle jingle +function play_puzzle_jingle() + -- ... +end + +--- Plays the course clear fanfare (this function's name was mixed up with the other) +function play_star_fanfare() + -- ... +end + +--- @param keepBackgroundMusic integer +--- Plays the power star jingle, set `keepBackgroundMusic` to 0 to mute background music +function play_power_star_jingle(keepBackgroundMusic) + -- ... +end + +--- Plays the race fanfare when a race is started +function play_race_fanfare() + -- ... +end + +--- Plays Toad's jingle +function play_toads_jingle() + -- ... +end + +--- @param seqId integer +function sound_reset_background_music_default_volume(seqId) + -- ... +end + +--- @param seqId integer +--- @param volume integer +function sound_set_background_music_default_volume(seqId, volume) + -- ... +end + +--- @param x number +--- @param z number +--- @return number +function get_sound_pan(x, z) + -- ... +end + +--- @param distance number +--- @return number +function sound_get_level_intensity(distance) + -- ... +end + --- @param m MarioState --- @return boolean --- Checks common cancels for first person @@ -4238,11 +4268,6 @@ function first_person_check_cancels(m) -- ... end ---- Resets first person -function first_person_reset() - -- ... -end - --- @return boolean --- Checks if first person is enabled function get_first_person_enabled() @@ -4255,13 +4280,13 @@ function set_first_person_enabled(enable) -- ... end ---- @param dialog integer -function create_dialog_box(dialog) +--- Resets first person +function first_person_reset() -- ... end --- @param dialog integer -function create_dialog_box_with_response(dialog) +function create_dialog_box(dialog) -- ... end @@ -4276,11 +4301,8 @@ function create_dialog_inverted_box(dialog) -- ... end -function reset_dialog_override_color() - -- ... -end - -function reset_dialog_override_pos() +--- @param dialog integer +function create_dialog_box_with_response(dialog) -- ... end @@ -4288,8 +4310,23 @@ function reset_dialog_render_state() -- ... end ---- @param state integer -function set_dialog_box_state(state) +--- @param mode integer +function set_menu_mode(mode) + -- ... +end + +--- @param width integer +function set_min_dialog_width(width) + -- ... +end + +--- @param x integer +--- @param y integer +function set_dialog_override_pos(x, y) + -- ... +end + +function reset_dialog_override_pos() -- ... end @@ -4305,111 +4342,12 @@ function set_dialog_override_color(bgR, bgG, bgB, bgA, textR, textG, textB, text -- ... end ---- @param x integer ---- @param y integer -function set_dialog_override_pos(x, y) +function reset_dialog_override_color() -- ... end ---- @param mode integer -function set_menu_mode(mode) - -- ... -end - ---- @param width integer -function set_min_dialog_width(width) - -- ... -end - ---- @param m MarioState ---- @param o Object ---- @return integer ---- Determines how Mario interacts with a given object based on his current action, position, and other state variables. Calculates the appropriate interaction type (e.g., punch, kick, ground pound) that should result from Mario's contact with the specified object (`o`). Useful for handling different types of player-object collisions, attacks, and object behaviors -function determine_interaction(m, o) - -- ... -end - ---- @param m MarioState ---- @return integer ---- Checks if Mario is currently wearing his normal cap on his head. Returns true if Mario's flag state matches that of having the normal cap equipped on his head, otherwise false. Useful for determining Mario's cap status -function does_mario_have_normal_cap_on_head(m) - -- ... -end - ---- @param door Object ---- @return integer ---- Retrieves the save file flag associated with a door, based on the number of stars required to open it. Used to check if the player has unlocked certain star doors or progressed far enough to access new areas -function get_door_save_file_flag(door) - -- ... -end - ---- @param capObject Object ---- @return integer ---- Determines the type of cap an object represents. Depending on the object's behavior, it returns a cap type (normal, metal, wing, vanish). Useful for handling the logic of picking up, wearing, or losing different kinds of caps -function get_mario_cap_flag(capObject) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles Mario's interaction with the Boo's Big Haunt (BBH) entrance object. When Mario tries to enter the BBH area, this function determines the resulting action (e.g., a jump or spin entrance) -function interact_bbh_entrance(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interactions where Mario bounces off the top of an object (e.g., Goombas, Koopas). Checks if Mario attacks the object from above and applies the appropriate knockback, sound effects, and object state changes. Useful for enemy defeat mechanics and platform bouncing -function interact_bounce_top(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interactions with breakable objects (e.g., breakable boxes or bob-ombs). If Mario hits the object with a valid attack (like a punch or kick), the object is destroyed or changes state. Useful for managing collectible items hidden in breakable objects and level progression through destructible blocks or walls -function interact_breakable(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interaction with Bully enemies. Determines if Mario attacks the Bully or gets knocked back. Updates Mario's velocity and state accordingly, and can defeat the Bully if attacked successfully. Useful for enemy encounters that involve pushing and shoving mechanics rather than just stomping like the bullies -function interact_bully(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interaction when Mario touches a cannon base. If the cannon is ready, Mario enters the cannon, triggering a special action and camera behavior. Useful for transitioning to cannon-aiming mode and enabling cannon travel within levels -function interact_cannon_base(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interaction when Mario picks up a cap object. This includes normal caps, wing caps, vanish caps, and metal caps. Updates Mario's state (e.g., cap timers, sound effects) and may initiate putting on the cap animation. Useful for managing cap statuses -function interact_cap(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interactions with objects like Clams or Bubbas, which can damage Mario or, in Bubba's case, eat Mario. If Bubba eats Mario, it triggers a unique "caught" action. Otherwise, it deals damage and knockback if hit by a Clam -function interact_clam_or_bubba(m, interactType, o) +--- @param state integer +function set_dialog_box_state(state) -- ... end @@ -4426,125 +4364,8 @@ end --- @param interactType integer --- @param o Object --- @return integer ---- Handles damaging interactions from various objects (e.g., enemies, hazards). If Mario takes damage, it applies knockback and reduces health. Useful for enemy attacks, environmental hazards, and managing damage related behaviors -function interact_damage(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interaction when Mario touches a door. If Mario meets the star requirement or has the key, he can unlock/open the door. Otherwise, it may display dialog indicating the requirement. Useful for controlling access to locked areas and providing progression gating in the game -function interact_door(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interaction with flame objects. If Mario touches a flame and is not invulnerable or protected by certain caps, he takes damage and may be set on fire, causing a burning jump. Useful for simulating fire damage and hazards in levels -function interact_flame(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interaction with grabbable objects (e.g., crates, small enemies, or Bowser). Checks if Mario can pick up the object and initiates the grab action if possible. Useful for course mechanics, throwing items, and Bowser -function interact_grabbable(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interactions where Mario hits an object from below (e.g., hitting a block from underneath). Determines if Mario damages/destroys the object, or if it damages Mario. Useful for handling upward attacks, hitting coin blocks, or interacting with certain NPCs from below -function interact_hit_from_below(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interaction with Hoot, the owl. If Mario can grab onto Hoot, this sets Mario onto a riding action, allowing him to fly around the level. Useful for special traversal mechanics and shortcuts within a course -function interact_hoot(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interaction with the igloo barrier found in Snowman's Land. If Mario runs into the barrier, this function pushes him away and prevents passage without the vanish cap. Useful for enforcing require-caps to access certain areas -function interact_igloo_barrier(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interaction when Mario touches a Koopa Shell. If conditions are met, Mario can hop onto the shell and start riding it, changing his movement mechanics. Useful for implementing Koopa Shell behavior -function interact_koopa_shell(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interaction with Mr. Blizzard (the snowman enemy) or similar objects. If Mario is attacked or collides with Mr. Blizzard, it applies damage and knockback if not protected or attacking -function interact_mr_blizzard(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interaction with another player (in multiplayer scenarios). Checks if Mario and another player collide and resolves any special behavior like bouncing on top. Useful for multiplayer interactions, such as PvP or cooperative gameplay mechanics -function interact_player(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interaction with poles (e.g., climbing poles). If Mario runs into a vertical pole, he can grab it and start climbing. Useful for platforming mechanics -function interact_pole(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interaction with shocking objects. If Mario touches an electrified enemy or hazard, he takes damage and may be stunned or shocked. Useful for electric-themed enemies and obstacles -function interact_shock(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interaction with Snufit bullets (projectiles fired by certain enemies). If Mario is not protected, he takes damage. Otherwise, the bullet can be destroyed -function interact_snufit_bullet(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interaction with Spiny-walking enemies. If Mario attacks it (e.g., by punching), the enemy is hurt. If he fails to attack properly (say bouncing on top), Mario takes damage and knockback. Useful for enemies that cannot be stomped from above and require direct attacks -function interact_spiny_walking(m, interactType, o) +--- Handles interactions with water rings that heal Mario. Passing through water rings increases his health counter. Useful for underwater stages +function interact_water_ring(m, interactType, o) -- ... end @@ -4561,26 +4382,8 @@ end --- @param interactType integer --- @param o Object --- @return integer ---- Handles interaction with strong wind gusts. These gusts push Mario back, often knocking him off platforms or sending him flying backwards. Useful for environmental wind hazards -function interact_strong_wind(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interaction with signs, NPCs, and other text-bearing objects. If Mario presses the interact button facing them, he enters a dialog reading state. Useful for managing hints, story elements, or gameplay instructions through in-game dialogue -function interact_text(m, interactType, o) - -- ... -end - ---- @param m MarioState ---- @param interactType integer ---- @param o Object ---- @return integer ---- Handles interaction with tornados. If Mario touches a tornado, he enters a spinning twirl action, losing control temporarily. Useful for desert levels or areas where environmental hazards lift Mario into the air -function interact_tornado(m, interactType, o) +--- Handles Mario's interaction with the Boo's Big Haunt (BBH) entrance object. When Mario tries to enter the BBH area, this function determines the resulting action (e.g., a jump or spin entrance) +function interact_bbh_entrance(m, interactType, o) -- ... end @@ -4606,8 +4409,44 @@ end --- @param interactType integer --- @param o Object --- @return integer ---- Handles interactions with water rings that heal Mario. Passing through water rings increases his health counter. Useful for underwater stages -function interact_water_ring(m, interactType, o) +--- Handles interaction when Mario touches a door. If Mario meets the star requirement or has the key, he can unlock/open the door. Otherwise, it may display dialog indicating the requirement. Useful for controlling access to locked areas and providing progression gating in the game +function interact_door(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interaction when Mario touches a cannon base. If the cannon is ready, Mario enters the cannon, triggering a special action and camera behavior. Useful for transitioning to cannon-aiming mode and enabling cannon travel within levels +function interact_cannon_base(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interaction with another player (in multiplayer scenarios). Checks if Mario and another player collide and resolves any special behavior like bouncing on top. Useful for multiplayer interactions, such as PvP or cooperative gameplay mechanics +function interact_player(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interaction with the igloo barrier found in Snowman's Land. If Mario runs into the barrier, this function pushes him away and prevents passage without the vanish cap. Useful for enforcing require-caps to access certain areas +function interact_igloo_barrier(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interaction with tornados. If Mario touches a tornado, he enters a spinning twirl action, losing control temporarily. Useful for desert levels or areas where environmental hazards lift Mario into the air +function interact_tornado(m, interactType, o) -- ... end @@ -4621,44 +4460,164 @@ function interact_whirlpool(m, interactType, o) end --- @param m MarioState ---- @param capSpeed number ---- Makes Mario blow off his normal cap at a given speed. Removes the normal cap from Mario's head and spawns it as a collectible object in the game world. Useful for simulating events where Mario loses his cap due to enemy attacks or environmental forces -function mario_blow_off_cap(m, capSpeed) - -- ... -end - ---- @param m MarioState +--- @param interactType integer +--- @param o Object --- @return integer ---- Checks if Mario can grab the currently encountered object (usually triggered when Mario punches or dives). If conditions are met, initiates the grabbing process. Useful for picking up objects, throwing enemies, or grabbing special items -function mario_check_object_grab(m) - -- ... -end - ---- @param m MarioState ---- Causes Mario to drop the object he is currently holding. Sets the held object's state accordingly and places it in front of Mario. Useful for releasing carried objects, such as throwing Bob-ombs or setting down crates -function mario_drop_held_object(m) +--- Handles interaction with strong wind gusts. These gusts push Mario back, often knocking him off platforms or sending him flying backwards. Useful for environmental wind hazards +function interact_strong_wind(m, interactType, o) -- ... end --- @param m MarioState --- @param interactType integer ---- @return Object ---- Returns a collided object that matches a given interaction type from Mario's current collision data. Useful for determining which object Mario has come into contact with -function mario_get_collided_object(m, interactType) - -- ... -end - ---- @param m MarioState ---- Grabs the object currently referenced by Mario's `usedObj` if it's not already being held. Changes the object's state to indicate it is now held by Mario. Useful for handling the moment Mario successfully picks up an object -function mario_grab_used_object(m) - -- ... -end - ---- @param m MarioState ---- @param arg integer +--- @param o Object --- @return integer ---- Makes Mario lose his normal cap to an enemy, such as Klepto or Ukiki. Updates flags so that the cap is no longer on Mario's head. Returns true if Mario was wearing his normal cap, otherwise false. Useful for scenarios where enemies steal Mario's cap -function mario_lose_cap_to_enemy(m, arg) +--- Handles interaction with flame objects. If Mario touches a flame and is not invulnerable or protected by certain caps, he takes damage and may be set on fire, causing a burning jump. Useful for simulating fire damage and hazards in levels +function interact_flame(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interaction with Snufit bullets (projectiles fired by certain enemies). If Mario is not protected, he takes damage. Otherwise, the bullet can be destroyed +function interact_snufit_bullet(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interactions with objects like Clams or Bubbas, which can damage Mario or, in Bubba's case, eat Mario. If Bubba eats Mario, it triggers a unique "caught" action. Otherwise, it deals damage and knockback if hit by a Clam +function interact_clam_or_bubba(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interaction with Bully enemies. Determines if Mario attacks the Bully or gets knocked back. Updates Mario's velocity and state accordingly, and can defeat the Bully if attacked successfully. Useful for enemy encounters that involve pushing and shoving mechanics rather than just stomping like the bullies +function interact_bully(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interaction with shocking objects. If Mario touches an electrified enemy or hazard, he takes damage and may be stunned or shocked. Useful for electric-themed enemies and obstacles +function interact_shock(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interaction with Mr. Blizzard (the snowman enemy) or similar objects. If Mario is attacked or collides with Mr. Blizzard, it applies damage and knockback if not protected or attacking +function interact_mr_blizzard(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interactions where Mario hits an object from below (e.g., hitting a block from underneath). Determines if Mario damages/destroys the object, or if it damages Mario. Useful for handling upward attacks, hitting coin blocks, or interacting with certain NPCs from below +function interact_hit_from_below(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interactions where Mario bounces off the top of an object (e.g., Goombas, Koopas). Checks if Mario attacks the object from above and applies the appropriate knockback, sound effects, and object state changes. Useful for enemy defeat mechanics and platform bouncing +function interact_bounce_top(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interaction with Spiny-walking enemies. If Mario attacks it (e.g., by punching), the enemy is hurt. If he fails to attack properly (say bouncing on top), Mario takes damage and knockback. Useful for enemies that cannot be stomped from above and require direct attacks +function interact_spiny_walking(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles damaging interactions from various objects (e.g., enemies, hazards). If Mario takes damage, it applies knockback and reduces health. Useful for enemy attacks, environmental hazards, and managing damage related behaviors +function interact_damage(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interactions with breakable objects (e.g., breakable boxes or bob-ombs). If Mario hits the object with a valid attack (like a punch or kick), the object is destroyed or changes state. Useful for managing collectible items hidden in breakable objects and level progression through destructible blocks or walls +function interact_breakable(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interaction when Mario touches a Koopa Shell. If conditions are met, Mario can hop onto the shell and start riding it, changing his movement mechanics. Useful for implementing Koopa Shell behavior +function interact_koopa_shell(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interaction with poles (e.g., climbing poles). If Mario runs into a vertical pole, he can grab it and start climbing. Useful for platforming mechanics +function interact_pole(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interaction with Hoot, the owl. If Mario can grab onto Hoot, this sets Mario onto a riding action, allowing him to fly around the level. Useful for special traversal mechanics and shortcuts within a course +function interact_hoot(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interaction when Mario picks up a cap object. This includes normal caps, wing caps, vanish caps, and metal caps. Updates Mario's state (e.g., cap timers, sound effects) and may initiate putting on the cap animation. Useful for managing cap statuses +function interact_cap(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interaction with grabbable objects (e.g., crates, small enemies, or Bowser). Checks if Mario can pick up the object and initiates the grab action if possible. Useful for course mechanics, throwing items, and Bowser +function interact_grabbable(m, interactType, o) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @param o Object +--- @return integer +--- Handles interaction with signs, NPCs, and other text-bearing objects. If Mario presses the interact button facing them, he enters a dialog reading state. Useful for managing hints, story elements, or gameplay instructions through in-game dialogue +function interact_text(m, interactType, o) -- ... end @@ -4671,8 +4630,26 @@ function mario_obj_angle_to_object(m, o) end --- @param m MarioState ---- Retrieves Mario's normal cap if it was previously lost. Removes the cap from Mario's hand state and places it on his head. Useful when Mario recovers his normal cap from enemies, finds it in a level, or if it were to disappear -function mario_retrieve_cap(m) +--- Stops Mario from riding any currently ridden object (e.g., a Koopa shell or Hoot), updating the object's interaction status and Mario's state. Useful for cleanly dismounting ridden objects +function mario_stop_riding_object(m) + -- ... +end + +--- @param m MarioState +--- Grabs the object currently referenced by Mario's `usedObj` if it's not already being held. Changes the object's state to indicate it is now held by Mario. Useful for handling the moment Mario successfully picks up an object +function mario_grab_used_object(m) + -- ... +end + +--- @param m MarioState +--- Causes Mario to drop the object he is currently holding. Sets the held object's state accordingly and places it in front of Mario. Useful for releasing carried objects, such as throwing Bob-ombs or setting down crates +function mario_drop_held_object(m) + -- ... +end + +--- @param m MarioState +--- Throws the object Mario is currently holding. The object is placed in front of Mario and given a forward velocity. Useful for attacking enemies with thrown objects, solving puzzles by throwing crates, or interacting with environment items +function mario_throw_held_object(m) -- ... end @@ -4683,14 +4660,52 @@ function mario_stop_riding_and_holding(m) end --- @param m MarioState ---- Stops Mario from riding any currently ridden object (e.g., a Koopa shell or Hoot), updating the object's interaction status and Mario's state. Useful for cleanly dismounting ridden objects -function mario_stop_riding_object(m) +--- @return integer +--- Checks if Mario is currently wearing his normal cap on his head. Returns true if Mario's flag state matches that of having the normal cap equipped on his head, otherwise false. Useful for determining Mario's cap status +function does_mario_have_normal_cap_on_head(m) -- ... end --- @param m MarioState ---- Throws the object Mario is currently holding. The object is placed in front of Mario and given a forward velocity. Useful for attacking enemies with thrown objects, solving puzzles by throwing crates, or interacting with environment items -function mario_throw_held_object(m) +--- @param capSpeed number +--- Makes Mario blow off his normal cap at a given speed. Removes the normal cap from Mario's head and spawns it as a collectible object in the game world. Useful for simulating events where Mario loses his cap due to enemy attacks or environmental forces +function mario_blow_off_cap(m, capSpeed) + -- ... +end + +--- @param m MarioState +--- @param arg integer +--- @return integer +--- Makes Mario lose his normal cap to an enemy, such as Klepto or Ukiki. Updates flags so that the cap is no longer on Mario's head. Returns true if Mario was wearing his normal cap, otherwise false. Useful for scenarios where enemies steal Mario's cap +function mario_lose_cap_to_enemy(m, arg) + -- ... +end + +--- @param m MarioState +--- Retrieves Mario's normal cap if it was previously lost. Removes the cap from Mario's hand state and places it on his head. Useful when Mario recovers his normal cap from enemies, finds it in a level, or if it were to disappear +function mario_retrieve_cap(m) + -- ... +end + +--- @param m MarioState +--- @param interactType integer +--- @return Object +--- Returns a collided object that matches a given interaction type from Mario's current collision data. Useful for determining which object Mario has come into contact with +function mario_get_collided_object(m, interactType) + -- ... +end + +--- @param m MarioState +--- @return integer +--- Checks if Mario can grab the currently encountered object (usually triggered when Mario punches or dives). If conditions are met, initiates the grabbing process. Useful for picking up objects, throwing enemies, or grabbing special items +function mario_check_object_grab(m) + -- ... +end + +--- @param door Object +--- @return integer +--- Retrieves the save file flag associated with a door, based on the number of stars required to open it. Used to check if the player has unlocked certain star doors or progressed far enough to access new areas +function get_door_save_file_flag(door) -- ... end @@ -4718,6 +4733,26 @@ function take_damage_and_knock_back(m, o) -- ... end +--- @param capObject Object +--- @return integer +--- Determines the type of cap an object represents. Depending on the object's behavior, it returns a cap type (normal, metal, wing, vanish). Useful for handling the logic of picking up, wearing, or losing different kinds of caps +function get_mario_cap_flag(capObject) + -- ... +end + +--- @param m MarioState +--- @param o Object +--- @return integer +--- Determines how Mario interacts with a given object based on his current action, position, and other state variables. Calculates the appropriate interaction type (e.g., punch, kick, ground pound) that should result from Mario's contact with the specified object (`o`). Useful for handling different types of player-object collisions, attacks, and object behaviors +function determine_interaction(m, o) + -- ... +end + +--- Stores the local Mario's current state in lag compensation history +function lag_compensation_store() + -- ... +end + --- @param otherNp NetworkPlayer --- @return MarioState --- Gets the local Mario's state stored in lag compensation history @@ -4725,29 +4760,15 @@ function lag_compensation_get_local_state(otherNp) -- ... end ---- @return integer ---- Gets the local Mario's state index -function lag_compensation_get_local_state_index() - -- ... -end - --- @return boolean --- Checks if lag compensation history is ready function lag_compensation_get_local_state_ready() -- ... end ---- Stores the local Mario's current state in lag compensation history -function lag_compensation_store() - -- ... -end - ---- @param courseNum integer ---- @param levelNum integer ---- @param areaIndex integer ---- @return string ---- Returns the name of the level corresponding to `courseNum`, `levelNum` and `areaIndex` as a decapitalized ASCII (human readable) string -function get_level_name(courseNum, levelNum, areaIndex) +--- @return integer +--- Gets the local Mario's state index +function lag_compensation_get_local_state_index() -- ... end @@ -4771,10 +4792,11 @@ function get_level_name_sm64(courseNum, levelNum, areaIndex, charCase) end --- @param courseNum integer ---- @param starNum integer +--- @param levelNum integer +--- @param areaIndex integer --- @return string ---- Returns the name of the star corresponding to `courseNum` and `starNum` as a decapitalized ASCII (human readable) string -function get_star_name(courseNum, starNum) +--- Returns the name of the level corresponding to `courseNum`, `levelNum` and `areaIndex` as a decapitalized ASCII (human readable) string +function get_level_name(courseNum, levelNum, areaIndex) -- ... end @@ -4795,6 +4817,14 @@ function get_star_name_sm64(courseNum, starNum, charCase) -- ... end +--- @param courseNum integer +--- @param starNum integer +--- @return string +--- Returns the name of the star corresponding to `courseNum` and `starNum` as a decapitalized ASCII (human readable) string +function get_star_name(courseNum, starNum) + -- ... +end + --- @param id integer --- @param destLevel integer --- @param destArea integer @@ -4807,6 +4837,12 @@ function area_create_warp_node(id, destLevel, destArea, destNode, checkpoint, o) -- ... end +--- @return integer +--- Returns if the level timer is running +function level_control_timer_running() + -- ... +end + --- @param arg integer --- @param color integer --- Fades into a special warp with `arg` and using `color` @@ -4833,12 +4869,6 @@ function initiate_painting_warp(paintingIndex) -- ... end ---- @return integer ---- Returns if the level timer is running -function level_control_timer_running() - -- ... -end - --- @param m MarioState --- @param warpOp integer --- @return integer @@ -4847,31 +4877,17 @@ function level_trigger_warp(m, warpOp) -- ... end ---- @param arg0 integer ---- @param levelNum integer ---- @return integer ---- Sets the level number and handles the act select screen -function lvl_set_current_level(arg0, levelNum) - -- ... -end - --- @param arg integer --- Special warps to arg (`SPECIAL_WARP_*`) function warp_special(arg) -- ... end ---- @param x number ---- @param y number ---- @param z number ---- @param r integer ---- @param g integer ---- @param b integer ---- @param radius number ---- @param intensity number +--- @param arg0 integer +--- @param levelNum integer --- @return integer ---- Adds a lighting engine point light at `x`, `y`, `z` with color `r`, `g`, `b` and `radius` with `intensity` -function le_add_light(x, y, z, r, g, b, radius, intensity) +--- Sets the level number and handles the act select screen +function lvl_set_current_level(arg0, levelNum) -- ... end @@ -4890,9 +4906,17 @@ function le_calculate_lighting_dir(pos, out) -- ... end +--- @param x number +--- @param y number +--- @param z number +--- @param r integer +--- @param g integer +--- @param b integer +--- @param radius number +--- @param intensity number --- @return integer ---- Gets the total number of lights currently loaded in the lighting engine -function le_get_light_count() +--- Adds a lighting engine point light at `x`, `y`, `z` with color `r`, `g`, `b` and `radius` with `intensity` +function le_add_light(x, y, z, r, g, b, radius, intensity) -- ... end @@ -4902,6 +4926,12 @@ function le_remove_light(id) -- ... end +--- @return integer +--- Gets the total number of lights currently loaded in the lighting engine +function le_get_light_count() + -- ... +end + --- @param r integer --- @param g integer --- @param b integer @@ -4910,22 +4940,6 @@ function le_set_ambient_color(r, g, b) -- ... end ---- @param id integer ---- @param r integer ---- @param g integer ---- @param b integer ---- Sets a lighting engine point light's color to `r`, `g`, `b` -function le_set_light_color(id, r, g, b) - -- ... -end - ---- @param id integer ---- @param intensity number ---- Sets a lighting engine point light's `intensity` -function le_set_light_intensity(id, intensity) - -- ... -end - --- @param id integer --- @param x number --- @param y number @@ -4935,6 +4949,15 @@ function le_set_light_pos(id, x, y, z) -- ... end +--- @param id integer +--- @param r integer +--- @param g integer +--- @param b integer +--- Sets a lighting engine point light's color to `r`, `g`, `b` +function le_set_light_color(id, r, g, b) + -- ... +end + --- @param id integer --- @param radius number --- Sets a lighting engine point light's `radius` @@ -4942,88 +4965,10 @@ function le_set_light_radius(id, radius) -- ... end ---- @param m MarioState ---- Adjusts the pitch/volume of Mario's movement-based sounds according to his forward velocity (`m.forwardVel`). Useful for adding dynamic audio feedback based on Mario's running or walking speed -function adjust_sound_for_speed(m) - -- ... -end - ---- @param m MarioState ---- @return integer ---- Checks for inputs that cause common action transitions (jump, freefall, walking, sliding). Useful for quickly exiting certain stationary actions when Mario begins moving or leaves the floor -function check_common_action_exits(m) - -- ... -end - ---- @param m MarioState ---- @return integer ---- Checks for inputs that cause common hold-action transitions (hold jump, hold freefall, hold walking, hold sliding) -function check_common_hold_action_exits(m) - -- ... -end - ---- @param m MarioState ---- @param action integer ---- @param actionArg integer ---- @return integer ---- Drops any currently held object and sets Mario to a new action. This function is typically used when Mario transitions to states where he cannot hold objects -function drop_and_set_mario_action(m, action, actionArg) - -- ... -end - ---- @param o Object ---- @return integer ---- Main driver for Mario's behavior. Executes the current action group (stationary, moving, airborne, etc.) in a loop until no further action changes are necessary -function execute_mario_action(o) - -- ... -end - ---- @param m MarioState ---- @param angleFromMario integer ---- @param distFromMario number ---- @return number ---- Finds the floor height relative to Mario's current position given a polar displacement (`angleFromMario`, `distFromMario`). Useful for determining height differentials ahead or behind Mario, e.g. for slope checks or collision logic -function find_floor_height_relative_polar(m, angleFromMario, distFromMario) - -- ... -end - ---- @param m MarioState ---- @param yawOffset integer ---- @return integer ---- Returns a slope angle based on comparing the floor heights slightly in front and behind Mario. It essentially calculates how steep the ground is in a specific yaw direction. Useful for slope-based calculations such as setting walking or sliding behaviors -function find_floor_slope(m, yawOffset) - -- ... -end - ---- @param o Object ---- @param yaw integer ---- @param translation Vec3s ---- @return integer ---- Retrieves the current animation flags and calculates the translation for Mario's animation, rotating it into the global coordinate system based on `yaw`. Useful for determining positional offsets from animations (e.g., stepping forward in a walk animation) and applying them to Mario's position -function find_mario_anim_flags_and_translation(o, yaw, translation) - -- ... -end - ---- @param m MarioState ---- @return integer ---- Forces Mario into an idle state, either `ACT_IDLE` or `ACT_WATER_IDLE` depending on whether he is submerged. Useful for quickly resetting Mario's state to an idle pose under special conditions (e.g., cutscene triggers) -function force_idle_state(m) - -- ... -end - ---- @param m MarioState ---- @param action integer ---- @param actionArg integer ---- @param hurtCounter integer ---- @return integer ---- Increments Mario's `hurtCounter` and immediately sets a new action. Often used when Mario takes damage and transitions into a knockback or stunned action. -function hurt_and_set_mario_action(m, action, actionArg, hurtCounter) - -- ... -end - ---- @param m MarioState ---- Initializes the fields of a single `MarioState` structure when the player spawns or respawns. Sets starting position, velocity, action, and various internal flags -function init_single_mario(m) +--- @param id integer +--- @param intensity number +--- Sets a lighting engine point light's `intensity` +function le_set_light_intensity(id, intensity) -- ... end @@ -5041,6 +4986,47 @@ function is_anim_past_end(m) -- ... end +--- @param m MarioState +--- @param targetAnimID integer +--- @return integer +--- Sets Mario's current animation to `targetAnimID` at a default acceleration (no speed change) +function set_mario_animation(m, targetAnimID) + -- ... +end + +--- @param m MarioState +--- @param targetAnimID integer +--- @param accel integer +--- @return integer +--- Sets Mario's current animation to `targetAnimID` with a custom `accel` value to speed up or slow down the animation. Useful for controlling animation timing, e.g., slow-motion or fast-forward effects +function set_mario_anim_with_accel(m, targetAnimID, accel) + -- ... +end + +--- @param m MarioState +--- @param targetAnimID CharacterAnimID +--- @return integer +--- Sets the character-specific animation at its default rate (no acceleration) +function set_character_animation(m, targetAnimID) + -- ... +end + +--- @param m MarioState +--- @param targetAnimID CharacterAnimID +--- @param accel integer +--- @return integer +--- Sets a character-specific animation where the animation speed is adjusted by `accel`. Useful for varying animation speeds based on context or dynamic conditions (e.g., slow-motion) +function set_character_anim_with_accel(m, targetAnimID, accel) + -- ... +end + +--- @param m MarioState +--- @param animFrame integer +--- Sets the current animation frame to a specific `animFrame` +function set_anim_to_frame(m, animFrame) + -- ... +end + --- @param m MarioState --- @param animFrame integer --- @return integer @@ -5049,6 +5035,107 @@ function is_anim_past_frame(m, animFrame) -- ... end +--- @param o Object +--- @param yaw integer +--- @param translation Vec3s +--- @return integer +--- Retrieves the current animation flags and calculates the translation for Mario's animation, rotating it into the global coordinate system based on `yaw`. Useful for determining positional offsets from animations (e.g., stepping forward in a walk animation) and applying them to Mario's position +function find_mario_anim_flags_and_translation(o, yaw, translation) + -- ... +end + +--- @param m MarioState +--- Applies the translation from Mario's current animation to his world position. Considers animation flags (horizontal/vertical translation) +function update_mario_pos_for_anim(m) + -- ... +end + +--- @param m MarioState +--- @return integer +--- Determines the vertical translation from Mario's animation (how much the animation moves Mario up or down). Returns the y-component of the animation's translation. Useful for adjusting Mario's vertical position based on an ongoing animation (e.g., a bounce or jump) +function return_mario_anim_y_translation(m) + -- ... +end + +--- @param m MarioState +--- @param soundBits integer +--- @param flags integer +--- Plays a sound if Mario does not currently have a specific flag set. Once played, the flag is set to prevent immediate repeats +function play_sound_if_no_flag(m, soundBits, flags) + -- ... +end + +--- @param m MarioState +--- Plays Mario’s jump sound if it hasn't been played yet since the last action change. This helps avoid overlapping jump voice lines on repeated jumps +function play_mario_jump_sound(m) + -- ... +end + +--- @param m MarioState +--- Adjusts the pitch/volume of Mario's movement-based sounds according to his forward velocity (`m.forwardVel`). Useful for adding dynamic audio feedback based on Mario's running or walking speed +function adjust_sound_for_speed(m) + -- ... +end + +--- @param m MarioState +--- @param soundBits integer +--- @param waveParticleType integer +--- Plays the specified sound effect and spawns surface-appropriate particles (e.g., water splash, snow, sand). Checks if Mario is metal to adjust audio accordingly +function play_sound_and_spawn_particles(m, soundBits, waveParticleType) + -- ... +end + +--- @param m MarioState +--- @param soundBits integer +--- @param waveParticleType integer +--- Plays an action sound once per action, optionally spawning wave or dust particles depending on the surface. This sets the `MARIO_ACTION_SOUND_PLAYED` flag to prevent repeats +function play_mario_action_sound(m, soundBits, waveParticleType) + -- ... +end + +--- @param m MarioState +--- @param soundBits integer +--- Plays a normal landing sound (or metal landing sound if Mario is metal) and spawns appropriate particle effects (water splash, dust, etc.) +function play_mario_landing_sound(m, soundBits) + -- ... +end + +--- @param m MarioState +--- @param soundBits integer +--- A variant of `play_mario_landing_sound` that ensures the sound is only played once per action. Uses `play_mario_action_sound` internally +function play_mario_landing_sound_once(m, soundBits) + -- ... +end + +--- @param m MarioState +--- @param soundBits integer +--- Plays a heavier, more forceful landing sound, possibly for ground pounds or large impacts. Takes into account whether Mario has a metal cap equipped. Useful for making big impact landings stand out aurally +function play_mario_heavy_landing_sound(m, soundBits) + -- ... +end + +--- @param m MarioState +--- @param soundBits integer +--- A variant of `play_mario_heavy_landing_sound` that ensures the sound is only played once per action (using `play_mario_action_sound` internally). Useful for consistent heavy landing effects without repetition +function play_mario_heavy_landing_sound_once(m, soundBits) + -- ... +end + +--- @param m MarioState +--- @param primarySoundBits integer +--- @param scondarySoundBits integer +--- Plays a given action sound (like a jump or landing) and also a Mario voice line if certain conditions are met. It manages flags to avoid repeated sounds +function play_mario_sound(m, primarySoundBits, scondarySoundBits) + -- ... +end + +--- @param m MarioState +--- @return boolean +--- Returns true if Mario is in any of the crouching or crawling states, checking his current action +function mario_is_crouching(m) + -- ... +end + --- @param m MarioState --- @return boolean --- Checks whether Mario can become bubbled under certain game conditions (multiplayer bubble mechanic). Returns false if already bubbled or if not allowed by settings @@ -5056,6 +5143,51 @@ function mario_can_bubble(m) -- ... end +--- @param m MarioState +--- Transitions Mario into a bubbled state (if available in multiplayer), decrementing lives and preventing normal movement +function mario_set_bubbled(m) + -- ... +end + +--- @param m MarioState +--- @param speed number +--- Sets Mario's forward velocity (`m.forwardVel`) and updates `slideVelX/Z` and `m.vel` accordingly, based on `m.faceAngle.y`. Useful for controlling Mario's speed and direction in various actions (jumping, walking, sliding, etc.) +function mario_set_forward_vel(m, speed) + -- ... +end + +--- @param m MarioState +--- @return integer +--- Retrieves the slipperiness class of Mario's current floor, ranging from not slippery to very slippery. Considers terrain types and special surfaces. Useful for controlling friction, movement speed adjustments, and whether Mario slips or walks +function mario_get_floor_class(m) + -- ... +end + +--- @param m MarioState +--- @return integer +--- Computes a value added to terrain sounds, depending on the floor’s type (sand, snow, water, etc.) and slipperiness. This returns a sound 'addend' used with sound effects. Useful for playing context-specific footstep or movement sounds +function mario_get_terrain_sound_addend(m) + -- ... +end + +--- @param pos Vec3f +--- @param offset number +--- @param radius number +--- @return Surface +--- Checks for and resolves wall collisions at a given position `pos`, returning the last wall encountered. Primarily used to prevent Mario from going through walls. Useful for collision detection when updating Mario’s movement or adjusting his position +function resolve_and_return_wall_collisions(pos, offset, radius) + -- ... +end + +--- @param pos Vec3f +--- @param offset number +--- @param radius number +--- @param collisionData WallCollisionData +--- Similar to `resolve_and_return_wall_collisions` but also returns detailed collision data (`WallCollisionData`). This can handle multiple walls and store them for further checks +function resolve_and_return_wall_collisions_data(pos, offset, radius, collisionData) + -- ... +end + --- @param m MarioState --- @param turnYaw integer --- @return integer @@ -5086,158 +5218,48 @@ function mario_floor_is_steep(m) end --- @param m MarioState +--- @param angleFromMario integer +--- @param distFromMario number +--- @return number +--- Finds the floor height relative to Mario's current position given a polar displacement (`angleFromMario`, `distFromMario`). Useful for determining height differentials ahead or behind Mario, e.g. for slope checks or collision logic +function find_floor_height_relative_polar(m, angleFromMario, distFromMario) + -- ... +end + +--- @param m MarioState +--- @param yawOffset integer --- @return integer ---- Retrieves the slipperiness class of Mario's current floor, ranging from not slippery to very slippery. Considers terrain types and special surfaces. Useful for controlling friction, movement speed adjustments, and whether Mario slips or walks -function mario_get_floor_class(m) +--- Returns a slope angle based on comparing the floor heights slightly in front and behind Mario. It essentially calculates how steep the ground is in a specific yaw direction. Useful for slope-based calculations such as setting walking or sliding behaviors +function find_floor_slope(m, yawOffset) -- ... end --- @param m MarioState +--- Updates the background noise and camera modes based on Mario's action. Especially relevant for actions like first-person view or sleeping. Useful for synchronizing camera behavior and ambient sounds with Mario's state changes +function update_mario_sound_and_camera(m) + -- ... +end + +--- @param m MarioState +--- Transitions Mario into ACT_STEEP_JUMP if the floor is too steep, adjusting his forward velocity and orientation accordingly. Useful for forcing special jump states on surfaces exceeding normal slope limits +function set_steep_jump_action(m) + -- ... +end + +--- @param m MarioState +--- @param initialVelY number +--- @param multiplier number +--- Adjusts Mario's vertical velocity (`m.vel.y`) based on his forward speed. This function also accounts for conditions like quicksand to halve velocity +function set_mario_y_vel_based_on_fspeed(m, initialVelY, multiplier) + -- ... +end + +--- @param m MarioState +--- @param action integer +--- @param actionArg integer --- @return integer ---- Computes a value added to terrain sounds, depending on the floor’s type (sand, snow, water, etc.) and slipperiness. This returns a sound 'addend' used with sound effects. Useful for playing context-specific footstep or movement sounds -function mario_get_terrain_sound_addend(m) - -- ... -end - ---- @param m MarioState ---- @return boolean ---- Returns true if Mario is in any of the crouching or crawling states, checking his current action -function mario_is_crouching(m) - -- ... -end - ---- @param m MarioState ---- Transitions Mario into a bubbled state (if available in multiplayer), decrementing lives and preventing normal movement -function mario_set_bubbled(m) - -- ... -end - ---- @param m MarioState ---- @param speed number ---- Sets Mario's forward velocity (`m.forwardVel`) and updates `slideVelX/Z` and `m.vel` accordingly, based on `m.faceAngle.y`. Useful for controlling Mario's speed and direction in various actions (jumping, walking, sliding, etc.) -function mario_set_forward_vel(m, speed) - -- ... -end - ---- @param m MarioState ---- @param wcd WallCollisionData ---- Updates Mario's wall information based on wall collisions (`WallCollisionData`). Chooses the most relevant wall depending on the level’s collision fix settings -function mario_update_wall(m, wcd) - -- ... -end - ---- @param m MarioState ---- @param soundBits integer ---- @param waveParticleType integer ---- Plays an action sound once per action, optionally spawning wave or dust particles depending on the surface. This sets the `MARIO_ACTION_SOUND_PLAYED` flag to prevent repeats -function play_mario_action_sound(m, soundBits, waveParticleType) - -- ... -end - ---- @param m MarioState ---- @param soundBits integer ---- Plays a heavier, more forceful landing sound, possibly for ground pounds or large impacts. Takes into account whether Mario has a metal cap equipped. Useful for making big impact landings stand out aurally -function play_mario_heavy_landing_sound(m, soundBits) - -- ... -end - ---- @param m MarioState ---- @param soundBits integer ---- A variant of `play_mario_heavy_landing_sound` that ensures the sound is only played once per action (using `play_mario_action_sound` internally). Useful for consistent heavy landing effects without repetition -function play_mario_heavy_landing_sound_once(m, soundBits) - -- ... -end - ---- @param m MarioState ---- Plays Mario’s jump sound if it hasn't been played yet since the last action change. This helps avoid overlapping jump voice lines on repeated jumps -function play_mario_jump_sound(m) - -- ... -end - ---- @param m MarioState ---- @param soundBits integer ---- Plays a normal landing sound (or metal landing sound if Mario is metal) and spawns appropriate particle effects (water splash, dust, etc.) -function play_mario_landing_sound(m, soundBits) - -- ... -end - ---- @param m MarioState ---- @param soundBits integer ---- A variant of `play_mario_landing_sound` that ensures the sound is only played once per action. Uses `play_mario_action_sound` internally -function play_mario_landing_sound_once(m, soundBits) - -- ... -end - ---- @param m MarioState ---- @param primarySoundBits integer ---- @param scondarySoundBits integer ---- Plays a given action sound (like a jump or landing) and also a Mario voice line if certain conditions are met. It manages flags to avoid repeated sounds -function play_mario_sound(m, primarySoundBits, scondarySoundBits) - -- ... -end - ---- @param m MarioState ---- @param soundBits integer ---- @param waveParticleType integer ---- Plays the specified sound effect and spawns surface-appropriate particles (e.g., water splash, snow, sand). Checks if Mario is metal to adjust audio accordingly -function play_sound_and_spawn_particles(m, soundBits, waveParticleType) - -- ... -end - ---- @param m MarioState ---- @param soundBits integer ---- @param flags integer ---- Plays a sound if Mario does not currently have a specific flag set. Once played, the flag is set to prevent immediate repeats -function play_sound_if_no_flag(m, soundBits, flags) - -- ... -end - ---- @param pos Vec3f ---- @param offset number ---- @param radius number ---- @return Surface ---- Checks for and resolves wall collisions at a given position `pos`, returning the last wall encountered. Primarily used to prevent Mario from going through walls. Useful for collision detection when updating Mario’s movement or adjusting his position -function resolve_and_return_wall_collisions(pos, offset, radius) - -- ... -end - ---- @param pos Vec3f ---- @param offset number ---- @param radius number ---- @param collisionData WallCollisionData ---- Similar to `resolve_and_return_wall_collisions` but also returns detailed collision data (`WallCollisionData`). This can handle multiple walls and store them for further checks -function resolve_and_return_wall_collisions_data(pos, offset, radius, collisionData) - -- ... -end - ---- @param m MarioState ---- @return integer ---- Determines the vertical translation from Mario's animation (how much the animation moves Mario up or down). Returns the y-component of the animation's translation. Useful for adjusting Mario's vertical position based on an ongoing animation (e.g., a bounce or jump) -function return_mario_anim_y_translation(m) - -- ... -end - ---- @param m MarioState ---- @param animFrame integer ---- Sets the current animation frame to a specific `animFrame` -function set_anim_to_frame(m, animFrame) - -- ... -end - ---- @param m MarioState ---- @param targetAnimID CharacterAnimID ---- @param accel integer ---- @return integer ---- Sets a character-specific animation where the animation speed is adjusted by `accel`. Useful for varying animation speeds based on context or dynamic conditions (e.g., slow-motion) -function set_character_anim_with_accel(m, targetAnimID, accel) - -- ... -end - ---- @param m MarioState ---- @param targetAnimID CharacterAnimID ---- @return integer ---- Sets the character-specific animation at its default rate (no acceleration) -function set_character_animation(m, targetAnimID) +--- Sets Mario's action to the specified `action` and `actionArg`, routing through group-specific transition functions (e.g., airborne actions). Resets sound flags and updates internal timers +function set_mario_action(m, action, actionArg) -- ... end @@ -5261,25 +5283,66 @@ end --- @param action integer --- @param actionArg integer --- @return integer ---- Sets Mario's action to the specified `action` and `actionArg`, routing through group-specific transition functions (e.g., airborne actions). Resets sound flags and updates internal timers -function set_mario_action(m, action, actionArg) +--- Drops any currently held object and sets Mario to a new action. This function is typically used when Mario transitions to states where he cannot hold objects +function drop_and_set_mario_action(m, action, actionArg) -- ... end --- @param m MarioState ---- @param targetAnimID integer ---- @param accel integer +--- @param action integer +--- @param actionArg integer +--- @param hurtCounter integer --- @return integer ---- Sets Mario's current animation to `targetAnimID` with a custom `accel` value to speed up or slow down the animation. Useful for controlling animation timing, e.g., slow-motion or fast-forward effects -function set_mario_anim_with_accel(m, targetAnimID, accel) +--- Increments Mario's `hurtCounter` and immediately sets a new action. Often used when Mario takes damage and transitions into a knockback or stunned action. +function hurt_and_set_mario_action(m, action, actionArg, hurtCounter) -- ... end --- @param m MarioState ---- @param targetAnimID integer --- @return integer ---- Sets Mario's current animation to `targetAnimID` at a default acceleration (no speed change) -function set_mario_animation(m, targetAnimID) +--- Checks for inputs that cause common action transitions (jump, freefall, walking, sliding). Useful for quickly exiting certain stationary actions when Mario begins moving or leaves the floor +function check_common_action_exits(m) + -- ... +end + +--- @param m MarioState +--- @return integer +--- Checks for inputs that cause common hold-action transitions (hold jump, hold freefall, hold walking, hold sliding) +function check_common_hold_action_exits(m) + -- ... +end + +--- @param m MarioState +--- @return integer +--- Transitions Mario from being underwater to a walking state. Resets camera to the default mode and can handle object-holding states. Useful for restoring standard ground movement when emerging from water +function transition_submerged_to_walking(m) + -- ... +end + +--- @param m MarioState +--- @return integer +--- Transitions Mario into a "water plunge" action, used when he enters water from above. Adjusts position, velocity, and camera mode +function set_water_plunge_action(m) + -- ... +end + +--- @param o Object +--- @return integer +--- Main driver for Mario's behavior. Executes the current action group (stationary, moving, airborne, etc.) in a loop until no further action changes are necessary +function execute_mario_action(o) + -- ... +end + +--- @param m MarioState +--- @return integer +--- Forces Mario into an idle state, either `ACT_IDLE` or `ACT_WATER_IDLE` depending on whether he is submerged. Useful for quickly resetting Mario's state to an idle pose under special conditions (e.g., cutscene triggers) +function force_idle_state(m) + -- ... +end + +--- @param m MarioState +--- Initializes the fields of a single `MarioState` structure when the player spawns or respawns. Sets starting position, velocity, action, and various internal flags +function init_single_mario(m) -- ... end @@ -5292,49 +5355,37 @@ function set_mario_particle_flags(m, flags, clear) end --- @param m MarioState ---- @param initialVelY number ---- @param multiplier number ---- Adjusts Mario's vertical velocity (`m.vel.y`) based on his forward speed. This function also accounts for conditions like quicksand to halve velocity -function set_mario_y_vel_based_on_fspeed(m, initialVelY, multiplier) +--- @param wcd WallCollisionData +--- Updates Mario's wall information based on wall collisions (`WallCollisionData`). Chooses the most relevant wall depending on the level’s collision fix settings +function mario_update_wall(m, wcd) -- ... end --- @param m MarioState ---- Transitions Mario into ACT_STEEP_JUMP if the floor is too steep, adjusting his forward velocity and orientation accordingly. Useful for forcing special jump states on surfaces exceeding normal slope limits -function set_steep_jump_action(m) +--- @param frame1 integer +--- @param frame2 integer +--- @param frame3 integer +--- Plays a spinning sound at specific animation frames for flips (usually side flips or certain jump flips). If the current animation frame matches any of the specified frames, it triggers `SOUND_ACTION_SPIN` +function play_flip_sounds(m, frame1, frame2, frame3) + -- ... +end + +--- @param m MarioState +--- Plays a unique sound when Mario has fallen a significant distance without being invulnerable, twirling, or flying. If the fall exceeds a threshold, triggers a "long fall" exclamation. Also sets a flag to prevent repeated triggering +function play_far_fall_sound(m) + -- ... +end + +--- @param m MarioState +--- Plays a knockback sound effect if Mario is hit or knocked back with significant velocity. The specific sound differs depending on whether Mario's forward velocity is high enough to be considered a strong knockback +function play_knockback_sound(m) -- ... end --- @param m MarioState --- @return integer ---- Transitions Mario into a "water plunge" action, used when he enters water from above. Adjusts position, velocity, and camera mode -function set_water_plunge_action(m) - -- ... -end - ---- @param m MarioState ---- @return integer ---- Transitions Mario from being underwater to a walking state. Resets camera to the default mode and can handle object-holding states. Useful for restoring standard ground movement when emerging from water -function transition_submerged_to_walking(m) - -- ... -end - ---- @param m MarioState ---- Applies the translation from Mario's current animation to his world position. Considers animation flags (horizontal/vertical translation) -function update_mario_pos_for_anim(m) - -- ... -end - ---- @param m MarioState ---- Updates the background noise and camera modes based on Mario's action. Especially relevant for actions like first-person view or sleeping. Useful for synchronizing camera behavior and ambient sounds with Mario's state changes -function update_mario_sound_and_camera(m) - -- ... -end - ---- @param m MarioState ---- @return integer ---- Checks for and handles common conditions that would cancel Mario's current air action. This includes transitioning to a water plunge if below the water level, becoming squished if appropriate, or switching to vertical wind action if on certain wind surfaces. Also resets `m.quicksandDepth` -function check_common_airborne_cancels(m) +--- Allows Mario to 'lava boost' off a lava wall, reorienting him to face away from the wall and adjusting forward velocity. Increases Mario's hurt counter if he's not metal, plays a burning sound, and transitions his action to `ACT_LAVA_BOOST`. Useful for handling collisions with lava walls, giving Mario a strong upward/forward boost at the cost of health +function lava_boost_on_wall(m) -- ... end @@ -5346,6 +5397,20 @@ function check_fall_damage(m, hardFallAction) -- ... end +--- @param m MarioState +--- @return integer +--- Checks if Mario should perform a kick or a dive while in mid-air, depending on his current forward velocity. Pressing the B button in the air can trigger a jump kick (at lower speeds) or a dive (at higher speeds) +function check_kick_or_dive_in_air(m) + -- ... +end + +--- @param m MarioState +--- @return integer +--- Determines whether Mario should become stuck in the ground after landing, specifically for soft terrain such as snow or sand, provided certain conditions are met (height of the fall, normal of the floor, etc.). Returns true if Mario should be stuck, false otherwise +function should_get_stuck_in_ground(m) + -- ... +end + --- @param m MarioState --- @param hardFallAction integer --- @return integer @@ -5362,16 +5427,38 @@ function check_horizontal_wind(m) end --- @param m MarioState ---- @return integer ---- Checks if Mario should perform a kick or a dive while in mid-air, depending on his current forward velocity. Pressing the B button in the air can trigger a jump kick (at lower speeds) or a dive (at higher speeds) -function check_kick_or_dive_in_air(m) +--- Updates Mario's air movement while allowing him to turn. Checks horizontal wind and applies a moderate amount of drag, approaches the forward velocity toward zero if no input is pressed, and modifies forward velocity/angle based on stick input +function update_air_with_turn(m) -- ... end --- @param m MarioState ---- @return integer ---- Checks if Mario should wall kick after performing an air hit against a wall. If the input conditions (e.g., pressing A) and the `wallKickTimer` allow, Mario transitions to `ACT_WALL_KICK_AIR` -function check_wall_kick(m) +--- Updates Mario's air movement without directly turning his facing angle to match his intended yaw. Instead, Mario can move sideways relative to his current facing direction. Also checks horizontal wind and applies drag +function update_air_without_turn(m) + -- ... +end + +--- @param m MarioState +--- Updates Mario's movement when in actions like lava boost or twirling in mid-air. Applies player input to adjust forward velocity and facing angle, but in a more restricted manner compared to standard jump movement. Used by `ACT_LAVA_BOOST` and `ACT_TWIRLING` +function update_lava_boost_or_twirling(m) + -- ... +end + +--- @param m MarioState +--- Calculates and applies a change in Mario's yaw while flying, based on horizontal stick input. Approaches a target yaw velocity and sets Mario's roll angle to simulate banking turns. This results in a more natural, curved flight path +function update_flying_yaw(m) + -- ... +end + +--- @param m MarioState +--- Calculates and applies a change in Mario's pitch while flying, based on vertical stick input. Approaches a target pitch velocity and clamps the final pitch angle to a certain range, simulating a smooth flight control +function update_flying_pitch(m) + -- ... +end + +--- @param m MarioState +--- Handles the complete flying logic for Mario (usually with the wing cap). Continuously updates pitch and yaw based on controller input, applies drag, and adjusts forward velocity. Also updates Mario's model angles for flight animations +function update_flying(m) -- ... end @@ -5398,8 +5485,15 @@ end --- @param m MarioState --- @return integer ---- Allows Mario to 'lava boost' off a lava wall, reorienting him to face away from the wall and adjusting forward velocity. Increases Mario's hurt counter if he's not metal, plays a burning sound, and transitions his action to `ACT_LAVA_BOOST`. Useful for handling collisions with lava walls, giving Mario a strong upward/forward boost at the cost of health -function lava_boost_on_wall(m) +--- Checks if Mario should wall kick after performing an air hit against a wall. If the input conditions (e.g., pressing A) and the `wallKickTimer` allow, Mario transitions to `ACT_WALL_KICK_AIR` +function check_wall_kick(m) + -- ... +end + +--- @param m MarioState +--- @return integer +--- Checks for and handles common conditions that would cancel Mario's current air action. This includes transitioning to a water plunge if below the water level, becoming squished if appropriate, or switching to vertical wind action if on certain wind surfaces. Also resets `m.quicksandDepth` +function check_common_airborne_cancels(m) -- ... end @@ -5410,111 +5504,12 @@ function mario_execute_airborne_action(m) -- ... end ---- @param m MarioState ---- Plays a unique sound when Mario has fallen a significant distance without being invulnerable, twirling, or flying. If the fall exceeds a threshold, triggers a "long fall" exclamation. Also sets a flag to prevent repeated triggering -function play_far_fall_sound(m) - -- ... -end - ---- @param m MarioState ---- @param frame1 integer ---- @param frame2 integer ---- @param frame3 integer ---- Plays a spinning sound at specific animation frames for flips (usually side flips or certain jump flips). If the current animation frame matches any of the specified frames, it triggers `SOUND_ACTION_SPIN` -function play_flip_sounds(m, frame1, frame2, frame3) - -- ... -end - ---- @param m MarioState ---- Plays a knockback sound effect if Mario is hit or knocked back with significant velocity. The specific sound differs depending on whether Mario's forward velocity is high enough to be considered a strong knockback -function play_knockback_sound(m) - -- ... -end - ---- @param m MarioState ---- @return integer ---- Determines whether Mario should become stuck in the ground after landing, specifically for soft terrain such as snow or sand, provided certain conditions are met (height of the fall, normal of the floor, etc.). Returns true if Mario should be stuck, false otherwise -function should_get_stuck_in_ground(m) - -- ... -end - ---- @param m MarioState ---- Updates Mario's air movement while allowing him to turn. Checks horizontal wind and applies a moderate amount of drag, approaches the forward velocity toward zero if no input is pressed, and modifies forward velocity/angle based on stick input -function update_air_with_turn(m) - -- ... -end - ---- @param m MarioState ---- Updates Mario's air movement without directly turning his facing angle to match his intended yaw. Instead, Mario can move sideways relative to his current facing direction. Also checks horizontal wind and applies drag -function update_air_without_turn(m) - -- ... -end - ---- @param m MarioState ---- Handles the complete flying logic for Mario (usually with the wing cap). Continuously updates pitch and yaw based on controller input, applies drag, and adjusts forward velocity. Also updates Mario's model angles for flight animations -function update_flying(m) - -- ... -end - ---- @param m MarioState ---- Calculates and applies a change in Mario's pitch while flying, based on vertical stick input. Approaches a target pitch velocity and clamps the final pitch angle to a certain range, simulating a smooth flight control -function update_flying_pitch(m) - -- ... -end - ---- @param m MarioState ---- Calculates and applies a change in Mario's yaw while flying, based on horizontal stick input. Approaches a target yaw velocity and sets Mario's roll angle to simulate banking turns. This results in a more natural, curved flight path -function update_flying_yaw(m) - -- ... -end - ---- @param m MarioState ---- Updates Mario's movement when in actions like lava boost or twirling in mid-air. Applies player input to adjust forward velocity and facing angle, but in a more restricted manner compared to standard jump movement. Used by `ACT_LAVA_BOOST` and `ACT_TWIRLING` -function update_lava_boost_or_twirling(m) - -- ... -end - --- @param m MarioState --- Spawns leaf particles when Mario climbs a tree, if he is sufficiently high above the floor. In Shifting Sand Land, the leaf effect spawns higher due to the taller palm trees function add_tree_leaf_particles(m) -- ... end ---- @param m MarioState ---- @return integer ---- Checks if Mario should cancel his current automatic action, primarily by detecting if he falls into deep water. If so, transitions him to the water-plunge state -function check_common_automatic_cancels(m) - -- ... -end - ---- @param m MarioState ---- Moves Mario onto the top of a ledge once he finishes climbing it. This shifts Mario forward slightly on the ledge and updates his animation accordingly -function climb_up_ledge(m) - -- ... -end - ---- @param m MarioState ---- @return integer ---- Handles Mario letting go of a ledge by adjusting his position and setting his velocity to make him fall away from the ledge. The action then transitions to a 'soft bonk' state -function let_go_of_ledge(m) - -- ... -end - ---- @param m MarioState ---- @return integer ---- Executes Mario's current automatic action (e.g., climbing a pole, hanging, ledge-grabbing) by calling the corresponding function. It also checks for common cancellations, like falling into water. Returns true if the action was canceled and a new action was set, or false otherwise -function mario_execute_automatic_action(m) - -- ... -end - ---- @param m MarioState ---- @param nextPos Vec3f ---- @return integer ---- Performs a single step of movement while Mario is hanging from a ceiling. It handles wall collisions and checks the floor and ceiling to determine if Mario remains hanging, leaves the ceiling, or hits it -function perform_hanging_step(m, nextPos) - -- ... -end - --- @param m MarioState --- @param b integer --- Plays the appropriate climbing sound effect depending on whether Mario is on a tree or a pole. If `b == 1`, it plays the "climbing up" sound; otherwise, it plays the "sliding down" sound @@ -5530,6 +5525,14 @@ function set_pole_position(m, offsetY) -- ... end +--- @param m MarioState +--- @param nextPos Vec3f +--- @return integer +--- Performs a single step of movement while Mario is hanging from a ceiling. It handles wall collisions and checks the floor and ceiling to determine if Mario remains hanging, leaves the ceiling, or hits it +function perform_hanging_step(m, nextPos) + -- ... +end + --- @param m MarioState --- @return integer --- Updates Mario's velocity and position while he is moving across a hangable ceiling. It calls `perform_hanging_step()` to handle collisions and movement logic, returning a status code indicating if Mario is still hanging or if he left the ceiling @@ -5543,6 +5546,25 @@ function update_hang_stationary(m) -- ... end +--- @param m MarioState +--- @return integer +--- Handles Mario letting go of a ledge by adjusting his position and setting his velocity to make him fall away from the ledge. The action then transitions to a 'soft bonk' state +function let_go_of_ledge(m) + -- ... +end + +--- @param m MarioState +--- Moves Mario onto the top of a ledge once he finishes climbing it. This shifts Mario forward slightly on the ledge and updates his animation accordingly +function climb_up_ledge(m) + -- ... +end + +--- @param m MarioState +--- Gradually adjusts the camera position to track Mario as he climbs a ledge. This creates a smoother view transition from the ledge-grab camera angle to Mario's new location on top of the ledge +function update_ledge_climb_camera(m) + -- ... +end + --- @param m MarioState --- @param animation integer --- @param endAction integer @@ -5552,8 +5574,23 @@ function update_ledge_climb(m, animation, endAction) end --- @param m MarioState ---- Gradually adjusts the camera position to track Mario as he climbs a ledge. This creates a smoother view transition from the ledge-grab camera angle to Mario's new location on top of the ledge -function update_ledge_climb_camera(m) +--- @return integer +--- Checks if Mario should cancel his current automatic action, primarily by detecting if he falls into deep water. If so, transitions him to the water-plunge state +function check_common_automatic_cancels(m) + -- ... +end + +--- @param m MarioState +--- @return integer +--- Executes Mario's current automatic action (e.g., climbing a pole, hanging, ledge-grabbing) by calling the corresponding function. It also checks for common cancellations, like falling into water. Returns true if the action was canceled and a new action was set, or false otherwise +function mario_execute_automatic_action(m) + -- ... +end + +--- @param str Pointer_integer +--- @return integer +--- Calculates the pixel width of a given credits string. Each space is counted as 4 pixels, and any other character as 7 pixels. Stops counting at the null terminator +function get_credits_str_width(str) -- ... end @@ -5567,50 +5604,6 @@ function bhv_end_toad_loop() -- ... end ---- @param m MarioState ---- @param animation integer ---- @param frameToDeathWarp integer ---- @return integer ---- Handles shared logic for Mario's various death states. Plays the specified death animation (`animation`), checks for a specific frame (`frameToDeathWarp`) to trigger a warp or bubble state if allowed, and sets Mario's eye state to 'dead' -function common_death_handler(m, animation, frameToDeathWarp) - -- ... -end - ---- @param m MarioState ---- Transitions Mario's state from having the cap in his hand to wearing it on his head. Clears the `MARIO_CAP_IN_HAND` flag, sets the `MARIO_CAP_ON_HEAD` flag, and plays the 'put cap on' sound -function cutscene_put_cap_on(m) - -- ... -end - ---- @param m MarioState ---- Transitions Mario's state from wearing the cap on his head to holding it in his hand. Clears the `MARIO_CAP_ON_HEAD` flag, sets the `MARIO_CAP_IN_HAND` flag, and plays the 'take cap off' sound -function cutscene_take_cap_off(m) - -- ... -end - ---- @param m MarioState ---- @param isInWater integer ---- Manages the star collection dance sequence for Mario, both on land and in water. Plays music, spawns the celebration star, increments the star count, and triggers level exits or dialogs at the correct times -function general_star_dance_handler(m, isInWater) - -- ... -end - ---- @param x integer ---- @param y integer ---- @param z integer ---- @param radius number ---- Spawns yellow sparkles in a circular pattern around a specified point (`x`, `y`, `z`) within a given `radius`. Frequently seen during end cutscenes when objects like stars or Peach appear -function generate_yellow_sparkles(x, y, z, radius) - -- ... -end - ---- @param str Pointer_integer ---- @return integer ---- Calculates the pixel width of a given credits string. Each space is counted as 4 pixels, and any other character as 7 pixels. Stops counting at the null terminator -function get_credits_str_width(str) - -- ... -end - --- @param m MarioState --- @return integer --- Determines which (if any) dialog to show when Mario collects a star. Checks milestone star counts against `prevNumStarsForDialog`, and returns a dialog ID if a milestone is reached. Otherwise, returns 0 @@ -5625,19 +5618,14 @@ function handle_save_menu(m) end --- @param m MarioState ---- @param endAction integer ---- @param animation integer ---- @param forwardVel number ---- @return integer ---- Launches Mario forward with a given velocity (`forwardVel`) and sets his animation. Continues moving him through the air until he lands, then changes Mario's action to `endAction` -function launch_mario_until_land(m, endAction, animation, forwardVel) +--- Transitions Mario's state from wearing the cap on his head to holding it in his hand. Clears the `MARIO_CAP_ON_HEAD` flag, sets the `MARIO_CAP_IN_HAND` flag, and plays the 'take cap off' sound +function cutscene_take_cap_off(m) -- ... end --- @param m MarioState ---- @return integer ---- Executes Mario's current cutscene action based on his `action` field. Includes various story-related sequences like entering doors, collecting stars, and final boss cutscenes. Delegates to the appropriate function for each cutscene action -function mario_execute_cutscene_action(m) +--- Transitions Mario's state from having the cap in his hand to wearing it on his head. Clears the `MARIO_CAP_IN_HAND` flag, sets the `MARIO_CAP_ON_HEAD` flag, and plays the 'put cap on' sound +function cutscene_put_cap_on(m) -- ... end @@ -5656,6 +5644,32 @@ function should_start_or_continue_dialog(m, object) -- ... end +--- @param m MarioState +--- @param isInWater integer +--- Manages the star collection dance sequence for Mario, both on land and in water. Plays music, spawns the celebration star, increments the star count, and triggers level exits or dialogs at the correct times +function general_star_dance_handler(m, isInWater) + -- ... +end + +--- @param m MarioState +--- @param animation integer +--- @param frameToDeathWarp integer +--- @return integer +--- Handles shared logic for Mario's various death states. Plays the specified death animation (`animation`), checks for a specific frame (`frameToDeathWarp`) to trigger a warp or bubble state if allowed, and sets Mario's eye state to 'dead' +function common_death_handler(m, animation, frameToDeathWarp) + -- ... +end + +--- @param m MarioState +--- @param endAction integer +--- @param animation integer +--- @param forwardVel number +--- @return integer +--- Launches Mario forward with a given velocity (`forwardVel`) and sets his animation. Continues moving him through the air until he lands, then changes Mario's action to `endAction` +function launch_mario_until_land(m, endAction, animation, forwardVel) + -- ... +end + --- @param m MarioState --- @param animation integer --- @param unstuckFrame integer @@ -5666,66 +5680,43 @@ function stuck_in_ground_handler(m, animation, unstuckFrame, target2, target3, e -- ... end +--- @param x integer +--- @param y integer +--- @param z integer +--- @param radius number +--- Spawns yellow sparkles in a circular pattern around a specified point (`x`, `y`, `z`) within a given `radius`. Frequently seen during end cutscenes when objects like stars or Peach appear +function generate_yellow_sparkles(x, y, z, radius) + -- ... +end + +--- @param m MarioState +--- @return integer +--- Executes Mario's current cutscene action based on his `action` field. Includes various story-related sequences like entering doors, collecting stars, and final boss cutscenes. Delegates to the appropriate function for each cutscene action +function mario_execute_cutscene_action(m) + -- ... +end + +--- @param m MarioState +--- @return integer +--- Tilts Mario's body according to his running speed and slope angle. Calculates a pitch offset used while running to simulate leaning forward at higher speeds or on slopes +function tilt_body_running(m) + -- ... +end + +--- @param m MarioState +--- @param frame1 integer +--- @param frame2 integer +--- Checks the current animation frame against two specified frames to trigger footstep sounds. Also chooses specific sounds if Mario is wearing Metal Cap or is in quicksand +function play_step_sound(m, frame1, frame2) + -- ... +end + --- @param m MarioState --- Aligns Mario's position and model transformation matrix to match the floor's angle. Specifically: Sets Mario's vertical position to be at `m.floorHeight` plus any active character animation offset and adjusts Mario's `throwMatrix` so that his body appears flush with the floor function align_with_floor(m) -- ... end ---- @param m MarioState ---- @return integer ---- Checks if the analog stick is held significantly behind Mario's current facing angle. Returns true if the stick is far enough in the opposite direction, indicating Mario wants to move backward -function analog_stick_held_back(m) - -- ... -end - ---- @param m MarioState ---- Plays the appropriate animation and footstep sounds for walking while carrying a heavy object. Sets the character animation speed based on Mario's intended movement speed -function anim_and_audio_for_heavy_walk(m) - -- ... -end - ---- @param m MarioState ---- Plays the appropriate animation and footstep sounds for walking while carrying a lighter object (like a small box). Adjusts the animation speed dynamically based on Mario's velocity -function anim_and_audio_for_hold_walk(m) - -- ... -end - ---- @param m MarioState ---- Handles the animation and audio (footstep sounds) for normal walking or running. The specific animation used (tiptoe, walk, or run) depends on Mario's current speed -function anim_and_audio_for_walk(m) - -- ... -end - ---- @param m MarioState ---- @param frictionFactor number ---- @return integer ---- Applies friction-like deceleration if the floor is flat, or slope-based acceleration if the floor is sloped. Capped in such a way that Mario eventually stops or stabilizes on flatter ground -function apply_landing_accel(m, frictionFactor) - -- ... -end - ---- @param m MarioState ---- Applies acceleration or deceleration based on the slope of the floor. On downward slopes, Mario gains speed, while on upward slopes, Mario loses speed -function apply_slope_accel(m) - -- ... -end - ---- @param m MarioState ---- @param decelCoef number ---- @return integer ---- Approaches Mario's forward velocity toward zero at a rate dependent on the floor's slipperiness. This function can completely stop Mario if the slope is gentle enough or if friction is high -function apply_slope_decel(m, decelCoef) - -- ... -end - ---- @param m MarioState ---- @return integer ---- Begins a braking action if Mario's forward velocity is high enough or transitions to a decelerating action otherwise. Also handles the scenario where Mario is up against a wall, transitioning to a standing state -function begin_braking_action(m) - -- ... -end - --- @param m MarioState --- @param forwardVel number --- @param action integer @@ -5737,9 +5728,96 @@ function begin_walking_action(m, forwardVel, action, actionArg) end --- @param m MarioState +--- Checks if Mario is near an edge while moving slowly and the floor below that edge is significantly lower. If the conditions are met, transitions Mario into a ledge-climb-down action and positions him accordingly on the edge +function check_ledge_climb_down(m) + -- ... +end + +--- @param m MarioState +--- @param fastAction integer +--- @param slowAction integer +--- Handles the scenario where Mario slides into a wall. If Mario is moving fast, reflects his velocity and transitions to a fast knockback, Otherwise, stops his forward velocity and sets a slower knockback +function slide_bonk(m, fastAction, slowAction) + -- ... +end + +--- @param m MarioState +--- @param action integer +--- @param actionArg integer --- @return integer ---- Performs common checks when Mario is in a moving state, transitions to water plunge if underwater, handles squished or shockwave bounce scenarios, and checks for death conditions -function check_common_moving_cancels(m) +--- Determines the proper triple jump action based on Mario's forward velocity and the Wing Cap flag: Normal triple jump, flying triple jump, or just a single jump if not enough speed +function set_triple_jump_action(m, action, actionArg) + -- ... +end + +--- @param m MarioState +--- @param accel number +--- @param lossFactor number +--- Adjusts Mario's slide velocity and facing angle when on a slope. Calculates slope direction and steepness, then modifies velocity accordingly (speed up downhill, slow uphill). Handles facing-direction changes and maximum speed limits +function update_sliding_angle(m, accel, lossFactor) + -- ... +end + +--- @param m MarioState +--- @param stopSpeed number +--- @return integer +--- Updates Mario's sliding state each frame, applying additional friction or acceleration based on the surface's slipperiness. Also checks if speed has slowed below a threshold to end the slide. Returns `true` if sliding has stopped +function update_sliding(m, stopSpeed) + -- ... +end + +--- @param m MarioState +--- Applies acceleration or deceleration based on the slope of the floor. On downward slopes, Mario gains speed, while on upward slopes, Mario loses speed +function apply_slope_accel(m) + -- ... +end + +--- @param m MarioState +--- @param frictionFactor number +--- @return integer +--- Applies friction-like deceleration if the floor is flat, or slope-based acceleration if the floor is sloped. Capped in such a way that Mario eventually stops or stabilizes on flatter ground +function apply_landing_accel(m, frictionFactor) + -- ... +end + +--- @param m MarioState +--- Controls Mario's speed when riding a Koopa Shell on the ground. +function update_shell_speed(m) + -- ... +end + +--- @param m MarioState +--- @param decelCoef number +--- @return integer +--- Approaches Mario's forward velocity toward zero at a rate dependent on the floor's slipperiness. This function can completely stop Mario if the slope is gentle enough or if friction is high +function apply_slope_decel(m, decelCoef) + -- ... +end + +--- @param m MarioState +--- @return integer +--- Gradually reduces Mario's forward speed to zero over time on level ground, unless otherwise influenced by slope or friction. Returns true if Mario's speed reaches zero, meaning he has stopped +function update_decelerating_speed(m) + -- ... +end + +--- @param m MarioState +--- Updates Mario's walking speed based on player input and floor conditions (e.g., a slow floor or quicksand). Caps speed at a certain value and may reduce it slightly on steep slopes +function update_walking_speed(m) + -- ... +end + +--- @param m MarioState +--- @return integer +--- Checks if Mario should begin sliding, based on player input (facing downhill, pressing the analog stick backward, or on a slide terrain), and current floor steepness. Returns true if conditions to slide are met. +function should_begin_sliding(m) + -- ... +end + +--- @param m MarioState +--- @return integer +--- Checks if the analog stick is held significantly behind Mario's current facing angle. Returns true if the stick is far enough in the opposite direction, indicating Mario wants to move backward +function analog_stick_held_back(m) -- ... end @@ -5751,8 +5829,83 @@ function check_ground_dive_or_punch(m) end --- @param m MarioState ---- Checks if Mario is near an edge while moving slowly and the floor below that edge is significantly lower. If the conditions are met, transitions Mario into a ledge-climb-down action and positions him accordingly on the edge -function check_ledge_climb_down(m) +--- @return integer +--- Begins a braking action if Mario's forward velocity is high enough or transitions to a decelerating action otherwise. Also handles the scenario where Mario is up against a wall, transitioning to a standing state +function begin_braking_action(m) + -- ... +end + +--- @param m MarioState +--- Handles the animation and audio (footstep sounds) for normal walking or running. The specific animation used (tiptoe, walk, or run) depends on Mario's current speed +function anim_and_audio_for_walk(m) + -- ... +end + +--- @param m MarioState +--- Plays the appropriate animation and footstep sounds for walking while carrying a lighter object (like a small box). Adjusts the animation speed dynamically based on Mario's velocity +function anim_and_audio_for_hold_walk(m) + -- ... +end + +--- @param m MarioState +--- Plays the appropriate animation and footstep sounds for walking while carrying a heavy object. Sets the character animation speed based on Mario's intended movement speed +function anim_and_audio_for_heavy_walk(m) + -- ... +end + +--- @param m MarioState +--- @param startPos Vec3f +--- When Mario hits a wall during movement, decides whether he's pushing against the wall or sidling along it. Plays pushing animations and sounds if he's head-on, sidles along the wall if he's more angled +function push_or_sidle_wall(m, startPos) + -- ... +end + +--- @param m MarioState +--- @param startYaw integer +--- Applies a left/right tilt to Mario's torso (and some pitch if running fast) while walking or running. The tilt is based on his change in yaw and current speed, giving a leaning appearance when turning +function tilt_body_walking(m, startYaw) + -- ... +end + +--- @param m MarioState +--- @param startYaw integer +--- Tilts Mario's torso and head while riding a shell on the ground to reflect turning. Similar to other tilt functions but tuned for shell-riding speeds and angles +function tilt_body_ground_shell(m, startYaw) + -- ... +end + +--- @param m MarioState +--- Tilts Mario's torso while butt sliding based on analog input direction and magnitude. Gives the appearance that Mario is balancing or leaning into a turn +function tilt_body_butt_slide(m) + -- ... +end + +--- @param m MarioState +--- @param endAction integer +--- @param airAction integer +--- @param animation integer +--- Applies shared logic for sliding-related actions while playing sliding sounds, managing ground steps (falling off edges, hitting walls), updates animation +function common_slide_action(m, endAction, airAction, animation) + -- ... +end + +--- @param m MarioState +--- @param stopAction integer +--- @param jumpAction integer +--- @param airAction integer +--- @param animation integer +--- @return integer +function common_slide_action_with_jump(m, stopAction, jumpAction, airAction, animation) + -- ... +end + +--- @param m MarioState +--- @param stopAction integer +--- @param airAction integer +--- @param animation integer +--- @return integer +--- Updates Mario's sliding state where he is on his stomach. Similar to other slide actions but has a chance to roll out if A or B is pressed. Uses `common_slide_action` for the core movement logic +function stomach_slide_action(m, stopAction, airAction, animation) -- ... end @@ -5777,21 +5930,19 @@ function common_landing_action(m, animation, airAction) end --- @param m MarioState +--- @param animation1 integer +--- @param animation2 integer --- @param endAction integer --- @param airAction integer ---- @param animation integer ---- Applies shared logic for sliding-related actions while playing sliding sounds, managing ground steps (falling off edges, hitting walls), updates animation -function common_slide_action(m, endAction, airAction, animation) +--- @return integer +function quicksand_jump_land_action(m, animation1, animation2, endAction, airAction) -- ... end --- @param m MarioState ---- @param stopAction integer ---- @param jumpAction integer ---- @param airAction integer ---- @param animation integer --- @return integer -function common_slide_action_with_jump(m, stopAction, jumpAction, airAction, animation) +--- Performs common checks when Mario is in a moving state, transitions to water plunge if underwater, handles squished or shockwave bounce scenarios, and checks for death conditions +function check_common_moving_cancels(m) -- ... end @@ -5802,127 +5953,6 @@ function mario_execute_moving_action(m) -- ... end ---- @param m MarioState ---- @param frame1 integer ---- @param frame2 integer ---- Checks the current animation frame against two specified frames to trigger footstep sounds. Also chooses specific sounds if Mario is wearing Metal Cap or is in quicksand -function play_step_sound(m, frame1, frame2) - -- ... -end - ---- @param m MarioState ---- @param startPos Vec3f ---- When Mario hits a wall during movement, decides whether he's pushing against the wall or sidling along it. Plays pushing animations and sounds if he's head-on, sidles along the wall if he's more angled -function push_or_sidle_wall(m, startPos) - -- ... -end - ---- @param m MarioState ---- @param animation1 integer ---- @param animation2 integer ---- @param endAction integer ---- @param airAction integer ---- @return integer -function quicksand_jump_land_action(m, animation1, animation2, endAction, airAction) - -- ... -end - ---- @param m MarioState ---- @param action integer ---- @param actionArg integer ---- @return integer ---- Determines the proper triple jump action based on Mario's forward velocity and the Wing Cap flag: Normal triple jump, flying triple jump, or just a single jump if not enough speed -function set_triple_jump_action(m, action, actionArg) - -- ... -end - ---- @param m MarioState ---- @return integer ---- Checks if Mario should begin sliding, based on player input (facing downhill, pressing the analog stick backward, or on a slide terrain), and current floor steepness. Returns true if conditions to slide are met. -function should_begin_sliding(m) - -- ... -end - ---- @param m MarioState ---- @param fastAction integer ---- @param slowAction integer ---- Handles the scenario where Mario slides into a wall. If Mario is moving fast, reflects his velocity and transitions to a fast knockback, Otherwise, stops his forward velocity and sets a slower knockback -function slide_bonk(m, fastAction, slowAction) - -- ... -end - ---- @param m MarioState ---- @param stopAction integer ---- @param airAction integer ---- @param animation integer ---- @return integer ---- Updates Mario's sliding state where he is on his stomach. Similar to other slide actions but has a chance to roll out if A or B is pressed. Uses `common_slide_action` for the core movement logic -function stomach_slide_action(m, stopAction, airAction, animation) - -- ... -end - ---- @param m MarioState ---- Tilts Mario's torso while butt sliding based on analog input direction and magnitude. Gives the appearance that Mario is balancing or leaning into a turn -function tilt_body_butt_slide(m) - -- ... -end - ---- @param m MarioState ---- @param startYaw integer ---- Tilts Mario's torso and head while riding a shell on the ground to reflect turning. Similar to other tilt functions but tuned for shell-riding speeds and angles -function tilt_body_ground_shell(m, startYaw) - -- ... -end - ---- @param m MarioState ---- @return integer ---- Tilts Mario's body according to his running speed and slope angle. Calculates a pitch offset used while running to simulate leaning forward at higher speeds or on slopes -function tilt_body_running(m) - -- ... -end - ---- @param m MarioState ---- @param startYaw integer ---- Applies a left/right tilt to Mario's torso (and some pitch if running fast) while walking or running. The tilt is based on his change in yaw and current speed, giving a leaning appearance when turning -function tilt_body_walking(m, startYaw) - -- ... -end - ---- @param m MarioState ---- @return integer ---- Gradually reduces Mario's forward speed to zero over time on level ground, unless otherwise influenced by slope or friction. Returns true if Mario's speed reaches zero, meaning he has stopped -function update_decelerating_speed(m) - -- ... -end - ---- @param m MarioState ---- Controls Mario's speed when riding a Koopa Shell on the ground. -function update_shell_speed(m) - -- ... -end - ---- @param m MarioState ---- @param stopSpeed number ---- @return integer ---- Updates Mario's sliding state each frame, applying additional friction or acceleration based on the surface's slipperiness. Also checks if speed has slowed below a threshold to end the slide. Returns `true` if sliding has stopped -function update_sliding(m, stopSpeed) - -- ... -end - ---- @param m MarioState ---- @param accel number ---- @param lossFactor number ---- Adjusts Mario's slide velocity and facing angle when on a slope. Calculates slope direction and steepness, then modifies velocity accordingly (speed up downhill, slow uphill). Handles facing-direction changes and maximum speed limits -function update_sliding_angle(m, accel, lossFactor) - -- ... -end - ---- @param m MarioState ---- Updates Mario's walking speed based on player input and floor conditions (e.g., a slow floor or quicksand). Caps speed at a certain value and may reduce it slightly on steep slopes -function update_walking_speed(m) - -- ... -end - --- @param m MarioState --- @param animation integer --- @param endAction integer @@ -5930,6 +5960,12 @@ function animated_stationary_ground_step(m, animation, endAction) -- ... end +--- @param m MarioState +--- @return integer +function mario_update_punch_sequence(m) + -- ... +end + --- @param m MarioState --- @return integer function check_common_object_cancels(m) @@ -5944,7 +5980,7 @@ end --- @param m MarioState --- @return integer -function mario_update_punch_sequence(m) +function check_common_idle_cancels(m) -- ... end @@ -5954,39 +5990,6 @@ function check_common_hold_idle_cancels(m) -- ... end ---- @param m MarioState ---- @return integer -function check_common_idle_cancels(m) - -- ... -end - ---- @param m MarioState ---- @param action integer ---- @return integer -function check_common_landing_cancels(m, action) - -- ... -end - ---- @param m MarioState ---- @return integer -function check_common_stationary_cancels(m) - -- ... -end - ---- @param m MarioState ---- @param arg1 integer ---- @param action integer ---- @return integer -function landing_step(m, arg1, action) - -- ... -end - ---- @param m MarioState ---- @return integer -function mario_execute_stationary_action(m) - -- ... -end - --- @param m MarioState --- @param actionState integer --- @param animFrame integer @@ -6003,19 +6006,35 @@ function stopping_step(m, animID, action) end --- @param m MarioState ---- @param step Vec3f -function apply_water_current(m, step) +--- @param arg1 integer +--- @param action integer +--- @return integer +function landing_step(m, arg1, action) -- ... end --- @param m MarioState -function float_surface_gfx(m) +--- @param action integer +--- @return integer +function check_common_landing_cancels(m, action) -- ... end --- @param m MarioState --- @return integer -function mario_execute_submerged_action(m) +function check_common_stationary_cancels(m) + -- ... +end + +--- @param m MarioState +--- @return integer +function mario_execute_stationary_action(m) + -- ... +end + +--- @param m MarioState +--- @param particleFlag integer +function set_swimming_at_surface_particles(m, particleFlag) -- ... end @@ -6026,6 +6045,12 @@ function perform_water_full_step(m, nextPos) -- ... end +--- @param m MarioState +--- @param step Vec3f +function apply_water_current(m, step) + -- ... +end + --- @param m MarioState --- @return integer function perform_water_step(m) @@ -6033,8 +6058,13 @@ function perform_water_step(m) end --- @param m MarioState ---- @param particleFlag integer -function set_swimming_at_surface_particles(m, particleFlag) +function float_surface_gfx(m) + -- ... +end + +--- @param m MarioState +--- @return integer +function mario_execute_submerged_action(m) -- ... end @@ -6058,24 +6088,31 @@ function bhv_unlock_door_star_loop() -- ... end ---- @return MarioBodyState ---- When used in a geo function, retrieve the MarioBodyState associated to the current processed object -function geo_get_body_state() - -- ... -end - --- @return MarioState --- When used in a geo function, retrieve the MarioState associated to the current processed object function geo_get_mario_state() -- ... end +--- @return MarioBodyState +--- When used in a geo function, retrieve the MarioBodyState associated to the current processed object +function geo_get_body_state() + -- ... +end + --- @return number --- Always returns zero. May have been originally used for beta trampolines function get_additive_y_vel_for_jumps() -- ... end +--- @param m MarioState +--- @param negateSpeed integer +--- Reflects Mario off a wall if he is colliding with one and flips forward velocity if `negateSpeed` is TRUE +function mario_bonk_reflection(m, negateSpeed) + -- ... +end + --- @param data BullyCollisionData --- @param posX number --- @param posZ number @@ -6088,9 +6125,10 @@ function init_bully_collision_data(data, posX, posZ, forwardVel, yaw, conversion end --- @param m MarioState ---- @param negateSpeed integer ---- Reflects Mario off a wall if he is colliding with one and flips forward velocity if `negateSpeed` is TRUE -function mario_bonk_reflection(m, negateSpeed) +--- @param sinkingSpeed number +--- @return integer +--- Updates Mario's state in quicksand, sinks him at `sinkingSpeed` if he's in non instant quicksand +function mario_update_quicksand(m, sinkingSpeed) -- ... end @@ -6111,17 +6149,29 @@ function mario_update_moving_sand(m) end --- @param m MarioState ---- @param sinkingSpeed number --- @return integer ---- Updates Mario's state in quicksand, sinks him at `sinkingSpeed` if he's in non instant quicksand -function mario_update_quicksand(m, sinkingSpeed) +--- Pushes Mario in the direction of the wind based on the floor surface +function mario_update_windy_ground(m) + -- ... +end + +--- @param m MarioState +--- Sets all of Mario's velocity variables to 0 and sets his Y position to the floor height +function stop_and_set_height_to_floor(m) -- ... end --- @param m MarioState --- @return integer ---- Pushes Mario in the direction of the wind based on the floor surface -function mario_update_windy_ground(m) +--- Performs a full Mario stationary physics step (4 substeps) and returns an `GROUND_STEP_*` result +function stationary_ground_step(m) + -- ... +end + +--- @param m MarioState +--- @return integer +--- Performs a full Mario ground physics step (4 substeps) and returns an `GROUND_STEP_*` result +function perform_ground_step(m) -- ... end @@ -6133,72 +6183,16 @@ function perform_air_step(m, stepArg) -- ... end ---- @param m MarioState ---- @return integer ---- Performs a full Mario ground physics step (4 substeps) and returns an `GROUND_STEP_*` result -function perform_ground_step(m) - -- ... -end - --- @param m MarioState --- Sets Mario's velocity to his forward velocity multiplied by the cosine and sine of his pitch and yaw function set_vel_from_pitch_and_yaw(m) -- ... end ---- @param m MarioState ---- @return integer ---- Performs a full Mario stationary physics step (4 substeps) and returns an `GROUND_STEP_*` result -function stationary_ground_step(m) - -- ... -end - ---- @param m MarioState ---- Sets all of Mario's velocity variables to 0 and sets his Y position to the floor height -function stop_and_set_height_to_floor(m) - -- ... -end - ---- @param m MarioState ---- @param keyFrames Pointer_Vec4s ---- Initializes a spline-based animation for the `MarioState` structure `m` using the provided array of 3D signed-integer vectors `keyFrames`. This sets up the animation so that it can be advanced by polling -function anim_spline_init(m, keyFrames) - -- ... -end - ---- @param m MarioState ---- @param result Vec3f ---- @return integer ---- Advances the spline-based animation associated with `m` and stores the current interpolated position in `result`. It returns the animation's status, allowing the caller to determine if the animation is ongoing or has completed -function anim_spline_poll(m, result) - -- ... -end - ---- @param current number ---- @param target number ---- @param inc number ---- @param dec number +--- @param sm64Angle integer --- @return number ---- Similar to `approach_s32`, but operates on floating-point numbers. It moves `current` toward `target` by increasing it by `inc` if below target, or decreasing it by `dec` if above target, creating a smooth interpolation -function approach_f32(current, target, inc, dec) - -- ... -end - ---- @param current integer ---- @param target integer ---- @param inc integer ---- @param dec integer ---- @return integer ---- Gradually moves an integer `current` value toward a `target` value, increasing it by `inc` if it is too low, or decreasing it by `dec` if it is too high. This is often used for smooth transitions or animations -function approach_s32(current, target, inc, dec) - -- ... -end - ---- @param y number ---- @param x number ---- @return integer ---- Computes the arctangent of y/x and returns the angle as a signed 16-bit integer, typically representing a direction in the SM64 fixed-point angle format. This can be used to find an angle between x and y coordinates -function atan2s(y, x) +--- Calculates the sine of the given angle, where the angle is specified as a signed 16-bit integer representing a fixed-point "SM64 angle". This function returns a floating-point result corresponding to sin(angle) +function sins(sm64Angle) -- ... end @@ -6209,177 +6203,6 @@ function coss(sm64Angle) -- ... end ---- @param dest Vec3f ---- @param a Vec3f ---- @param b Vec3f ---- @param c Vec3f ---- @return void* ---- Determines a vector that is perpendicular (normal) to the plane defined by three given 3D floating-point points `a`, `b`, and `c`. The resulting perpendicular vector is stored in `dest` -function find_vector_perpendicular_to_plane(dest, a, b, c) - -- ... -end - ---- @param dest Vec3f ---- @param objMtx Mat4 ---- @param camMtx Mat4 ---- Extracts the position (translation component) from the transformation matrix `objMtx` relative to the coordinate system defined by `camMtx` and stores that 3D position in `dest`. This can be used to get the object's coordinates in camera space -function get_pos_from_transform_mtx(dest, objMtx, camMtx) - -- ... -end - ---- @param dest Mat4 ---- @param upDir Vec3f ---- @param pos Vec3f ---- @param yaw integer ---- Aligns `dest` so that it fits the orientation of a terrain surface defined by its normal vector `upDir`. The transformation is positioned at `pos` and oriented with a given `yaw`. This is often used to make objects sit naturally on uneven ground -function mtxf_align_terrain_normal(dest, upDir, pos, yaw) - -- ... -end - ---- @param mtx Mat4 ---- @param pos Vec3f ---- @param yaw integer ---- @param radius number ---- Aligns `mtx` to fit onto a terrain triangle at `pos`, applying a given `yaw` and scaling by `radius`. This helps position objects so they match the orientation of the terrain's surface -function mtxf_align_terrain_triangle(mtx, pos, yaw, radius) - -- ... -end - ---- @param dest Mat4 ---- @param mtx Mat4 ---- @param position Vec3f ---- @param angle integer ---- Transforms a 4x4 floating-point matrix `mtx` into a "billboard" oriented toward the camera or a given direction. The billboard is placed at `position` and rotated by `angle`. This is useful for objects that should always face the viewer -function mtxf_billboard(dest, mtx, position, angle) - -- ... -end - ---- @param dest Mat4 ---- @param src Mat4 ---- Copies the 4x4 floating-point matrix `src` into `dest`. After this operation, `dest` contains the same matrix values as `src` -function mtxf_copy(dest, src) - -- ... -end - ---- @param dest Mat4 ---- @param mtx Mat4 ---- @param position Vec3f ---- @param angle integer ---- Creates a "cylindrical billboard" transformation from the 4x4 matrix `mtx` placed at `position` with a given `angle`. Unlike a full billboard, this might allow rotation around one axis while still facing the viewer on others -function mtxf_cylboard(dest, mtx, position, angle) - -- ... -end - ---- @param mtx Mat4 ---- Sets the 4x4 floating-point matrix `mtx` to the identity matrix. The identity matrix leaves points unchanged when they are transformed by it which is useful for matrix math -function mtxf_identity(mtx) - -- ... -end - ---- @param dest Mat4 ---- @param src Mat4 ---- Inverts the 4x4 floating-point matrix `src` and stores the inverse in `dest`. Applying the inverse transformation undoes whatever `src` did, returning points back to their original coordinate space -function mtxf_inverse(dest, src) - -- ... -end - ---- @param mtx Mat4 ---- @param from Vec3f ---- @param to Vec3f ---- @param roll integer ---- Adjusts the 4x4 floating-point matrix `mtx` so that it represents a viewing transformation looking from the point `from` toward the point `to`, with a given roll angle. This creates a view matrix oriented toward `to` -function mtxf_lookat(mtx, from, to, roll) - -- ... -end - ---- @param dest Mat4 ---- @param a Mat4 ---- @param b Mat4 ---- Multiplies two 4x4 floating-point matrices `a` and `b` (in that order), storing the product in `dest`. This can be used for combining multiple transformations into one -function mtxf_mul(dest, a, b) - -- ... -end - ---- @param mtx Mat4 ---- @param b Vec3s ---- Multiplies the 4x4 floating-point matrix `mtx` by a 3D signed-integer vector `b`, potentially interpreting `b` as angles or translations depending on usage, and modifies `mtx` accordingly -function mtxf_mul_vec3s(mtx, b) - -- ... -end - ---- @param dest Mat4 ---- @param b Vec3f ---- @param c Vec3s ---- Rotates `dest` using angles in XYZ order, and then translates it by the 3D floating-point vector `b` and applies the rotations described by `c`. This sets up `dest` with a specific orientation and position in space -function mtxf_rotate_xyz_and_translate(dest, b, c) - -- ... -end - ---- @param dest Mat4 ---- @param translate Vec3f ---- @param rotate Vec3s ---- Rotates `dest` according to the angles in `rotate` using ZXY order, and then translates it by the 3D floating-point vector `translate`. This effectively positions and orients `dest` in 3D space -function mtxf_rotate_zxy_and_translate(dest, translate, rotate) - -- ... -end - ---- @param dest Mat4 ---- @param mtx Mat4 ---- @param s Vec3f ---- Scales the 4x4 floating-point matrix `mtx` by the scaling factors found in the 3D floating-point vector `s`, and stores the result in `dest`. This enlarges or shrinks objects in 3D space -function mtxf_scale_vec3f(dest, mtx, s) - -- ... -end - ---- @param dest Mat4 ---- @param b Vec3f ---- Applies a translation to the 4x4 floating-point matrix `dest` by adding the coordinates in the 3D floating-point vector `b`. This shifts any transformed point by `b` -function mtxf_translate(dest, b) - -- ... -end - ---- @param value number ---- @param replacement number ---- @return number ---- Checks if `value` is zero. If not, it returns `value`. If it is zero, it returns the `replacement` value. This function ensures that a zero value can be substituted with a fallback value if needed -function not_zero(value, replacement) - -- ... -end - ---- @param sm64Angle integer ---- @return number ---- Calculates the sine of the given angle, where the angle is specified as a signed 16-bit integer representing a fixed-point "SM64 angle". This function returns a floating-point result corresponding to sin(angle) -function sins(sm64Angle) - -- ... -end - ---- @param m MarioState ---- @param result Vec4f ---- @param t number ---- @param c integer ---- Computes spline interpolation weights for a given parameter `t` and stores these weights in `result`. This is used in spline-based animations to find intermediate positions between keyframes -function spline_get_weights(m, result, t, c) - -- ... -end - ---- @param dest Vec3f ---- @param a Vec3f ---- @return void* ---- Adds the components of the 3D floating-point vector `a` to `dest`. After this operation, `dest.x` will be `dest.x + a.x`, and similarly for the y and z components -function vec3f_add(dest, a) - -- ... -end - ---- @param dest Vec3f ---- @param vecA Vec3f ---- @param vecB Vec3f ---- @param sclA number ---- @param sclB number ---- Takes two 3D floating-point vectors `vecA` and `vecB`, multiplies them by `sclA` and `sclB` respectively, and then adds the scaled vectors together. The final combined vector is stored in `dest` -function vec3f_combine(dest, vecA, vecB, sclA, sclB) - -- ... -end - --- @param dest Vec3f --- @param src Vec3f --- @return void* @@ -6388,88 +6211,6 @@ function vec3f_copy(dest, src) -- ... end ---- @param dest Vec3f ---- @param a Vec3f ---- @param b Vec3f ---- @return void* ---- Computes the cross product of two 3D floating-point vectors `a` and `b`. The cross product is a vector perpendicular to both `a` and `b`. The result is stored in `dest` -function vec3f_cross(dest, a, b) - -- ... -end - ---- @param dest Vec3f ---- @param a Vec3f ---- @param b Vec3f ---- @return void* ---- Subtracts the components of the 3D floating-point vector `b` from the components of `a` and stores the result in `dest`. For example, `dest.x = a.x - b.x` This results in a vector that represents the difference between `a` and `b`. -function vec3f_dif(dest, a, b) - -- ... -end - ---- @param v1 Vec3f ---- @param v2 Vec3f ---- @return number ---- Calculates the distance between two 3D floating-point points `v1` and `v2`. The distance is the length of the vector `v2 - v1`, i.e., sqrt((v2.x - v1.x)² + (v2.y - v1.y)² + (v2.z - v1.z)²) -function vec3f_dist(v1, v2) - -- ... -end - ---- @param a Vec3f ---- @param b Vec3f ---- @return number ---- Computes the dot product of the two 3D floating-point vectors `a` and `b`. The dot product is a scalar value defined by (a.x * b.x + a.y * b.y + a.z * b.z), representing how aligned the two vectors are -function vec3f_dot(a, b) - -- ... -end - ---- @param from Vec3f ---- @param to Vec3f ---- @param dist Pointer_number ---- @param pitch Pointer_integer ---- @param yaw Pointer_integer ---- Calculates the distance between two points in 3D space (`from` and `to`), as well as the pitch and yaw angles that describe the direction from `from` to `to`. The results are stored in `dist`, `pitch`, and `yaw` -function vec3f_get_dist_and_angle(from, to, dist, pitch, yaw) - -- ... -end - ---- @param a Vec3f ---- @return number ---- Calculates the length (magnitude) of the 3D floating-point vector `a`. The length is defined as sqrt(x² + y² + z²) for the vector components (x, y, z) -function vec3f_length(a) - -- ... -end - ---- @param dest Vec3f ---- @param a number ---- @return void* ---- Multiplies each component of the 3D floating-point vector `dest` by the scalar value `a`. For instance, `dest.x = dest.x * a`, and similarly for y and z. This scales the vector `dest` by `a` -function vec3f_mul(dest, a) - -- ... -end - ---- @param dest Vec3f ---- @return void* ---- Normalizes the 3D floating-point vector `dest` so that its length (magnitude) becomes 1, while retaining its direction. This effectively scales `dest` so that it lies on the unit sphere -function vec3f_normalize(dest) - -- ... -end - ---- @param vec Vec3f ---- @param onto Vec3f ---- @param out Vec3f ---- Projects the 3D floating-point vector `vec` onto another 3D floating-point vector `onto`. The resulting projection, stored in `out`, represents how much of `vec` lies along the direction of `onto` -function vec3f_project(vec, onto, out) - -- ... -end - ---- @param v Vec3f ---- @param rotate Vec3s ---- @return void* ---- Rotates the 3D floating-point vector `v` by the angles specified in the 3D signed-integer vector `rotate`, applying the rotations in the order Z, then X, then Y. The rotated vector replaces `v` -function vec3f_rotate_zxy(v, rotate) - -- ... -end - --- @param dest Vec3f --- @param x number --- @param y number @@ -6480,12 +6221,11 @@ function vec3f_set(dest, x, y, z) -- ... end ---- @param from Vec3f ---- @param to Vec3f ---- @param dist number ---- @param pitch integer ---- @param yaw integer -function vec3f_set_dist_and_angle(from, to, dist, pitch, yaw) +--- @param dest Vec3f +--- @param a Vec3f +--- @return void* +--- Adds the components of the 3D floating-point vector `a` to `dest`. After this operation, `dest.x` will be `dest.x + a.x`, and similarly for the y and z components +function vec3f_add(dest, a) -- ... end @@ -6498,19 +6238,20 @@ function vec3f_sum(dest, a, b) -- ... end ---- @param dest Vec3s +--- @param dest Vec3f --- @param a Vec3f +--- @param b Vec3f --- @return void* ---- Converts a 3D floating-point vector `a` (Vec3f) into a 3D signed-integer vector and stores it in `dest`. After this operation, `dest` will contain the integer versions of `a`'s floating-point components -function vec3f_to_vec3s(dest, a) +--- Subtracts the components of the 3D floating-point vector `b` from the components of `a` and stores the result in `dest`. For example, `dest.x = a.x - b.x` This results in a vector that represents the difference between `a` and `b`. +function vec3f_dif(dest, a, b) -- ... end ---- @param dest Vec3s ---- @param a Vec3s +--- @param dest Vec3f +--- @param a number --- @return void* ---- Adds the components of a 3D signed-integer vector `a` to the corresponding components of `dest`. After this operation, each component of `dest` is increased by the corresponding component in `a` -function vec3s_add(dest, a) +--- Multiplies each component of the 3D floating-point vector `dest` by the scalar value `a`. For instance, `dest.x = dest.x * a`, and similarly for y and z. This scales the vector `dest` by `a` +function vec3f_mul(dest, a) -- ... end @@ -6532,6 +6273,14 @@ function vec3s_set(dest, x, y, z) -- ... end +--- @param dest Vec3s +--- @param a Vec3s +--- @return void* +--- Adds the components of a 3D signed-integer vector `a` to the corresponding components of `dest`. After this operation, each component of `dest` is increased by the corresponding component in `a` +function vec3s_add(dest, a) + -- ... +end + --- @param dest Vec3s --- @param a Vec3s --- @param b Vec3s @@ -6549,6 +6298,301 @@ function vec3s_to_vec3f(dest, a) -- ... end +--- @param dest Vec3s +--- @param a Vec3f +--- @return void* +--- Converts a 3D floating-point vector `a` (Vec3f) into a 3D signed-integer vector and stores it in `dest`. After this operation, `dest` will contain the integer versions of `a`'s floating-point components +function vec3f_to_vec3s(dest, a) + -- ... +end + +--- @param dest Vec3f +--- @param a Vec3f +--- @param b Vec3f +--- @param c Vec3f +--- @return void* +--- Determines a vector that is perpendicular (normal) to the plane defined by three given 3D floating-point points `a`, `b`, and `c`. The resulting perpendicular vector is stored in `dest` +function find_vector_perpendicular_to_plane(dest, a, b, c) + -- ... +end + +--- @param dest Vec3f +--- @param a Vec3f +--- @param b Vec3f +--- @return void* +--- Computes the cross product of two 3D floating-point vectors `a` and `b`. The cross product is a vector perpendicular to both `a` and `b`. The result is stored in `dest` +function vec3f_cross(dest, a, b) + -- ... +end + +--- @param dest Vec3f +--- @return void* +--- Normalizes the 3D floating-point vector `dest` so that its length (magnitude) becomes 1, while retaining its direction. This effectively scales `dest` so that it lies on the unit sphere +function vec3f_normalize(dest) + -- ... +end + +--- @param a Vec3f +--- @return number +--- Calculates the length (magnitude) of the 3D floating-point vector `a`. The length is defined as sqrt(x² + y² + z²) for the vector components (x, y, z) +function vec3f_length(a) + -- ... +end + +--- @param a Vec3f +--- @param b Vec3f +--- @return number +--- Computes the dot product of the two 3D floating-point vectors `a` and `b`. The dot product is a scalar value defined by (a.x * b.x + a.y * b.y + a.z * b.z), representing how aligned the two vectors are +function vec3f_dot(a, b) + -- ... +end + +--- @param dest Vec3f +--- @param vecA Vec3f +--- @param vecB Vec3f +--- @param sclA number +--- @param sclB number +--- Takes two 3D floating-point vectors `vecA` and `vecB`, multiplies them by `sclA` and `sclB` respectively, and then adds the scaled vectors together. The final combined vector is stored in `dest` +function vec3f_combine(dest, vecA, vecB, sclA, sclB) + -- ... +end + +--- @param v Vec3f +--- @param rotate Vec3s +--- @return void* +--- Rotates the 3D floating-point vector `v` by the angles specified in the 3D signed-integer vector `rotate`, applying the rotations in the order Z, then X, then Y. The rotated vector replaces `v` +function vec3f_rotate_zxy(v, rotate) + -- ... +end + +--- @param dest Mat4 +--- @param src Mat4 +--- Copies the 4x4 floating-point matrix `src` into `dest`. After this operation, `dest` contains the same matrix values as `src` +function mtxf_copy(dest, src) + -- ... +end + +--- @param mtx Mat4 +--- Sets the 4x4 floating-point matrix `mtx` to the identity matrix. The identity matrix leaves points unchanged when they are transformed by it which is useful for matrix math +function mtxf_identity(mtx) + -- ... +end + +--- @param dest Mat4 +--- @param b Vec3f +--- Applies a translation to the 4x4 floating-point matrix `dest` by adding the coordinates in the 3D floating-point vector `b`. This shifts any transformed point by `b` +function mtxf_translate(dest, b) + -- ... +end + +--- @param mtx Mat4 +--- @param from Vec3f +--- @param to Vec3f +--- @param roll integer +--- Adjusts the 4x4 floating-point matrix `mtx` so that it represents a viewing transformation looking from the point `from` toward the point `to`, with a given roll angle. This creates a view matrix oriented toward `to` +function mtxf_lookat(mtx, from, to, roll) + -- ... +end + +--- @param dest Mat4 +--- @param translate Vec3f +--- @param rotate Vec3s +--- Rotates `dest` according to the angles in `rotate` using ZXY order, and then translates it by the 3D floating-point vector `translate`. This effectively positions and orients `dest` in 3D space +function mtxf_rotate_zxy_and_translate(dest, translate, rotate) + -- ... +end + +--- @param dest Mat4 +--- @param b Vec3f +--- @param c Vec3s +--- Rotates `dest` using angles in XYZ order, and then translates it by the 3D floating-point vector `b` and applies the rotations described by `c`. This sets up `dest` with a specific orientation and position in space +function mtxf_rotate_xyz_and_translate(dest, b, c) + -- ... +end + +--- @param dest Mat4 +--- @param mtx Mat4 +--- @param position Vec3f +--- @param angle integer +--- Transforms a 4x4 floating-point matrix `mtx` into a "billboard" oriented toward the camera or a given direction. The billboard is placed at `position` and rotated by `angle`. This is useful for objects that should always face the viewer +function mtxf_billboard(dest, mtx, position, angle) + -- ... +end + +--- @param dest Mat4 +--- @param mtx Mat4 +--- @param position Vec3f +--- @param angle integer +--- Creates a "cylindrical billboard" transformation from the 4x4 matrix `mtx` placed at `position` with a given `angle`. Unlike a full billboard, this might allow rotation around one axis while still facing the viewer on others +function mtxf_cylboard(dest, mtx, position, angle) + -- ... +end + +--- @param dest Mat4 +--- @param upDir Vec3f +--- @param pos Vec3f +--- @param yaw integer +--- Aligns `dest` so that it fits the orientation of a terrain surface defined by its normal vector `upDir`. The transformation is positioned at `pos` and oriented with a given `yaw`. This is often used to make objects sit naturally on uneven ground +function mtxf_align_terrain_normal(dest, upDir, pos, yaw) + -- ... +end + +--- @param mtx Mat4 +--- @param pos Vec3f +--- @param yaw integer +--- @param radius number +--- Aligns `mtx` to fit onto a terrain triangle at `pos`, applying a given `yaw` and scaling by `radius`. This helps position objects so they match the orientation of the terrain's surface +function mtxf_align_terrain_triangle(mtx, pos, yaw, radius) + -- ... +end + +--- @param dest Mat4 +--- @param a Mat4 +--- @param b Mat4 +--- Multiplies two 4x4 floating-point matrices `a` and `b` (in that order), storing the product in `dest`. This can be used for combining multiple transformations into one +function mtxf_mul(dest, a, b) + -- ... +end + +--- @param dest Mat4 +--- @param mtx Mat4 +--- @param s Vec3f +--- Scales the 4x4 floating-point matrix `mtx` by the scaling factors found in the 3D floating-point vector `s`, and stores the result in `dest`. This enlarges or shrinks objects in 3D space +function mtxf_scale_vec3f(dest, mtx, s) + -- ... +end + +--- @param mtx Mat4 +--- @param b Vec3s +--- Multiplies the 4x4 floating-point matrix `mtx` by a 3D signed-integer vector `b`, potentially interpreting `b` as angles or translations depending on usage, and modifies `mtx` accordingly +function mtxf_mul_vec3s(mtx, b) + -- ... +end + +--- @param dest Mat4 +--- @param src Mat4 +--- Inverts the 4x4 floating-point matrix `src` and stores the inverse in `dest`. Applying the inverse transformation undoes whatever `src` did, returning points back to their original coordinate space +function mtxf_inverse(dest, src) + -- ... +end + +--- @param dest Vec3f +--- @param objMtx Mat4 +--- @param camMtx Mat4 +--- Extracts the position (translation component) from the transformation matrix `objMtx` relative to the coordinate system defined by `camMtx` and stores that 3D position in `dest`. This can be used to get the object's coordinates in camera space +function get_pos_from_transform_mtx(dest, objMtx, camMtx) + -- ... +end + +--- @param from Vec3f +--- @param to Vec3f +--- @param dist Pointer_number +--- @param pitch Pointer_integer +--- @param yaw Pointer_integer +--- Calculates the distance between two points in 3D space (`from` and `to`), as well as the pitch and yaw angles that describe the direction from `from` to `to`. The results are stored in `dist`, `pitch`, and `yaw` +function vec3f_get_dist_and_angle(from, to, dist, pitch, yaw) + -- ... +end + +--- @param from Vec3f +--- @param to Vec3f +--- @param dist number +--- @param pitch integer +--- @param yaw integer +function vec3f_set_dist_and_angle(from, to, dist, pitch, yaw) + -- ... +end + +--- @param current integer +--- @param target integer +--- @param inc integer +--- @param dec integer +--- @return integer +--- Gradually moves an integer `current` value toward a `target` value, increasing it by `inc` if it is too low, or decreasing it by `dec` if it is too high. This is often used for smooth transitions or animations +function approach_s32(current, target, inc, dec) + -- ... +end + +--- @param current number +--- @param target number +--- @param inc number +--- @param dec number +--- @return number +--- Similar to `approach_s32`, but operates on floating-point numbers. It moves `current` toward `target` by increasing it by `inc` if below target, or decreasing it by `dec` if above target, creating a smooth interpolation +function approach_f32(current, target, inc, dec) + -- ... +end + +--- @param y number +--- @param x number +--- @return integer +--- Computes the arctangent of y/x and returns the angle as a signed 16-bit integer, typically representing a direction in the SM64 fixed-point angle format. This can be used to find an angle between x and y coordinates +function atan2s(y, x) + -- ... +end + +--- @param m MarioState +--- @param result Vec4f +--- @param t number +--- @param c integer +--- Computes spline interpolation weights for a given parameter `t` and stores these weights in `result`. This is used in spline-based animations to find intermediate positions between keyframes +function spline_get_weights(m, result, t, c) + -- ... +end + +--- @param m MarioState +--- @param keyFrames Pointer_Vec4s +--- Initializes a spline-based animation for the `MarioState` structure `m` using the provided array of 3D signed-integer vectors `keyFrames`. This sets up the animation so that it can be advanced by polling +function anim_spline_init(m, keyFrames) + -- ... +end + +--- @param m MarioState +--- @param result Vec3f +--- @return integer +--- Advances the spline-based animation associated with `m` and stores the current interpolated position in `result`. It returns the animation's status, allowing the caller to determine if the animation is ongoing or has completed +function anim_spline_poll(m, result) + -- ... +end + +--- @param value number +--- @param replacement number +--- @return number +--- Checks if `value` is zero. If not, it returns `value`. If it is zero, it returns the `replacement` value. This function ensures that a zero value can be substituted with a fallback value if needed +function not_zero(value, replacement) + -- ... +end + +--- @param vec Vec3f +--- @param onto Vec3f +--- @param out Vec3f +--- Projects the 3D floating-point vector `vec` onto another 3D floating-point vector `onto`. The resulting projection, stored in `out`, represents how much of `vec` lies along the direction of `onto` +function vec3f_project(vec, onto, out) + -- ... +end + +--- @param v1 Vec3f +--- @param v2 Vec3f +--- @return number +--- Calculates the distance between two 3D floating-point points `v1` and `v2`. The distance is the length of the vector `v2 - v1`, i.e., sqrt((v2.x - v1.x)² + (v2.y - v1.y)² + (v2.z - v1.z)²) +function vec3f_dist(v1, v2) + -- ... +end + +--- @param edge0 number +--- @param edge1 number +--- @param x number +--- @return number +--- Smoothly steps between `edge0` and `edge1` with `x` as delta +function smooth_step(edge0, edge1, x) + -- ... +end + +--- Updates every Mario state's star count with the save file total star count +function update_all_mario_stars() + -- ... +end + --- @return number --- Gets the current clock elapsed time function clock_elapsed() @@ -6611,61 +6655,6 @@ function delta_interpolate_vec3s(res, a, b, delta) -- ... end ---- @param edge0 number ---- @param edge1 number ---- @param x number ---- @return number ---- Smoothly steps between `edge0` and `edge1` with `x` as delta -function smooth_step(edge0, edge1, x) - -- ... -end - ---- Updates every Mario state's star count with the save file total star count -function update_all_mario_stars() - -- ... -end - ---- @return boolean ---- Clears the mod's data from mod storage -function mod_storage_clear() - -- ... -end - ---- @param key string ---- @return boolean ---- Checks if a `key` is in mod storage -function mod_storage_exists(key) - -- ... -end - ---- @param key string ---- @return string ---- Loads a string `value` from a `key` in mod storage -function mod_storage_load(key) - -- ... -end - ---- @param key string ---- @return boolean ---- Loads a bool `value` from a `key` in mod storage -function mod_storage_load_bool(key) - -- ... -end - ---- @param key string ---- @return number ---- Loads a float `value` from a `key` in mod storage -function mod_storage_load_number(key) - -- ... -end - ---- @param key string ---- @return boolean ---- Removes a `key` from mod storage -function mod_storage_remove(key) - -- ... -end - --- @param key string --- @param value string --- @return boolean @@ -6674,6 +6663,14 @@ function mod_storage_save(key, value) -- ... end +--- @param key string +--- @param value number +--- @return boolean +--- Saves a `key` corresponding to a float `value` to mod storage +function mod_storage_save_number(key, value) + -- ... +end + --- @param key string --- @param value boolean --- @return boolean @@ -6683,32 +6680,43 @@ function mod_storage_save_bool(key, value) end --- @param key string ---- @param value number +--- @return string +--- Loads a string `value` from a `key` in mod storage +function mod_storage_load(key) + -- ... +end + +--- @param key string +--- @return number +--- Loads a float `value` from a `key` in mod storage +function mod_storage_load_number(key) + -- ... +end + +--- @param key string --- @return boolean ---- Saves a `key` corresponding to a float `value` to mod storage -function mod_storage_save_number(key, value) +--- Loads a bool `value` from a `key` in mod storage +function mod_storage_load_bool(key) -- ... end ---- @param courseNum integer ---- @param actNum integer ---- @param levelNum integer ---- @param areaIndex integer ---- @return NetworkPlayer -function get_network_player_from_area(courseNum, actNum, levelNum, areaIndex) +--- @param key string +--- @return boolean +--- Checks if a `key` is in mod storage +function mod_storage_exists(key) -- ... end ---- @param courseNum integer ---- @param actNum integer ---- @param levelNum integer ---- @return NetworkPlayer -function get_network_player_from_level(courseNum, actNum, levelNum) +--- @param key string +--- @return boolean +--- Removes a `key` from mod storage +function mod_storage_remove(key) -- ... end ---- @return NetworkPlayer -function get_network_player_smallest_global() +--- @return boolean +--- Clears the mod's data from mod storage +function mod_storage_clear() -- ... end @@ -6717,39 +6725,6 @@ function network_player_connected_count() -- ... end ---- @param globalIndex integer ---- @return NetworkPlayer -function network_player_from_global_index(globalIndex) - -- ... -end - ---- @param np NetworkPlayer ---- @param part PlayerPart ---- @param index integer ---- @return integer -function network_player_get_override_palette_color_channel(np, part, index) - -- ... -end - ---- @param np NetworkPlayer ---- @param part PlayerPart ---- @param index integer ---- @return integer -function network_player_get_palette_color_channel(np, part, index) - -- ... -end - ---- @param np NetworkPlayer ---- @return boolean -function network_player_is_override_palette_same(np) - -- ... -end - ---- @param np NetworkPlayer -function network_player_reset_override_palette(np) - -- ... -end - --- @param np NetworkPlayer --- @param description string --- @param r integer @@ -6766,6 +6741,50 @@ function network_player_set_override_location(np, location) -- ... end +--- @param globalIndex integer +--- @return NetworkPlayer +function network_player_from_global_index(globalIndex) + -- ... +end + +--- @param courseNum integer +--- @param actNum integer +--- @param levelNum integer +--- @return NetworkPlayer +function get_network_player_from_level(courseNum, actNum, levelNum) + -- ... +end + +--- @param courseNum integer +--- @param actNum integer +--- @param levelNum integer +--- @param areaIndex integer +--- @return NetworkPlayer +function get_network_player_from_area(courseNum, actNum, levelNum, areaIndex) + -- ... +end + +--- @return NetworkPlayer +function get_network_player_smallest_global() + -- ... +end + +--- @param np NetworkPlayer +--- @param part PlayerPart +--- @param index integer +--- @return integer +function network_player_get_palette_color_channel(np, part, index) + -- ... +end + +--- @param np NetworkPlayer +--- @param part PlayerPart +--- @param index integer +--- @return integer +function network_player_get_override_palette_color_channel(np, part, index) + -- ... +end + --- @param np NetworkPlayer --- @param part PlayerPart --- @param color Color @@ -6773,6 +6792,50 @@ function network_player_set_override_palette_color(np, part, color) -- ... end +--- @param np NetworkPlayer +function network_player_reset_override_palette(np) + -- ... +end + +--- @param np NetworkPlayer +--- @return boolean +function network_player_is_override_palette_same(np) + -- ... +end + +--- @param localIndex integer +--- @return integer +--- Gets a player's global index from their local index +function network_global_index_from_local(localIndex) + -- ... +end + +--- @param globalIndex integer +--- @return integer +--- Gets a player's local index from their global index +function network_local_index_from_global(globalIndex) + -- ... +end + +--- @return boolean +--- Checks if you are hosting the current lobby, this value doesn't change +function network_is_server() + -- ... +end + +--- @return boolean +--- Checks if you are a moderator in the current lobby +function network_is_moderator() + -- ... +end + +--- @param localIndex integer +--- @return string +--- Gets the DJUI hex color code string for the player corresponding to `localIndex`'s cap color +function network_get_player_text_color_string(localIndex) + -- ... +end + --- @return boolean --- Checks if the game can currently be paused in singleplayer function network_check_singleplayer_pause() @@ -6786,36 +6849,7 @@ function network_discord_id_from_local_index(localIndex) -- ... end ---- @param localIndex integer ---- @return string ---- Gets the DJUI hex color code string for the player corresponding to `localIndex`'s cap color -function network_get_player_text_color_string(localIndex) - -- ... -end - ---- @param localIndex integer ---- @return integer ---- Gets a player's global index from their local index -function network_global_index_from_local(localIndex) - -- ... -end - ---- @return boolean ---- Checks if you are a moderator in the current lobby -function network_is_moderator() - -- ... -end - ---- @return boolean ---- Checks if you are hosting the current lobby, this value doesn't change -function network_is_server() - -- ... -end - ---- @param globalIndex integer ---- @return integer ---- Gets a player's local index from their global index -function network_local_index_from_global(globalIndex) +function set_yoshi_as_not_dead() -- ... end @@ -6825,6 +6859,50 @@ function absf_2(f) -- ... end +--- @param velX number +--- @param velZ number +--- @param nX number +--- @param nY number +--- @param nZ number +--- @param objYawX Pointer_number +--- @param objYawZ Pointer_number +function turn_obj_away_from_surface(velX, velZ, nX, nY, nZ, objYawX, objYawZ) + -- ... +end + +--- @param objNewX number +--- @param objY number +--- @param objNewZ number +--- @param objVelX number +--- @param objVelZ number +--- @return integer +function obj_find_wall(objNewX, objY, objNewZ, objVelX, objVelZ) + -- ... +end + +--- @param objFloor Surface +--- @param floorY number +--- @param objVelX number +--- @param objVelZ number +--- @return integer +function turn_obj_away_from_steep_floor(objFloor, floorY, objVelX, objVelZ) + -- ... +end + +--- @param obj Object +--- @param normalX number +--- @param normalY number +--- @param normalZ number +function obj_orient_graph(obj, normalX, normalY, normalZ) + -- ... +end + +--- @param objFriction Pointer_number +--- @param floor_nY number +function calc_obj_friction(objFriction, floor_nY) + -- ... +end + --- @param objFloor Surface --- @param objFloorY number --- @param objVelX number @@ -6842,15 +6920,93 @@ function calc_new_obj_vel_and_pos_y_underwater(objFloor, floorY, objVelX, objVel -- ... end ---- @param objFriction Pointer_number ---- @param floor_nY number -function calc_obj_friction(objFriction, floor_nY) +function obj_update_pos_vel_xz() + -- ... +end + +--- @param waterY integer +--- @param objY integer +function obj_splash(waterY, objY) -- ... end ---- @param room integer --- @return integer -function current_mario_room_check(room) +function object_step() + -- ... +end + +--- @return integer +function object_step_without_floor_orient() + -- ... +end + +--- @param obj Object +function obj_move_xyz_using_fvel_and_yaw(obj) + -- ... +end + +--- @param x number +--- @param y number +--- @param z number +--- @param dist integer +--- @return integer +function is_point_within_radius_of_mario(x, y, z, dist) + -- ... +end + +--- @param x number +--- @param y number +--- @param z number +--- @param dist integer +--- @return integer +function is_point_within_radius_of_any_player(x, y, z, dist) + -- ... +end + +--- @param m MarioState +--- @return integer +function is_player_active(m) + -- ... +end + +--- @return integer +function is_other_player_active() + -- ... +end + +--- @param m MarioState +--- @return integer +function is_player_in_local_area(m) + -- ... +end + +--- @param obj Object +--- @return MarioState +function nearest_mario_state_to_object(obj) + -- ... +end + +--- @param obj Object +--- @return MarioState +function nearest_possible_mario_state_to_object(obj) + -- ... +end + +--- @param obj Object +--- @return Object +function nearest_player_to_object(obj) + -- ... +end + +--- @param obj Object +--- @return MarioState +function nearest_interacting_mario_state_to_object(obj) + -- ... +end + +--- @param obj Object +--- @return Object +function nearest_interacting_player_to_object(obj) -- ... end @@ -6868,23 +7024,6 @@ function is_nearest_player_to_object(m, obj) -- ... end ---- @return integer -function is_other_player_active() - -- ... -end - ---- @param m MarioState ---- @return integer -function is_player_active(m) - -- ... -end - ---- @param m MarioState ---- @return integer -function is_player_in_local_area(m) - -- ... -end - --- @param obj Object --- @param x number --- @param y number @@ -6895,119 +7034,9 @@ function is_point_close_to_object(obj, x, y, z, dist) -- ... end ---- @param x number ---- @param y number ---- @param z number +--- @param obj Object --- @param dist integer ---- @return integer -function is_point_within_radius_of_any_player(x, y, z, dist) - -- ... -end - ---- @param x number ---- @param y number ---- @param z number ---- @param dist integer ---- @return integer -function is_point_within_radius_of_mario(x, y, z, dist) - -- ... -end - ---- @param obj Object ---- @return MarioState -function nearest_interacting_mario_state_to_object(obj) - -- ... -end - ---- @param obj Object ---- @return Object -function nearest_interacting_player_to_object(obj) - -- ... -end - ---- @param obj Object ---- @return MarioState -function nearest_mario_state_to_object(obj) - -- ... -end - ---- @param obj Object ---- @return Object -function nearest_player_to_object(obj) - -- ... -end - ---- @param obj Object ---- @return MarioState -function nearest_possible_mario_state_to_object(obj) - -- ... -end - ---- @param collisionFlags integer ---- @param floor Surface -function obj_check_floor_death(collisionFlags, floor) - -- ... -end - ---- @param base integer ---- @param goal integer ---- @param range integer ---- @return integer -function obj_check_if_facing_toward_angle(base, goal, range) - -- ... -end - ---- @param objNewX number ---- @param objY number ---- @param objNewZ number ---- @param objVelX number ---- @param objVelZ number ---- @return integer -function obj_find_wall(objNewX, objY, objNewZ, objVelX, objVelZ) - -- ... -end - ---- @param dist Vec3f ---- @param x number ---- @param y number ---- @param z number ---- @param radius number ---- @return integer -function obj_find_wall_displacement(dist, x, y, z, radius) - -- ... -end - ---- @param obj Object ---- @param lifeSpan integer ---- @return integer -function obj_flicker_and_disappear(obj, lifeSpan) - -- ... -end - ---- @return integer -function obj_lava_death() - -- ... -end - ---- @param obj Object -function obj_move_xyz_using_fvel_and_yaw(obj) - -- ... -end - ---- @param obj Object ---- @param normalX number ---- @param normalY number ---- @param normalZ number -function obj_orient_graph(obj, normalX, normalY, normalZ) - -- ... -end - ---- @param obj Object ---- @param homeX number ---- @param homeY number ---- @param homeZ number ---- @param baseDisp integer -function obj_return_and_displace_home(obj, homeX, homeY, homeZ, baseDisp) +function set_object_visibility(obj, dist) -- ... end @@ -7021,39 +7050,60 @@ function obj_return_home_if_safe(obj, homeX, y, homeZ, dist) -- ... end +--- @param obj Object +--- @param homeX number +--- @param homeY number +--- @param homeZ number +--- @param baseDisp integer +function obj_return_and_displace_home(obj, homeX, homeY, homeZ, baseDisp) + -- ... +end + +--- @param base integer +--- @param goal integer +--- @param range integer +--- @return integer +function obj_check_if_facing_toward_angle(base, goal, range) + -- ... +end + +--- @param dist Vec3f +--- @param x number +--- @param y number +--- @param z number +--- @param radius number +--- @return integer +function obj_find_wall_displacement(dist, x, y, z, radius) + -- ... +end + --- @param obj Object --- @param nCoins integer function obj_spawn_yellow_coins(obj, nCoins) -- ... end ---- @param waterY integer ---- @param objY integer -function obj_splash(waterY, objY) - -- ... -end - -function obj_update_pos_vel_xz() - -- ... -end - ---- @return integer -function object_step() - -- ... -end - ---- @return integer -function object_step_without_floor_orient() - -- ... -end - --- @param obj Object ---- @param dist integer -function set_object_visibility(obj, dist) +--- @param lifeSpan integer +--- @return integer +function obj_flicker_and_disappear(obj, lifeSpan) -- ... end -function set_yoshi_as_not_dead() +--- @param room integer +--- @return integer +function current_mario_room_check(room) + -- ... +end + +--- @param collisionFlags integer +--- @param floor Surface +function obj_check_floor_death(collisionFlags, floor) + -- ... +end + +--- @return integer +function obj_lava_death() -- ... end @@ -7065,31 +7115,62 @@ function spawn_orange_number(behParam, relX, relY, relZ) -- ... end ---- @param objFloor Surface ---- @param floorY number ---- @param objVelX number ---- @param objVelZ number --- @return integer -function turn_obj_away_from_steep_floor(objFloor, floorY, objVelX, objVelZ) +function obj_is_rendering_enabled() -- ... end ---- @param velX number ---- @param velZ number ---- @param nX number ---- @param nY number ---- @param nZ number ---- @param objYawX Pointer_number ---- @param objYawZ Pointer_number -function turn_obj_away_from_surface(velX, velZ, nX, nY, nZ, objYawX, objYawZ) +--- @return integer +function obj_get_pitch_from_vel() -- ... end ---- @param px Pointer_number ---- @param target number ---- @param delta number +--- @param distFromHome number +function obj_set_dist_from_home(distFromHome) + -- ... +end + +--- @param m MarioState +--- @param maxDist number +--- @param maxAngleDiff integer --- @return integer -function approach_f32_ptr(px, target, delta) +function obj_is_near_to_and_facing_mario(m, maxDist, maxAngleDiff) + -- ... +end + +--- @param ballIndex integer +--- @param x number +--- @param y number +--- @param z number +function platform_on_track_update_pos_or_spawn_ball(ballIndex, x, y, z) + -- ... +end + +--- @param arg0 number +--- @param arg1 number +function cur_obj_spin_all_dimensions(arg0, arg1) + -- ... +end + +--- @param targetYaw integer +--- @param turnAmount integer +function obj_rotate_yaw_and_bounce_off_walls(targetYaw, turnAmount) + -- ... +end + +--- @param latDistToHome number +--- @return integer +function obj_get_pitch_to_home(latDistToHome) + -- ... +end + +--- @param speed number +function obj_compute_vel_from_move_pitch(speed) + -- ... +end + +--- @param arg0 integer +function cur_obj_init_anim_extend(arg0) -- ... end @@ -7107,7 +7188,8 @@ function cur_obj_init_anim_check_frame(arg0, arg1) end --- @param arg0 integer -function cur_obj_init_anim_extend(arg0) +--- @return integer +function cur_obj_set_anim_if_at_end(arg0) -- ... end @@ -7119,73 +7201,19 @@ function cur_obj_play_sound_at_anim_range(arg0, arg1, sound) -- ... end ---- @param arg0 integer +--- @param m MarioState +--- @param targetOffsetY number +--- @param turnAmount integer --- @return integer -function cur_obj_set_anim_if_at_end(arg0) +function obj_turn_pitch_toward_mario(m, targetOffsetY, turnAmount) -- ... end ---- @param arg0 number ---- @param arg1 number -function cur_obj_spin_all_dimensions(arg0, arg1) - -- ... -end - ---- @param baseScale number -function obj_act_knockback(baseScale) - -- ... -end - ---- @param baseScale number -function obj_act_squished(baseScale) - -- ... -end - ---- @param targetYaw Pointer_integer +--- @param px Pointer_number +--- @param target number +--- @param delta number --- @return integer -function obj_bounce_off_walls_edges_objects(targetYaw) - -- ... -end - ---- @param hitbox ObjectHitbox ---- @param attackedMarioAction integer ---- @return integer -function obj_check_attacks(hitbox, attackedMarioAction) - -- ... -end - ---- @param speed number -function obj_compute_vel_from_move_pitch(speed) - -- ... -end - ---- @return integer -function obj_die_if_above_lava_and_health_non_positive() - -- ... -end - -function obj_die_if_health_non_positive() - -- ... -end - ---- @param targetPitch integer ---- @param deltaPitch integer ---- @return integer -function obj_face_pitch_approach(targetPitch, deltaPitch) - -- ... -end - ---- @param targetRoll integer ---- @param deltaRoll integer ---- @return integer -function obj_face_roll_approach(targetRoll, deltaRoll) - -- ... -end - ---- @param targetYaw integer ---- @param deltaYaw integer ---- @return integer -function obj_face_yaw_approach(targetYaw, deltaYaw) +function approach_f32_ptr(px, target, delta) -- ... end @@ -7196,49 +7224,10 @@ function obj_forward_vel_approach(target, delta) -- ... end +--- @param target number +--- @param delta number --- @return integer -function obj_get_pitch_from_vel() - -- ... -end - ---- @param latDistToHome number ---- @return integer -function obj_get_pitch_to_home(latDistToHome) - -- ... -end - ---- @param scaleVel Pointer_number ---- @param shootFireScale number ---- @param endScale number ---- @return integer -function obj_grow_then_shrink(scaleVel, shootFireScale, endScale) - -- ... -end - ---- @param hitbox ObjectHitbox ---- @param attackedMarioAction integer ---- @param attackHandlers Pointer_integer ---- @return integer -function obj_handle_attacks(hitbox, attackedMarioAction, attackHandlers) - -- ... -end - ---- @param m MarioState ---- @param maxDist number ---- @param maxAngleDiff integer ---- @return integer -function obj_is_near_to_and_facing_mario(m, maxDist, maxAngleDiff) - -- ... -end - ---- @return integer -function obj_is_rendering_enabled() - -- ... -end - ---- @param endAction integer ---- @return integer -function obj_move_for_one_second(endAction) +function obj_y_vel_approach(target, delta) -- ... end @@ -7249,49 +7238,24 @@ function obj_move_pitch_approach(target, delta) -- ... end ---- @param delta integer +--- @param targetPitch integer +--- @param deltaPitch integer --- @return integer -function obj_random_fixed_turn(delta) +function obj_face_pitch_approach(targetPitch, deltaPitch) -- ... end --- @param targetYaw integer ---- @param turnSpeed integer +--- @param deltaYaw integer --- @return integer -function obj_resolve_collisions_and_turn(targetYaw, turnSpeed) +function obj_face_yaw_approach(targetYaw, deltaYaw) -- ... end ---- @param targetYaw Pointer_integer +--- @param targetRoll integer +--- @param deltaRoll integer --- @return integer -function obj_resolve_object_collisions(targetYaw) - -- ... -end - ---- @param targetYaw integer ---- @param maxRoll integer ---- @param rollSpeed integer -function obj_roll_to_match_yaw_turn(targetYaw, maxRoll, rollSpeed) - -- ... -end - ---- @param targetYaw integer ---- @param turnAmount integer -function obj_rotate_yaw_and_bounce_off_walls(targetYaw, turnAmount) - -- ... -end - ---- @param distFromHome number -function obj_set_dist_from_home(distFromHome) - -- ... -end - ---- @param attackType integer -function obj_set_knockback_action(attackType) - -- ... -end - -function obj_set_squished_action() +function obj_face_roll_approach(targetRoll, deltaRoll) -- ... end @@ -7307,68 +7271,10 @@ function obj_smooth_turn(angleVel, angle, targetAngle, targetSpeedProportion, ac -- ... end ---- @param relativePosX integer ---- @param relativePosY integer ---- @param relativePosZ integer ---- @param scale number ---- @param model integer ---- @param startSpeed number ---- @param endSpeed number ---- @param movePitch integer ---- @return Object -function obj_spit_fire(relativePosX, relativePosY, relativePosZ, scale, model, startSpeed, endSpeed, movePitch) - -- ... -end - ---- @param m MarioState ---- @param targetOffsetY number ---- @param turnAmount integer ---- @return integer -function obj_turn_pitch_toward_mario(m, targetOffsetY, turnAmount) - -- ... -end - -function obj_unused_die() - -- ... -end - ---- @param blinkTimer Pointer_integer ---- @param baseCycleLength integer ---- @param cycleLengthRange integer ---- @param blinkLength integer -function obj_update_blinking(blinkTimer, baseCycleLength, cycleLengthRange, blinkLength) - -- ... -end - ---- @param scale number ---- @return integer -function obj_update_standard_actions(scale) - -- ... -end - ---- @param target number ---- @param delta number ---- @return integer -function obj_y_vel_approach(target, delta) - -- ... -end - ---- @param value Pointer_integer ---- @param vel Pointer_number ---- @param target integer ---- @param velCloseToZero number ---- @param accel number ---- @param slowdown number ---- @return integer -function oscillate_toward(value, vel, target, velCloseToZero, accel, slowdown) - -- ... -end - ---- @param ballIndex integer ---- @param x number ---- @param y number ---- @param z number -function platform_on_track_update_pos_or_spawn_ball(ballIndex, x, y, z) +--- @param targetYaw integer +--- @param maxRoll integer +--- @param rollSpeed integer +function obj_roll_to_match_yaw_turn(targetYaw, maxRoll, rollSpeed) -- ... end @@ -7387,6 +7293,117 @@ function random_mod_offset(base, step, mod) -- ... end +--- @param delta integer +--- @return integer +function obj_random_fixed_turn(delta) + -- ... +end + +--- @param scaleVel Pointer_number +--- @param shootFireScale number +--- @param endScale number +--- @return integer +function obj_grow_then_shrink(scaleVel, shootFireScale, endScale) + -- ... +end + +--- @param value Pointer_integer +--- @param vel Pointer_number +--- @param target integer +--- @param velCloseToZero number +--- @param accel number +--- @param slowdown number +--- @return integer +function oscillate_toward(value, vel, target, velCloseToZero, accel, slowdown) + -- ... +end + +--- @param blinkTimer Pointer_integer +--- @param baseCycleLength integer +--- @param cycleLengthRange integer +--- @param blinkLength integer +function obj_update_blinking(blinkTimer, baseCycleLength, cycleLengthRange, blinkLength) + -- ... +end + +--- @param targetYaw Pointer_integer +--- @return integer +function obj_resolve_object_collisions(targetYaw) + -- ... +end + +--- @param targetYaw Pointer_integer +--- @return integer +function obj_bounce_off_walls_edges_objects(targetYaw) + -- ... +end + +--- @param targetYaw integer +--- @param turnSpeed integer +--- @return integer +function obj_resolve_collisions_and_turn(targetYaw, turnSpeed) + -- ... +end + +function obj_die_if_health_non_positive() + -- ... +end + +function obj_unused_die() + -- ... +end + +--- @param attackType integer +function obj_set_knockback_action(attackType) + -- ... +end + +function obj_set_squished_action() + -- ... +end + +--- @return integer +function obj_die_if_above_lava_and_health_non_positive() + -- ... +end + +--- @param hitbox ObjectHitbox +--- @param attackedMarioAction integer +--- @param attackHandlers Pointer_integer +--- @return integer +function obj_handle_attacks(hitbox, attackedMarioAction, attackHandlers) + -- ... +end + +--- @param baseScale number +function obj_act_knockback(baseScale) + -- ... +end + +--- @param baseScale number +function obj_act_squished(baseScale) + -- ... +end + +--- @param scale number +--- @return integer +function obj_update_standard_actions(scale) + -- ... +end + +--- @param hitbox ObjectHitbox +--- @param attackedMarioAction integer +--- @return integer +function obj_check_attacks(hitbox, attackedMarioAction) + -- ... +end + +--- @param endAction integer +--- @return integer +function obj_move_for_one_second(endAction) + -- ... +end + --- @param threshold number --- @param distanceToPlayer Pointer_integer --- @param angleToPlayer Pointer_integer @@ -7394,16 +7411,83 @@ function treat_far_home_as_mario(threshold, distanceToPlayer, angleToPlayer) -- ... end ---- @param x0 integer ---- @param x1 integer ---- @return integer -function abs_angle_diff(x0, x1) +--- @param relativePosX integer +--- @param relativePosY integer +--- @param relativePosZ integer +--- @param scale number +--- @param model integer +--- @param startSpeed number +--- @param endSpeed number +--- @param movePitch integer +--- @return Object +function obj_spit_fire(relativePosX, relativePosY, relativePosZ, scale, model, startSpeed, endSpeed, movePitch) -- ... end ---- @param value Pointer_number ---- @param dragStrength number -function apply_drag_to_value(value, dragStrength) +--- @param bitSet Pointer_integer +--- @param flag integer +--- @return integer +function clear_move_flag(bitSet, flag) + -- ... +end + +--- @param room integer +function set_room_override(room) + -- ... +end + +--- @param a0 Mat4 +--- @param a1 Object +function obj_update_pos_from_parent_transformation(a0, a1) + -- ... +end + +--- @param obj Object +--- @param dst Mat4 +--- @param src Mat4 +function obj_apply_scale_to_matrix(obj, dst, src) + -- ... +end + +--- @param a0 Mat4 +--- @param a1 Mat4 +--- @param a2 Mat4 +function create_transformation_from_matrices(a0, a1, a2) + -- ... +end + +--- @param obj Object +--- @param heldBehavior Pointer_BehaviorScript +function obj_set_held_state(obj, heldBehavior) + -- ... +end + +--- @param obj1 Object +--- @param obj2 Object +--- @return number +function lateral_dist_between_objects(obj1, obj2) + -- ... +end + +--- @param obj1 Object +--- @param obj2 Object +--- @return number +function dist_between_objects(obj1, obj2) + -- ... +end + +--- @param obj Object +--- @param pointX number +--- @param pointY number +--- @param pointZ number +--- @return number +function dist_between_object_and_point(obj, pointX, pointY, pointZ) + -- ... +end + +--- @param target number +--- @param increment number +function cur_obj_forward_vel_approach_upward(target, increment) -- ... end @@ -7431,34 +7515,331 @@ function approach_s16_symmetric(value, target, increment) -- ... end -function bhv_dust_smoke_loop() - -- ... -end - -function bhv_init_room() - -- ... -end - ---- @param a0 integer +--- @param target integer +--- @param increment integer --- @return integer -function bit_shift_left(a0) +function cur_obj_rotate_yaw_toward(target, increment) -- ... end ---- @param segment ChainSegment -function chain_segment_init(segment) - -- ... -end - ---- @param bitSet Pointer_integer ---- @param flag integer +--- @param obj1 Object +--- @param obj2 Object --- @return integer -function clear_move_flag(bitSet, flag) +function obj_angle_to_object(obj1, obj2) -- ... end ---- @param flags integer -function clear_time_stop_flags(flags) +--- @param obj Object +--- @param target Object +--- @return integer +function obj_pitch_to_object(obj, target) + -- ... +end + +--- @param obj Object +--- @param pointX number +--- @param pointZ number +--- @return integer +function obj_angle_to_point(obj, pointX, pointZ) + -- ... +end + +--- @param obj Object +--- @param target Object +--- @param angleIndex integer +--- @param turnAmount integer +--- @return integer +function obj_turn_toward_object(obj, target, angleIndex, turnAmount) + -- ... +end + +--- @param obj Object +--- @param relX integer +--- @param relY integer +--- @param relZ integer +function obj_set_parent_relative_pos(obj, relX, relY, relZ) + -- ... +end + +--- @param obj Object +--- @param x integer +--- @param y integer +--- @param z integer +function obj_set_pos(obj, x, y, z) + -- ... +end + +--- @param obj Object +--- @param pitch integer +--- @param yaw integer +--- @param roll integer +function obj_set_angle(obj, pitch, yaw, roll) + -- ... +end + +--- @param obj Object +--- @param pitch integer +--- @param yaw integer +--- @param roll integer +function obj_set_move_angle(obj, pitch, yaw, roll) + -- ... +end + +--- @param obj Object +--- @param pitch integer +--- @param yaw integer +--- @param roll integer +function obj_set_face_angle(obj, pitch, yaw, roll) + -- ... +end + +--- @param obj Object +--- @param pitch integer +--- @param yaw integer +--- @param roll integer +function obj_set_gfx_angle(obj, pitch, yaw, roll) + -- ... +end + +--- @param obj Object +--- @param x number +--- @param y number +--- @param z number +function obj_set_gfx_pos(obj, x, y, z) + -- ... +end + +--- @param obj Object +--- @param x number +--- @param y number +--- @param z number +function obj_set_gfx_scale(obj, x, y, z) + -- ... +end + +--- @param parent Object +--- @param params WaterDropletParams +--- @return Object +function spawn_water_droplet(parent, params) + -- ... +end + +--- @param obj Object +function obj_build_relative_transform(obj) + -- ... +end + +function cur_obj_move_using_vel() + -- ... +end + +--- @param dst Object +--- @param src Object +function obj_copy_graph_y_offset(dst, src) + -- ... +end + +--- @param dst Object +--- @param src Object +function obj_copy_pos_and_angle(dst, src) + -- ... +end + +--- @param dst Object +--- @param src Object +function obj_copy_pos(dst, src) + -- ... +end + +--- @param dst Object +--- @param src Object +function obj_copy_angle(dst, src) + -- ... +end + +--- @param obj Object +function obj_set_gfx_pos_from_pos(obj) + -- ... +end + +--- @param obj Object +--- @param animIndex integer +function obj_init_animation(obj, animIndex) + -- ... +end + +--- @param m Mat4 +--- @param dst Vec3f +--- @param v Vec3f +function linear_mtxf_mul_vec3f(m, dst, v) + -- ... +end + +--- @param m Mat4 +--- @param dst Vec3f +--- @param v Vec3f +function linear_mtxf_transpose_mul_vec3f(m, dst, v) + -- ... +end + +--- @param obj Object +function obj_apply_scale_to_transform(obj) + -- ... +end + +--- @param dst Object +--- @param src Object +function obj_copy_scale(dst, src) + -- ... +end + +--- @param obj Object +--- @param xScale number +--- @param yScale number +--- @param zScale number +function obj_scale_xyz(obj, xScale, yScale, zScale) + -- ... +end + +--- @param obj Object +--- @param scale number +function obj_scale(obj, scale) + -- ... +end + +--- @param scale number +function cur_obj_scale(scale) + -- ... +end + +--- @param animIndex integer +function cur_obj_init_animation(animIndex) + -- ... +end + +--- @param animIndex integer +function cur_obj_init_animation_with_sound(animIndex) + -- ... +end + +--- @param obj Object +--- @param animIndex integer +--- @param accel number +function obj_init_animation_with_accel_and_sound(obj, animIndex, accel) + -- ... +end + +--- @param animIndex integer +--- @param accel number +function cur_obj_init_animation_with_accel_and_sound(animIndex, accel) + -- ... +end + +--- @param obj Object +--- @param animations AnimationTable +--- @param animIndex integer +function obj_init_animation_with_sound(obj, animations, animIndex) + -- ... +end + +--- @param obj Object +function cur_obj_enable_rendering_and_become_tangible(obj) + -- ... +end + +function cur_obj_enable_rendering() + -- ... +end + +--- @param obj Object +function cur_obj_disable_rendering_and_become_intangible(obj) + -- ... +end + +function cur_obj_disable_rendering() + -- ... +end + +function cur_obj_unhide() + -- ... +end + +function cur_obj_hide() + -- ... +end + +--- @param other Object +--- @param dleft number +--- @param dy number +--- @param dforward number +function cur_obj_set_pos_relative(other, dleft, dy, dforward) + -- ... +end + +--- @param dleft number +--- @param dy number +--- @param dforward number +function cur_obj_set_pos_relative_to_parent(dleft, dy, dforward) + -- ... +end + +function cur_obj_enable_rendering_2() + -- ... +end + +function cur_obj_unused_init_on_floor() + -- ... +end + +--- @param obj Object +function obj_set_face_angle_to_move_angle(obj) + -- ... +end + +--- @param behavior Pointer_BehaviorScript +--- @return integer +function get_object_list_from_behavior(behavior) + -- ... +end + +--- @param behavior Pointer_BehaviorScript +--- @return Object +function cur_obj_nearest_object_with_behavior(behavior) + -- ... +end + +--- @param behavior Pointer_BehaviorScript +--- @return number +function cur_obj_dist_to_nearest_object_with_behavior(behavior) + -- ... +end + +--- @return Object +function cur_obj_find_nearest_pole() + -- ... +end + +--- @param behavior Pointer_BehaviorScript +--- @param dist Pointer_number +--- @return Object +function cur_obj_find_nearest_object_with_behavior(behavior, dist) + -- ... +end + +--- @param behavior Pointer_BehaviorScript +--- @param dist number +--- @return integer +function cur_obj_count_objects_with_behavior(behavior, dist) + -- ... +end + +--- @return Object +function find_unimportant_object() + -- ... +end + +--- @return integer +function count_unimportant_objects() -- ... end @@ -7468,64 +7849,20 @@ function count_objects_with_behavior(behavior) -- ... end ---- @return integer -function count_unimportant_objects() +--- @param behavior Pointer_BehaviorScript +--- @return Object +function find_object_with_behavior(behavior) -- ... end ---- @param a0 Mat4 ---- @param a1 Mat4 ---- @param a2 Mat4 -function create_transformation_from_matrices(a0, a1, a2) +--- @param behavior Pointer_BehaviorScript +--- @param maxDist number +--- @return Object +function cur_obj_find_nearby_held_actor(behavior, maxDist) -- ... end ---- @return number -function cur_obj_abs_y_dist_to_home() - -- ... -end - ---- @return integer -function cur_obj_advance_looping_anim() - -- ... -end - -function cur_obj_align_gfx_with_floor() - -- ... -end - ---- @return integer -function cur_obj_angle_to_home() - -- ... -end - ---- @param dragStrength number -function cur_obj_apply_drag_xz(dragStrength) - -- ... -end - -function cur_obj_become_intangible() - -- ... -end - -function cur_obj_become_tangible() - -- ... -end - ---- @param m MarioState ---- @param radius number ---- @param height number ---- @param unused integer ---- @return integer -function cur_obj_can_mario_activate_textbox(m, radius, height, unused) - -- ... -end - ---- @param m MarioState ---- @param radius number ---- @param height number ---- @return integer -function cur_obj_can_mario_activate_textbox_2(m, radius, height) +function cur_obj_reset_timer_and_subaction() -- ... end @@ -7534,6 +7871,31 @@ function cur_obj_change_action(action) -- ... end +--- @param m MarioState +--- @param f12 number +--- @param f14 number +function cur_obj_set_vel_from_mario_vel(m, f12, f14) + -- ... +end + +function cur_obj_reverse_animation() + -- ... +end + +function cur_obj_extend_animation_if_at_end() + -- ... +end + +--- @return integer +function cur_obj_check_if_near_animation_end() + -- ... +end + +--- @return integer +function cur_obj_check_if_at_animation_end() + -- ... +end + --- @param frame integer --- @return integer function cur_obj_check_anim_frame(frame) @@ -7553,128 +7915,33 @@ function cur_obj_check_frame_prior_current_frame(a0) -- ... end +--- @param m MarioState --- @return integer -function cur_obj_check_grabbed_mario() - -- ... -end - ---- @return integer -function cur_obj_check_if_at_animation_end() - -- ... -end - ---- @return integer -function cur_obj_check_if_near_animation_end() - -- ... -end - ---- @return integer -function cur_obj_check_interacted() - -- ... -end - ---- @param flag integer ---- @return integer -function cur_obj_clear_interact_status_flag(flag) - -- ... -end - -function cur_obj_compute_vel_xz() - -- ... -end - ---- @param behavior Pointer_BehaviorScript ---- @param dist number ---- @return integer -function cur_obj_count_objects_with_behavior(behavior, dist) - -- ... -end - ---- @param steepAngleDegrees integer ---- @return integer -function cur_obj_detect_steep_floor(steepAngleDegrees) - -- ... -end - -function cur_obj_disable() - -- ... -end - -function cur_obj_disable_rendering() - -- ... -end - ---- @param obj Object -function cur_obj_disable_rendering_and_become_intangible(obj) - -- ... -end - ---- @param behavior Pointer_BehaviorScript ---- @return number -function cur_obj_dist_to_nearest_object_with_behavior(behavior) - -- ... -end - -function cur_obj_enable_rendering() - -- ... -end - -function cur_obj_enable_rendering_2() - -- ... -end - ---- @param obj Object -function cur_obj_enable_rendering_and_become_tangible(obj) - -- ... -end - -function cur_obj_enable_rendering_if_mario_in_room() +function mario_is_in_air_action(m) -- ... end --- @param m MarioState ---- @param dialogFlags integer ---- @param dialogResult integer -function cur_obj_end_dialog(m, dialogFlags, dialogResult) - -- ... -end - -function cur_obj_extend_animation_if_at_end() - -- ... -end - ---- @param behavior Pointer_BehaviorScript ---- @param maxDist number ---- @return Object -function cur_obj_find_nearby_held_actor(behavior, maxDist) - -- ... -end - ---- @param behavior Pointer_BehaviorScript ---- @param dist Pointer_number ---- @return Object -function cur_obj_find_nearest_object_with_behavior(behavior, dist) - -- ... -end - ---- @return Object -function cur_obj_find_nearest_pole() - -- ... -end - ---- @param unusedArg integer --- @return integer -function cur_obj_follow_path(unusedArg) +function mario_is_dive_sliding(m) -- ... end ---- @param target number ---- @param increment number -function cur_obj_forward_vel_approach_upward(target, increment) +--- @param sp18 number +--- @param sp1C integer +function cur_obj_set_y_vel_and_animation(sp18, sp1C) -- ... end -function cur_obj_get_dropped() +--- @param sp18 integer +--- @param sp1C integer +function cur_obj_unrender_and_reset_state(sp18, sp1C) + -- ... +end + +--- @param forwardVel number +--- @param velY number +function cur_obj_move_after_thrown_or_dropped(forwardVel, velY) -- ... end @@ -7685,19 +7952,605 @@ function cur_obj_get_thrown_or_placed(forwardVel, velY, thrownAction) -- ... end +function cur_obj_get_dropped() + -- ... +end + +--- @param flag integer +function mario_set_flag(flag) + -- ... +end + +--- @param flag integer +--- @return integer +function cur_obj_clear_interact_status_flag(flag) + -- ... +end + +--- @param obj Object +function obj_mark_for_deletion(obj) + -- ... +end + +function cur_obj_disable() + -- ... +end + +function cur_obj_become_intangible() + -- ... +end + +function cur_obj_become_tangible() + -- ... +end + +--- @param obj Object +function obj_become_tangible(obj) + -- ... +end + +function cur_obj_update_floor_height() + -- ... +end + +--- @return Surface +function cur_obj_update_floor_height_and_get_floor() + -- ... +end + +--- @param value Pointer_number +--- @param dragStrength number +function apply_drag_to_value(value, dragStrength) + -- ... +end + +--- @param dragStrength number +function cur_obj_apply_drag_xz(dragStrength) + -- ... +end + +--- @param steepSlopeNormalY number +--- @param careAboutEdgesAndSteepSlopes integer +--- @return integer +function cur_obj_move_xz(steepSlopeNormalY, careAboutEdgesAndSteepSlopes) + -- ... +end + +function cur_obj_move_update_underwater_flags() + -- ... +end + +--- @param gravity number +--- @param bounciness number +function cur_obj_move_update_ground_air_flags(gravity, bounciness) + -- ... +end + +--- @param gravity number +--- @param buoyancy number +--- @return number +function cur_obj_move_y_and_get_water_level(gravity, buoyancy) + -- ... +end + +--- @param gravity number +--- @param bounciness number +--- @param buoyancy number +function cur_obj_move_y(gravity, bounciness, buoyancy) + -- ... +end + +--- @param offsetY number +--- @param radius number +function cur_obj_unused_resolve_wall_collisions(offsetY, radius) + -- ... +end + +--- @param x0 integer +--- @param x1 integer +--- @return integer +function abs_angle_diff(x0, x1) + -- ... +end + +function cur_obj_move_xz_using_fvel_and_yaw() + -- ... +end + +function cur_obj_move_y_with_terminal_vel() + -- ... +end + +function cur_obj_compute_vel_xz() + -- ... +end + +--- @param value number +--- @param center number +--- @param zeroThreshold number +--- @param increment number +--- @return number +function increment_velocity_toward_range(value, center, zeroThreshold, increment) + -- ... +end + +--- @param obj1 Object +--- @param obj2 Object +--- @return integer +function obj_check_if_collided_with_object(obj1, obj2) + -- ... +end + +--- @param behavior Pointer_BehaviorScript +function cur_obj_set_behavior(behavior) + -- ... +end + +--- @param obj Object +--- @param behavior Pointer_BehaviorScript +function obj_set_behavior(obj, behavior) + -- ... +end + --- @param behavior Pointer_BehaviorScript --- @return integer function cur_obj_has_behavior(behavior) -- ... end ---- @param modelID integer +--- @param obj Object +--- @param behavior Pointer_BehaviorScript --- @return integer -function cur_obj_has_model(modelID) +function obj_has_behavior(obj, behavior) -- ... end -function cur_obj_hide() +--- @param obj Object +--- @return number +function cur_obj_lateral_dist_from_obj_to_home(obj) + -- ... +end + +--- @return number +function cur_obj_lateral_dist_from_mario_to_home() + -- ... +end + +--- @return number +function cur_obj_lateral_dist_to_home() + -- ... +end + +--- @param halfLength number +--- @return integer +function cur_obj_outside_home_square(halfLength) + -- ... +end + +--- @param minX number +--- @param maxX number +--- @param minZ number +--- @param maxZ number +--- @return integer +function cur_obj_outside_home_rectangle(minX, maxX, minZ, maxZ) + -- ... +end + +function cur_obj_set_pos_to_home() + -- ... +end + +function cur_obj_set_pos_to_home_and_stop() + -- ... +end + +--- @param amount number +function cur_obj_shake_y(amount) + -- ... +end + +--- @param obj Object +--- @param cameraEvent integer +function cur_obj_start_cam_event(obj, cameraEvent) + -- ... +end + +--- @param sp0 integer +--- @param sp4 integer +--- @param sp8 number +function set_mario_interact_hoot_if_in_range(sp0, sp4, sp8) + -- ... +end + +--- @param obj Object +function obj_set_billboard(obj) + -- ... +end + +--- @param obj Object +function obj_set_cylboard(obj) + -- ... +end + +function cur_obj_set_billboard_if_vanilla_cam() + -- ... +end + +--- @param o Object +--- @param radius number +--- @param height number +function obj_set_hitbox_radius_and_height(o, radius, height) + -- ... +end + +--- @param o Object +--- @param radius number +--- @param height number +function obj_set_hurtbox_radius_and_height(o, radius, height) + -- ... +end + +--- @param radius number +--- @param height number +function cur_obj_set_hitbox_radius_and_height(radius, height) + -- ... +end + +--- @param radius number +--- @param height number +function cur_obj_set_hurtbox_radius_and_height(radius, height) + -- ... +end + +--- @param obj Object +--- @param numCoins integer +--- @param sp30 number +--- @param coinBehavior Pointer_BehaviorScript +--- @param posJitter integer +--- @param model integer +function obj_spawn_loot_coins(obj, numCoins, sp30, coinBehavior, posJitter, model) + -- ... +end + +--- @param obj Object +--- @param numCoins integer +--- @param sp28 number +--- @param posJitter integer +function obj_spawn_loot_blue_coins(obj, numCoins, sp28, posJitter) + -- ... +end + +--- @param obj Object +--- @param numCoins integer +--- @param sp28 number +function obj_spawn_loot_yellow_coins(obj, numCoins, sp28) + -- ... +end + +--- @param m MarioState +function cur_obj_spawn_loot_coin_at_mario_pos(m) + -- ... +end + +--- @return number +function cur_obj_abs_y_dist_to_home() + -- ... +end + +--- @return integer +function cur_obj_advance_looping_anim() + -- ... +end + +--- @param steepAngleDegrees integer +--- @return integer +function cur_obj_detect_steep_floor(steepAngleDegrees) + -- ... +end + +--- @return integer +function cur_obj_resolve_wall_collisions() + -- ... +end + +function cur_obj_update_floor() + -- ... +end + +--- @param steepSlopeDegrees integer +function cur_obj_update_floor_and_resolve_wall_collisions(steepSlopeDegrees) + -- ... +end + +function cur_obj_update_floor_and_walls() + -- ... +end + +--- @param steepSlopeAngleDegrees integer +function cur_obj_move_standard(steepSlopeAngleDegrees) + -- ... +end + +--- @return integer +function cur_obj_within_12k_bounds() + -- ... +end + +function cur_obj_move_using_vel_and_gravity() + -- ... +end + +function cur_obj_move_using_fvel_and_gravity() + -- ... +end + +--- @param obj Object +--- @param other Object +--- @param dleft number +--- @param dy number +--- @param dforward number +function obj_set_pos_relative(obj, other, dleft, dy, dforward) + -- ... +end + +--- @return integer +function cur_obj_angle_to_home() + -- ... +end + +--- @param obj1 Object +--- @param obj2 Object +function obj_set_gfx_pos_at_obj_pos(obj1, obj2) + -- ... +end + +--- @param obj Object +--- @param posIndex integer +--- @param localTranslateIndex integer +function obj_translate_local(obj, posIndex, localTranslateIndex) + -- ... +end + +--- @param obj Object +--- @param posIndex integer +--- @param angleIndex integer +function obj_build_transform_from_pos_and_angle(obj, posIndex, angleIndex) + -- ... +end + +--- @param obj Object +function obj_set_throw_matrix_from_transform(obj) + -- ... +end + +--- @param obj Object +function obj_build_transform_relative_to_parent(obj) + -- ... +end + +--- @param obj Object +function obj_create_transform_from_self(obj) + -- ... +end + +function cur_obj_rotate_move_angle_using_vel() + -- ... +end + +function cur_obj_rotate_face_angle_using_vel() + -- ... +end + +function cur_obj_set_face_angle_to_move_angle() + -- ... +end + +--- @param unusedArg integer +--- @return integer +function cur_obj_follow_path(unusedArg) + -- ... +end + +--- @param segment ChainSegment +function chain_segment_init(segment) + -- ... +end + +--- @param diameter number +--- @return number +function random_f32_around_zero(diameter) + -- ... +end + +--- @param obj Object +--- @param rangeLength number +--- @param minScale number +function obj_scale_random(obj, rangeLength, minScale) + -- ... +end + +--- @param obj Object +--- @param rangeLength number +function obj_translate_xyz_random(obj, rangeLength) + -- ... +end + +--- @param obj Object +--- @param rangeLength number +function obj_translate_xz_random(obj, rangeLength) + -- ... +end + +--- @param a0 Object +function obj_build_vel_from_transform(a0) + -- ... +end + +function cur_obj_set_pos_via_transform() + -- ... +end + +--- @return integer +function cur_obj_reflect_move_angle_off_wall() + -- ... +end + +--- @param info SpawnParticlesInfo +function cur_obj_spawn_particles(info) + -- ... +end + +--- @param obj Object +--- @param hitbox ObjectHitbox +function obj_set_hitbox(obj, hitbox) + -- ... +end + +--- @param x integer +--- @return integer +function signum_positive(x) + -- ... +end + +--- @param timeUntilBlinking integer +--- @param numBlinks integer +--- @return integer +function cur_obj_wait_then_blink(timeUntilBlinking, numBlinks) + -- ... +end + +--- @return integer +function cur_obj_is_mario_ground_pounding_platform() + -- ... +end + +function spawn_mist_particles() + -- ... +end + +--- @param sp18 integer +function spawn_mist_particles_with_sound(sp18) + -- ... +end + +--- @param radius number +function cur_obj_push_mario_away(radius) + -- ... +end + +--- @param radius number +--- @param extentY number +function cur_obj_push_mario_away_from_cylinder(radius, extentY) + -- ... +end + +function bhv_dust_smoke_loop() + -- ... +end + +--- @param sp0 integer +--- @param sp4 integer +function stub_obj_helpers_3(sp0, sp4) + -- ... +end + +--- @param a0 integer +--- @param a1 integer +--- @param sp10 number +--- @param sp14 number +function cur_obj_scale_over_time(a0, a1, sp10, sp14) + -- ... +end + +function cur_obj_set_pos_to_home_with_debug() + -- ... +end + +function stub_obj_helpers_4() + -- ... +end + +--- @return integer +function cur_obj_is_mario_on_platform() + -- ... +end + +--- @return integer +function cur_obj_is_any_player_on_platform() + -- ... +end + +--- @param cycles integer +--- @param amount integer +--- @return integer +function cur_obj_shake_y_until(cycles, amount) + -- ... +end + +--- @param a0 integer +--- @return integer +function cur_obj_move_up_and_down(a0) + -- ... +end + +--- @param sp20 integer +--- @param sp24 integer +--- @return Object +function spawn_star_with_no_lvl_exit(sp20, sp24) + -- ... +end + +function spawn_base_star_with_no_lvl_exit() + -- ... +end + +--- @param a0 integer +--- @return integer +function bit_shift_left(a0) + -- ... +end + +--- @return integer +function cur_obj_mario_far_away() + -- ... +end + +--- @param speedThreshold integer +--- @return integer +function is_mario_moving_fast_or_in_air(speedThreshold) + -- ... +end + +--- @param item integer +--- @param array Pointer_integer +--- @return integer +function is_item_in_array(item, array) + -- ... +end + +function bhv_init_room() + -- ... +end + +function cur_obj_enable_rendering_if_mario_in_room() + -- ... +end + +--- @param hitbox ObjectHitbox +--- @param deathSound integer +--- @param noLootCoins integer +--- @return integer +function cur_obj_set_hitbox_and_die_if_attacked(hitbox, deathSound, noLootCoins) + -- ... +end + +--- @param sp18 number +--- @param sp1C integer +function obj_explode_and_spawn_coins(sp18, sp1C) + -- ... +end + +function cur_obj_if_hit_wall_bounce_away() -- ... end @@ -7707,12 +8560,101 @@ function cur_obj_hide_if_mario_far_away_y(distY) -- ... end -function cur_obj_if_hit_wall_bounce_away() +--- @param obj Object +--- @return integer +function obj_is_hidden(obj) -- ... end ---- @param animIndex integer -function cur_obj_init_animation(animIndex) +function enable_time_stop() + -- ... +end + +function enable_time_stop_if_alone() + -- ... +end + +function disable_time_stop() + -- ... +end + +--- @param flags integer +function set_time_stop_flags(flags) + -- ... +end + +--- @param flags integer +function set_time_stop_flags_if_alone(flags) + -- ... +end + +--- @param flags integer +function clear_time_stop_flags(flags) + -- ... +end + +--- @param m MarioState +--- @param radius number +--- @param height number +--- @param unused integer +--- @return integer +function cur_obj_can_mario_activate_textbox(m, radius, height, unused) + -- ... +end + +--- @param m MarioState +--- @param radius number +--- @param height number +--- @return integer +function cur_obj_can_mario_activate_textbox_2(m, radius, height) + -- ... +end + +--- @param m MarioState +--- @param dialogFlags integer +--- @param dialogResult integer +function cur_obj_end_dialog(m, dialogFlags, dialogResult) + -- ... +end + +--- @param modelID integer +--- @return integer +function cur_obj_has_model(modelID) + -- ... +end + +function cur_obj_align_gfx_with_floor() + -- ... +end + +--- @param minX integer +--- @param maxX integer +--- @param minZ integer +--- @param maxZ integer +--- @return integer +function mario_is_within_rectangle(minX, maxX, minZ, maxZ) + -- ... +end + +--- @param shake integer +function cur_obj_shake_screen(shake) + -- ... +end + +--- @param obj Object +--- @return integer +function obj_attack_collided_from_other_object(obj) + -- ... +end + +--- @return integer +function cur_obj_was_attacked_or_ground_pounded() + -- ... +end + +--- @param dst Object +--- @param src Object +function obj_copy_behavior_params(dst, src) -- ... end @@ -7733,294 +8675,33 @@ function cur_obj_init_animation_and_extend_if_at_end(animIndex) -- ... end ---- @param animIndex integer ---- @param accel number -function cur_obj_init_animation_with_accel_and_sound(animIndex, accel) - -- ... -end - ---- @param animIndex integer -function cur_obj_init_animation_with_sound(animIndex) +--- @return integer +function cur_obj_check_grabbed_mario() -- ... end --- @return integer -function cur_obj_is_any_player_on_platform() +function player_performed_grab_escape_action() + -- ... +end + +--- @param animFrame1 integer +--- @param animFrame2 integer +--- @param sound integer +function cur_obj_unused_play_footstep_sound(animFrame1, animFrame2, sound) + -- ... +end + +function enable_time_stop_including_mario() + -- ... +end + +function disable_time_stop_including_mario() -- ... end --- @return integer -function cur_obj_is_mario_ground_pounding_platform() - -- ... -end - ---- @return integer -function cur_obj_is_mario_on_platform() - -- ... -end - ---- @return number -function cur_obj_lateral_dist_from_mario_to_home() - -- ... -end - ---- @param obj Object ---- @return number -function cur_obj_lateral_dist_from_obj_to_home(obj) - -- ... -end - ---- @return number -function cur_obj_lateral_dist_to_home() - -- ... -end - ---- @return integer -function cur_obj_mario_far_away() - -- ... -end - ---- @param forwardVel number ---- @param velY number -function cur_obj_move_after_thrown_or_dropped(forwardVel, velY) - -- ... -end - ---- @param steepSlopeAngleDegrees integer -function cur_obj_move_standard(steepSlopeAngleDegrees) - -- ... -end - ---- @param a0 integer ---- @return integer -function cur_obj_move_up_and_down(a0) - -- ... -end - ---- @param gravity number ---- @param bounciness number -function cur_obj_move_update_ground_air_flags(gravity, bounciness) - -- ... -end - -function cur_obj_move_update_underwater_flags() - -- ... -end - -function cur_obj_move_using_fvel_and_gravity() - -- ... -end - -function cur_obj_move_using_vel() - -- ... -end - -function cur_obj_move_using_vel_and_gravity() - -- ... -end - ---- @param steepSlopeNormalY number ---- @param careAboutEdgesAndSteepSlopes integer ---- @return integer -function cur_obj_move_xz(steepSlopeNormalY, careAboutEdgesAndSteepSlopes) - -- ... -end - -function cur_obj_move_xz_using_fvel_and_yaw() - -- ... -end - ---- @param gravity number ---- @param bounciness number ---- @param buoyancy number -function cur_obj_move_y(gravity, bounciness, buoyancy) - -- ... -end - ---- @param gravity number ---- @param buoyancy number ---- @return number -function cur_obj_move_y_and_get_water_level(gravity, buoyancy) - -- ... -end - -function cur_obj_move_y_with_terminal_vel() - -- ... -end - ---- @param behavior Pointer_BehaviorScript ---- @return Object -function cur_obj_nearest_object_with_behavior(behavior) - -- ... -end - ---- @param minX number ---- @param maxX number ---- @param minZ number ---- @param maxZ number ---- @return integer -function cur_obj_outside_home_rectangle(minX, maxX, minZ, maxZ) - -- ... -end - ---- @param halfLength number ---- @return integer -function cur_obj_outside_home_square(halfLength) - -- ... -end - ---- @param radius number -function cur_obj_push_mario_away(radius) - -- ... -end - ---- @param radius number ---- @param extentY number -function cur_obj_push_mario_away_from_cylinder(radius, extentY) - -- ... -end - ---- @return integer -function cur_obj_reflect_move_angle_off_wall() - -- ... -end - -function cur_obj_reset_timer_and_subaction() - -- ... -end - ---- @return integer -function cur_obj_resolve_wall_collisions() - -- ... -end - -function cur_obj_reverse_animation() - -- ... -end - -function cur_obj_rotate_face_angle_using_vel() - -- ... -end - -function cur_obj_rotate_move_angle_using_vel() - -- ... -end - ---- @param target integer ---- @param increment integer ---- @return integer -function cur_obj_rotate_yaw_toward(target, increment) - -- ... -end - ---- @param scale number -function cur_obj_scale(scale) - -- ... -end - ---- @param a0 integer ---- @param a1 integer ---- @param sp10 number ---- @param sp14 number -function cur_obj_scale_over_time(a0, a1, sp10, sp14) - -- ... -end - ---- @param behavior Pointer_BehaviorScript -function cur_obj_set_behavior(behavior) - -- ... -end - -function cur_obj_set_billboard_if_vanilla_cam() - -- ... -end - -function cur_obj_set_face_angle_to_move_angle() - -- ... -end - ---- @param hitbox ObjectHitbox ---- @param deathSound integer ---- @param noLootCoins integer ---- @return integer -function cur_obj_set_hitbox_and_die_if_attacked(hitbox, deathSound, noLootCoins) - -- ... -end - ---- @param radius number ---- @param height number -function cur_obj_set_hitbox_radius_and_height(radius, height) - -- ... -end - -function cur_obj_set_home_once() - -- ... -end - ---- @param radius number ---- @param height number -function cur_obj_set_hurtbox_radius_and_height(radius, height) - -- ... -end - ---- @param other Object ---- @param dleft number ---- @param dy number ---- @param dforward number -function cur_obj_set_pos_relative(other, dleft, dy, dforward) - -- ... -end - ---- @param dleft number ---- @param dy number ---- @param dforward number -function cur_obj_set_pos_relative_to_parent(dleft, dy, dforward) - -- ... -end - -function cur_obj_set_pos_to_home() - -- ... -end - -function cur_obj_set_pos_to_home_and_stop() - -- ... -end - -function cur_obj_set_pos_to_home_with_debug() - -- ... -end - -function cur_obj_set_pos_via_transform() - -- ... -end - ---- @param m MarioState ---- @param f12 number ---- @param f14 number -function cur_obj_set_vel_from_mario_vel(m, f12, f14) - -- ... -end - ---- @param sp18 number ---- @param sp1C integer -function cur_obj_set_y_vel_and_animation(sp18, sp1C) - -- ... -end - ---- @param shake integer -function cur_obj_shake_screen(shake) - -- ... -end - ---- @param amount number -function cur_obj_shake_y(amount) - -- ... -end - ---- @param cycles integer ---- @param amount integer ---- @return integer -function cur_obj_shake_y_until(cycles, amount) +function cur_obj_check_interacted() -- ... end @@ -8028,16 +8709,6 @@ function cur_obj_spawn_loot_blue_coin() -- ... end ---- @param m MarioState -function cur_obj_spawn_loot_coin_at_mario_pos(m) - -- ... -end - ---- @param info SpawnParticlesInfo -function cur_obj_spawn_particles(info) - -- ... -end - --- @param targetX number --- @param targetY number --- @param targetZ number @@ -8046,128 +8717,7 @@ function cur_obj_spawn_star_at_y_offset(targetX, targetY, targetZ, offsetY) -- ... end ---- @param obj Object ---- @param cameraEvent integer -function cur_obj_start_cam_event(obj, cameraEvent) - -- ... -end - -function cur_obj_unhide() - -- ... -end - ---- @param sp18 integer ---- @param sp1C integer -function cur_obj_unrender_and_reset_state(sp18, sp1C) - -- ... -end - -function cur_obj_unused_init_on_floor() - -- ... -end - ---- @param animFrame1 integer ---- @param animFrame2 integer ---- @param sound integer -function cur_obj_unused_play_footstep_sound(animFrame1, animFrame2, sound) - -- ... -end - ---- @param offsetY number ---- @param radius number -function cur_obj_unused_resolve_wall_collisions(offsetY, radius) - -- ... -end - -function cur_obj_update_floor() - -- ... -end - ---- @param steepSlopeDegrees integer -function cur_obj_update_floor_and_resolve_wall_collisions(steepSlopeDegrees) - -- ... -end - -function cur_obj_update_floor_and_walls() - -- ... -end - -function cur_obj_update_floor_height() - -- ... -end - ---- @return Surface -function cur_obj_update_floor_height_and_get_floor() - -- ... -end - ---- @param timeUntilBlinking integer ---- @param numBlinks integer ---- @return integer -function cur_obj_wait_then_blink(timeUntilBlinking, numBlinks) - -- ... -end - ---- @return integer -function cur_obj_was_attacked_or_ground_pounded() - -- ... -end - ---- @return integer -function cur_obj_within_12k_bounds() - -- ... -end - -function disable_time_stop() - -- ... -end - -function disable_time_stop_including_mario() - -- ... -end - ---- @param obj Object ---- @param pointX number ---- @param pointY number ---- @param pointZ number ---- @return number -function dist_between_object_and_point(obj, pointX, pointY, pointZ) - -- ... -end - ---- @param obj1 Object ---- @param obj2 Object ---- @return number -function dist_between_objects(obj1, obj2) - -- ... -end - -function enable_time_stop() - -- ... -end - -function enable_time_stop_if_alone() - -- ... -end - -function enable_time_stop_including_mario() - -- ... -end - ---- @param behavior Pointer_BehaviorScript ---- @return Object -function find_object_with_behavior(behavior) - -- ... -end - ---- @return Object -function find_unimportant_object() - -- ... -end - ---- @param behavior Pointer_BehaviorScript ---- @return integer -function get_object_list_from_behavior(behavior) +function cur_obj_set_home_once() -- ... end @@ -8177,526 +8727,6 @@ function get_trajectory_length(trajectory) -- ... end ---- @param value number ---- @param center number ---- @param zeroThreshold number ---- @param increment number ---- @return number -function increment_velocity_toward_range(value, center, zeroThreshold, increment) - -- ... -end - ---- @param item integer ---- @param array Pointer_integer ---- @return integer -function is_item_in_array(item, array) - -- ... -end - ---- @param speedThreshold integer ---- @return integer -function is_mario_moving_fast_or_in_air(speedThreshold) - -- ... -end - ---- @param obj1 Object ---- @param obj2 Object ---- @return number -function lateral_dist_between_objects(obj1, obj2) - -- ... -end - ---- @param m Mat4 ---- @param dst Vec3f ---- @param v Vec3f -function linear_mtxf_mul_vec3f(m, dst, v) - -- ... -end - ---- @param m Mat4 ---- @param dst Vec3f ---- @param v Vec3f -function linear_mtxf_transpose_mul_vec3f(m, dst, v) - -- ... -end - ---- @param m MarioState ---- @return integer -function mario_is_dive_sliding(m) - -- ... -end - ---- @param m MarioState ---- @return integer -function mario_is_in_air_action(m) - -- ... -end - ---- @param minX integer ---- @param maxX integer ---- @param minZ integer ---- @param maxZ integer ---- @return integer -function mario_is_within_rectangle(minX, maxX, minZ, maxZ) - -- ... -end - ---- @param flag integer -function mario_set_flag(flag) - -- ... -end - ---- @param obj1 Object ---- @param obj2 Object ---- @return integer -function obj_angle_to_object(obj1, obj2) - -- ... -end - ---- @param obj Object ---- @param pointX number ---- @param pointZ number ---- @return integer -function obj_angle_to_point(obj, pointX, pointZ) - -- ... -end - ---- @param obj Object ---- @param dst Mat4 ---- @param src Mat4 -function obj_apply_scale_to_matrix(obj, dst, src) - -- ... -end - ---- @param obj Object -function obj_apply_scale_to_transform(obj) - -- ... -end - ---- @param obj Object ---- @return integer -function obj_attack_collided_from_other_object(obj) - -- ... -end - ---- @param obj Object -function obj_become_tangible(obj) - -- ... -end - ---- @param obj Object -function obj_build_relative_transform(obj) - -- ... -end - ---- @param obj Object ---- @param posIndex integer ---- @param angleIndex integer -function obj_build_transform_from_pos_and_angle(obj, posIndex, angleIndex) - -- ... -end - ---- @param obj Object -function obj_build_transform_relative_to_parent(obj) - -- ... -end - ---- @param a0 Object -function obj_build_vel_from_transform(a0) - -- ... -end - ---- @param obj1 Object ---- @param obj2 Object ---- @return integer -function obj_check_if_collided_with_object(obj1, obj2) - -- ... -end - ---- @param dst Object ---- @param src Object -function obj_copy_angle(dst, src) - -- ... -end - ---- @param dst Object ---- @param src Object -function obj_copy_behavior_params(dst, src) - -- ... -end - ---- @param dst Object ---- @param src Object -function obj_copy_graph_y_offset(dst, src) - -- ... -end - ---- @param dst Object ---- @param src Object -function obj_copy_pos(dst, src) - -- ... -end - ---- @param dst Object ---- @param src Object -function obj_copy_pos_and_angle(dst, src) - -- ... -end - ---- @param dst Object ---- @param src Object -function obj_copy_scale(dst, src) - -- ... -end - ---- @param obj Object -function obj_create_transform_from_self(obj) - -- ... -end - ---- @param sp18 number ---- @param sp1C integer -function obj_explode_and_spawn_coins(sp18, sp1C) - -- ... -end - ---- @param obj Object ---- @param behavior Pointer_BehaviorScript ---- @return integer -function obj_has_behavior(obj, behavior) - -- ... -end - ---- @param obj Object ---- @param animIndex integer -function obj_init_animation(obj, animIndex) - -- ... -end - ---- @param obj Object ---- @param animIndex integer ---- @param accel number -function obj_init_animation_with_accel_and_sound(obj, animIndex, accel) - -- ... -end - ---- @param obj Object ---- @param animations AnimationTable ---- @param animIndex integer -function obj_init_animation_with_sound(obj, animations, animIndex) - -- ... -end - ---- @param obj Object ---- @return integer -function obj_is_hidden(obj) - -- ... -end - ---- @param obj Object -function obj_mark_for_deletion(obj) - -- ... -end - ---- @param obj Object ---- @param target Object ---- @return integer -function obj_pitch_to_object(obj, target) - -- ... -end - ---- @param obj Object ---- @param scale number -function obj_scale(obj, scale) - -- ... -end - ---- @param obj Object ---- @param rangeLength number ---- @param minScale number -function obj_scale_random(obj, rangeLength, minScale) - -- ... -end - ---- @param obj Object ---- @param xScale number ---- @param yScale number ---- @param zScale number -function obj_scale_xyz(obj, xScale, yScale, zScale) - -- ... -end - ---- @param obj Object ---- @param pitch integer ---- @param yaw integer ---- @param roll integer -function obj_set_angle(obj, pitch, yaw, roll) - -- ... -end - ---- @param obj Object ---- @param behavior Pointer_BehaviorScript -function obj_set_behavior(obj, behavior) - -- ... -end - ---- @param obj Object -function obj_set_billboard(obj) - -- ... -end - ---- @param obj Object -function obj_set_cylboard(obj) - -- ... -end - ---- @param obj Object ---- @param pitch integer ---- @param yaw integer ---- @param roll integer -function obj_set_face_angle(obj, pitch, yaw, roll) - -- ... -end - ---- @param obj Object -function obj_set_face_angle_to_move_angle(obj) - -- ... -end - ---- @param obj Object ---- @param pitch integer ---- @param yaw integer ---- @param roll integer -function obj_set_gfx_angle(obj, pitch, yaw, roll) - -- ... -end - ---- @param obj Object ---- @param x number ---- @param y number ---- @param z number -function obj_set_gfx_pos(obj, x, y, z) - -- ... -end - ---- @param obj1 Object ---- @param obj2 Object -function obj_set_gfx_pos_at_obj_pos(obj1, obj2) - -- ... -end - ---- @param obj Object -function obj_set_gfx_pos_from_pos(obj) - -- ... -end - ---- @param obj Object ---- @param x number ---- @param y number ---- @param z number -function obj_set_gfx_scale(obj, x, y, z) - -- ... -end - ---- @param obj Object ---- @param heldBehavior Pointer_BehaviorScript -function obj_set_held_state(obj, heldBehavior) - -- ... -end - ---- @param obj Object ---- @param hitbox ObjectHitbox -function obj_set_hitbox(obj, hitbox) - -- ... -end - ---- @param o Object ---- @param radius number ---- @param height number -function obj_set_hitbox_radius_and_height(o, radius, height) - -- ... -end - ---- @param o Object ---- @param radius number ---- @param height number -function obj_set_hurtbox_radius_and_height(o, radius, height) - -- ... -end - ---- @param obj Object ---- @param pitch integer ---- @param yaw integer ---- @param roll integer -function obj_set_move_angle(obj, pitch, yaw, roll) - -- ... -end - ---- @param obj Object ---- @param relX integer ---- @param relY integer ---- @param relZ integer -function obj_set_parent_relative_pos(obj, relX, relY, relZ) - -- ... -end - ---- @param obj Object ---- @param x integer ---- @param y integer ---- @param z integer -function obj_set_pos(obj, x, y, z) - -- ... -end - ---- @param obj Object ---- @param other Object ---- @param dleft number ---- @param dy number ---- @param dforward number -function obj_set_pos_relative(obj, other, dleft, dy, dforward) - -- ... -end - ---- @param obj Object -function obj_set_throw_matrix_from_transform(obj) - -- ... -end - ---- @param obj Object ---- @param numCoins integer ---- @param sp28 number ---- @param posJitter integer -function obj_spawn_loot_blue_coins(obj, numCoins, sp28, posJitter) - -- ... -end - ---- @param obj Object ---- @param numCoins integer ---- @param sp30 number ---- @param coinBehavior Pointer_BehaviorScript ---- @param posJitter integer ---- @param model integer -function obj_spawn_loot_coins(obj, numCoins, sp30, coinBehavior, posJitter, model) - -- ... -end - ---- @param obj Object ---- @param numCoins integer ---- @param sp28 number -function obj_spawn_loot_yellow_coins(obj, numCoins, sp28) - -- ... -end - ---- @param obj Object ---- @param posIndex integer ---- @param localTranslateIndex integer -function obj_translate_local(obj, posIndex, localTranslateIndex) - -- ... -end - ---- @param obj Object ---- @param rangeLength number -function obj_translate_xyz_random(obj, rangeLength) - -- ... -end - ---- @param obj Object ---- @param rangeLength number -function obj_translate_xz_random(obj, rangeLength) - -- ... -end - ---- @param obj Object ---- @param target Object ---- @param angleIndex integer ---- @param turnAmount integer ---- @return integer -function obj_turn_toward_object(obj, target, angleIndex, turnAmount) - -- ... -end - ---- @param a0 Mat4 ---- @param a1 Object -function obj_update_pos_from_parent_transformation(a0, a1) - -- ... -end - ---- @return integer -function player_performed_grab_escape_action() - -- ... -end - ---- @param diameter number ---- @return number -function random_f32_around_zero(diameter) - -- ... -end - ---- @param sp0 integer ---- @param sp4 integer ---- @param sp8 number -function set_mario_interact_hoot_if_in_range(sp0, sp4, sp8) - -- ... -end - ---- @param room integer -function set_room_override(room) - -- ... -end - ---- @param flags integer -function set_time_stop_flags(flags) - -- ... -end - ---- @param flags integer -function set_time_stop_flags_if_alone(flags) - -- ... -end - ---- @param x integer ---- @return integer -function signum_positive(x) - -- ... -end - -function spawn_base_star_with_no_lvl_exit() - -- ... -end - -function spawn_mist_particles() - -- ... -end - ---- @param sp18 integer -function spawn_mist_particles_with_sound(sp18) - -- ... -end - ---- @param sp20 integer ---- @param sp24 integer ---- @return Object -function spawn_star_with_no_lvl_exit(sp20, sp24) - -- ... -end - ---- @param parent Object ---- @param params WaterDropletParams ---- @return Object -function spawn_water_droplet(parent, params) - -- ... -end - ---- @param sp0 integer ---- @param sp4 integer -function stub_obj_helpers_3(sp0, sp4) - -- ... -end - -function stub_obj_helpers_4() - -- ... -end - --- @param obj Object --- @param bits integer --- Runs an OR operator on the `obj`'s respawn info with `bits` << 8. If `bits` is 0xFF, this prevents the object from respawning after leaving and re-entering the area @@ -8711,14 +8741,6 @@ function queue_rumble_data(a0, a1) -- ... end ---- @param m MarioState ---- @param a0 integer ---- @param a1 integer ---- Queues rumble data for Mario -function queue_rumble_data_mario(m, a0, a1) - -- ... -end - --- @param object Object --- @param a0 integer --- @param a1 integer @@ -8727,6 +8749,14 @@ function queue_rumble_data_object(object, a0, a1) -- ... end +--- @param m MarioState +--- @param a0 integer +--- @param a1 integer +--- Queues rumble data for Mario +function queue_rumble_data_mario(m, a0, a1) + -- ... +end + --- @param m MarioState --- Resets rumble timers function reset_rumble_timers(m) @@ -8740,9 +8770,10 @@ function reset_rumble_timers_2(m, a0) -- ... end ---- @param flags integer ---- Clears specific flags in the current save file. The flags are specified as a bitmask in the `flags` parameter. Ensures that the save file remains valid after clearing. Useful for removing specific game states, such as collected items or completed objectives, without resetting the entire save -function save_file_clear_flags(flags) +--- @param fileIndex integer +--- @param courseIndex integer +--- Marks the coin score for a specific course as the newest among all save files. Adjusts the age of other scores to reflect the update. Useful for leaderboard tracking or displaying recent progress +function touch_coin_score_age(fileIndex, courseIndex) -- ... end @@ -8764,32 +8795,9 @@ function save_file_erase_current_backup_save() -- ... end ---- @param capPos Vec3s ---- @return integer ---- Retrieves the current position of Mario's cap, if it is on the ground in the current level and area. The position is stored in the provided `capPos` parameter. Useful for tracking the cap's location after it has been dropped or lost -function save_file_get_cap_pos(capPos) - -- ... -end - ---- @param fileIndex integer ---- @param courseIndex integer ---- @return integer ---- Returns the highest coin score for a specified course in the save file. Performs checks to ensure the coin score is valid. Useful for tracking player achievements and high scores -function save_file_get_course_coin_score(fileIndex, courseIndex) - -- ... -end - ---- @param fileIndex integer ---- @param courseIndex integer ---- @return integer ---- Calculates the total number of stars collected in a specific course for a given save file. Useful for determining completion status of individual levels -function save_file_get_course_star_count(fileIndex, courseIndex) - -- ... -end - ---- @return integer ---- Retrieves the bitmask of flags representing the current state of the save file. Flags indicate collected items, completed objectives, and other game states. Useful for checking specific game progress details -function save_file_get_flags() +--- @param load_all integer +--- Reloads the save file data into memory, optionally resetting all save files. Marks the save file as modified. Useful for reloading state after data corruption or during development debugging +function save_file_reload(load_all) -- ... end @@ -8800,17 +8808,11 @@ function save_file_get_max_coin_score(courseIndex) -- ... end ---- @return integer ---- Returns the current sound mode (e.g., stereo, mono) stored in the save file. Useful for checking the audio output preferences when loading a save -function save_file_get_sound_mode() - -- ... -end - --- @param fileIndex integer --- @param courseIndex integer --- @return integer ---- Retrieves the bitmask of stars collected in a specific course or castle secret stars (-1). Useful for evaluating level progress and completion -function save_file_get_star_flags(fileIndex, courseIndex) +--- Calculates the total number of stars collected in a specific course for a given save file. Useful for determining completion status of individual levels +function save_file_get_course_star_count(fileIndex, courseIndex) -- ... end @@ -8823,39 +8825,29 @@ function save_file_get_total_star_count(fileIndex, minCourse, maxCourse) -- ... end ---- @param fileIndex integer ---- @param courseIndex integer ---- @return integer ---- Checks whether the cannon in the specified course is unlocked. Returns true if the cannon is unlocked, otherwise false. Useful for tracking course-specific progress and enabling shortcuts -function save_file_is_cannon_unlocked(fileIndex, courseIndex) - -- ... -end - ---- @param load_all integer ---- Reloads the save file data into memory, optionally resetting all save files. Marks the save file as modified. Useful for reloading state after data corruption or during development debugging -function save_file_reload(load_all) - -- ... -end - ---- @param fileIndex integer ---- @param courseIndex integer ---- @param starFlagsToRemove integer ---- Removes specific star flags from the save file. This modifies the bitmask representing collected stars for a course or castle secret stars. Useful for undoing progress or debugging collected stars -function save_file_remove_star_flags(fileIndex, courseIndex, starFlagsToRemove) - -- ... -end - ---- @param fileIndex integer ---- @param courseIndex integer ---- @param coinScore integer ---- Updates the coin score for a specific course in the save file. The new score is provided in the `coinScore` parameter. Useful for manually setting achievements such as high coin counts in individual levels -function save_file_set_course_coin_score(fileIndex, courseIndex, coinScore) +--- @param flags integer +--- Adds new flags to the save file's flag bitmask. Useful for updating progress or triggering new gameplay features +function save_file_set_flags(flags) -- ... end --- @param flags integer ---- Adds new flags to the save file's flag bitmask. Useful for updating progress or triggering new gameplay features -function save_file_set_flags(flags) +--- Clears specific flags in the current save file. The flags are specified as a bitmask in the `flags` parameter. Ensures that the save file remains valid after clearing. Useful for removing specific game states, such as collected items or completed objectives, without resetting the entire save +function save_file_clear_flags(flags) + -- ... +end + +--- @return integer +--- Retrieves the bitmask of flags representing the current state of the save file. Flags indicate collected items, completed objectives, and other game states. Useful for checking specific game progress details +function save_file_get_flags() + -- ... +end + +--- @param fileIndex integer +--- @param courseIndex integer +--- @return integer +--- Retrieves the bitmask of stars collected in a specific course or castle secret stars (-1). Useful for evaluating level progress and completion +function save_file_get_star_flags(fileIndex, courseIndex) -- ... end @@ -8869,8 +8861,46 @@ end --- @param fileIndex integer --- @param courseIndex integer ---- Marks the coin score for a specific course as the newest among all save files. Adjusts the age of other scores to reflect the update. Useful for leaderboard tracking or displaying recent progress -function touch_coin_score_age(fileIndex, courseIndex) +--- @param starFlagsToRemove integer +--- Removes specific star flags from the save file. This modifies the bitmask representing collected stars for a course or castle secret stars. Useful for undoing progress or debugging collected stars +function save_file_remove_star_flags(fileIndex, courseIndex, starFlagsToRemove) + -- ... +end + +--- @param fileIndex integer +--- @param courseIndex integer +--- @return integer +--- Returns the highest coin score for a specified course in the save file. Performs checks to ensure the coin score is valid. Useful for tracking player achievements and high scores +function save_file_get_course_coin_score(fileIndex, courseIndex) + -- ... +end + +--- @param fileIndex integer +--- @param courseIndex integer +--- @param coinScore integer +--- Updates the coin score for a specific course in the save file. The new score is provided in the `coinScore` parameter. Useful for manually setting achievements such as high coin counts in individual levels +function save_file_set_course_coin_score(fileIndex, courseIndex, coinScore) + -- ... +end + +--- @param fileIndex integer +--- @param courseIndex integer +--- @return integer +--- Checks whether the cannon in the specified course is unlocked. Returns true if the cannon is unlocked, otherwise false. Useful for tracking course-specific progress and enabling shortcuts +function save_file_is_cannon_unlocked(fileIndex, courseIndex) + -- ... +end + +--- @param capPos Vec3s +--- @return integer +--- Retrieves the current position of Mario's cap, if it is on the ground in the current level and area. The position is stored in the provided `capPos` parameter. Useful for tracking the cap's location after it has been dropped or lost +function save_file_get_cap_pos(capPos) + -- ... +end + +--- @return integer +--- Returns the current sound mode (e.g., stereo, mono) stored in the save file. Useful for checking the audio output preferences when loading a save +function save_file_get_sound_mode() -- ... end @@ -8881,13 +8911,27 @@ function sequence_player_get_tempo(player) -- ... end +--- @param player integer +--- @param tempo integer +--- Sets the `tempo` of `player`. Resets when another sequence is played +function sequence_player_set_tempo(player, tempo) + -- ... +end + --- @param player integer --- @return integer ---- Gets the tempoAcc (tempo ???) of `player` +--- Gets the tempoAcc (tempo accumulation) of `player` function sequence_player_get_tempo_acc(player) -- ... end +--- @param player integer +--- @param tempoAcc integer +--- Sets the `tempoAcc` (tempo accumulation) of `player`. Resets when another sequence is played +function sequence_player_set_tempo_acc(player, tempoAcc) + -- ... +end + --- @param player integer --- @return integer --- Gets the transposition (pitch) of `player` @@ -8895,20 +8939,6 @@ function sequence_player_get_transposition(player) -- ... end ---- @param player integer ---- @param tempo integer ---- Sets the `tempo` of `player`. Resets when another sequence is played -function sequence_player_set_tempo(player, tempo) - -- ... -end - ---- @param player integer ---- @param tempoAcc integer ---- Sets the `tempoAcc` (tempo ???) of `player`. Resets when another sequence is played -function sequence_player_set_tempo_acc(player, tempoAcc) - -- ... -end - --- @param player integer --- @param transposition integer --- Sets the `transposition` (pitch) of `player`. Resets when another sequence is played @@ -8916,6 +8946,27 @@ function sequence_player_set_transposition(player, transposition) -- ... end +--- @param player integer +--- @return number +--- Gets the volume of `player` +function sequence_player_get_volume(player) + -- ... +end + +--- @param player integer +--- @return number +--- Gets the fade volume of `player` +function sequence_player_get_fade_volume(player) + -- ... +end + +--- @param player integer +--- @return number +--- Gets the mute volume scale of `player` +function sequence_player_get_mute_volume_scale(player) + -- ... +end + --- @param index integer --- @return Animation --- Gets a vanilla mario Animation with `index` @@ -8923,13 +8974,6 @@ function get_mario_vanilla_animation(index) -- ... end ---- @param obj Object ---- @return string ---- Gets the name of the current animation playing on `obj`, returns `nil` if there's no name -function smlua_anim_util_get_current_animation_name(obj) - -- ... -end - --- @param obj Object --- @param name string --- Sets the animation of `obj` to the animation `name` corresponds to @@ -8937,64 +8981,22 @@ function smlua_anim_util_set_animation(obj, name) -- ... end ---- @param audio ModAudio ---- Destroys an `audio` sample -function audio_sample_destroy(audio) +--- @param obj Object +--- @return string +--- Gets the name of the current animation playing on `obj`, returns `nil` if there's no name +function smlua_anim_util_get_current_animation_name(obj) -- ... end ---- @param filename string ---- @return ModAudio ---- Loads an `audio` sample -function audio_sample_load(filename) +function smlua_audio_utils_reset_all() -- ... end ---- @param audio ModAudio ---- @param position Vec3f ---- @param volume number ---- Plays an `audio` sample at `position` with `volume` -function audio_sample_play(audio, position, volume) - -- ... -end - ---- @param audio ModAudio ---- Stops an `audio` sample -function audio_sample_stop(audio) - -- ... -end - ---- @param audio ModAudio ---- Destroys an `audio` stream -function audio_stream_destroy(audio) - -- ... -end - ---- @param audio ModAudio ---- @return number ---- Gets the frequency of an `audio` stream -function audio_stream_get_frequency(audio) - -- ... -end - ---- @param audio ModAudio ---- @return boolean ---- Gets if an `audio` stream is looping or not -function audio_stream_get_looping(audio) - -- ... -end - ---- @param audio ModAudio ---- @return number ---- Gets the position of an `audio` stream -function audio_stream_get_position(audio) - -- ... -end - ---- @param audio ModAudio ---- @return number ---- Gets the volume of an `audio` stream -function audio_stream_get_volume(audio) +--- @param sequenceId integer +--- @param bankId integer +--- @param defaultVolume integer +--- @param m64Name string +function smlua_audio_utils_replace_sequence(sequenceId, bankId, defaultVolume, m64Name) -- ... end @@ -9006,8 +9008,8 @@ function audio_stream_load(filename) end --- @param audio ModAudio ---- Pauses an `audio` stream -function audio_stream_pause(audio) +--- Destroys an `audio` stream +function audio_stream_destroy(audio) -- ... end @@ -9020,9 +9022,42 @@ function audio_stream_play(audio, restart, volume) end --- @param audio ModAudio ---- @param freq number ---- Sets the frequency of an `audio` stream -function audio_stream_set_frequency(audio, freq) +--- Pauses an `audio` stream +function audio_stream_pause(audio) + -- ... +end + +--- @param audio ModAudio +--- Stops an `audio` stream +function audio_stream_stop(audio) + -- ... +end + +--- @param audio ModAudio +--- @return number +--- Gets the position of an `audio` stream +function audio_stream_get_position(audio) + -- ... +end + +--- @param audio ModAudio +--- @param pos number +--- Sets the position of an `audio` stream +function audio_stream_set_position(audio, pos) + -- ... +end + +--- @param audio ModAudio +--- @return boolean +--- Gets if an `audio` stream is looping or not +function audio_stream_get_looping(audio) + -- ... +end + +--- @param audio ModAudio +--- @param looping boolean +--- Sets if an `audio` stream is looping or not +function audio_stream_set_looping(audio, looping) -- ... end @@ -9035,16 +9070,23 @@ function audio_stream_set_loop_points(audio, loopStart, loopEnd) end --- @param audio ModAudio ---- @param looping boolean ---- Sets if an `audio` stream is looping or not -function audio_stream_set_looping(audio, looping) +--- @return number +--- Gets the frequency of an `audio` stream +function audio_stream_get_frequency(audio) -- ... end --- @param audio ModAudio ---- @param pos number ---- Sets the position of an `audio` stream -function audio_stream_set_position(audio, pos) +--- @param freq number +--- Sets the frequency of an `audio` stream +function audio_stream_set_frequency(audio, freq) + -- ... +end + +--- @param audio ModAudio +--- @return number +--- Gets the volume of an `audio` stream +function audio_stream_get_volume(audio) -- ... end @@ -9055,21 +9097,69 @@ function audio_stream_set_volume(audio, volume) -- ... end +--- @param filename string +--- @return ModAudio +--- Loads an `audio` sample +function audio_sample_load(filename) + -- ... +end + --- @param audio ModAudio ---- Stops an `audio` stream -function audio_stream_stop(audio) +--- Destroys an `audio` sample +function audio_sample_destroy(audio) -- ... end ---- @param sequenceId integer ---- @param bankId integer ---- @param defaultVolume integer ---- @param m64Name string -function smlua_audio_utils_replace_sequence(sequenceId, bankId, defaultVolume, m64Name) +--- @param audio ModAudio +--- Stops an `audio` sample +function audio_sample_stop(audio) -- ... end -function smlua_audio_utils_reset_all() +--- @param audio ModAudio +--- @param position Vec3f +--- @param volume number +--- Plays an `audio` sample at `position` with `volume` +function audio_sample_play(audio, position, volume) + -- ... +end + +--- Resets camera config overrides +function camera_reset_overrides() + -- ... +end + +--- Freezes the camera by not updating it +function camera_freeze() + -- ... +end + +--- Unfreezes the camera +function camera_unfreeze() + -- ... +end + +--- @return boolean +--- Checks if the camera is frozen +function camera_is_frozen() + -- ... +end + +--- @param allow integer +--- Sets if only mods are allowed to modify the camera (Enabling prevents the player from modifying the camera through the settings) +function camera_romhack_allow_only_mods(allow) + -- ... +end + +--- @param rco RomhackCameraOverride +--- Sets the romhack camera override status +function camera_set_romhack_override(rco) + -- ... +end + +--- @param allow integer +--- Sets if the romhack camera should allow centering, triggered with the L button +function camera_romhack_allow_centering(allow) -- ... end @@ -9079,82 +9169,99 @@ function camera_allow_toxic_gas_camera(allow) -- ... end ---- @param enable boolean ---- Overrides if Analog Camera is enabled -function camera_config_enable_analog_cam(enable) +--- @param allow integer +--- Sets if the romhack camera should allow D-Pad movement +function camera_romhack_allow_dpad_usage(allow) -- ... end ---- @param enable boolean ---- Overrides if the L button will center the camera -function camera_config_enable_centering(enable) +--- @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) -- ... end ---- @param enable boolean ---- Overrides if Camera Collision is enabled -function camera_config_enable_collisions(enable) +--- @param val integer +--- Sets the romhack camera's zoomed in distance (Default: 900) +function camera_romhack_set_zoomed_in_dist(val) -- ... end ---- @param enable boolean ---- Overrides if Freecam DPad Behavior is enabled -function camera_config_enable_dpad(enable) +--- @param val integer +--- Sets the romhack camera's zoomed out additional distance (Default: 500) +function camera_romhack_set_zoomed_out_dist(val) -- ... end ---- @param enable boolean ---- Overrides if Free Camera is enabled -function camera_config_enable_free_cam(enable) +--- @param val integer +--- Sets the romhack camera's zoomed in height (Default: 300) +function camera_romhack_set_zoomed_in_height(val) -- ... end ---- @param enable boolean ---- Overrides if camera mouse look is enabled -function camera_config_enable_mouse_look(enable) +--- @param val integer +--- Sets the romhack camera's zoomed out additional height (Default: 150) +function camera_romhack_set_zoomed_out_height(val) -- ... end --- @return integer -function camera_config_get_aggression() +--- Gets the romhack camera's zoomed in distance +function camera_romhack_get_zoomed_in_dist() + -- ... +end + +--- @return integer +--- Gets the romhack camera's additional zoomed out distance +function camera_romhack_get_zoomed_out_dist() + -- ... +end + +--- @return integer +--- Gets the romhack camera's zoomed in height +function camera_romhack_get_zoomed_in_height() + -- ... +end + +--- @return integer +--- Gets the romhack camera's additional zoomed out height +function camera_romhack_get_zoomed_out_height() + -- ... +end + +--- @return RomhackCameraOverride +--- Gets the current romhack camera override status +function camera_get_romhack_override() + -- ... +end + +--- @return integer +--- Gets if the romhack camera should allow centering +function camera_romhack_get_allow_centering() + -- ... +end + +--- @return integer +--- Gets if the romhack camera should fly above poison gas +function camera_get_allow_toxic_gas_camera() + -- ... +end + +--- @return integer +--- Gets if the romhack camera should allow D-Pad movement +function camera_romhack_get_allow_dpad_usage() + -- ... +end + +--- @return integer +--- Gets if the romhack camera has surface collisions +function camera_romhack_get_collisions() -- ... end --- @return boolean ---- Gets if the L button will center the camera -function camera_config_get_centering() - -- ... -end - ---- @return integer -function camera_config_get_deceleration() - -- ... -end - ---- @return integer -function camera_config_get_pan_level() - -- ... -end - ---- @return integer -function camera_config_get_x_sensitivity() - -- ... -end - ---- @return integer -function camera_config_get_y_sensitivity() - -- ... -end - ---- @param invert boolean ---- Overrides if camera X is inverted -function camera_config_invert_x(invert) - -- ... -end - ---- @param invert boolean ---- Overrides if camera Y is inverted -function camera_config_invert_y(invert) +--- Checks if Free Camera is enabled +function camera_config_is_free_cam_enabled() -- ... end @@ -9164,12 +9271,6 @@ function camera_config_is_analog_cam_enabled() -- ... end ---- @return boolean ---- Checks if Camera Collision is enabled -function camera_config_is_collision_enabled() - -- ... -end - --- @return boolean --- Checks if Freecam DPad Behavior is enabled function camera_config_is_dpad_enabled() @@ -9177,8 +9278,8 @@ function camera_config_is_dpad_enabled() end --- @return boolean ---- Checks if Free Camera is enabled -function camera_config_is_free_cam_enabled() +--- Checks if Camera Collision is enabled +function camera_config_is_collision_enabled() -- ... end @@ -9200,21 +9301,82 @@ function camera_config_is_y_inverted() -- ... end ---- @param value integer ---- Overrides camera aggression -function camera_config_set_aggression(value) +--- @return integer +function camera_config_get_x_sensitivity() -- ... end ---- @param value integer ---- Overrides camera deceleration -function camera_config_set_deceleration(value) +--- @return integer +function camera_config_get_y_sensitivity() -- ... end ---- @param value integer ---- Overrides camera pan level -function camera_config_set_pan_level(value) +--- @return integer +function camera_config_get_aggression() + -- ... +end + +--- @return integer +function camera_config_get_pan_level() + -- ... +end + +--- @return integer +function camera_config_get_deceleration() + -- ... +end + +--- @return boolean +--- Gets if the L button will center the camera +function camera_config_get_centering() + -- ... +end + +--- @param enable boolean +--- Overrides if Free Camera is enabled +function camera_config_enable_free_cam(enable) + -- ... +end + +--- @param enable boolean +--- Overrides if Analog Camera is enabled +function camera_config_enable_analog_cam(enable) + -- ... +end + +--- @param enable boolean +--- Overrides if the L button will center the camera +function camera_config_enable_centering(enable) + -- ... +end + +--- @param enable boolean +--- Overrides if Freecam DPad Behavior is enabled +function camera_config_enable_dpad(enable) + -- ... +end + +--- @param enable boolean +--- Overrides if Camera Collision is enabled +function camera_config_enable_collisions(enable) + -- ... +end + +--- @param enable boolean +--- Overrides if camera mouse look is enabled +function camera_config_enable_mouse_look(enable) + -- ... +end + +--- @param invert boolean +--- Overrides if camera X is inverted +function camera_config_invert_x(invert) + -- ... +end + +--- @param invert boolean +--- Overrides if camera Y is inverted +function camera_config_invert_y(invert) -- ... end @@ -9230,14 +9392,21 @@ function camera_config_set_y_sensitivity(value) -- ... end ---- Freezes the camera by not updating it -function camera_freeze() +--- @param value integer +--- Overrides camera aggression +function camera_config_set_aggression(value) -- ... end ---- @return integer ---- Gets if the romhack camera should fly above poison gas -function camera_get_allow_toxic_gas_camera() +--- @param value integer +--- Overrides camera pan level +function camera_config_set_pan_level(value) + -- ... +end + +--- @param value integer +--- Overrides camera deceleration +function camera_config_set_deceleration(value) -- ... end @@ -9247,127 +9416,18 @@ function camera_get_checking_surfaces() -- ... end ---- @return RomhackCameraOverride ---- Gets the current romhack camera override status -function camera_get_romhack_override() - -- ... -end - ---- @return boolean ---- Checks if the camera is frozen -function camera_is_frozen() - -- ... -end - ---- Resets camera config overrides -function camera_reset_overrides() - -- ... -end - ---- @param allow integer ---- Sets if the romhack camera should allow centering, triggered with the L button -function camera_romhack_allow_centering(allow) - -- ... -end - ---- @param allow integer ---- Sets if the romhack camera should allow D-Pad movement -function camera_romhack_allow_dpad_usage(allow) - -- ... -end - ---- @param allow integer ---- Sets if only mods are allowed to modify the camera (Enabling prevents the player from modifying the camera through the settings) -function camera_romhack_allow_only_mods(allow) - -- ... -end - ---- @return integer ---- Gets if the romhack camera should allow centering -function camera_romhack_get_allow_centering() - -- ... -end - ---- @return integer ---- Gets if the romhack camera should allow D-Pad movement -function camera_romhack_get_allow_dpad_usage() - -- ... -end - ---- @return integer ---- Gets if the romhack camera has surface collisions -function camera_romhack_get_collisions() - -- ... -end - ---- @return integer ---- Gets the romhack camera's zoomed in distance -function camera_romhack_get_zoomed_in_dist() - -- ... -end - ---- @return integer ---- Gets the romhack camera's zoomed in height -function camera_romhack_get_zoomed_in_height() - -- ... -end - ---- @return integer ---- Gets the romhack camera's additional zoomed out distance -function camera_romhack_get_zoomed_out_dist() - -- ... -end - ---- @return integer ---- Gets the romhack camera's additional zoomed out height -function camera_romhack_get_zoomed_out_height() - -- ... -end - ---- @param val integer ---- Sets the romhack camera's zoomed in distance (Default: 900) -function camera_romhack_set_zoomed_in_dist(val) - -- ... -end - ---- @param val integer ---- Sets the romhack camera's zoomed in height (Default: 300) -function camera_romhack_set_zoomed_in_height(val) - -- ... -end - ---- @param val integer ---- Sets the romhack camera's zoomed out additional distance (Default: 500) -function camera_romhack_set_zoomed_out_dist(val) - -- ... -end - ---- @param val integer ---- Sets the romhack camera's zoomed out additional height (Default: 150) -function camera_romhack_set_zoomed_out_height(val) - -- ... -end - --- @param value boolean --- Sets if the camera should account for surfaces function camera_set_checking_surfaces(value) -- ... end ---- @param rco RomhackCameraOverride ---- Sets the romhack camera override status -function camera_set_romhack_override(rco) - -- ... -end - ---- Unfreezes the camera -function camera_unfreeze() - -- ... -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) +--- @param x number +--- @param y number +--- @param z number +--- @return Surface +--- Finds a potential floor at the given `x`, `y`, and `z` values +function collision_find_floor(x, y, z) -- ... end @@ -9380,12 +9440,15 @@ function collision_find_ceil(x, y, z) -- ... end ---- @param x number ---- @param y number ---- @param z number --- @return Surface ---- Finds a potential floor at the given `x`, `y`, and `z` values -function collision_find_floor(x, y, z) +function get_water_surface_pseudo_floor() + -- ... +end + +--- @param name string +--- @return Pointer_Collision +--- Gets the `Collision` with `name` +function smlua_collision_util_get(name) -- ... end @@ -9403,24 +9466,6 @@ function get_surface_from_wcd_index(wcd, index) -- ... end ---- @return Surface -function get_water_surface_pseudo_floor() - -- ... -end - ---- @param data Pointer_Collision ---- Gets a table of the surface types from `data` -function smlua_collision_util_find_surface_types(data) - -- ... -end - ---- @param name string ---- @return Pointer_Collision ---- Gets the `Collision` with `name` -function smlua_collision_util_get(name) - -- ... -end - --- @return Pointer_Collision --- Gets the current level terrain collision function smlua_collision_util_get_current_terrain_collision() @@ -9435,21 +9480,24 @@ function smlua_collision_util_get_level_collision(level, area) -- ... end +--- @param data Pointer_Collision +--- Gets a table of the surface types from `data` +function smlua_collision_util_find_surface_types(data) + -- ... +end + --- @deprecated ---- @param audio ModAudio ---- @return number ---- [DEPRECATED: There may be a replacement for this function in the future] -function audio_stream_get_tempo(audio) +--- @param enable boolean +--- [DEPRECATED: Use `HOOK_ON_HUD_RENDER_BEHIND` instead] Sets if DJUI should render behind the vanilla HUD +function djui_hud_set_render_behind_hud(enable) -- ... end --- @deprecated --- @param audio ModAudio ---- @param initial_freq number ---- @param speed number ---- @param pitch boolean +--- @return number --- [DEPRECATED: There may be a replacement for this function in the future] -function audio_stream_set_speed(audio, initial_freq, speed, pitch) +function audio_stream_get_tempo(audio) -- ... end @@ -9462,9 +9510,12 @@ function audio_stream_set_tempo(audio, tempo) end --- @deprecated ---- @param enable boolean ---- [DEPRECATED: Use `HOOK_ON_HUD_RENDER_BEHIND` instead] Sets if DJUI should render behind the vanilla HUD -function djui_hud_set_render_behind_hud(enable) +--- @param audio ModAudio +--- @param initial_freq number +--- @param speed number +--- @param pitch boolean +--- [DEPRECATED: There may be a replacement for this function in the future] +function audio_stream_set_speed(audio, initial_freq, speed, pitch) -- ... end @@ -9486,16 +9537,35 @@ function network_player_palette_to_color(np, part, out) -- ... end ---- @param index integer ---- @return integer ---- Gets a value of the global fog color -function get_fog_color(index) +--- @param fov number +--- Sets the override FOV +function set_override_fov(fov) -- ... end +--- @param near number +--- Sets the override near plane +function set_override_near(near) + -- ... +end + +--- @param far number +--- Sets the override far plane +function set_override_far(far) + -- ... +end + +--- @param index integer --- @return number ---- Gets the intensity of the fog -function get_fog_intensity() +--- Gets a value of the global lighting direction +function get_lighting_dir(index) + -- ... +end + +--- @param index integer +--- @param value number +--- Sets a value of the global lighting direction +function set_lighting_dir(index, value) -- ... end @@ -9514,9 +9584,56 @@ function get_lighting_color_ambient(index) end --- @param index integer +--- @param value integer +--- Sets a value of the global lighting color +function set_lighting_color(index, value) + -- ... +end + +--- @param index integer +--- @param value integer +--- Sets a value of the global lighting color (run this after `set_lighting_color` for the ambient color to not be overriden) +function set_lighting_color_ambient(index, value) + -- ... +end + +--- @param index integer +--- @return integer +--- Gets a value of the global vertex shading color +function get_vertex_color(index) + -- ... +end + +--- @param index integer +--- @param value integer +--- Sets a value of the global vertex shading color +function set_vertex_color(index, value) + -- ... +end + +--- @param index integer +--- @return integer +--- Gets a value of the global fog color +function get_fog_color(index) + -- ... +end + +--- @param index integer +--- @param value integer +--- Sets a value of the global fog color +function set_fog_color(index, value) + -- ... +end + --- @return number ---- Gets a value of the global lighting direction -function get_lighting_dir(index) +--- Gets the intensity of the fog +function get_fog_intensity() + -- ... +end + +--- @param intensity number +--- Sets the intensity of the fog (this value scales very quickly, 1.0 to 1.1 is a desirable range) +function set_fog_intensity(intensity) -- ... end @@ -9526,6 +9643,12 @@ function get_skybox() -- ... end +--- @param background integer +--- Sets the override skybox +function set_override_skybox(background) + -- ... +end + --- @param index integer --- @return integer --- Gets a value of the global skybox color @@ -9534,9 +9657,16 @@ function get_skybox_color(index) end --- @param index integer ---- @return integer ---- Gets a value of the global vertex shading color -function get_vertex_color(index) +--- @param value integer +--- Sets a value of the global skybox color +function set_skybox_color(index, value) + -- ... +end + +--- @param cmd Pointer_Gfx +--- @param func function +--- Traverses a display list. Takes a Lua function as a parameter, which is called back for each command in the display list with the parameters `cmd` (display list pointer), and `op` +function gfx_parse(cmd, func) -- ... end @@ -9555,13 +9685,6 @@ function gfx_get_vtx_count(cmd) -- ... end ---- @param cmd Pointer_Gfx ---- @param func function ---- Traverses a display list. Takes a Lua function as a parameter, which is called back for each command in the display list with the parameters `cmd` (display list pointer), and `op` -function gfx_parse(cmd, func) - -- ... -end - --- @param gfx Pointer_Gfx --- @param a0 integer --- @param b0 integer @@ -9594,82 +9717,30 @@ function gfx_set_texture_image(gfx, format, size, width, texture) -- ... end ---- @param index integer ---- @param value integer ---- Sets a value of the global fog color -function set_fog_color(index, value) - -- ... -end - ---- @param intensity number ---- Sets the intensity of the fog (this value scales very quickly, 1.0 to 1.1 is a desirable range) -function set_fog_intensity(intensity) - -- ... -end - ---- @param index integer ---- @param value integer ---- Sets a value of the global lighting color -function set_lighting_color(index, value) - -- ... -end - ---- @param index integer ---- @param value integer ---- Sets a value of the global lighting color (run this after `set_lighting_color` for the ambient color to not be overriden) -function set_lighting_color_ambient(index, value) - -- ... -end - ---- @param index integer ---- @param value number ---- Sets a value of the global lighting direction -function set_lighting_dir(index, value) - -- ... -end - ---- @param far number ---- Sets the override far plane -function set_override_far(far) - -- ... -end - ---- @param fov number ---- Sets the override FOV -function set_override_fov(fov) - -- ... -end - ---- @param near number ---- Sets the override near plane -function set_override_near(near) - -- ... -end - ---- @param background integer ---- Sets the override skybox -function set_override_skybox(background) - -- ... -end - ---- @param index integer ---- @param value integer ---- Sets a value of the global skybox color -function set_skybox_color(index, value) - -- ... -end - ---- @param index integer ---- @param value integer ---- Sets a value of the global vertex shading color -function set_vertex_color(index, value) +--- @param areaIndex integer +--- Instantly changes the current area to `areaIndex` +function smlua_level_util_change_area(areaIndex) -- ... end --- @param levelNum integer ---- @return boolean ---- Checks if `levelNum` is a vanilla level -function level_is_vanilla_level(levelNum) +--- @return CustomLevelInfo +--- Gets information on a custom level from `levelNum` +function smlua_level_util_get_info(levelNum) + -- ... +end + +--- @param shortName string +--- @return CustomLevelInfo +--- Gets information on a custom level from `shortName` +function smlua_level_util_get_info_from_short_name(shortName) + -- ... +end + +--- @param courseNum integer +--- @return CustomLevelInfo +--- Gets information on a custom level from `courseNum` +function smlua_level_util_get_info_from_course_num(courseNum) -- ... end @@ -9687,50 +9758,20 @@ function level_register(scriptEntryName, courseNum, fullName, shortName, acousti -- ... end ---- @param areaIndex integer ---- Instantly changes the current area to `areaIndex` -function smlua_level_util_change_area(areaIndex) - -- ... -end - --- @param levelNum integer ---- @return CustomLevelInfo ---- Gets information on a custom level from `levelNum` -function smlua_level_util_get_info(levelNum) - -- ... -end - ---- @param courseNum integer ---- @return CustomLevelInfo ---- Gets information on a custom level from `courseNum` -function smlua_level_util_get_info_from_course_num(courseNum) - -- ... -end - ---- @param shortName string ---- @return CustomLevelInfo ---- Gets information on a custom level from `shortName` -function smlua_level_util_get_info_from_short_name(shortName) - -- ... -end - ---- @param aDelay integer --- @return boolean ---- Exits the current level after `aDelay` -function warp_exit_level(aDelay) - -- ... -end - ---- @return boolean ---- Restarts the current level -function warp_restart_level() +--- Checks if `levelNum` is a vanilla level +function level_is_vanilla_level(levelNum) -- ... end --- @param aLevel integer +--- @param aArea integer +--- @param aAct integer +--- @param aWarpId integer --- @return boolean ---- Warps back to the castle from `aLevel` -function warp_to_castle(aLevel) +--- Warps to `aWarpId` of `aArea` in `aLevel` during `aAct` +function warp_to_warpnode(aLevel, aArea, aAct, aWarpId) -- ... end @@ -9743,19 +9784,111 @@ function warp_to_level(aLevel, aArea, aAct) -- ... end +--- @return boolean +--- Restarts the current level +function warp_restart_level() + -- ... +end + --- @return boolean --- Warps to the start level (Castle Grounds by default) function warp_to_start_level() -- ... end ---- @param aLevel integer ---- @param aArea integer ---- @param aAct integer ---- @param aWarpId integer +--- @param aDelay integer --- @return boolean ---- Warps to `aWarpId` of `aArea` in `aLevel` during `aAct` -function warp_to_warpnode(aLevel, aArea, aAct, aWarpId) +--- Exits the current level after `aDelay` +function warp_exit_level(aDelay) + -- ... +end + +--- @param aLevel integer +--- @return boolean +--- Warps back to the castle from `aLevel` +function warp_to_castle(aLevel) + -- ... +end + +--- @param a integer +--- @param b integer +--- @return integer +--- Finds the minimum of two signed 32-bit integers +function min(a, b) + -- ... +end + +--- @param a integer +--- @param b integer +--- @return integer +--- Finds the maximum of two signed 32-bit integers +function max(a, b) + -- ... +end + +--- @param x integer +--- @return integer +--- Computes the square of a signed 32-bit integer +function sqr(x) + -- ... +end + +--- @param a number +--- @param b number +--- @return number +--- Finds the minimum of two floating-point numbers +function minf(a, b) + -- ... +end + +--- @param a number +--- @param b number +--- @return number +--- Finds the maximum of two floating-point numbers +function maxf(a, b) + -- ... +end + +--- @param x number +--- @return number +--- Computes the square of a floating-point number +function sqrf(x) + -- ... +end + +--- @param sm64Angle integer +--- @return number +--- Converts an angle from SM64 format to radians +function sm64_to_radians(sm64Angle) + -- ... +end + +--- @param radiansAngle number +--- @return integer +--- Converts an angle from radians to SM64 format +function radians_to_sm64(radiansAngle) + -- ... +end + +--- @param sm64Angle integer +--- @return number +--- Converts an angle from SM64 format to degrees +function sm64_to_degrees(sm64Angle) + -- ... +end + +--- @param degreesAngle number +--- @return integer +--- Converts an angle from degrees to SM64 format +function degrees_to_sm64(degreesAngle) + -- ... +end + +--- @param a number +--- @param b number +--- @return number +--- Computes the hypotenuse of a right triangle given sides `a` and `b` using the Pythagorean theorem +function hypotf(a, b) -- ... end @@ -9777,105 +9910,39 @@ function clampf(a, b, c) -- ... end ---- @param degreesAngle number --- @return integer ---- Converts an angle from degrees to SM64 format -function degrees_to_sm64(degreesAngle) +--- Gets the current area's networked timer +function get_network_area_timer() -- ... end ---- @param a number ---- @param b number ---- @return number ---- Computes the hypotenuse of a right triangle given sides `a` and `b` using the Pythagorean theorem -function hypotf(a, b) - -- ... -end - ---- @param a integer ---- @param b integer --- @return integer ---- Finds the maximum of two signed 32-bit integers -function max(a, b) +--- Gets the area update counter incremented when objects are updated +function get_area_update_counter() -- ... end ---- @param a number ---- @param b number ---- @return number ---- Finds the maximum of two floating-point numbers -function maxf(a, b) - -- ... -end - ---- @param a integer ---- @param b integer ---- @return integer ---- Finds the minimum of two signed 32-bit integers -function min(a, b) - -- ... -end - ---- @param a number ---- @param b number ---- @return number ---- Finds the minimum of two floating-point numbers -function minf(a, b) - -- ... -end - ---- @param radiansAngle number ---- @return integer ---- Converts an angle from radians to SM64 format -function radians_to_sm64(radiansAngle) - -- ... -end - ---- @param sm64Angle integer ---- @return number ---- Converts an angle from SM64 format to degrees -function sm64_to_degrees(sm64Angle) - -- ... -end - ---- @param sm64Angle integer ---- @return number ---- Converts an angle from SM64 format to radians -function sm64_to_radians(sm64Angle) - -- ... -end - ---- @param x integer ---- @return integer ---- Computes the square of a signed 32-bit integer -function sqr(x) - -- ... -end - ---- @param x number ---- @return number ---- Computes the square of a floating-point number -function sqrf(x) - -- ... -end - ---- @param actFlags integer ---- @return integer ---- Allocates an action ID with bitwise flags -function allocate_mario_action(actFlags) - -- ... -end - ---- @param courseNum integer ---- @return boolean ---- Checks if a course is a main course and not the castle or secret levels -function course_is_main_course(courseNum) +--- @param message string +--- @param lines integer +--- Creates a DJUI popup that is broadcasted to every client +function djui_popup_create_global(message, lines) -- ... end --- @return boolean ---- Checks if the DJUI playerlist is attempting to be opened -function djui_attempting_to_open_playerlist() +--- Returns if popups are disabled +function djui_is_popup_disabled() + -- ... +end + +--- @param value boolean +--- Sets if popups are disabled +function djui_set_popup_disabled_override(value) + -- ... +end + +--- Resets if popups are disabled +function djui_reset_popup_disabled_override() -- ... end @@ -9886,8 +9953,14 @@ function djui_is_playerlist_open() end --- @return boolean ---- Returns if popups are disabled -function djui_is_popup_disabled() +--- Checks if the DJUI playerlist is attempting to be opened +function djui_attempting_to_open_playerlist() + -- ... +end + +--- @return integer +--- Gets the DJUI playerlist's page index +function djui_get_playerlist_page_index() -- ... end @@ -9903,55 +9976,6 @@ function djui_menu_get_theme() -- ... end ---- @param message string ---- @param lines integer ---- Creates a DJUI popup that is broadcasted to every client -function djui_popup_create_global(message, lines) - -- ... -end - ---- Resets if popups are disabled -function djui_reset_popup_disabled_override() - -- ... -end - ---- @param value boolean ---- Sets if popups are disabled -function djui_set_popup_disabled_override(value) - -- ... -end - ---- @return Mod ---- Gets the mod currently being processed -function get_active_mod() - -- ... -end - ---- @return integer ---- Gets the area update counter incremented when objects are updated -function get_area_update_counter() - -- ... -end - ---- @param localIndex integer ---- @return string ---- Gets the CoopNet ID of a player with `localIndex` if CoopNet is being used and the player is connected, otherwise "-1" is returned -function get_coopnet_id(localIndex) - -- ... -end - ---- @return integer ---- Gets the current save file number (1-indexed) -function get_current_save_file_num() - -- ... -end - ---- @return DateTime ---- Gets the system clock's date and time -function get_date_and_time() - -- ... -end - --- @return integer --- Gets the current state of the dialog box function get_dialog_box_state() @@ -9965,27 +9989,38 @@ function get_dialog_id() end --- @return integer ---- Gets the choice selected inside of a dialog box (0-1) -function get_dialog_response() +--- Gets if the last objective collected was a star (0) or a key (1) +function get_last_star_or_key() + -- ... +end + +--- @param value integer +--- Sets if the last objective collected was a star (0) or a key (1) +function set_last_star_or_key(value) -- ... end --- @return integer ---- Gets the non overridden environment effect (e.g. snow) -function get_envfx() +--- Gets the last course a star or key was collected in +function get_last_completed_course_num() -- ... end ---- @param index integer ---- @return number ---- Gets an environment region (gas/water boxes) height value -function get_environment_region(index) +--- @param courseNum integer +--- Sets the last course a star or key was collected in +function set_last_completed_course_num(courseNum) -- ... end --- @return integer ---- Gets the global timer that has been ticking at 30 frames per second since game boot -function get_global_timer() +--- Gets the last collected star's number (1-7) +function get_last_completed_star_num() + -- ... +end + +--- @param starNum integer +--- Sets the last collected star's number (1-7) +function set_last_completed_star_num(starNum) -- ... end @@ -9995,6 +10030,108 @@ function get_got_file_coin_hi_score() -- ... end +--- @param value boolean +--- Sets if the save file's coin "HI SCORE" was obtained with the last star or key collection +function set_got_file_coin_hi_score(value) + -- ... +end + +--- @return boolean +--- Checks if the save file has been modified without saving +function get_save_file_modified() + -- ... +end + +--- @param value boolean +--- Sets if the save file has been modified without saving +function set_save_file_modified(value) + -- ... +end + +--- Hides the HUD +function hud_hide() + -- ... +end + +--- Shows the HUD +function hud_show() + -- ... +end + +--- @return boolean +--- Checks if the HUD is hidden +function hud_is_hidden() + -- ... +end + +--- @param type HudDisplayValue +--- @return integer +function hud_get_value(type) + -- ... +end + +--- @param type HudDisplayValue +--- @param value integer +--- Sets a HUD display value +function hud_set_value(type, value) + -- ... +end + +--- @param health integer +--- @param x number +--- @param y number +--- @param width number +--- @param height number +--- Renders a power meter on the HUD +function hud_render_power_meter(health, x, y, width, height) + -- ... +end + +--- @param health integer +--- @param prevX number +--- @param prevY number +--- @param prevWidth number +--- @param prevHeight number +--- @param x number +--- @param y number +--- @param width number +--- @param height number +--- Renders an interpolated power meter on the HUD +function hud_render_power_meter_interpolated(health, prevX, prevY, prevWidth, prevHeight, x, y, width, height) + -- ... +end + +--- @return integer +--- Gets if the star counter on the HUD should flash +function hud_get_flash() + -- ... +end + +--- @param value integer +--- Sets if the star counter on the HUD should flash +function hud_set_flash(value) + -- ... +end + +--- @return boolean +--- Checks if the game is paused +function is_game_paused() + -- ... +end + +--- @return boolean +--- Checks if a screen transition is playing +function is_transition_playing() + -- ... +end + +--- @param actFlags integer +--- @return integer +--- Allocates an action ID with bitwise flags +function allocate_mario_action(actFlags) + -- ... +end + --- @param m MarioState --- @param index integer --- @return number @@ -10020,195 +10157,8 @@ function get_hand_foot_pos_z(m, index) end --- @return integer ---- Gets the last course a star or key was collected in -function get_last_completed_course_num() - -- ... -end - ---- @return integer ---- Gets the last collected star's number (1-7) -function get_last_completed_star_num() - -- ... -end - ---- @return integer ---- Gets if the last objective collected was a star (0) or a key (1) -function get_last_star_or_key() - -- ... -end - ---- @return string ---- Gets the local discord ID if it isn't disabled, otherwise "0" is returned -function get_local_discord_id() - -- ... -end - ---- @return integer ---- Gets the current area's networked timer -function get_network_area_timer() - -- ... -end - ---- @return string ---- Gets the name of the operating system the game is running on -function get_os_name() - -- ... -end - ---- @return boolean ---- Checks if the save file has been modified without saving -function get_save_file_modified() - -- ... -end - ---- @return integer ---- Gets the Unix Timestamp -function get_time() - -- ... -end - ---- @return integer ---- Gets TTC's speed setting -function get_ttc_speed_setting() - -- ... -end - ---- @return number ---- Gets the volume level of environment sounds effects -function get_volume_env() - -- ... -end - ---- @return number ---- Gets the volume level of music -function get_volume_level() - -- ... -end - ---- @return number ---- Gets the master volume level -function get_volume_master() - -- ... -end - ---- @return number ---- Gets the volume level of sound effects -function get_volume_sfx() - -- ... -end - ---- @param index integer ---- @return integer ---- Gets the water level in an area corresponding to `index` (0-indexed) -function get_water_level(index) - -- ... -end - ---- @return integer ---- Gets if the star counter on the HUD should flash -function hud_get_flash() - -- ... -end - ---- @param type HudDisplayValue ---- @return integer -function hud_get_value(type) - -- ... -end - ---- Hides the HUD -function hud_hide() - -- ... -end - ---- @return boolean ---- Checks if the HUD is hidden -function hud_is_hidden() - -- ... -end - ---- @param health integer ---- @param x number ---- @param y number ---- @param width number ---- @param height number ---- Renders a power meter on the HUD -function hud_render_power_meter(health, x, y, width, height) - -- ... -end - ---- @param health integer ---- @param prevX number ---- @param prevY number ---- @param prevWidth number ---- @param prevHeight number ---- @param x number ---- @param y number ---- @param width number ---- @param height number ---- Renders an interpolated power meter on the HUD -function hud_render_power_meter_interpolated(health, prevX, prevY, prevWidth, prevHeight, x, y, width, height) - -- ... -end - ---- @param value integer ---- Sets if the star counter on the HUD should flash -function hud_set_flash(value) - -- ... -end - ---- @param type HudDisplayValue ---- @param value integer ---- Sets a HUD display value -function hud_set_value(type, value) - -- ... -end - ---- Shows the HUD -function hud_show() - -- ... -end - ---- @return boolean ---- Checks if the game is paused -function is_game_paused() - -- ... -end - ---- @return boolean ---- Checks if a screen transition is playing -function is_transition_playing() - -- ... -end - ---- @param filename string ---- @return boolean ---- Checks if a file exists inside of a mod -function mod_file_exists(filename) - -- ... -end - ---- @param name string ---- @param level integer ---- @param area integer ---- @param type integer ---- Registers a custom moving texture entry (used for vanilla water boxes) -function movtexqc_register(name, level, area, type) - -- ... -end - ---- @param transType integer ---- @param time integer ---- @param red integer ---- @param green integer ---- @param blue integer ---- Plays a screen transition -function play_transition(transType, time, red, green, blue) - -- ... -end - ---- Resets the window title -function reset_window_title() +--- Gets the current save file number (1-indexed) +function get_current_save_file_num() -- ... end @@ -10224,76 +10174,19 @@ function save_file_set_using_backup_slot(usingBackupSlot) -- ... end +--- @param name string +--- @param level integer +--- @param area integer +--- @param type integer +--- Registers a custom moving texture entry (used for vanilla water boxes) +function movtexqc_register(name, level, area, type) + -- ... +end + --- @param index integer ---- @param value integer ---- Sets an environment region (gas/water boxes) height value -function set_environment_region(index, value) - -- ... -end - ---- @param value boolean ---- Sets if the save file's coin "HI SCORE" was obtained with the last star or key collection -function set_got_file_coin_hi_score(value) - -- ... -end - ---- @param courseNum integer ---- Sets the last course a star or key was collected in -function set_last_completed_course_num(courseNum) - -- ... -end - ---- @param starNum integer ---- Sets the last collected star's number (1-7) -function set_last_completed_star_num(starNum) - -- ... -end - ---- @param value integer ---- Sets if the last objective collected was a star (0) or a key (1) -function set_last_star_or_key(value) - -- ... -end - ---- @param envfx integer ---- Sets the override environment effect (e.g. snow) -function set_override_envfx(envfx) - -- ... -end - ---- @param value boolean ---- Sets if the save file has been modified without saving -function set_save_file_modified(value) - -- ... -end - ---- @param speed integer ---- Sets TTC's speed setting (TTC_SPEED_*) -function set_ttc_speed_setting(speed) - -- ... -end - ---- @param volume number ---- Sets the volume level of environment sounds effects -function set_volume_env(volume) - -- ... -end - ---- @param volume number ---- Sets the volume level of music -function set_volume_level(volume) - -- ... -end - ---- @param volume number ---- Sets the master volume level -function set_volume_master(volume) - -- ... -end - ---- @param volume number ---- Sets the volume level of sound effects -function set_volume_sfx(volume) +--- @return integer +--- Gets the water level in an area corresponding to `index` (0-indexed) +function get_water_level(index) -- ... end @@ -10305,12 +10198,176 @@ function set_water_level(index, height, sync) -- ... end +--- @param transType integer +--- @param time integer +--- @param red integer +--- @param green integer +--- @param blue integer +--- Plays a screen transition +function play_transition(transType, time, red, green, blue) + -- ... +end + +--- @param courseNum integer +--- @return boolean +--- Checks if a course is a main course and not the castle or secret levels +function course_is_main_course(courseNum) + -- ... +end + +--- @return integer +--- Gets TTC's speed setting +function get_ttc_speed_setting() + -- ... +end + +--- @param speed integer +--- Sets TTC's speed setting (TTC_SPEED_*) +function set_ttc_speed_setting(speed) + -- ... +end + +--- @return integer +--- Gets the Unix Timestamp +function get_time() + -- ... +end + +--- @return DateTime +--- Gets the system clock's date and time +function get_date_and_time() + -- ... +end + +--- @return integer +--- Gets the non overridden environment effect (e.g. snow) +function get_envfx() + -- ... +end + +--- @param envfx integer +--- Sets the override environment effect (e.g. snow) +function set_override_envfx(envfx) + -- ... +end + +--- @return integer +--- Gets the global timer that has been ticking at 30 frames per second since game boot +function get_global_timer() + -- ... +end + +--- @return integer +--- Gets the choice selected inside of a dialog box (0-1) +function get_dialog_response() + -- ... +end + +--- @return string +--- Gets the local discord ID if it isn't disabled, otherwise "0" is returned +function get_local_discord_id() + -- ... +end + +--- @param localIndex integer +--- @return string +--- Gets the CoopNet ID of a player with `localIndex` if CoopNet is being used and the player is connected, otherwise "-1" is returned +function get_coopnet_id(localIndex) + -- ... +end + +--- @return number +--- Gets the master volume level +function get_volume_master() + -- ... +end + +--- @return number +--- Gets the volume level of music +function get_volume_level() + -- ... +end + +--- @return number +--- Gets the volume level of sound effects +function get_volume_sfx() + -- ... +end + +--- @return number +--- Gets the volume level of environment sounds effects +function get_volume_env() + -- ... +end + +--- @param volume number +--- Sets the master volume level +function set_volume_master(volume) + -- ... +end + +--- @param volume number +--- Sets the volume level of music +function set_volume_level(volume) + -- ... +end + +--- @param volume number +--- Sets the volume level of sound effects +function set_volume_sfx(volume) + -- ... +end + +--- @param volume number +--- Sets the volume level of environment sounds effects +function set_volume_env(volume) + -- ... +end + +--- @param index integer +--- @return number +--- Gets an environment region (gas/water boxes) height value +function get_environment_region(index) + -- ... +end + +--- @param index integer +--- @param value integer +--- Sets an environment region (gas/water boxes) height value +function set_environment_region(index, value) + -- ... +end + +--- @param filename string +--- @return boolean +--- Checks if a file exists inside of a mod +function mod_file_exists(filename) + -- ... +end + +--- @return Mod +--- Gets the mod currently being processed +function get_active_mod() + -- ... +end + --- @param title string --- Sets the window title to a custom title function set_window_title(title) -- ... end +--- Resets the window title +function reset_window_title() + -- ... +end + +--- @return string +--- Gets the name of the operating system the game is running on +function get_os_name() + -- ... +end + --- @param name string --- @return ModelExtendedId --- Gets the extended model ID for the `name` of a `GeoLayout` @@ -10318,6 +10375,67 @@ function smlua_model_util_get_id(name) -- ... end +--- @param behaviorId BehaviorId +--- @param modelId ModelExtendedId +--- @param x number +--- @param y number +--- @param z number +--- @param objSetupFunction function +--- @return Object +--- Spawns a synchronized object in at `x`, `y`, and `z` as a child object of the local Mario with his rotation. You can change the fields of the object in `objSetupFunction` +function spawn_sync_object(behaviorId, modelId, x, y, z, objSetupFunction) + -- ... +end + +--- @param behaviorId BehaviorId +--- @param modelId ModelExtendedId +--- @param x number +--- @param y number +--- @param z number +--- @param objSetupFunction function +--- @return Object +--- Spawns a synchronized object in at `x`, `y`, and `z` as a child object of the local Mario with his rotation. You can change the fields of the object in `objSetupFunction` +function spawn_non_sync_object(behaviorId, modelId, x, y, z, objSetupFunction) + -- ... +end + +--- @param o Object +--- @param behaviorId BehaviorId +--- @return integer +--- Checks if an object has `behaviorId` +function obj_has_behavior_id(o, behaviorId) + -- ... +end + +--- @param o Object +--- @param modelId ModelExtendedId +--- @return integer +--- Checks if an object's model is equal to `modelId` +function obj_has_model_extended(o, modelId) + -- ... +end + +--- @param o Object +--- @return ModelExtendedId +--- Returns an object's extended model id +function obj_get_model_id_extended(o) + -- ... +end + +--- @param o Object +--- @param modelId ModelExtendedId +--- Sets an object's model to `modelId` +function obj_set_model_extended(o, modelId) + -- ... +end + +--- @param name string +--- @return Pointer_Trajectory +--- Gets a trajectory by `name` +function get_trajectory(name) + -- ... +end + --- @return Object --- When used in a geo function, retrieve the current processed object function geo_get_current_object() @@ -10331,14 +10449,14 @@ function get_current_object() end --- @return Object ---- Gets the cutscene focus object -function get_cutscene_focus() +--- Gets the NPC object Mario is talking to +function get_dialog_object() -- ... end --- @return Object ---- Gets the NPC object Mario is talking to -function get_dialog_object() +--- Gets the cutscene focus object +function get_cutscene_focus() -- ... end @@ -10348,37 +10466,89 @@ function get_secondary_camera_focus() -- ... end ---- @return ObjectHitbox ---- Returns a temporary object hitbox pointer -function get_temp_object_hitbox() - -- ... -end - ---- @param name string ---- @return Pointer_Trajectory ---- Gets a trajectory by `name` -function get_trajectory(name) - -- ... -end - ---- @param o1 Object ---- @param o2 Object ---- @return boolean ---- Checks if `o1`'s hitbox is colliding with `o2`'s hitbox -function obj_check_hitbox_overlap(o1, o2) +--- @param o Object +--- @return void* +--- Sets the cutscene focus object +function set_cutscene_focus(o) -- ... end --- @param o Object ---- @param x number ---- @param y number ---- @param z number ---- @param h number ---- @param r number ---- @param d number ---- @return boolean ---- Checks if `o`'s hitbox is colliding with the parameters of a hitbox -function obj_check_overlap_with_hitbox_params(o, x, y, z, h, r, d) +--- @return void* +--- Sets the secondary camera focus object +function set_secondary_camera_focus(o) + -- ... +end + +--- @param objList ObjectList +--- @return Object +--- Gets the first object in an object list +function obj_get_first(objList) + -- ... +end + +--- @param behaviorId BehaviorId +--- @return Object +--- Gets the first object loaded with `behaviorId` +function obj_get_first_with_behavior_id(behaviorId) + -- ... +end + +--- @param behaviorId BehaviorId +--- @param fieldIndex integer +--- @param value integer +--- @return Object +--- Gets the first object loaded with `behaviorId` and object signed 32-bit integer field (look in `object_fields.h` to get the index of a field) +function obj_get_first_with_behavior_id_and_field_s32(behaviorId, fieldIndex, value) + -- ... +end + +--- @param behaviorId BehaviorId +--- @param fieldIndex integer +--- @param value number +--- @return Object +--- Gets the first object loaded with `behaviorId` and object float field (look in `object_fields.h` to get the index of a field) +function obj_get_first_with_behavior_id_and_field_f32(behaviorId, fieldIndex, value) + -- ... +end + +--- @param o Object +--- @return Object +--- Gets the next object in an object list +function obj_get_next(o) + -- ... +end + +--- @param o Object +--- @return Object +--- Gets the next object loaded with the same behavior ID +function obj_get_next_with_same_behavior_id(o) + -- ... +end + +--- @param o Object +--- @param fieldIndex integer +--- @param value integer +--- @return Object +--- Gets the next object loaded with the same behavior ID and object signed 32-bit integer field (look in `object_fields.h` to get the index of a field) +function obj_get_next_with_same_behavior_id_and_field_s32(o, fieldIndex, value) + -- ... +end + +--- @param o Object +--- @param fieldIndex integer +--- @param value number +--- @return Object +--- Gets the next object loaded with the same behavior ID and object float field (look in `object_fields.h` to get the index of a field) +function obj_get_next_with_same_behavior_id_and_field_f32(o, fieldIndex, value) + -- ... +end + +--- @param o Object +--- @param behaviorId BehaviorId +--- @return Object +--- Gets the nearest object with `behaviorId` to `o` +function obj_get_nearest_object_with_behavior_id(o, behaviorId) -- ... end @@ -10397,6 +10567,22 @@ function obj_get_collided_object(o, index) -- ... end +--- @param o Object +--- @param fieldIndex integer +--- @return integer +--- Gets the unsigned 32-bit integer value from the field corresponding to `fieldIndex` +function obj_get_field_u32(o, fieldIndex) + -- ... +end + +--- @param o Object +--- @param fieldIndex integer +--- @return integer +--- Gets the signed 32-bit integer value from the field corresponding to `fieldIndex` +function obj_get_field_s32(o, fieldIndex) + -- ... +end + --- @param o Object --- @param fieldIndex integer --- @return number @@ -10416,96 +10602,34 @@ end --- @param o Object --- @param fieldIndex integer ---- @return integer ---- Gets the signed 32-bit integer value from the field corresponding to `fieldIndex` -function obj_get_field_s32(o, fieldIndex) - -- ... -end - ---- @param o Object ---- @param fieldIndex integer ---- @return integer ---- Gets the unsigned 32-bit integer value from the field corresponding to `fieldIndex` -function obj_get_field_u32(o, fieldIndex) - -- ... -end - ---- @param objList ObjectList ---- @return Object ---- Gets the first object in an object list -function obj_get_first(objList) - -- ... -end - ---- @param behaviorId BehaviorId ---- @return Object ---- Gets the first object loaded with `behaviorId` -function obj_get_first_with_behavior_id(behaviorId) - -- ... -end - ---- @param behaviorId BehaviorId ---- @param fieldIndex integer ---- @param value number ---- @return Object ---- Gets the first object loaded with `behaviorId` and object float field (look in `object_fields.h` to get the index of a field) -function obj_get_first_with_behavior_id_and_field_f32(behaviorId, fieldIndex, value) - -- ... -end - ---- @param behaviorId BehaviorId ---- @param fieldIndex integer --- @param value integer ---- @return Object ---- Gets the first object loaded with `behaviorId` and object signed 32-bit integer field (look in `object_fields.h` to get the index of a field) -function obj_get_first_with_behavior_id_and_field_s32(behaviorId, fieldIndex, value) - -- ... -end - ---- @param o Object ---- @return ModelExtendedId ---- Returns an object's extended model id -function obj_get_model_id_extended(o) - -- ... -end - ---- @param o Object ---- @param behaviorId BehaviorId ---- @return Object ---- Gets the nearest object with `behaviorId` to `o` -function obj_get_nearest_object_with_behavior_id(o, behaviorId) - -- ... -end - ---- @param o Object ---- @return Object ---- Gets the next object in an object list -function obj_get_next(o) - -- ... -end - ---- @param o Object ---- @return Object ---- Gets the next object loaded with the same behavior ID -function obj_get_next_with_same_behavior_id(o) - -- ... -end - ---- @param o Object ---- @param fieldIndex integer ---- @param value number ---- @return Object ---- Gets the next object loaded with the same behavior ID and object float field (look in `object_fields.h` to get the index of a field) -function obj_get_next_with_same_behavior_id_and_field_f32(o, fieldIndex, value) +--- Sets the unsigned 32-bit integer value from the field corresponding to `fieldIndex` +function obj_set_field_u32(o, fieldIndex, value) -- ... end --- @param o Object --- @param fieldIndex integer --- @param value integer ---- @return Object ---- Gets the next object loaded with the same behavior ID and object signed 32-bit integer field (look in `object_fields.h` to get the index of a field) -function obj_get_next_with_same_behavior_id_and_field_s32(o, fieldIndex, value) +--- Sets the signed 32-bit integer value from the field corresponding to `fieldIndex` +function obj_set_field_s32(o, fieldIndex, value) + -- ... +end + +--- @param o Object +--- @param fieldIndex integer +--- @param value number +--- Sets the float value from the field corresponding to `fieldIndex` +function obj_set_field_f32(o, fieldIndex, value) + -- ... +end + +--- @param o Object +--- @param fieldIndex integer +--- @param fieldSubIndex integer +--- @param value integer +--- Sets the signed 32-bit integer value from the sub field corresponding to `fieldSubIndex` from the field corresponding to `fieldIndex` +function obj_set_field_s16(o, fieldIndex, fieldSubIndex, value) -- ... end @@ -10516,19 +10640,9 @@ function obj_get_temp_spawn_particles_info(modelId) -- ... end ---- @param o Object ---- @param behaviorId BehaviorId ---- @return integer ---- Checks if an object has `behaviorId` -function obj_has_behavior_id(o, behaviorId) - -- ... -end - ---- @param o Object ---- @param modelId ModelExtendedId ---- @return integer ---- Checks if an object's model is equal to `modelId` -function obj_has_model_extended(o, modelId) +--- @return ObjectHitbox +--- Returns a temporary object hitbox pointer +function get_temp_object_hitbox() -- ... end @@ -10595,52 +10709,24 @@ function obj_is_valid_for_interaction(o) -- ... end ---- @param o Object ---- @param dx number ---- @param dy number ---- @param dz number ---- Moves the object in the direction of `dx`, `dy`, and `dz` -function obj_move_xyz(o, dx, dy, dz) +--- @param o1 Object +--- @param o2 Object +--- @return boolean +--- Checks if `o1`'s hitbox is colliding with `o2`'s hitbox +function obj_check_hitbox_overlap(o1, o2) -- ... end --- @param o Object ---- @param fieldIndex integer ---- @param value number ---- Sets the float value from the field corresponding to `fieldIndex` -function obj_set_field_f32(o, fieldIndex, value) - -- ... -end - ---- @param o Object ---- @param fieldIndex integer ---- @param fieldSubIndex integer ---- @param value integer ---- Sets the signed 32-bit integer value from the sub field corresponding to `fieldSubIndex` from the field corresponding to `fieldIndex` -function obj_set_field_s16(o, fieldIndex, fieldSubIndex, value) - -- ... -end - ---- @param o Object ---- @param fieldIndex integer ---- @param value integer ---- Sets the signed 32-bit integer value from the field corresponding to `fieldIndex` -function obj_set_field_s32(o, fieldIndex, value) - -- ... -end - ---- @param o Object ---- @param fieldIndex integer ---- @param value integer ---- Sets the unsigned 32-bit integer value from the field corresponding to `fieldIndex` -function obj_set_field_u32(o, fieldIndex, value) - -- ... -end - ---- @param o Object ---- @param modelId ModelExtendedId ---- Sets an object's model to `modelId` -function obj_set_model_extended(o, modelId) +--- @param x number +--- @param y number +--- @param z number +--- @param h number +--- @param r number +--- @param d number +--- @return boolean +--- Checks if `o`'s hitbox is colliding with the parameters of a hitbox +function obj_check_overlap_with_hitbox_params(o, x, y, z, h, r, d) -- ... end @@ -10654,16 +10740,11 @@ function obj_set_vel(o, vx, vy, vz) end --- @param o Object ---- @return void* ---- Sets the cutscene focus object -function set_cutscene_focus(o) - -- ... -end - ---- @param o Object ---- @return void* ---- Sets the secondary camera focus object -function set_secondary_camera_focus(o) +--- @param dx number +--- @param dy number +--- @param dz number +--- Moves the object in the direction of `dx`, `dy`, and `dz` +function obj_move_xyz(o, dx, dy, dz) -- ... end @@ -10678,27 +10759,74 @@ function set_whirlpools(x, y, z, strength, area, index) -- ... end ---- @param behaviorId BehaviorId ---- @param modelId ModelExtendedId ---- @param x number ---- @param y number ---- @param z number ---- @param objSetupFunction function ---- @return Object ---- Spawns a synchronized object in at `x`, `y`, and `z` as a child object of the local Mario with his rotation. You can change the fields of the object in `objSetupFunction` -function spawn_non_sync_object(behaviorId, modelId, x, y, z, objSetupFunction) +--- Resets every modified dialog back to vanilla +function smlua_text_utils_reset_all() -- ... end ---- @param behaviorId BehaviorId ---- @param modelId ModelExtendedId ---- @param x number ---- @param y number ---- @param z number ---- @param objSetupFunction function ---- @return Object ---- Spawns a synchronized object in at `x`, `y`, and `z` as a child object of the local Mario with his rotation. You can change the fields of the object in `objSetupFunction` -function spawn_sync_object(behaviorId, modelId, x, y, z, objSetupFunction) +--- @param dialogId DialogId +--- @param unused integer +--- @param linesPerBox integer +--- @param leftOffset integer +--- @param width integer +--- @param str string +--- Replaces `dialogId` with a custom one +function smlua_text_utils_dialog_replace(dialogId, unused, linesPerBox, leftOffset, width, str) + -- ... +end + +--- @param courseNum integer +--- @param courseName string +--- @param act1 string +--- @param act2 string +--- @param act3 string +--- @param act4 string +--- @param act5 string +--- @param act6 string +--- Replaces the act names of `courseNum` +function smlua_text_utils_course_acts_replace(courseNum, courseName, act1, act2, act3, act4, act5, act6) + -- ... +end + +--- @param courseNum integer +--- @param courseName string +--- Replaces the secret star course name of `courseNum` with `courseName` +function smlua_text_utils_secret_star_replace(courseNum, courseName) + -- ... +end + +--- @param courseNum integer +--- @param name string +--- Replaces the name of `courseNum` with `name` +function smlua_text_utils_course_name_replace(courseNum, name) + -- ... +end + +--- @param courseNum integer +--- @return string +--- Gets the name of `courseNum` +function smlua_text_utils_course_name_get(courseNum) + -- ... +end + +--- @param courseNum integer +--- @return integer +--- Gets the index of the mod that replaced the name of `courseNum` +function smlua_text_utils_course_name_mod_index(courseNum) + -- ... +end + +--- @param courseNum integer +--- Resets the name of `courseNum` +function smlua_text_utils_course_name_reset(courseNum) + -- ... +end + +--- @param courseNum integer +--- @param actNum integer +--- @param name string +--- Replaces the act name of `actNum` in `courseNum` with `name` +function smlua_text_utils_act_name_replace(courseNum, actNum, name) -- ... end @@ -10718,14 +10846,6 @@ function smlua_text_utils_act_name_mod_index(courseNum, actNum) -- ... end ---- @param courseNum integer ---- @param actNum integer ---- @param name string ---- Replaces the act name of `actNum` in `courseNum` with `name` -function smlua_text_utils_act_name_replace(courseNum, actNum, name) - -- ... -end - --- @param courseNum integer --- @param actNum integer --- Resets the act name of `actNum` in `courseNum` @@ -10739,57 +10859,6 @@ function smlua_text_utils_castle_secret_stars_replace(name) -- ... end ---- @param courseNum integer ---- @param courseName string ---- @param act1 string ---- @param act2 string ---- @param act3 string ---- @param act4 string ---- @param act5 string ---- @param act6 string ---- Replaces the act names of `courseNum` -function smlua_text_utils_course_acts_replace(courseNum, courseName, act1, act2, act3, act4, act5, act6) - -- ... -end - ---- @param courseNum integer ---- @return string ---- Gets the name of `courseNum` -function smlua_text_utils_course_name_get(courseNum) - -- ... -end - ---- @param courseNum integer ---- @return integer ---- Gets the index of the mod that replaced the name of `courseNum` -function smlua_text_utils_course_name_mod_index(courseNum) - -- ... -end - ---- @param courseNum integer ---- @param name string ---- Replaces the name of `courseNum` with `name` -function smlua_text_utils_course_name_replace(courseNum, name) - -- ... -end - ---- @param courseNum integer ---- Resets the name of `courseNum` -function smlua_text_utils_course_name_reset(courseNum) - -- ... -end - ---- @param dialogId DialogId ---- @param unused integer ---- @param linesPerBox integer ---- @param leftOffset integer ---- @param width integer ---- @param str string ---- Replaces `dialogId` with a custom one -function smlua_text_utils_dialog_replace(dialogId, unused, linesPerBox, leftOffset, width, str) - -- ... -end - --- @param index integer --- @param text string --- Replace extra text (e.g. one of the castle's secret stars) with `text` @@ -10803,15 +10872,20 @@ function smlua_text_utils_get_language() -- ... end ---- Resets every modified dialog back to vanilla -function smlua_text_utils_reset_all() +--- Resets if music volume has been lowered +function reset_volume() -- ... end ---- @param courseNum integer ---- @param courseName string ---- Replaces the secret star course name of `courseNum` with `courseName` -function smlua_text_utils_secret_star_replace(courseNum, courseName) +--- @param a integer +--- Raises music volume back up to normal levels +function raise_background_noise(a) + -- ... +end + +--- @param a integer +--- Lowers the volume of music by 40% +function lower_background_noise(a) -- ... end @@ -10825,46 +10899,6 @@ function enable_background_sound() -- ... end ---- Fades out cap music -function fadeout_cap_music() - -- ... -end - ---- @param fadeTimer integer ---- Fades out the level sequence player -function fadeout_level_music(fadeTimer) - -- ... -end - ---- @param fadeOutTime integer ---- Fades out level, shell, and cap music -function fadeout_music(fadeOutTime) - -- ... -end - ---- @param a integer ---- Lowers the volume of music by 40% -function lower_background_noise(a) - -- ... -end - ---- @param seqArgs integer ---- Plays `seqArgs` as cap music -function play_cap_music(seqArgs) - -- ... -end - ---- @param seqArgs integer ---- Plays and sets the current music to `seqArgs` -function play_cutscene_music(seqArgs) - -- ... -end - ---- Plays the infinite stairs music if you're in the endless stairs room and have less than `gLevelValues.infiniteStairsRequirement` stars -function play_infinite_stairs_music() - -- ... -end - --- @param soundMenuFlags integer --- Play menu sounds from `SOUND_MENU_FLAG_*` constants and queues rumble if `SOUND_MENU_FLAG_LETGOMARIOFACE` is one of the flags function play_menu_sounds(soundMenuFlags) @@ -10876,19 +10910,8 @@ function play_painting_eject_sound() -- ... end ---- Plays shell music -function play_shell_music() - -- ... -end - ---- @param a integer ---- Raises music volume back up to normal levels -function raise_background_noise(a) - -- ... -end - ---- Resets if music volume has been lowered -function reset_volume() +--- Plays the infinite stairs music if you're in the endless stairs room and have less than `gLevelValues.infiniteStairsRequirement` stars +function play_infinite_stairs_music() -- ... end @@ -10900,8 +10923,26 @@ function set_background_music(a, seqArgs, fadeTimer) -- ... end ---- Stops cap music completely -function stop_cap_music() +--- @param fadeOutTime integer +--- Fades out level, shell, and cap music +function fadeout_music(fadeOutTime) + -- ... +end + +--- @param fadeTimer integer +--- Fades out the level sequence player +function fadeout_level_music(fadeTimer) + -- ... +end + +--- @param seqArgs integer +--- Plays and sets the current music to `seqArgs` +function play_cutscene_music(seqArgs) + -- ... +end + +--- Plays shell music +function play_shell_music() -- ... end @@ -10910,6 +10951,46 @@ function stop_shell_music() -- ... end +--- @param seqArgs integer +--- Plays `seqArgs` as cap music +function play_cap_music(seqArgs) + -- ... +end + +--- Fades out cap music +function fadeout_cap_music() + -- ... +end + +--- Stops cap music completely +function stop_cap_music() + -- ... +end + +--- @param soundStates SoundState +--- @param maxSoundStates integer +function exec_anim_sound_state(soundStates, maxSoundStates) + -- ... +end + +--- @param soundMagic integer +--- Plays a sound if the current object is visible +function cur_obj_play_sound_1(soundMagic) + -- ... +end + +--- @param soundMagic integer +--- Plays a sound if the current object is visible and queues rumble for specific sounds +function cur_obj_play_sound_2(soundMagic) + -- ... +end + +--- @param soundMagic integer +--- Create a sound spawner for objects that need a sound play once. (Breakable walls, King Bobomb exploding, etc) +function create_sound_spawner(soundMagic) + -- ... +end + --- @param distance number --- @return integer --- Unused vanilla function, calculates a volume based on `distance`. If `distance` is less than 500 then 127, if `distance` is greater than 1500 then 0, if `distance` is between 500 and 1500 then it ranges linearly from 60 to 124. What an even more strange and confusing function @@ -10924,27 +11005,10 @@ function calc_dist_to_volume_range_2(distance) -- ... end ---- @param soundMagic integer ---- Create a sound spawner for objects that need a sound play once. (Breakable walls, King Bobomb exploding, etc) -function create_sound_spawner(soundMagic) - -- ... -end - ---- @param soundMagic integer ---- Plays a sound if the current object is visible -function cur_obj_play_sound_1(soundMagic) - -- ... -end - ---- @param soundMagic integer ---- Plays a sound if the current object is visible and queues rumble for specific sounds -function cur_obj_play_sound_2(soundMagic) - -- ... -end - ---- @param soundStates SoundState ---- @param maxSoundStates integer -function exec_anim_sound_state(soundStates, maxSoundStates) +--- @param colData WallCollisionData +--- @return integer +--- Detects wall collisions at a given position and adjusts the position based on the walls found. Returns the number of wall collisions detected +function find_wall_collisions(colData) -- ... end @@ -10969,23 +11033,16 @@ end --- @param x number --- @param z number --- @return number ---- Finds the height of the poison gas at a given position (x, z), if the position is within a gas region. If no gas is found, returns the default height of `gLevelValues.floorLowerLimit`(-11000 by default) -function find_poison_gas_level(x, z) - -- ... -end - ---- @param colData WallCollisionData ---- @return integer ---- Detects wall collisions at a given position and adjusts the position based on the walls found. Returns the number of wall collisions detected -function find_wall_collisions(colData) +--- Finds the height of water at a given position (x, z), if the position is within a water region. If no water is found, returns the default height of `gLevelValues.floorLowerLimit`(-11000 by default) +function find_water_level(x, z) -- ... end --- @param x number --- @param z number --- @return number ---- Finds the height of water at a given position (x, z), if the position is within a water region. If no water is found, returns the default height of `gLevelValues.floorLowerLimit`(-11000 by default) -function find_water_level(x, z) +--- Finds the height of the poison gas at a given position (x, z), if the position is within a gas region. If no gas is found, returns the default height of `gLevelValues.floorLowerLimit`(-11000 by default) +function find_poison_gas_level(x, z) -- ... end @@ -11030,11 +11087,11 @@ function surface_has_force(surfaceType) -- ... end ---- @class Pointer_integer ---- @class Pointer_BehaviorScript ---- @class Pointer_number ---- @class Pointer_Vec4s ---- @class Pointer_Trajectory ---- @class Pointer_Collision ---- @class Pointer_Gfx ---- @class Pointer_Vtx +--- @alias Pointer_integer integer +--- @alias Pointer_BehaviorScript BehaviorScript +--- @alias Pointer_number number +--- @alias Pointer_Vec4s Vec4s +--- @alias Pointer_Trajectory Trajectory +--- @alias Pointer_Collision Collision +--- @alias Pointer_Gfx Gfx +--- @alias Pointer_Vtx Vtx diff --git a/autogen/lua_definitions/structs.lua b/autogen/lua_definitions/structs.lua index 481cd2a00..44cb2e080 100644 --- a/autogen/lua_definitions/structs.lua +++ b/autogen/lua_definitions/structs.lua @@ -2453,12 +2453,12 @@ --- @field public g integer --- @field public b integer ---- @class Pointer_integer ---- @class Pointer_Trajectory ---- @class Pointer_Gfx ---- @class Pointer_LevelScript ---- @class Pointer_ObjectAnimPointer ---- @class Pointer_Collision ---- @class Pointer_Mat4 ---- @class Pointer_Vec4s ---- @class Pointer_BehaviorScript +--- @alias Pointer_integer integer +--- @alias Pointer_Trajectory Trajectory +--- @alias Pointer_Gfx Gfx +--- @alias Pointer_LevelScript LevelScript +--- @alias Pointer_ObjectAnimPointer ObjectAnimPointer +--- @alias Pointer_Collision Collision +--- @alias Pointer_Mat4 Mat4 +--- @alias Pointer_Vec4s Vec4s +--- @alias Pointer_BehaviorScript BehaviorScript diff --git a/docs/lua/constants.md b/docs/lua/constants.md index 8fa0ad8f8..a99e82acc 100644 --- a/docs/lua/constants.md +++ b/docs/lua/constants.md @@ -5,19 +5,20 @@ - [behavior_table.h](#behavior_tableh) - [enum BehaviorId](#enum-BehaviorId) - [camera.h](#camerah) - - [enum RomhackCameraEnable](#enum-RomhackCameraEnable) - [enum RomhackCameraOverride](#enum-RomhackCameraOverride) + - [enum RomhackCameraEnable](#enum-RomhackCameraEnable) - [characters.h](#charactersh) - - [enum CharacterSound](#enum-CharacterSound) - [enum CharacterType](#enum-CharacterType) + - [enum CharacterSound](#enum-CharacterSound) +- [controller_mouse.h](#controller_mouseh) - [dialog_ids.h](#dialog_idsh) - [enum DialogId](#enum-DialogId) - [djui_console.h](#djui_consoleh) - [enum ConsoleMessageLevel](#enum-ConsoleMessageLevel) - [djui_hud_utils.h](#djui_hud_utilsh) - - [enum DjuiFontType](#enum-DjuiFontType) - - [enum HudUtilsFilter](#enum-HudUtilsFilter) - [enum HudUtilsResolution](#enum-HudUtilsResolution) + - [enum HudUtilsFilter](#enum-HudUtilsFilter) + - [enum DjuiFontType](#enum-DjuiFontType) - [djui_panel_menu.h](#djui_panel_menuh) - [enum DjuiRainbowColor](#enum-DjuiRainbowColor) - [envfx_snow.h](#envfx_snowh) @@ -29,28 +30,28 @@ - [graph_node.h](#graph_nodeh) - [interaction.c](#interactionc) - [interaction.h](#interactionh) - - [enum InteractionFlag](#enum-InteractionFlag) - [enum InteractionType](#enum-InteractionType) + - [enum InteractionFlag](#enum-InteractionFlag) - [lag_compensation.h](#lag_compensationh) - [level_commands.h](#level_commandsh) - [level_defines.h](#level_definesh) - [enum LevelNum](#enum-LevelNum) - [level_update.h](#level_updateh) - - [enum HUDDisplayFlag](#enum-HUDDisplayFlag) - [enum MarioSpawnType](#enum-MarioSpawnType) + - [enum HUDDisplayFlag](#enum-HUDDisplayFlag) - [mario_animation_ids.h](#mario_animation_idsh) - - [enum CharacterAnimID](#enum-CharacterAnimID) - [enum MarioAnimID](#enum-MarioAnimID) + - [enum CharacterAnimID](#enum-CharacterAnimID) - [mario_geo_switch_case_ids.h](#mario_geo_switch_case_idsh) - - [enum MarioCapGSCId](#enum-MarioCapGSCId) - [enum MarioEyesGSCId](#enum-MarioEyesGSCId) - - [enum MarioGrabPosGSCId](#enum-MarioGrabPosGSCId) - [enum MarioHandGSCId](#enum-MarioHandGSCId) + - [enum MarioCapGSCId](#enum-MarioCapGSCId) + - [enum MarioGrabPosGSCId](#enum-MarioGrabPosGSCId) - [mod_storage.h](#mod_storageh) - [network.h](#networkh) - - [enum BouncyLevelBounds](#enum-BouncyLevelBounds) - [enum NetworkSystemType](#enum-NetworkSystemType) - [enum PlayerInteractions](#enum-PlayerInteractions) + - [enum BouncyLevelBounds](#enum-BouncyLevelBounds) - [enum PvpType](#enum-PvpType) - [network_player.h](#network_playerh) - [enum NetworkPlayerType](#enum-NetworkPlayerType) @@ -63,25 +64,25 @@ - [player_palette.h](#player_paletteh) - [enum PlayerPart](#enum-PlayerPart) - [save_file.h](#save_fileh) - - [enum EuLanguages](#enum-EuLanguages) - [enum SaveFileIndex](#enum-SaveFileIndex) + - [enum EuLanguages](#enum-EuLanguages) - [seq_ids.h](#seq_idsh) - [enum SeqId](#enum-SeqId) - [sm64.h](#sm64h) - [smlua_hooks.h](#smlua_hooksh) - - [enum LuaActionHookType](#enum-LuaActionHookType) - [enum LuaHookedEventType](#enum-LuaHookedEventType) + - [enum LuaActionHookType](#enum-LuaActionHookType) - [enum LuaModMenuElementType](#enum-LuaModMenuElementType) - [smlua_misc_utils.h](#smlua_misc_utilsh) - - [enum HudDisplayFlags](#enum-HudDisplayFlags) - [enum HudDisplayValue](#enum-HudDisplayValue) + - [enum HudDisplayFlags](#enum-HudDisplayFlags) - [smlua_model_utils.h](#smlua_model_utilsh) - [enum ModelExtendedId](#enum-ModelExtendedId) - [sounds.h](#soundsh) - [surface_terrains.h](#surface_terrainsh) - [types.h](#typesh) - - [enum AreaTimerType](#enum-AreaTimerType) - [enum SpTaskState](#enum-SpTaskState) + - [enum AreaTimerType](#enum-AreaTimerType) - [version.h](#versionh)
@@ -90,17 +91,17 @@ - INSTANT_WARP_INDEX_START - INSTANT_WARP_INDEX_STOP - MAX_AREAS -- VERSION_REGION -- WARP_TRANSITION_FADE_FROM_BOWSER -- WARP_TRANSITION_FADE_FROM_CIRCLE - WARP_TRANSITION_FADE_FROM_COLOR -- WARP_TRANSITION_FADE_FROM_MARIO -- WARP_TRANSITION_FADE_FROM_STAR -- WARP_TRANSITION_FADE_INTO_BOWSER -- WARP_TRANSITION_FADE_INTO_CIRCLE - WARP_TRANSITION_FADE_INTO_COLOR -- WARP_TRANSITION_FADE_INTO_MARIO +- WARP_TRANSITION_FADE_FROM_STAR - WARP_TRANSITION_FADE_INTO_STAR +- WARP_TRANSITION_FADE_FROM_CIRCLE +- WARP_TRANSITION_FADE_INTO_CIRCLE +- WARP_TRANSITION_FADE_FROM_MARIO +- WARP_TRANSITION_FADE_INTO_MARIO +- WARP_TRANSITION_FADE_FROM_BOWSER +- WARP_TRANSITION_FADE_INTO_BOWSER +- VERSION_REGION [:arrow_up_small:](#) @@ -659,193 +660,6 @@
## [camera.h](#camera.h) -- CAMERA_MODE_8_DIRECTIONS -- CAMERA_MODE_BEHIND_MARIO -- CAMERA_MODE_BOSS_FIGHT -- CAMERA_MODE_CLOSE -- CAMERA_MODE_C_UP -- CAMERA_MODE_FIXED -- CAMERA_MODE_FREE_ROAM -- CAMERA_MODE_INSIDE_CANNON -- CAMERA_MODE_NEWCAM -- CAMERA_MODE_NONE -- CAMERA_MODE_OUTWARD_RADIAL -- CAMERA_MODE_PARALLEL_TRACKING -- CAMERA_MODE_RADIAL -- CAMERA_MODE_ROM_HACK -- CAMERA_MODE_SLIDE_HOOT -- CAMERA_MODE_SPIRAL_STAIRS -- CAMERA_MODE_WATER_SURFACE -- CAM_ANGLE_LAKITU -- CAM_ANGLE_MARIO -- CAM_EVENT_BOWSER_INIT -- CAM_EVENT_BOWSER_JUMP -- CAM_EVENT_BOWSER_THROW_BOUNCE -- CAM_EVENT_CANNON -- CAM_EVENT_DOOR -- CAM_EVENT_DOOR_WARP -- CAM_EVENT_SHOT_FROM_CANNON -- CAM_EVENT_START_CREDITS -- CAM_EVENT_START_ENDING -- CAM_EVENT_START_END_WAVING -- CAM_EVENT_START_GRAND_STAR -- CAM_EVENT_START_INTRO -- CAM_EVENT_UNUSED_3 -- CAM_FLAG_BEHIND_MARIO_POST_DOOR -- CAM_FLAG_BLOCK_AREA_PROCESSING -- CAM_FLAG_BLOCK_SMOOTH_MOVEMENT -- CAM_FLAG_CAM_NEAR_WALL -- CAM_FLAG_CCM_SLIDE_SHORTCUT -- CAM_FLAG_CHANGED_PARTRACK_INDEX -- CAM_FLAG_COLLIDED_WITH_WALL -- CAM_FLAG_FRAME_AFTER_CAM_INIT -- CAM_FLAG_SLEEPING -- CAM_FLAG_SMOOTH_MOVEMENT -- CAM_FLAG_START_TRANSITION -- CAM_FLAG_TRANSITION_OUT_OF_C_UP -- CAM_FLAG_UNUSED_13 -- CAM_FLAG_UNUSED_7 -- CAM_FLAG_UNUSED_8 -- CAM_FLAG_UNUSED_CUTSCENE_ACTIVE -- CAM_FOV_APP_20 -- CAM_FOV_APP_30 -- CAM_FOV_APP_45 -- CAM_FOV_APP_60 -- CAM_FOV_APP_80 -- CAM_FOV_BBH -- CAM_FOV_DEFAULT -- CAM_FOV_SET_29 -- CAM_FOV_SET_30 -- CAM_FOV_SET_45 -- CAM_FOV_ZOOM_30 -- CAM_MODE_LAKITU_WAS_ZOOMED_OUT -- CAM_MODE_MARIO_ACTIVE -- CAM_MODE_MARIO_SELECTED -- CAM_MOVE_ALREADY_ZOOMED_OUT -- CAM_MOVE_C_UP_MODE -- CAM_MOVE_ENTERED_ROTATE_SURFACE -- CAM_MOVE_FIX_IN_PLACE -- CAM_MOVE_INIT_CAMERA -- CAM_MOVE_METAL_BELOW_WATER -- CAM_MOVE_PAUSE_SCREEN -- CAM_MOVE_RESTRICT -- CAM_MOVE_RETURN_TO_MIDDLE -- CAM_MOVE_ROTATE -- CAM_MOVE_ROTATE_LEFT -- CAM_MOVE_ROTATE_RIGHT -- CAM_MOVE_STARTED_EXITING_C_UP -- CAM_MOVE_SUBMERGED -- CAM_MOVE_UNKNOWN_11 -- CAM_MOVE_UNKNOWN_8 -- CAM_MOVE_ZOOMED_OUT -- CAM_MOVING_INTO_MODE -- CAM_SELECTION_FIXED -- CAM_SELECTION_MARIO -- CAM_SOUND_C_UP_PLAYED -- CAM_SOUND_FIXED_ACTIVE -- CAM_SOUND_MARIO_ACTIVE -- CAM_SOUND_NORMAL_ACTIVE -- CAM_SOUND_UNUSED_SELECT_FIXED -- CAM_SOUND_UNUSED_SELECT_MARIO -- CAM_STATUS_C_DOWN -- CAM_STATUS_C_MODE_GROUP -- CAM_STATUS_C_UP -- CAM_STATUS_FIXED -- CAM_STATUS_LAKITU -- CAM_STATUS_MARIO -- CAM_STATUS_MODE_GROUP -- CAM_STATUS_NONE -- CUTSCENE_0F_UNUSED -- CUTSCENE_CAP_SWITCH_PRESS -- CUTSCENE_CREDITS -- CUTSCENE_DANCE_CLOSEUP -- CUTSCENE_DANCE_DEFAULT -- CUTSCENE_DANCE_FLY_AWAY -- CUTSCENE_DANCE_ROTATE -- CUTSCENE_DEATH_EXIT -- CUTSCENE_DEATH_ON_BACK -- CUTSCENE_DEATH_ON_STOMACH -- CUTSCENE_DIALOG -- CUTSCENE_DOOR_PULL -- CUTSCENE_DOOR_PULL_MODE -- CUTSCENE_DOOR_PUSH -- CUTSCENE_DOOR_PUSH_MODE -- CUTSCENE_DOOR_WARP -- CUTSCENE_ENDING -- CUTSCENE_END_WAVING -- CUTSCENE_ENTER_BOWSER_ARENA -- CUTSCENE_ENTER_CANNON -- CUTSCENE_ENTER_PAINTING -- CUTSCENE_ENTER_POOL -- CUTSCENE_ENTER_PYRAMID_TOP -- CUTSCENE_EXIT_BOWSER_DEATH -- CUTSCENE_EXIT_BOWSER_SUCC -- CUTSCENE_EXIT_FALL_WMOTR -- CUTSCENE_EXIT_PAINTING_SUCC -- CUTSCENE_EXIT_SPECIAL_SUCC -- CUTSCENE_EXIT_WATERFALL -- CUTSCENE_GRAND_STAR -- CUTSCENE_INTRO_PEACH -- CUTSCENE_KEY_DANCE -- CUTSCENE_LOOP -- CUTSCENE_NONPAINTING_DEATH -- CUTSCENE_PALETTE_EDITOR -- CUTSCENE_PREPARE_CANNON -- CUTSCENE_QUICKSAND_DEATH -- CUTSCENE_RACE_DIALOG -- CUTSCENE_READ_MESSAGE -- CUTSCENE_RED_COIN_STAR_SPAWN -- CUTSCENE_SLIDING_DOORS_OPEN -- CUTSCENE_SSL_PYRAMID_EXPLODE -- CUTSCENE_STANDING_DEATH -- CUTSCENE_STAR_SPAWN -- CUTSCENE_STOP -- CUTSCENE_SUFFOCATION_DEATH -- CUTSCENE_UNLOCK_KEY_DOOR -- CUTSCENE_UNUSED_EXIT -- CUTSCENE_WATER_DEATH -- DOOR_DEFAULT -- DOOR_ENTER_LOBBY -- DOOR_LEAVING_SPECIAL -- HAND_CAM_SHAKE_CUTSCENE -- HAND_CAM_SHAKE_HANG_OWL -- HAND_CAM_SHAKE_HIGH -- HAND_CAM_SHAKE_LOW -- HAND_CAM_SHAKE_OFF -- HAND_CAM_SHAKE_STAR_DANCE -- HAND_CAM_SHAKE_UNUSED -- SHAKE_ATTACK -- SHAKE_ENV_BOWSER_JUMP -- SHAKE_ENV_BOWSER_THROW_BOUNCE -- SHAKE_ENV_EXPLOSION -- SHAKE_ENV_FALLING_BITS_PLAT -- SHAKE_ENV_JRB_SHIP_DRAIN -- SHAKE_ENV_PYRAMID_EXPLODE -- SHAKE_ENV_UNUSED_5 -- SHAKE_ENV_UNUSED_6 -- SHAKE_ENV_UNUSED_7 -- SHAKE_FALL_DAMAGE -- SHAKE_FOV_LARGE -- SHAKE_FOV_MEDIUM -- SHAKE_FOV_SMALL -- SHAKE_FOV_UNUSED -- SHAKE_GROUND_POUND -- SHAKE_HIT_FROM_BELOW -- SHAKE_LARGE_DAMAGE -- SHAKE_MED_DAMAGE -- SHAKE_POS_BOWLING_BALL -- SHAKE_POS_LARGE -- SHAKE_POS_MEDIUM -- SHAKE_POS_SMALL -- SHAKE_SHOCK -- SHAKE_SMALL_DAMAGE - -### [enum RomhackCameraEnable](#RomhackCameraEnable) -| Identifier | Value | -| :--------- | :---- | -| RCE_AUTOMATIC | 0 | -| RCE_ON | 1 | -| RCE_OFF | 2 | ### [enum RomhackCameraOverride](#RomhackCameraOverride) | Identifier | Value | @@ -857,12 +671,209 @@ | RCO_ALL_VANILLA_EXCEPT_BOWSER | 4 | | RCO_DISABLE | 5 | +### [enum RomhackCameraEnable](#RomhackCameraEnable) +| Identifier | Value | +| :--------- | :---- | +| RCE_AUTOMATIC | 0 | +| RCE_ON | 1 | +| RCE_OFF | 2 | +- CAM_MODE_MARIO_ACTIVE +- CAM_MODE_LAKITU_WAS_ZOOMED_OUT +- CAM_MODE_MARIO_SELECTED +- CAM_SELECTION_MARIO +- CAM_SELECTION_FIXED +- CAM_ANGLE_MARIO +- CAM_ANGLE_LAKITU +- CAMERA_MODE_NONE +- CAMERA_MODE_RADIAL +- CAMERA_MODE_OUTWARD_RADIAL +- CAMERA_MODE_BEHIND_MARIO +- CAMERA_MODE_CLOSE +- CAMERA_MODE_C_UP +- CAMERA_MODE_WATER_SURFACE +- CAMERA_MODE_SLIDE_HOOT +- CAMERA_MODE_INSIDE_CANNON +- CAMERA_MODE_BOSS_FIGHT +- CAMERA_MODE_PARALLEL_TRACKING +- CAMERA_MODE_FIXED +- CAMERA_MODE_8_DIRECTIONS +- CAMERA_MODE_FREE_ROAM +- CAMERA_MODE_SPIRAL_STAIRS +- CAMERA_MODE_NEWCAM +- CAMERA_MODE_ROM_HACK +- CAM_MOVE_RETURN_TO_MIDDLE +- CAM_MOVE_ZOOMED_OUT +- CAM_MOVE_ROTATE_RIGHT +- CAM_MOVE_ROTATE_LEFT +- CAM_MOVE_ENTERED_ROTATE_SURFACE +- CAM_MOVE_METAL_BELOW_WATER +- CAM_MOVE_FIX_IN_PLACE +- CAM_MOVE_UNKNOWN_8 +- CAM_MOVING_INTO_MODE +- CAM_MOVE_STARTED_EXITING_C_UP +- CAM_MOVE_UNKNOWN_11 +- CAM_MOVE_INIT_CAMERA +- CAM_MOVE_ALREADY_ZOOMED_OUT +- CAM_MOVE_C_UP_MODE +- CAM_MOVE_SUBMERGED +- CAM_MOVE_PAUSE_SCREEN +- CAM_MOVE_ROTATE +- CAM_MOVE_RESTRICT +- CAM_SOUND_C_UP_PLAYED +- CAM_SOUND_MARIO_ACTIVE +- CAM_SOUND_NORMAL_ACTIVE +- CAM_SOUND_UNUSED_SELECT_MARIO +- CAM_SOUND_UNUSED_SELECT_FIXED +- CAM_SOUND_FIXED_ACTIVE +- CAM_FLAG_SMOOTH_MOVEMENT +- CAM_FLAG_BLOCK_SMOOTH_MOVEMENT +- CAM_FLAG_FRAME_AFTER_CAM_INIT +- CAM_FLAG_CHANGED_PARTRACK_INDEX +- CAM_FLAG_CCM_SLIDE_SHORTCUT +- CAM_FLAG_CAM_NEAR_WALL +- CAM_FLAG_SLEEPING +- CAM_FLAG_UNUSED_7 +- CAM_FLAG_UNUSED_8 +- CAM_FLAG_COLLIDED_WITH_WALL +- CAM_FLAG_START_TRANSITION +- CAM_FLAG_TRANSITION_OUT_OF_C_UP +- CAM_FLAG_BLOCK_AREA_PROCESSING +- CAM_FLAG_UNUSED_13 +- CAM_FLAG_UNUSED_CUTSCENE_ACTIVE +- CAM_FLAG_BEHIND_MARIO_POST_DOOR +- CAM_STATUS_NONE +- CAM_STATUS_MARIO +- CAM_STATUS_LAKITU +- CAM_STATUS_FIXED +- CAM_STATUS_C_DOWN +- CAM_STATUS_C_UP +- CAM_STATUS_MODE_GROUP +- CAM_STATUS_C_MODE_GROUP +- SHAKE_ATTACK +- SHAKE_GROUND_POUND +- SHAKE_SMALL_DAMAGE +- SHAKE_MED_DAMAGE +- SHAKE_LARGE_DAMAGE +- SHAKE_HIT_FROM_BELOW +- SHAKE_FALL_DAMAGE +- SHAKE_SHOCK +- SHAKE_ENV_EXPLOSION +- SHAKE_ENV_BOWSER_THROW_BOUNCE +- SHAKE_ENV_BOWSER_JUMP +- SHAKE_ENV_UNUSED_5 +- SHAKE_ENV_UNUSED_6 +- SHAKE_ENV_UNUSED_7 +- SHAKE_ENV_PYRAMID_EXPLODE +- SHAKE_ENV_JRB_SHIP_DRAIN +- SHAKE_ENV_FALLING_BITS_PLAT +- SHAKE_FOV_SMALL +- SHAKE_FOV_UNUSED +- SHAKE_FOV_MEDIUM +- SHAKE_FOV_LARGE +- SHAKE_POS_SMALL +- SHAKE_POS_MEDIUM +- SHAKE_POS_LARGE +- SHAKE_POS_BOWLING_BALL +- CUTSCENE_DOOR_PULL +- CUTSCENE_DOOR_PUSH +- CUTSCENE_ENTER_CANNON +- CUTSCENE_ENTER_PAINTING +- CUTSCENE_DEATH_EXIT +- CUTSCENE_DOOR_WARP +- CUTSCENE_DOOR_PULL_MODE +- CUTSCENE_DOOR_PUSH_MODE +- CUTSCENE_INTRO_PEACH +- CUTSCENE_DANCE_ROTATE +- CUTSCENE_ENTER_BOWSER_ARENA +- CUTSCENE_0F_UNUSED +- CUTSCENE_UNUSED_EXIT +- CUTSCENE_SLIDING_DOORS_OPEN +- CUTSCENE_PREPARE_CANNON +- CUTSCENE_UNLOCK_KEY_DOOR +- CUTSCENE_STANDING_DEATH +- CUTSCENE_DEATH_ON_STOMACH +- CUTSCENE_DEATH_ON_BACK +- CUTSCENE_QUICKSAND_DEATH +- CUTSCENE_SUFFOCATION_DEATH +- CUTSCENE_EXIT_BOWSER_SUCC +- CUTSCENE_EXIT_BOWSER_DEATH +- CUTSCENE_WATER_DEATH +- CUTSCENE_EXIT_PAINTING_SUCC +- CUTSCENE_CAP_SWITCH_PRESS +- CUTSCENE_DIALOG +- CUTSCENE_RACE_DIALOG +- CUTSCENE_ENTER_PYRAMID_TOP +- CUTSCENE_DANCE_FLY_AWAY +- CUTSCENE_DANCE_CLOSEUP +- CUTSCENE_KEY_DANCE +- CUTSCENE_SSL_PYRAMID_EXPLODE +- CUTSCENE_EXIT_SPECIAL_SUCC +- CUTSCENE_NONPAINTING_DEATH +- CUTSCENE_READ_MESSAGE +- CUTSCENE_ENDING +- CUTSCENE_STAR_SPAWN +- CUTSCENE_GRAND_STAR +- CUTSCENE_DANCE_DEFAULT +- CUTSCENE_RED_COIN_STAR_SPAWN +- CUTSCENE_END_WAVING +- CUTSCENE_CREDITS +- CUTSCENE_EXIT_WATERFALL +- CUTSCENE_EXIT_FALL_WMOTR +- CUTSCENE_ENTER_POOL +- CUTSCENE_PALETTE_EDITOR +- CUTSCENE_STOP +- CUTSCENE_LOOP +- HAND_CAM_SHAKE_OFF +- HAND_CAM_SHAKE_CUTSCENE +- HAND_CAM_SHAKE_UNUSED +- HAND_CAM_SHAKE_HANG_OWL +- HAND_CAM_SHAKE_HIGH +- HAND_CAM_SHAKE_STAR_DANCE +- HAND_CAM_SHAKE_LOW +- DOOR_DEFAULT +- DOOR_LEAVING_SPECIAL +- DOOR_ENTER_LOBBY +- CAM_FOV_SET_45 +- CAM_FOV_DEFAULT +- CAM_FOV_APP_45 +- CAM_FOV_SET_30 +- CAM_FOV_APP_20 +- CAM_FOV_BBH +- CAM_FOV_APP_80 +- CAM_FOV_APP_30 +- CAM_FOV_APP_60 +- CAM_FOV_ZOOM_30 +- CAM_FOV_SET_29 +- CAM_EVENT_CANNON +- CAM_EVENT_SHOT_FROM_CANNON +- CAM_EVENT_UNUSED_3 +- CAM_EVENT_BOWSER_INIT +- CAM_EVENT_DOOR_WARP +- CAM_EVENT_DOOR +- CAM_EVENT_BOWSER_JUMP +- CAM_EVENT_BOWSER_THROW_BOUNCE +- CAM_EVENT_START_INTRO +- CAM_EVENT_START_GRAND_STAR +- CAM_EVENT_START_ENDING +- CAM_EVENT_START_END_WAVING +- CAM_EVENT_START_CREDITS + [:arrow_up_small:](#)
## [characters.h](#characters.h) +### [enum CharacterType](#CharacterType) +| Identifier | Value | +| :--------- | :---- | +| CT_MARIO | 0 | +| CT_LUIGI | 1 | +| CT_TOAD | 2 | +| CT_WALUIGI | 3 | +| CT_WARIO | 4 | +| CT_MAX | 5 | + ### [enum CharacterSound](#CharacterSound) | Identifier | Value | | :--------- | :---- | @@ -912,15 +923,19 @@ | CHAR_SOUND_OKEY_DOKEY | 43 | | CHAR_SOUND_MAX | 44 | -### [enum CharacterType](#CharacterType) -| Identifier | Value | -| :--------- | :---- | -| CT_MARIO | 0 | -| CT_LUIGI | 1 | -| CT_TOAD | 2 | -| CT_WALUIGI | 3 | -| CT_WARIO | 4 | -| CT_MAX | 5 | +[:arrow_up_small:](#) + +
+ +## [controller_mouse.h](#controller_mouse.h) +- MOUSE_BUTTON_1 +- MOUSE_BUTTON_2 +- MOUSE_BUTTON_3 +- MOUSE_BUTTON_4 +- MOUSE_BUTTON_5 +- L_MOUSE_BUTTON +- M_MOUSE_BUTTON +- R_MOUSE_BUTTON [:arrow_up_small:](#) @@ -1122,6 +1137,20 @@ ## [djui_hud_utils.h](#djui_hud_utils.h) +### [enum HudUtilsResolution](#HudUtilsResolution) +| Identifier | Value | +| :--------- | :---- | +| RESOLUTION_DJUI | 0 | +| RESOLUTION_N64 | 1 | +| RESOLUTION_COUNT | 2 | + +### [enum HudUtilsFilter](#HudUtilsFilter) +| Identifier | Value | +| :--------- | :---- | +| FILTER_NEAREST | 0 | +| FILTER_LINEAR | 1 | +| FILTER_COUNT | 2 | + ### [enum DjuiFontType](#DjuiFontType) | Identifier | Value | | :--------- | :---- | @@ -1134,20 +1163,6 @@ | FONT_SPECIAL | 6 | | FONT_COUNT | 7 | -### [enum HudUtilsFilter](#HudUtilsFilter) -| Identifier | Value | -| :--------- | :---- | -| FILTER_NEAREST | 0 | -| FILTER_LINEAR | 1 | -| FILTER_COUNT | 2 | - -### [enum HudUtilsResolution](#HudUtilsResolution) -| Identifier | Value | -| :--------- | :---- | -| RESOLUTION_DJUI | 0 | -| RESOLUTION_N64 | 1 | -| RESOLUTION_COUNT | 2 | - [:arrow_up_small:](#)
@@ -1167,26 +1182,24 @@
## [envfx_snow.h](#envfx_snow.h) -- ENVFX_BUBBLE_START -- ENVFX_FLOWERS -- ENVFX_JETSTREAM_BUBBLES -- ENVFX_LAVA_BUBBLES - ENVFX_MODE_NONE -- ENVFX_MODE_NO_OVERRIDE -- ENVFX_SNOW_BLIZZARD - ENVFX_SNOW_NORMAL - ENVFX_SNOW_WATER +- ENVFX_SNOW_BLIZZARD +- ENVFX_BUBBLE_START +- ENVFX_FLOWERS +- ENVFX_LAVA_BUBBLES - ENVFX_WHIRLPOOL_BUBBLES +- ENVFX_JETSTREAM_BUBBLES +- ENVFX_MODE_NO_OVERRIDE [:arrow_up_small:](#)
## [external.h](#external.h) -- DS_DIFF -- DS_DIFF -- SEQ_PLAYER_ENV - SEQ_PLAYER_LEVEL +- SEQ_PLAYER_ENV - SEQ_PLAYER_SFX ### [enum DialogSound](#DialogSound) @@ -1205,6 +1218,8 @@ | DS_YOSHI | 10 | | DS_MAX | 11 | | DS_NONE | 0xff | +- DS_DIFF +- DS_DIFF [:arrow_up_small:](#) @@ -1220,197 +1235,280 @@
## [gbi.h](#gbi.h) -- AA_EN -- ALPHA_CVG_SEL -- BOWTIE_VAL -- CLR_ON_CVG -- CVG_DST_CLAMP -- CVG_DST_FULL -- CVG_DST_SAVE -- CVG_DST_WRAP -- CVG_X_ALPHA -- FORCE_BL -- FR_NEG_FRUSTRATIO_1 -- FR_NEG_FRUSTRATIO_2 -- FR_NEG_FRUSTRATIO_3 -- FR_NEG_FRUSTRATIO_4 -- FR_NEG_FRUSTRATIO_5 -- FR_NEG_FRUSTRATIO_6 -- FR_POS_FRUSTRATIO_1 -- FR_POS_FRUSTRATIO_2 -- FR_POS_FRUSTRATIO_3 -- FR_POS_FRUSTRATIO_4 -- FR_POS_FRUSTRATIO_5 -- FR_POS_FRUSTRATIO_6 -- G_ACMUX_0 -- G_ACMUX_1 -- G_ACMUX_COMBINED -- G_ACMUX_ENVIRONMENT -- G_ACMUX_LOD_FRACTION -- G_ACMUX_PRIMITIVE -- G_ACMUX_PRIM_LOD_FRAC -- G_ACMUX_SHADE -- G_ACMUX_TEXEL0 -- G_ACMUX_TEXEL1 -- G_AC_DITHER -- G_AC_NONE -- G_AC_THRESHOLD -- G_AD_DISABLE -- G_AD_NOISE -- G_AD_NOTPATTERN -- G_AD_PATTERN -- G_BL_0 -- G_BL_1 -- G_BL_1MA -- G_BL_A_FOG -- G_BL_A_IN -- G_BL_A_MEM -- G_BL_A_SHADE -- G_BL_CLR_BL -- G_BL_CLR_FOG -- G_BL_CLR_IN -- G_BL_CLR_MEM +- G_COPYMEM +- G_NOOP +- G_RDPHALF_2 +- G_SETOTHERMODE_H +- G_SETOTHERMODE_L +- G_RDPHALF_1 +- G_SPNOOP +- G_ENDDL +- G_DL +- G_LOAD_UCODE +- G_MOVEMEM +- G_MOVEWORD +- G_MTX +- G_GEOMETRYMODE +- G_POPMTX +- G_TEXTURE +- G_DMA_IO +- G_SPECIAL_1 +- G_SPECIAL_2 +- G_SPECIAL_3 +- G_VTX +- G_MODIFYVTX +- G_CULLDL - G_BRANCH_Z -- G_CCMUX_0 -- G_CCMUX_1 -- G_CCMUX_CENTER +- G_TRI1 +- G_TRI2 +- G_QUAD +- G_LINE3D +- G_SPNOOP +- G_MTX +- G_RESERVED0 +- G_MOVEMEM +- G_VTX +- G_RESERVED1 +- G_DL +- G_RESERVED2 +- G_RESERVED3 +- G_SPRITE2D_BASE +- G_IMMFIRST +- G_TRI1 +- G_CULLDL +- G_POPMTX +- G_MOVEWORD +- G_TEXTURE +- G_SETOTHERMODE_H +- G_SETOTHERMODE_L +- G_ENDDL +- G_SETGEOMETRYMODE +- G_CLEARGEOMETRYMODE +- G_LINE3D +- G_RDPHALF_1 +- G_RDPHALF_2 +- G_SPRITE2D_SCALEFLIP +- G_SPRITE2D_DRAW +- G_NOOP +- G_SETCIMG +- G_SETZIMG +- G_SETTIMG +- G_SETCOMBINE +- G_SETENVCOLOR +- G_SETPRIMCOLOR +- G_SETBLENDCOLOR +- G_SETFOGCOLOR +- G_SETFILLCOLOR +- G_FILLRECT +- G_SETTILE +- G_LOADTILE +- G_LOADBLOCK +- G_SETTILESIZE +- G_LOADTLUT +- G_RDPSETOTHERMODE +- G_SETPRIMDEPTH +- G_SETSCISSOR +- G_SETCONVERT +- G_SETKEYR +- G_SETKEYGB +- G_RDPFULLSYNC +- G_RDPTILESYNC +- G_RDPPIPESYNC +- G_RDPLOADSYNC +- G_TEXRECTFLIP +- G_TEXRECT +- G_TRI_FILL +- G_TRI_SHADE +- G_TRI_TXTR +- G_TRI_SHADE_TXTR +- G_TRI_FILL_ZBUFF +- G_TRI_SHADE_ZBUFF +- G_TRI_TXTR_ZBUFF +- G_TRI_SHADE_TXTR_ZBUFF +- G_RDP_TRI_FILL_MASK +- G_RDP_TRI_SHADE_MASK +- G_RDP_TRI_TXTR_MASK +- G_RDP_TRI_ZBUFF_MASK +- BOWTIE_VAL +- G_RDP_ADDR_FIXUP +- G_DMACMDSIZ +- G_IMMCMDSIZ +- G_RDPCMDSIZ +- G_TEXTURE_IMAGE_FRAC +- G_TEXTURE_SCALE_FRAC +- G_SCALE_FRAC +- G_ROTATE_FRAC +- G_MAXFBZ +- G_ZBUFFER +- G_SHADE +- G_FOG +- G_LIGHTING +- G_TEXTURE_GEN +- G_TEXTURE_GEN_LINEAR +- G_LOD +- G_IM_FMT_RGBA +- G_IM_FMT_YUV +- G_IM_FMT_CI +- G_IM_FMT_IA +- G_IM_FMT_I +- G_IM_SIZ_4b +- G_IM_SIZ_8b +- G_IM_SIZ_16b +- G_IM_SIZ_32b +- G_IM_SIZ_DD +- G_IM_SIZ_4b_BYTES +- G_IM_SIZ_8b_BYTES +- G_IM_SIZ_16b_BYTES +- G_IM_SIZ_32b_BYTES +- G_IM_SIZ_32b_TILE_BYTES +- G_IM_SIZ_32b_LINE_BYTES +- G_IM_SIZ_4b_SHIFT +- G_IM_SIZ_8b_SHIFT +- G_IM_SIZ_16b_SHIFT +- G_IM_SIZ_32b_SHIFT +- G_IM_SIZ_4b_INCR +- G_IM_SIZ_8b_INCR +- G_IM_SIZ_16b_INCR +- G_IM_SIZ_32b_INCR - G_CCMUX_COMBINED -- G_CCMUX_COMBINED_ALPHA +- G_CCMUX_TEXEL0 +- G_CCMUX_TEXEL1 +- G_CCMUX_PRIMITIVE +- G_CCMUX_SHADE - G_CCMUX_ENVIRONMENT +- G_CCMUX_CENTER +- G_CCMUX_SCALE +- G_CCMUX_COMBINED_ALPHA +- G_CCMUX_TEXEL0_ALPHA +- G_CCMUX_TEXEL1_ALPHA +- G_CCMUX_PRIMITIVE_ALPHA +- G_CCMUX_SHADE_ALPHA - G_CCMUX_ENV_ALPHA +- G_CCMUX_LOD_FRACTION +- G_CCMUX_PRIM_LOD_FRAC +- G_CCMUX_NOISE - G_CCMUX_K4 - G_CCMUX_K5 -- G_CCMUX_LOD_FRACTION -- G_CCMUX_NOISE -- G_CCMUX_PRIMITIVE -- G_CCMUX_PRIMITIVE_ALPHA -- G_CCMUX_PRIM_LOD_FRAC -- G_CCMUX_SCALE -- G_CCMUX_SHADE -- G_CCMUX_SHADE_ALPHA -- G_CCMUX_TEXEL0 -- G_CCMUX_TEXEL0_ALPHA -- G_CCMUX_TEXEL1 -- G_CCMUX_TEXEL1_ALPHA -- G_CD_BAYER -- G_CD_DISABLE -- G_CD_DISABLE -- G_CD_ENABLE -- G_CD_ENABLE -- G_CD_MAGICSQ -- G_CD_NOISE -- G_CK_KEY +- G_CCMUX_1 +- G_CCMUX_0 +- G_ACMUX_COMBINED +- G_ACMUX_TEXEL0 +- G_ACMUX_TEXEL1 +- G_ACMUX_PRIMITIVE +- G_ACMUX_SHADE +- G_ACMUX_ENVIRONMENT +- G_ACMUX_LOD_FRACTION +- G_ACMUX_PRIM_LOD_FRAC +- G_ACMUX_1 +- G_ACMUX_0 +- G_MDSFT_ALPHACOMPARE +- G_MDSFT_ZSRCSEL +- G_MDSFT_RENDERMODE +- G_MDSFT_BLENDER +- G_MDSFT_BLENDMASK +- G_MDSFT_ALPHADITHER +- G_MDSFT_RGBDITHER +- G_MDSFT_COMBKEY +- G_MDSFT_TEXTCONV +- G_MDSFT_TEXTFILT +- G_MDSFT_TEXTLUT +- G_MDSFT_TEXTLOD +- G_MDSFT_TEXTDETAIL +- G_MDSFT_TEXTPERSP +- G_MDSFT_CYCLETYPE +- G_MDSFT_COLORDITHER +- G_MDSFT_PIPELINE +- G_PM_1PRIMITIVE +- G_PM_NPRIMITIVE +- G_CYC_1CYCLE +- G_CYC_2CYCLE +- G_CYC_COPY +- G_CYC_FILL +- G_TP_NONE +- G_TP_PERSP +- G_TD_CLAMP +- G_TD_SHARPEN +- G_TD_DETAIL +- G_TL_TILE +- G_TL_LOD +- G_TT_NONE +- G_TT_RGBA16 +- G_TT_IA16 +- G_TF_POINT +- G_TF_AVERAGE +- G_TF_BILERP +- G_TC_CONV +- G_TC_FILTCONV +- G_TC_FILT - G_CK_NONE -- G_CLEARGEOMETRYMODE -- G_COPYMEM -- G_CULLDL -- G_CULLDL +- G_CK_KEY +- G_CD_MAGICSQ +- G_CD_BAYER +- G_CD_NOISE +- G_CD_DISABLE +- G_CD_ENABLE +- G_CD_ENABLE +- G_CD_DISABLE +- G_AD_PATTERN +- G_AD_NOTPATTERN +- G_AD_NOISE +- G_AD_DISABLE +- G_AC_NONE +- G_AC_THRESHOLD +- G_AC_DITHER +- G_ZS_PIXEL +- G_ZS_PRIM +- AA_EN +- Z_CMP +- Z_UPD +- IM_RD +- CLR_ON_CVG +- CVG_DST_CLAMP +- CVG_DST_WRAP +- CVG_DST_FULL +- CVG_DST_SAVE +- ZMODE_OPA +- ZMODE_INTER +- ZMODE_XLU +- ZMODE_DEC +- CVG_X_ALPHA +- ALPHA_CVG_SEL +- FORCE_BL +- TEX_EDGE +- G_BL_CLR_IN +- G_BL_CLR_MEM +- G_BL_CLR_BL +- G_BL_CLR_FOG +- G_BL_1MA +- G_BL_A_MEM +- G_BL_A_IN +- G_BL_A_FOG +- G_BL_A_SHADE +- G_BL_1 +- G_BL_0 - G_CV_K0 - G_CV_K1 - G_CV_K2 - G_CV_K3 - G_CV_K4 - G_CV_K5 -- G_CYC_1CYCLE -- G_CYC_2CYCLE -- G_CYC_COPY -- G_CYC_FILL -- G_DL -- G_DL -- G_DL_NOPUSH +- G_SC_NON_INTERLACE +- G_SC_ODD_INTERLACE +- G_SC_EVEN_INTERLACE - G_DL_PUSH -- G_DMACMDSIZ -- G_DMA_IO -- G_ENDDL -- G_ENDDL -- G_FILLRECT -- G_FOG -- G_GEOMETRYMODE -- G_IMMCMDSIZ -- G_IMMFIRST -- G_IM_FMT_CI -- G_IM_FMT_I -- G_IM_FMT_IA -- G_IM_FMT_RGBA -- G_IM_FMT_YUV -- G_IM_SIZ_16b -- G_IM_SIZ_16b_BYTES -- G_IM_SIZ_16b_INCR -- G_IM_SIZ_16b_SHIFT -- G_IM_SIZ_32b -- G_IM_SIZ_32b_BYTES -- G_IM_SIZ_32b_INCR -- G_IM_SIZ_32b_LINE_BYTES -- G_IM_SIZ_32b_SHIFT -- G_IM_SIZ_32b_TILE_BYTES -- G_IM_SIZ_4b -- G_IM_SIZ_4b_BYTES -- G_IM_SIZ_4b_INCR -- G_IM_SIZ_4b_SHIFT -- G_IM_SIZ_8b -- G_IM_SIZ_8b_BYTES -- G_IM_SIZ_8b_INCR -- G_IM_SIZ_8b_SHIFT -- G_IM_SIZ_DD -- G_LIGHTING -- G_LINE3D -- G_LINE3D -- G_LOADBLOCK -- G_LOADTILE -- G_LOADTLUT -- G_LOAD_UCODE -- G_LOD -- G_MAXFBZ -- G_MDSFT_ALPHACOMPARE -- G_MDSFT_ALPHADITHER -- G_MDSFT_BLENDER -- G_MDSFT_BLENDMASK -- G_MDSFT_COLORDITHER -- G_MDSFT_COMBKEY -- G_MDSFT_CYCLETYPE -- G_MDSFT_PIPELINE -- G_MDSFT_RENDERMODE -- G_MDSFT_RGBDITHER -- G_MDSFT_TEXTCONV -- G_MDSFT_TEXTDETAIL -- G_MDSFT_TEXTFILT -- G_MDSFT_TEXTLOD -- G_MDSFT_TEXTLUT -- G_MDSFT_TEXTPERSP -- G_MDSFT_ZSRCSEL -- G_MODIFYVTX -- G_MOVEMEM -- G_MOVEMEM -- G_MOVEWORD -- G_MOVEWORD -- G_MTX -- G_MTX +- G_DL_NOPUSH +- G_MW_MATRIX +- G_MW_NUMLIGHT +- G_MW_CLIP +- G_MW_SEGMENT +- G_MW_FOG +- G_MW_LIGHTCOL +- G_MW_PERSPNORM +- G_MWO_NUMLIGHT - G_MWO_CLIP_RNX - G_MWO_CLIP_RNY - G_MWO_CLIP_RPX - G_MWO_CLIP_RPY -- G_MWO_FOG -- G_MWO_MATRIX_WX_WY_F -- G_MWO_MATRIX_WX_WY_I -- G_MWO_MATRIX_WZ_WW_F -- G_MWO_MATRIX_WZ_WW_I -- G_MWO_MATRIX_XX_XY_F -- G_MWO_MATRIX_XX_XY_I -- G_MWO_MATRIX_XZ_XW_F -- G_MWO_MATRIX_XZ_XW_I -- G_MWO_MATRIX_YX_YY_F -- G_MWO_MATRIX_YX_YY_I -- G_MWO_MATRIX_YZ_YW_F -- G_MWO_MATRIX_YZ_YW_I -- G_MWO_MATRIX_ZX_ZY_F -- G_MWO_MATRIX_ZX_ZY_I -- G_MWO_MATRIX_ZZ_ZW_F -- G_MWO_MATRIX_ZZ_ZW_I -- G_MWO_NUMLIGHT -- G_MWO_POINT_RGBA -- G_MWO_POINT_ST -- G_MWO_POINT_XYSCREEN -- G_MWO_POINT_ZSCREEN - G_MWO_SEGMENT_0 - G_MWO_SEGMENT_1 - G_MWO_SEGMENT_2 @@ -1427,164 +1525,69 @@ - G_MWO_SEGMENT_D - G_MWO_SEGMENT_E - G_MWO_SEGMENT_F +- G_MWO_FOG - G_MWO_aLIGHT_1 -- G_MWO_aLIGHT_2 -- G_MWO_aLIGHT_2 -- G_MWO_aLIGHT_3 -- G_MWO_aLIGHT_3 -- G_MWO_aLIGHT_4 -- G_MWO_aLIGHT_4 -- G_MWO_aLIGHT_5 -- G_MWO_aLIGHT_5 -- G_MWO_aLIGHT_6 -- G_MWO_aLIGHT_6 -- G_MWO_aLIGHT_7 -- G_MWO_aLIGHT_7 -- G_MWO_aLIGHT_8 -- G_MWO_aLIGHT_8 - G_MWO_bLIGHT_1 +- G_MWO_aLIGHT_2 - G_MWO_bLIGHT_2 +- G_MWO_aLIGHT_3 +- G_MWO_bLIGHT_3 +- G_MWO_aLIGHT_4 +- G_MWO_bLIGHT_4 +- G_MWO_aLIGHT_5 +- G_MWO_bLIGHT_5 +- G_MWO_aLIGHT_6 +- G_MWO_bLIGHT_6 +- G_MWO_aLIGHT_7 +- G_MWO_bLIGHT_7 +- G_MWO_aLIGHT_8 +- G_MWO_bLIGHT_8 +- G_MWO_aLIGHT_2 - G_MWO_bLIGHT_2 +- G_MWO_aLIGHT_3 - G_MWO_bLIGHT_3 -- G_MWO_bLIGHT_3 -- G_MWO_bLIGHT_4 +- G_MWO_aLIGHT_4 - G_MWO_bLIGHT_4 +- G_MWO_aLIGHT_5 - G_MWO_bLIGHT_5 -- G_MWO_bLIGHT_5 -- G_MWO_bLIGHT_6 +- G_MWO_aLIGHT_6 - G_MWO_bLIGHT_6 +- G_MWO_aLIGHT_7 - G_MWO_bLIGHT_7 -- G_MWO_bLIGHT_7 +- G_MWO_aLIGHT_8 - G_MWO_bLIGHT_8 -- G_MWO_bLIGHT_8 -- G_MW_CLIP -- G_MW_FOG -- G_MW_LIGHTCOL -- G_MW_MATRIX -- G_MW_NUMLIGHT -- G_MW_PERSPNORM -- G_MW_SEGMENT -- G_NOOP -- G_NOOP -- G_PM_1PRIMITIVE -- G_PM_NPRIMITIVE -- G_POPMTX -- G_POPMTX -- G_QUAD -- G_RDPCMDSIZ -- G_RDPFULLSYNC -- G_RDPHALF_1 -- G_RDPHALF_1 -- G_RDPHALF_2 -- G_RDPHALF_2 -- G_RDPLOADSYNC -- G_RDPPIPESYNC -- G_RDPSETOTHERMODE -- G_RDPTILESYNC -- G_RDP_ADDR_FIXUP -- G_RDP_TRI_FILL_MASK -- G_RDP_TRI_SHADE_MASK -- G_RDP_TRI_TXTR_MASK -- G_RDP_TRI_ZBUFF_MASK -- G_RESERVED0 -- G_RESERVED1 -- G_RESERVED2 -- G_RESERVED3 -- G_ROTATE_FRAC -- G_SCALE_FRAC -- G_SC_EVEN_INTERLACE -- G_SC_NON_INTERLACE -- G_SC_ODD_INTERLACE -- G_SETBLENDCOLOR -- G_SETCIMG -- G_SETCOMBINE -- G_SETCONVERT -- G_SETENVCOLOR -- G_SETFILLCOLOR -- G_SETFOGCOLOR -- G_SETGEOMETRYMODE -- G_SETKEYGB -- G_SETKEYR -- G_SETOTHERMODE_H -- G_SETOTHERMODE_H -- G_SETOTHERMODE_L -- G_SETOTHERMODE_L -- G_SETPRIMCOLOR -- G_SETPRIMDEPTH -- G_SETSCISSOR -- G_SETTILE -- G_SETTILESIZE -- G_SETTIMG -- G_SETZIMG -- G_SHADE -- G_SPECIAL_1 -- G_SPECIAL_2 -- G_SPECIAL_3 -- G_SPNOOP -- G_SPNOOP -- G_SPRITE2D_BASE -- G_SPRITE2D_DRAW -- G_SPRITE2D_SCALEFLIP -- G_TC_CONV -- G_TC_FILT -- G_TC_FILTCONV -- G_TD_CLAMP -- G_TD_DETAIL -- G_TD_SHARPEN -- G_TEXRECT -- G_TEXRECTFLIP -- G_TEXTURE -- G_TEXTURE -- G_TEXTURE_GEN -- G_TEXTURE_GEN_LINEAR -- G_TEXTURE_IMAGE_FRAC -- G_TEXTURE_SCALE_FRAC -- G_TF_AVERAGE -- G_TF_BILERP -- G_TF_POINT -- G_TL_LOD -- G_TL_TILE -- G_TP_NONE -- G_TP_PERSP -- G_TRI1 -- G_TRI1 -- G_TRI2 -- G_TRI_FILL -- G_TRI_FILL_ZBUFF -- G_TRI_SHADE -- G_TRI_SHADE_TXTR -- G_TRI_SHADE_TXTR_ZBUFF -- G_TRI_SHADE_ZBUFF -- G_TRI_TXTR -- G_TRI_TXTR_ZBUFF -- G_TT_IA16 -- G_TT_NONE -- G_TT_RGBA16 -- G_TX_CLAMP -- G_TX_DXT_FRAC -- G_TX_LDBLK_MAX_TXL -- G_TX_LDBLK_MAX_TXL -- G_TX_LOADTILE -- G_TX_MIRROR -- G_TX_NOLOD -- G_TX_NOMASK -- G_TX_NOMIRROR -- G_TX_RENDERTILE -- G_TX_WRAP -- G_VTX -- G_VTX -- G_ZBUFFER -- G_ZS_PIXEL -- G_ZS_PRIM -- IM_RD -- LIGHT_1 -- LIGHT_2 -- LIGHT_3 -- LIGHT_4 -- LIGHT_5 -- LIGHT_6 -- LIGHT_7 -- LIGHT_8 +- G_MWO_MATRIX_XX_XY_I +- G_MWO_MATRIX_XZ_XW_I +- G_MWO_MATRIX_YX_YY_I +- G_MWO_MATRIX_YZ_YW_I +- G_MWO_MATRIX_ZX_ZY_I +- G_MWO_MATRIX_ZZ_ZW_I +- G_MWO_MATRIX_WX_WY_I +- G_MWO_MATRIX_WZ_WW_I +- G_MWO_MATRIX_XX_XY_F +- G_MWO_MATRIX_XZ_XW_F +- G_MWO_MATRIX_YX_YY_F +- G_MWO_MATRIX_YZ_YW_F +- G_MWO_MATRIX_ZX_ZY_F +- G_MWO_MATRIX_ZZ_ZW_F +- G_MWO_MATRIX_WX_WY_F +- G_MWO_MATRIX_WZ_WW_F +- G_MWO_POINT_RGBA +- G_MWO_POINT_ST +- G_MWO_POINT_XYSCREEN +- G_MWO_POINT_ZSCREEN +- FR_NEG_FRUSTRATIO_1 +- FR_POS_FRUSTRATIO_1 +- FR_NEG_FRUSTRATIO_2 +- FR_POS_FRUSTRATIO_2 +- FR_NEG_FRUSTRATIO_3 +- FR_POS_FRUSTRATIO_3 +- FR_NEG_FRUSTRATIO_4 +- FR_POS_FRUSTRATIO_4 +- FR_NEG_FRUSTRATIO_5 +- FR_POS_FRUSTRATIO_5 +- FR_NEG_FRUSTRATIO_6 +- FR_POS_FRUSTRATIO_6 - NUMLIGHTS_0 - NUMLIGHTS_1 - NUMLIGHTS_2 @@ -1593,76 +1596,88 @@ - NUMLIGHTS_5 - NUMLIGHTS_6 - NUMLIGHTS_7 -- TEX_EDGE -- ZMODE_DEC -- ZMODE_INTER -- ZMODE_OPA -- ZMODE_XLU -- Z_CMP -- Z_UPD +- LIGHT_1 +- LIGHT_2 +- LIGHT_3 +- LIGHT_4 +- LIGHT_5 +- LIGHT_6 +- LIGHT_7 +- LIGHT_8 +- G_TX_LOADTILE +- G_TX_RENDERTILE +- G_TX_NOMIRROR +- G_TX_WRAP +- G_TX_MIRROR +- G_TX_CLAMP +- G_TX_NOMASK +- G_TX_NOLOD +- G_TX_DXT_FRAC +- G_TX_LDBLK_MAX_TXL +- G_TX_LDBLK_MAX_TXL [:arrow_up_small:](#)
## [geo_commands.h](#geo_commands.h) -- BACKGROUND_ABOVE_CLOUDS -- BACKGROUND_BELOW_CLOUDS -- BACKGROUND_CUSTOM -- BACKGROUND_DESERT -- BACKGROUND_FLAMING_SKY -- BACKGROUND_GREEN_SKY -- BACKGROUND_HAUNTED - BACKGROUND_OCEAN_SKY -- BACKGROUND_PURPLE_SKY -- BACKGROUND_SNOW_MOUNTAINS +- BACKGROUND_FLAMING_SKY - BACKGROUND_UNDERWATER_CITY +- BACKGROUND_BELOW_CLOUDS +- BACKGROUND_SNOW_MOUNTAINS +- BACKGROUND_DESERT +- BACKGROUND_HAUNTED +- BACKGROUND_GREEN_SKY +- BACKGROUND_ABOVE_CLOUDS +- BACKGROUND_PURPLE_SKY +- BACKGROUND_CUSTOM [:arrow_up_small:](#)
## [graph_node.h](#graph_node.h) -- GEO_CONTEXT_AREA_INIT -- GEO_CONTEXT_AREA_LOAD -- GEO_CONTEXT_AREA_UNLOAD -- GEO_CONTEXT_CREATE -- GEO_CONTEXT_HELD_OBJ -- GEO_CONTEXT_RENDER -- GFX_NUM_MASTER_LISTS +- GRAPH_RENDER_ACTIVE +- GRAPH_RENDER_CHILDREN_FIRST +- GRAPH_RENDER_BILLBOARD +- GRAPH_RENDER_Z_BUFFER +- GRAPH_RENDER_INVISIBLE +- GRAPH_RENDER_HAS_ANIMATION +- GRAPH_RENDER_CYLBOARD +- GRAPH_RENDER_PLAYER - GRAPH_EXTRA_FORCE_3D -- GRAPH_NODE_TYPE_400 -- GRAPH_NODE_TYPE_ANIMATED_PART -- GRAPH_NODE_TYPE_BACKGROUND -- GRAPH_NODE_TYPE_BILLBOARD -- GRAPH_NODE_TYPE_CAMERA -- GRAPH_NODE_TYPE_CULLING_RADIUS -- GRAPH_NODE_TYPE_DISPLAY_LIST - GRAPH_NODE_TYPE_FUNCTIONAL -- GRAPH_NODE_TYPE_GENERATED_LIST -- GRAPH_NODE_TYPE_HELD_OBJ -- GRAPH_NODE_TYPE_LEVEL_OF_DETAIL -- GRAPH_NODE_TYPE_MASTER_LIST -- GRAPH_NODE_TYPE_OBJECT -- GRAPH_NODE_TYPE_OBJECT_PARENT +- GRAPH_NODE_TYPE_400 +- GRAPH_NODE_TYPE_ROOT - GRAPH_NODE_TYPE_ORTHO_PROJECTION - GRAPH_NODE_TYPE_PERSPECTIVE -- GRAPH_NODE_TYPE_ROOT +- GRAPH_NODE_TYPE_MASTER_LIST +- GRAPH_NODE_TYPE_START +- GRAPH_NODE_TYPE_LEVEL_OF_DETAIL +- GRAPH_NODE_TYPE_SWITCH_CASE +- GRAPH_NODE_TYPE_CAMERA +- GRAPH_NODE_TYPE_TRANSLATION_ROTATION +- GRAPH_NODE_TYPE_TRANSLATION - GRAPH_NODE_TYPE_ROTATION +- GRAPH_NODE_TYPE_OBJECT +- GRAPH_NODE_TYPE_ANIMATED_PART +- GRAPH_NODE_TYPE_BILLBOARD +- GRAPH_NODE_TYPE_DISPLAY_LIST - GRAPH_NODE_TYPE_SCALE - GRAPH_NODE_TYPE_SHADOW -- GRAPH_NODE_TYPE_START -- GRAPH_NODE_TYPE_SWITCH_CASE -- GRAPH_NODE_TYPE_TRANSLATION -- GRAPH_NODE_TYPE_TRANSLATION_ROTATION -- GRAPH_RENDER_ACTIVE -- GRAPH_RENDER_BILLBOARD -- GRAPH_RENDER_CHILDREN_FIRST -- GRAPH_RENDER_CYLBOARD -- GRAPH_RENDER_HAS_ANIMATION -- GRAPH_RENDER_INVISIBLE -- GRAPH_RENDER_PLAYER -- GRAPH_RENDER_Z_BUFFER +- GRAPH_NODE_TYPE_OBJECT_PARENT +- GRAPH_NODE_TYPE_GENERATED_LIST +- GRAPH_NODE_TYPE_BACKGROUND +- GRAPH_NODE_TYPE_HELD_OBJ +- GRAPH_NODE_TYPE_CULLING_RADIUS +- GFX_NUM_MASTER_LISTS +- GEO_CONTEXT_CREATE +- GEO_CONTEXT_RENDER +- GEO_CONTEXT_AREA_UNLOAD +- GEO_CONTEXT_AREA_LOAD +- GEO_CONTEXT_AREA_INIT +- GEO_CONTEXT_HELD_OBJ [:arrow_up_small:](#) @@ -1675,67 +1690,7 @@
## [interaction.h](#interaction.h) -- ATTACK_FAST_ATTACK -- ATTACK_FROM_ABOVE -- ATTACK_FROM_BELOW -- ATTACK_GROUND_POUND_OR_TWIRL -- ATTACK_KICK_OR_TRIP -- ATTACK_PUNCH - INTERACT_UNKNOWN_08 -- INT_ANY_ATTACK -- INT_ATTACK_NOT_FROM_BELOW -- INT_ATTACK_NOT_WEAK_FROM_ABOVE -- INT_ATTACK_SLIDE -- INT_STATUS_ATTACKED_MARIO -- INT_STATUS_ATTACK_MASK -- INT_STATUS_GRABBED_MARIO -- INT_STATUS_HIT_BY_SHOCKWAVE -- INT_STATUS_HIT_MINE -- INT_STATUS_HOOT_GRABBED_BY_MARIO -- INT_STATUS_INTERACTED -- INT_STATUS_MARIO_DROP_OBJECT -- INT_STATUS_MARIO_UNK1 -- INT_STATUS_MARIO_UNK2 -- INT_STATUS_MARIO_UNK5 -- INT_STATUS_MARIO_UNK6 -- INT_STATUS_MARIO_UNK7 -- INT_STATUS_STOP_RIDING -- INT_STATUS_TOUCHED_BOB_OMB -- INT_STATUS_TRAP_TURN -- INT_STATUS_WAS_ATTACKED -- INT_SUBTYPE_BIG_KNOCKBACK -- INT_SUBTYPE_DELAY_INVINCIBILITY -- INT_SUBTYPE_DROP_IMMEDIATELY -- INT_SUBTYPE_EATS_MARIO -- INT_SUBTYPE_FADING_WARP -- INT_SUBTYPE_GRABS_MARIO -- INT_SUBTYPE_GRAND_STAR -- INT_SUBTYPE_HOLDABLE_NPC -- INT_SUBTYPE_KICKABLE -- INT_SUBTYPE_NOT_GRABBABLE -- INT_SUBTYPE_NO_EXIT -- INT_SUBTYPE_NPC -- INT_SUBTYPE_SIGN -- INT_SUBTYPE_STAR_DOOR -- INT_SUBTYPE_TWIRL_BOUNCE -- PVP_ATTACK_KNOCKBACK_TIMER_DEFAULT -- PVP_ATTACK_KNOCKBACK_TIMER_OVERRIDE -- PVP_ATTACK_OVERRIDE_VANILLA_INVINCIBILITY - -### [enum InteractionFlag](#InteractionFlag) -| Identifier | Value | -| :--------- | :---- | -| INT_GROUND_POUND | (1 << 0) | -| INT_PUNCH | (1 << 1) | -| INT_KICK | (1 << 2) | -| INT_TRIP | (1 << 3) | -| INT_SLIDE_KICK | (1 << 4) | -| INT_FAST_ATTACK_OR_SHELL | (1 << 5) | -| INT_HIT_FROM_ABOVE | (1 << 6) | -| INT_HIT_FROM_BELOW | (1 << 7) | -| INT_TWIRL | (1 << 8) | -| INT_GROUND_POUND_OR_TWIRL | (INT_GROUND_POUND | INT_TWIRL) | -| INT_LUA | (1 << 31) | ### [enum InteractionType](#InteractionType) | Identifier | Value | @@ -1773,6 +1728,66 @@ | INTERACT_IGLOO_BARRIER | (1 << 30) | | INTERACT_PLAYER | (1 << 31) | +### [enum InteractionFlag](#InteractionFlag) +| Identifier | Value | +| :--------- | :---- | +| INT_GROUND_POUND | (1 << 0) | +| INT_PUNCH | (1 << 1) | +| INT_KICK | (1 << 2) | +| INT_TRIP | (1 << 3) | +| INT_SLIDE_KICK | (1 << 4) | +| INT_FAST_ATTACK_OR_SHELL | (1 << 5) | +| INT_HIT_FROM_ABOVE | (1 << 6) | +| INT_HIT_FROM_BELOW | (1 << 7) | +| INT_TWIRL | (1 << 8) | +| INT_GROUND_POUND_OR_TWIRL | (INT_GROUND_POUND | INT_TWIRL) | +| INT_LUA | (1 << 31) | +- INT_ATTACK_NOT_FROM_BELOW +- INT_ANY_ATTACK +- INT_ATTACK_NOT_WEAK_FROM_ABOVE +- INT_ATTACK_SLIDE +- INT_SUBTYPE_FADING_WARP +- INT_SUBTYPE_DELAY_INVINCIBILITY +- INT_SUBTYPE_BIG_KNOCKBACK +- INT_SUBTYPE_GRABS_MARIO +- INT_SUBTYPE_HOLDABLE_NPC +- INT_SUBTYPE_DROP_IMMEDIATELY +- INT_SUBTYPE_KICKABLE +- INT_SUBTYPE_NOT_GRABBABLE +- INT_SUBTYPE_STAR_DOOR +- INT_SUBTYPE_TWIRL_BOUNCE +- INT_SUBTYPE_NO_EXIT +- INT_SUBTYPE_GRAND_STAR +- INT_SUBTYPE_SIGN +- INT_SUBTYPE_NPC +- INT_SUBTYPE_EATS_MARIO +- ATTACK_PUNCH +- ATTACK_KICK_OR_TRIP +- ATTACK_FROM_ABOVE +- ATTACK_GROUND_POUND_OR_TWIRL +- ATTACK_FAST_ATTACK +- ATTACK_FROM_BELOW +- PVP_ATTACK_KNOCKBACK_TIMER_DEFAULT +- PVP_ATTACK_KNOCKBACK_TIMER_OVERRIDE +- PVP_ATTACK_OVERRIDE_VANILLA_INVINCIBILITY +- INT_STATUS_ATTACK_MASK +- INT_STATUS_HOOT_GRABBED_BY_MARIO +- INT_STATUS_MARIO_UNK1 +- INT_STATUS_MARIO_UNK2 +- INT_STATUS_MARIO_DROP_OBJECT +- INT_STATUS_HIT_BY_SHOCKWAVE +- INT_STATUS_MARIO_UNK5 +- INT_STATUS_MARIO_UNK6 +- INT_STATUS_MARIO_UNK7 +- INT_STATUS_GRABBED_MARIO +- INT_STATUS_ATTACKED_MARIO +- INT_STATUS_WAS_ATTACKED +- INT_STATUS_INTERACTED +- INT_STATUS_TRAP_TURN +- INT_STATUS_HIT_MINE +- INT_STATUS_STOP_RIDING +- INT_STATUS_TOUCHED_BOB_OMB + [:arrow_up_small:](#)
@@ -1843,68 +1858,33 @@
## [level_update.h](#level_update.h) -- MARIO_SPAWN_UNKNOWN_02 -- MARIO_SPAWN_UNKNOWN_03 -- MARIO_SPAWN_UNKNOWN_27 -- PAINTING_WARP_INDEX_END -- PAINTING_WARP_INDEX_FA -- PAINTING_WARP_INDEX_START -- PRESS_START_DEMO_TIMER -- SPECIAL_WARP_CAKE -- SPECIAL_WARP_GODDARD -- SPECIAL_WARP_GODDARD_GAMEOVER -- SPECIAL_WARP_LEVEL_SELECT -- SPECIAL_WARP_TITLE -- TIMER_CONTROL_HIDE - TIMER_CONTROL_SHOW - TIMER_CONTROL_START - TIMER_CONTROL_STOP -- WARP_NODE_CREDITS_END -- WARP_NODE_CREDITS_MIN -- WARP_NODE_CREDITS_NEXT -- WARP_NODE_CREDITS_START -- WARP_NODE_DEATH -- WARP_NODE_F0 -- WARP_NODE_F2 -- WARP_NODE_WARP_FLOOR -- WARP_OP_CREDITS_END -- WARP_OP_CREDITS_NEXT -- WARP_OP_CREDITS_START -- WARP_OP_DEATH -- WARP_OP_DEMO_END -- WARP_OP_DEMO_NEXT -- WARP_OP_EXIT -- WARP_OP_FORCE_SYNC -- WARP_OP_GAME_OVER -- WARP_OP_LOOK_UP +- TIMER_CONTROL_HIDE - WARP_OP_NONE +- WARP_OP_LOOK_UP - WARP_OP_SPIN_SHRINK -- WARP_OP_STAR_EXIT -- WARP_OP_TELEPORT -- WARP_OP_TRIGGERS_LEVEL_SELECT - WARP_OP_WARP_DOOR -- WARP_OP_WARP_FLOOR - WARP_OP_WARP_OBJECT -- WARP_TYPE_CHANGE_AREA -- WARP_TYPE_CHANGE_LEVEL -- WARP_TYPE_NOT_WARPING -- WARP_TYPE_SAME_AREA - -### [enum HUDDisplayFlag](#HUDDisplayFlag) -| Identifier | Value | -| :--------- | :---- | -| HUD_DISPLAY_FLAG_LIVES | 0x0001 | -| HUD_DISPLAY_FLAG_COIN_COUNT | 0x0002 | -| HUD_DISPLAY_FLAG_STAR_COUNT | 0x0004 | -| HUD_DISPLAY_FLAG_CAMERA_AND_POWER | 0x0008 | -| HUD_DISPLAY_FLAG_KEYS | 0x0010 | -| HUD_DISPLAY_FLAG_UNKNOWN_0020 | 0x0020 | -| HUD_DISPLAY_FLAG_TIMER | 0x0040 | -| HUD_DISPLAY_FLAG_CAMERA | 0x0080 | -| HUD_DISPLAY_FLAG_POWER | 0x0100 | -| HUD_DISPLAY_FLAG_EMPHASIZE_POWER | 0x8000 | -| HUD_DISPLAY_NONE | 0x0000 | -| HUD_DISPLAY_DEFAULT | HUD_DISPLAY_FLAG_LIVES | HUD_DISPLAY_FLAG_COIN_COUNT | HUD_DISPLAY_FLAG_STAR_COUNT | HUD_DISPLAY_FLAG_CAMERA_AND_POWER | HUD_DISPLAY_FLAG_CAMERA | HUD_DISPLAY_FLAG_POWER | HUD_DISPLAY_FLAG_KEYS | HUD_DISPLAY_FLAG_UNKNOWN_0020 | +- WARP_OP_TELEPORT +- WARP_OP_STAR_EXIT +- WARP_OP_DEATH +- WARP_OP_WARP_FLOOR +- WARP_OP_GAME_OVER +- WARP_OP_CREDITS_END +- WARP_OP_DEMO_NEXT +- WARP_OP_CREDITS_START +- WARP_OP_CREDITS_NEXT +- WARP_OP_DEMO_END +- WARP_OP_FORCE_SYNC +- WARP_OP_EXIT +- WARP_OP_TRIGGERS_LEVEL_SELECT +- SPECIAL_WARP_CAKE +- SPECIAL_WARP_GODDARD +- SPECIAL_WARP_GODDARD_GAMEOVER +- SPECIAL_WARP_TITLE +- SPECIAL_WARP_LEVEL_SELECT ### [enum MarioSpawnType](#MarioSpawnType) | Identifier | Value | @@ -1930,6 +1910,41 @@ | MARIO_SPAWN_LAUNCH_DEATH | ((MARIO_SPAWN_PAINTING_STAR_COLLECT ) + 5) | | MARIO_SPAWN_UNUSED_38 | ((MARIO_SPAWN_PAINTING_STAR_COLLECT ) + 6) | | MARIO_SPAWN_FADE_FROM_BLACK | ((MARIO_SPAWN_PAINTING_STAR_COLLECT ) + 7) | +- MARIO_SPAWN_UNKNOWN_02 +- MARIO_SPAWN_UNKNOWN_03 +- MARIO_SPAWN_UNKNOWN_27 +- WARP_NODE_F0 +- WARP_NODE_DEATH +- WARP_NODE_F2 +- WARP_NODE_WARP_FLOOR +- WARP_NODE_CREDITS_START +- WARP_NODE_CREDITS_NEXT +- WARP_NODE_CREDITS_END +- WARP_NODE_CREDITS_MIN +- WARP_TYPE_NOT_WARPING +- WARP_TYPE_CHANGE_LEVEL +- WARP_TYPE_CHANGE_AREA +- WARP_TYPE_SAME_AREA +- PRESS_START_DEMO_TIMER +- PAINTING_WARP_INDEX_START +- PAINTING_WARP_INDEX_FA +- PAINTING_WARP_INDEX_END + +### [enum HUDDisplayFlag](#HUDDisplayFlag) +| Identifier | Value | +| :--------- | :---- | +| HUD_DISPLAY_FLAG_LIVES | 0x0001 | +| HUD_DISPLAY_FLAG_COIN_COUNT | 0x0002 | +| HUD_DISPLAY_FLAG_STAR_COUNT | 0x0004 | +| HUD_DISPLAY_FLAG_CAMERA_AND_POWER | 0x0008 | +| HUD_DISPLAY_FLAG_KEYS | 0x0010 | +| HUD_DISPLAY_FLAG_UNKNOWN_0020 | 0x0020 | +| HUD_DISPLAY_FLAG_TIMER | 0x0040 | +| HUD_DISPLAY_FLAG_CAMERA | 0x0080 | +| HUD_DISPLAY_FLAG_POWER | 0x0100 | +| HUD_DISPLAY_FLAG_EMPHASIZE_POWER | 0x8000 | +| HUD_DISPLAY_NONE | 0x0000 | +| HUD_DISPLAY_DEFAULT | HUD_DISPLAY_FLAG_LIVES | HUD_DISPLAY_FLAG_COIN_COUNT | HUD_DISPLAY_FLAG_STAR_COUNT | HUD_DISPLAY_FLAG_CAMERA_AND_POWER | HUD_DISPLAY_FLAG_CAMERA | HUD_DISPLAY_FLAG_POWER | HUD_DISPLAY_FLAG_KEYS | HUD_DISPLAY_FLAG_UNKNOWN_0020 | [:arrow_up_small:](#) @@ -1937,6 +1952,219 @@ ## [mario_animation_ids.h](#mario_animation_ids.h) +### [enum MarioAnimID](#MarioAnimID) +| Identifier | Value | +| :--------- | :---- | +| MARIO_ANIM_SLOW_LEDGE_GRAB | 0 | +| MARIO_ANIM_FALL_OVER_BACKWARDS | 1 | +| MARIO_ANIM_BACKWARD_AIR_KB | 2 | +| MARIO_ANIM_DYING_ON_BACK | 3 | +| MARIO_ANIM_BACKFLIP | 4 | +| MARIO_ANIM_CLIMB_UP_POLE | 5 | +| MARIO_ANIM_GRAB_POLE_SHORT | 6 | +| MARIO_ANIM_GRAB_POLE_SWING_PART1 | 7 | +| MARIO_ANIM_GRAB_POLE_SWING_PART2 | 8 | +| MARIO_ANIM_HANDSTAND_IDLE | 9 | +| MARIO_ANIM_HANDSTAND_JUMP | 10 | +| MARIO_ANIM_START_HANDSTAND | 11 | +| MARIO_ANIM_RETURN_FROM_HANDSTAND | 12 | +| MARIO_ANIM_IDLE_ON_POLE | 13 | +| MARIO_ANIM_A_POSE | 14 | +| MARIO_ANIM_SKID_ON_GROUND | 15 | +| MARIO_ANIM_STOP_SKID | 16 | +| MARIO_ANIM_CROUCH_FROM_FAST_LONGJUMP | 17 | +| MARIO_ANIM_CROUCH_FROM_SLOW_LONGJUMP | 18 | +| MARIO_ANIM_FAST_LONGJUMP | 19 | +| MARIO_ANIM_SLOW_LONGJUMP | 20 | +| MARIO_ANIM_AIRBORNE_ON_STOMACH | 21 | +| MARIO_ANIM_WALK_WITH_LIGHT_OBJ | 22 | +| MARIO_ANIM_RUN_WITH_LIGHT_OBJ | 23 | +| MARIO_ANIM_SLOW_WALK_WITH_LIGHT_OBJ | 24 | +| MARIO_ANIM_SHIVERING_WARMING_HAND | 25 | +| MARIO_ANIM_SHIVERING_RETURN_TO_IDLE | 26 | +| MARIO_ANIM_SHIVERING | 27 | +| MARIO_ANIM_CLIMB_DOWN_LEDGE | 28 | +| MARIO_ANIM_CREDITS_WAVING | 29 | +| MARIO_ANIM_CREDITS_LOOK_UP | 30 | +| MARIO_ANIM_CREDITS_RETURN_FROM_LOOK_UP | 31 | +| MARIO_ANIM_CREDITS_RAISE_HAND | 32 | +| MARIO_ANIM_CREDITS_LOWER_HAND | 33 | +| MARIO_ANIM_CREDITS_TAKE_OFF_CAP | 34 | +| MARIO_ANIM_CREDITS_START_WALK_LOOK_UP | 35 | +| MARIO_ANIM_CREDITS_LOOK_BACK_THEN_RUN | 36 | +| MARIO_ANIM_FINAL_BOWSER_RAISE_HAND_SPIN | 37 | +| MARIO_ANIM_FINAL_BOWSER_WING_CAP_TAKE_OFF | 38 | +| MARIO_ANIM_CREDITS_PEACE_SIGN | 39 | +| MARIO_ANIM_STAND_UP_FROM_LAVA_BOOST | 40 | +| MARIO_ANIM_FIRE_LAVA_BURN | 41 | +| MARIO_ANIM_WING_CAP_FLY | 42 | +| MARIO_ANIM_HANG_ON_OWL | 43 | +| MARIO_ANIM_LAND_ON_STOMACH | 44 | +| MARIO_ANIM_AIR_FORWARD_KB | 45 | +| MARIO_ANIM_DYING_ON_STOMACH | 46 | +| MARIO_ANIM_SUFFOCATING | 47 | +| MARIO_ANIM_COUGHING | 48 | +| MARIO_ANIM_THROW_CATCH_KEY | 49 | +| MARIO_ANIM_DYING_FALL_OVER | 50 | +| MARIO_ANIM_IDLE_ON_LEDGE | 51 | +| MARIO_ANIM_FAST_LEDGE_GRAB | 52 | +| MARIO_ANIM_HANG_ON_CEILING | 53 | +| MARIO_ANIM_PUT_CAP_ON | 54 | +| MARIO_ANIM_TAKE_CAP_OFF_THEN_ON | 55 | +| MARIO_ANIM_QUICKLY_PUT_CAP_ON | 56 | +| MARIO_ANIM_HEAD_STUCK_IN_GROUND | 57 | +| MARIO_ANIM_GROUND_POUND_LANDING | 58 | +| MARIO_ANIM_TRIPLE_JUMP_GROUND_POUND | 59 | +| MARIO_ANIM_START_GROUND_POUND | 60 | +| MARIO_ANIM_GROUND_POUND | 61 | +| MARIO_ANIM_BOTTOM_STUCK_IN_GROUND | 62 | +| MARIO_ANIM_IDLE_WITH_LIGHT_OBJ | 63 | +| MARIO_ANIM_JUMP_LAND_WITH_LIGHT_OBJ | 64 | +| MARIO_ANIM_JUMP_WITH_LIGHT_OBJ | 65 | +| MARIO_ANIM_FALL_LAND_WITH_LIGHT_OBJ | 66 | +| MARIO_ANIM_FALL_WITH_LIGHT_OBJ | 67 | +| MARIO_ANIM_FALL_FROM_SLIDING_WITH_LIGHT_OBJ | 68 | +| MARIO_ANIM_SLIDING_ON_BOTTOM_WITH_LIGHT_OBJ | 69 | +| MARIO_ANIM_STAND_UP_FROM_SLIDING_WITH_LIGHT_OBJ | 70 | +| MARIO_ANIM_RIDING_SHELL | 71 | +| MARIO_ANIM_WALKING | 72 | +| MARIO_ANIM_FORWARD_FLIP | 73 | +| MARIO_ANIM_JUMP_RIDING_SHELL | 74 | +| MARIO_ANIM_LAND_FROM_DOUBLE_JUMP | 75 | +| MARIO_ANIM_DOUBLE_JUMP_FALL | 76 | +| MARIO_ANIM_SINGLE_JUMP | 77 | +| MARIO_ANIM_LAND_FROM_SINGLE_JUMP | 78 | +| MARIO_ANIM_AIR_KICK | 79 | +| MARIO_ANIM_DOUBLE_JUMP_RISE | 80 | +| MARIO_ANIM_START_FORWARD_SPINNING | 81 | +| MARIO_ANIM_THROW_LIGHT_OBJECT | 82 | +| MARIO_ANIM_FALL_FROM_SLIDE_KICK | 83 | +| MARIO_ANIM_BEND_KNESS_RIDING_SHELL | 84 | +| MARIO_ANIM_LEGS_STUCK_IN_GROUND | 85 | +| MARIO_ANIM_GENERAL_FALL | 86 | +| MARIO_ANIM_GENERAL_LAND | 87 | +| MARIO_ANIM_BEING_GRABBED | 88 | +| MARIO_ANIM_GRAB_HEAVY_OBJECT | 89 | +| MARIO_ANIM_SLOW_LAND_FROM_DIVE | 90 | +| MARIO_ANIM_FLY_FROM_CANNON | 91 | +| MARIO_ANIM_MOVE_ON_WIRE_NET_RIGHT | 92 | +| MARIO_ANIM_MOVE_ON_WIRE_NET_LEFT | 93 | +| MARIO_ANIM_MISSING_CAP | 94 | +| MARIO_ANIM_PULL_DOOR_WALK_IN | 95 | +| MARIO_ANIM_PUSH_DOOR_WALK_IN | 96 | +| MARIO_ANIM_UNLOCK_DOOR | 97 | +| MARIO_ANIM_START_REACH_POCKET | 98 | +| MARIO_ANIM_REACH_POCKET | 99 | +| MARIO_ANIM_STOP_REACH_POCKET | 100 | +| MARIO_ANIM_GROUND_THROW | 101 | +| MARIO_ANIM_GROUND_KICK | 102 | +| MARIO_ANIM_FIRST_PUNCH | 103 | +| MARIO_ANIM_SECOND_PUNCH | 104 | +| MARIO_ANIM_FIRST_PUNCH_FAST | 105 | +| MARIO_ANIM_SECOND_PUNCH_FAST | 106 | +| MARIO_ANIM_PICK_UP_LIGHT_OBJ | 107 | +| MARIO_ANIM_PUSHING | 108 | +| MARIO_ANIM_START_RIDING_SHELL | 109 | +| MARIO_ANIM_PLACE_LIGHT_OBJ | 110 | +| MARIO_ANIM_FORWARD_SPINNING | 111 | +| MARIO_ANIM_BACKWARD_SPINNING | 112 | +| MARIO_ANIM_BREAKDANCE | 113 | +| MARIO_ANIM_RUNNING | 114 | +| MARIO_ANIM_RUNNING_UNUSED | 115 | +| MARIO_ANIM_SOFT_BACK_KB | 116 | +| MARIO_ANIM_SOFT_FRONT_KB | 117 | +| MARIO_ANIM_DYING_IN_QUICKSAND | 118 | +| MARIO_ANIM_IDLE_IN_QUICKSAND | 119 | +| MARIO_ANIM_MOVE_IN_QUICKSAND | 120 | +| MARIO_ANIM_ELECTROCUTION | 121 | +| MARIO_ANIM_SHOCKED | 122 | +| MARIO_ANIM_BACKWARD_KB | 123 | +| MARIO_ANIM_FORWARD_KB | 124 | +| MARIO_ANIM_IDLE_HEAVY_OBJ | 125 | +| MARIO_ANIM_STAND_AGAINST_WALL | 126 | +| MARIO_ANIM_SIDESTEP_LEFT | 127 | +| MARIO_ANIM_SIDESTEP_RIGHT | 128 | +| MARIO_ANIM_START_SLEEP_IDLE | 129 | +| MARIO_ANIM_START_SLEEP_SCRATCH | 130 | +| MARIO_ANIM_START_SLEEP_YAWN | 131 | +| MARIO_ANIM_START_SLEEP_SITTING | 132 | +| MARIO_ANIM_SLEEP_IDLE | 133 | +| MARIO_ANIM_SLEEP_START_LYING | 134 | +| MARIO_ANIM_SLEEP_LYING | 135 | +| MARIO_ANIM_DIVE | 136 | +| MARIO_ANIM_SLIDE_DIVE | 137 | +| MARIO_ANIM_GROUND_BONK | 138 | +| MARIO_ANIM_STOP_SLIDE_LIGHT_OBJ | 139 | +| MARIO_ANIM_SLIDE_KICK | 140 | +| MARIO_ANIM_CROUCH_FROM_SLIDE_KICK | 141 | +| MARIO_ANIM_SLIDE_MOTIONLESS | 142 | +| MARIO_ANIM_STOP_SLIDE | 143 | +| MARIO_ANIM_FALL_FROM_SLIDE | 144 | +| MARIO_ANIM_SLIDE | 145 | +| MARIO_ANIM_TIPTOE | 146 | +| MARIO_ANIM_TWIRL_LAND | 147 | +| MARIO_ANIM_TWIRL | 148 | +| MARIO_ANIM_START_TWIRL | 149 | +| MARIO_ANIM_STOP_CROUCHING | 150 | +| MARIO_ANIM_START_CROUCHING | 151 | +| MARIO_ANIM_CROUCHING | 152 | +| MARIO_ANIM_CRAWLING | 153 | +| MARIO_ANIM_STOP_CRAWLING | 154 | +| MARIO_ANIM_START_CRAWLING | 155 | +| MARIO_ANIM_SUMMON_STAR | 156 | +| MARIO_ANIM_RETURN_STAR_APPROACH_DOOR | 157 | +| MARIO_ANIM_BACKWARDS_WATER_KB | 158 | +| MARIO_ANIM_SWIM_WITH_OBJ_PART1 | 159 | +| MARIO_ANIM_SWIM_WITH_OBJ_PART2 | 160 | +| MARIO_ANIM_FLUTTERKICK_WITH_OBJ | 161 | +| MARIO_ANIM_WATER_ACTION_END_WITH_OBJ | 162 | +| MARIO_ANIM_STOP_GRAB_OBJ_WATER | 163 | +| MARIO_ANIM_WATER_IDLE_WITH_OBJ | 164 | +| MARIO_ANIM_DROWNING_PART1 | 165 | +| MARIO_ANIM_DROWNING_PART2 | 166 | +| MARIO_ANIM_WATER_DYING | 167 | +| MARIO_ANIM_WATER_FORWARD_KB | 168 | +| MARIO_ANIM_FALL_FROM_WATER | 169 | +| MARIO_ANIM_SWIM_PART1 | 170 | +| MARIO_ANIM_SWIM_PART2 | 171 | +| MARIO_ANIM_FLUTTERKICK | 172 | +| MARIO_ANIM_WATER_ACTION_END | 173 | +| MARIO_ANIM_WATER_PICK_UP_OBJ | 174 | +| MARIO_ANIM_WATER_GRAB_OBJ_PART2 | 175 | +| MARIO_ANIM_WATER_GRAB_OBJ_PART1 | 176 | +| MARIO_ANIM_WATER_THROW_OBJ | 177 | +| MARIO_ANIM_WATER_IDLE | 178 | +| MARIO_ANIM_WATER_STAR_DANCE | 179 | +| MARIO_ANIM_RETURN_FROM_WATER_STAR_DANCE | 180 | +| MARIO_ANIM_GRAB_BOWSER | 181 | +| MARIO_ANIM_SWINGING_BOWSER | 182 | +| MARIO_ANIM_RELEASE_BOWSER | 183 | +| MARIO_ANIM_HOLDING_BOWSER | 184 | +| MARIO_ANIM_HEAVY_THROW | 185 | +| MARIO_ANIM_WALK_PANTING | 186 | +| MARIO_ANIM_WALK_WITH_HEAVY_OBJ | 187 | +| MARIO_ANIM_TURNING_PART1 | 188 | +| MARIO_ANIM_TURNING_PART2 | 189 | +| MARIO_ANIM_SLIDEFLIP_LAND | 190 | +| MARIO_ANIM_SLIDEFLIP | 191 | +| MARIO_ANIM_TRIPLE_JUMP_LAND | 192 | +| MARIO_ANIM_TRIPLE_JUMP | 193 | +| MARIO_ANIM_FIRST_PERSON | 194 | +| MARIO_ANIM_IDLE_HEAD_LEFT | 195 | +| MARIO_ANIM_IDLE_HEAD_RIGHT | 196 | +| MARIO_ANIM_IDLE_HEAD_CENTER | 197 | +| MARIO_ANIM_HANDSTAND_LEFT | 198 | +| MARIO_ANIM_HANDSTAND_RIGHT | 199 | +| MARIO_ANIM_WAKE_FROM_SLEEP | 200 | +| MARIO_ANIM_WAKE_FROM_LYING | 201 | +| MARIO_ANIM_START_TIPTOE | 202 | +| MARIO_ANIM_SLIDEJUMP | 203 | +| MARIO_ANIM_START_WALLKICK | 204 | +| MARIO_ANIM_STAR_DANCE | 205 | +| MARIO_ANIM_RETURN_FROM_STAR_DANCE | 206 | +| MARIO_ANIM_FORWARD_SPINNING_FLIP | 207 | +| MARIO_ANIM_TRIPLE_JUMP_FLY | 208 | + ### [enum CharacterAnimID](#CharacterAnimID) | Identifier | Value | | :--------- | :---- | @@ -2151,233 +2379,12 @@ | CHAR_ANIM_TRIPLE_JUMP_FLY | 208 | | CHAR_ANIM_MAX | 209 | -### [enum MarioAnimID](#MarioAnimID) -| Identifier | Value | -| :--------- | :---- | -| MARIO_ANIM_SLOW_LEDGE_GRAB | 0 | -| MARIO_ANIM_FALL_OVER_BACKWARDS | 1 | -| MARIO_ANIM_BACKWARD_AIR_KB | 2 | -| MARIO_ANIM_DYING_ON_BACK | 3 | -| MARIO_ANIM_BACKFLIP | 4 | -| MARIO_ANIM_CLIMB_UP_POLE | 5 | -| MARIO_ANIM_GRAB_POLE_SHORT | 6 | -| MARIO_ANIM_GRAB_POLE_SWING_PART1 | 7 | -| MARIO_ANIM_GRAB_POLE_SWING_PART2 | 8 | -| MARIO_ANIM_HANDSTAND_IDLE | 9 | -| MARIO_ANIM_HANDSTAND_JUMP | 10 | -| MARIO_ANIM_START_HANDSTAND | 11 | -| MARIO_ANIM_RETURN_FROM_HANDSTAND | 12 | -| MARIO_ANIM_IDLE_ON_POLE | 13 | -| MARIO_ANIM_A_POSE | 14 | -| MARIO_ANIM_SKID_ON_GROUND | 15 | -| MARIO_ANIM_STOP_SKID | 16 | -| MARIO_ANIM_CROUCH_FROM_FAST_LONGJUMP | 17 | -| MARIO_ANIM_CROUCH_FROM_SLOW_LONGJUMP | 18 | -| MARIO_ANIM_FAST_LONGJUMP | 19 | -| MARIO_ANIM_SLOW_LONGJUMP | 20 | -| MARIO_ANIM_AIRBORNE_ON_STOMACH | 21 | -| MARIO_ANIM_WALK_WITH_LIGHT_OBJ | 22 | -| MARIO_ANIM_RUN_WITH_LIGHT_OBJ | 23 | -| MARIO_ANIM_SLOW_WALK_WITH_LIGHT_OBJ | 24 | -| MARIO_ANIM_SHIVERING_WARMING_HAND | 25 | -| MARIO_ANIM_SHIVERING_RETURN_TO_IDLE | 26 | -| MARIO_ANIM_SHIVERING | 27 | -| MARIO_ANIM_CLIMB_DOWN_LEDGE | 28 | -| MARIO_ANIM_CREDITS_WAVING | 29 | -| MARIO_ANIM_CREDITS_LOOK_UP | 30 | -| MARIO_ANIM_CREDITS_RETURN_FROM_LOOK_UP | 31 | -| MARIO_ANIM_CREDITS_RAISE_HAND | 32 | -| MARIO_ANIM_CREDITS_LOWER_HAND | 33 | -| MARIO_ANIM_CREDITS_TAKE_OFF_CAP | 34 | -| MARIO_ANIM_CREDITS_START_WALK_LOOK_UP | 35 | -| MARIO_ANIM_CREDITS_LOOK_BACK_THEN_RUN | 36 | -| MARIO_ANIM_FINAL_BOWSER_RAISE_HAND_SPIN | 37 | -| MARIO_ANIM_FINAL_BOWSER_WING_CAP_TAKE_OFF | 38 | -| MARIO_ANIM_CREDITS_PEACE_SIGN | 39 | -| MARIO_ANIM_STAND_UP_FROM_LAVA_BOOST | 40 | -| MARIO_ANIM_FIRE_LAVA_BURN | 41 | -| MARIO_ANIM_WING_CAP_FLY | 42 | -| MARIO_ANIM_HANG_ON_OWL | 43 | -| MARIO_ANIM_LAND_ON_STOMACH | 44 | -| MARIO_ANIM_AIR_FORWARD_KB | 45 | -| MARIO_ANIM_DYING_ON_STOMACH | 46 | -| MARIO_ANIM_SUFFOCATING | 47 | -| MARIO_ANIM_COUGHING | 48 | -| MARIO_ANIM_THROW_CATCH_KEY | 49 | -| MARIO_ANIM_DYING_FALL_OVER | 50 | -| MARIO_ANIM_IDLE_ON_LEDGE | 51 | -| MARIO_ANIM_FAST_LEDGE_GRAB | 52 | -| MARIO_ANIM_HANG_ON_CEILING | 53 | -| MARIO_ANIM_PUT_CAP_ON | 54 | -| MARIO_ANIM_TAKE_CAP_OFF_THEN_ON | 55 | -| MARIO_ANIM_QUICKLY_PUT_CAP_ON | 56 | -| MARIO_ANIM_HEAD_STUCK_IN_GROUND | 57 | -| MARIO_ANIM_GROUND_POUND_LANDING | 58 | -| MARIO_ANIM_TRIPLE_JUMP_GROUND_POUND | 59 | -| MARIO_ANIM_START_GROUND_POUND | 60 | -| MARIO_ANIM_GROUND_POUND | 61 | -| MARIO_ANIM_BOTTOM_STUCK_IN_GROUND | 62 | -| MARIO_ANIM_IDLE_WITH_LIGHT_OBJ | 63 | -| MARIO_ANIM_JUMP_LAND_WITH_LIGHT_OBJ | 64 | -| MARIO_ANIM_JUMP_WITH_LIGHT_OBJ | 65 | -| MARIO_ANIM_FALL_LAND_WITH_LIGHT_OBJ | 66 | -| MARIO_ANIM_FALL_WITH_LIGHT_OBJ | 67 | -| MARIO_ANIM_FALL_FROM_SLIDING_WITH_LIGHT_OBJ | 68 | -| MARIO_ANIM_SLIDING_ON_BOTTOM_WITH_LIGHT_OBJ | 69 | -| MARIO_ANIM_STAND_UP_FROM_SLIDING_WITH_LIGHT_OBJ | 70 | -| MARIO_ANIM_RIDING_SHELL | 71 | -| MARIO_ANIM_WALKING | 72 | -| MARIO_ANIM_FORWARD_FLIP | 73 | -| MARIO_ANIM_JUMP_RIDING_SHELL | 74 | -| MARIO_ANIM_LAND_FROM_DOUBLE_JUMP | 75 | -| MARIO_ANIM_DOUBLE_JUMP_FALL | 76 | -| MARIO_ANIM_SINGLE_JUMP | 77 | -| MARIO_ANIM_LAND_FROM_SINGLE_JUMP | 78 | -| MARIO_ANIM_AIR_KICK | 79 | -| MARIO_ANIM_DOUBLE_JUMP_RISE | 80 | -| MARIO_ANIM_START_FORWARD_SPINNING | 81 | -| MARIO_ANIM_THROW_LIGHT_OBJECT | 82 | -| MARIO_ANIM_FALL_FROM_SLIDE_KICK | 83 | -| MARIO_ANIM_BEND_KNESS_RIDING_SHELL | 84 | -| MARIO_ANIM_LEGS_STUCK_IN_GROUND | 85 | -| MARIO_ANIM_GENERAL_FALL | 86 | -| MARIO_ANIM_GENERAL_LAND | 87 | -| MARIO_ANIM_BEING_GRABBED | 88 | -| MARIO_ANIM_GRAB_HEAVY_OBJECT | 89 | -| MARIO_ANIM_SLOW_LAND_FROM_DIVE | 90 | -| MARIO_ANIM_FLY_FROM_CANNON | 91 | -| MARIO_ANIM_MOVE_ON_WIRE_NET_RIGHT | 92 | -| MARIO_ANIM_MOVE_ON_WIRE_NET_LEFT | 93 | -| MARIO_ANIM_MISSING_CAP | 94 | -| MARIO_ANIM_PULL_DOOR_WALK_IN | 95 | -| MARIO_ANIM_PUSH_DOOR_WALK_IN | 96 | -| MARIO_ANIM_UNLOCK_DOOR | 97 | -| MARIO_ANIM_START_REACH_POCKET | 98 | -| MARIO_ANIM_REACH_POCKET | 99 | -| MARIO_ANIM_STOP_REACH_POCKET | 100 | -| MARIO_ANIM_GROUND_THROW | 101 | -| MARIO_ANIM_GROUND_KICK | 102 | -| MARIO_ANIM_FIRST_PUNCH | 103 | -| MARIO_ANIM_SECOND_PUNCH | 104 | -| MARIO_ANIM_FIRST_PUNCH_FAST | 105 | -| MARIO_ANIM_SECOND_PUNCH_FAST | 106 | -| MARIO_ANIM_PICK_UP_LIGHT_OBJ | 107 | -| MARIO_ANIM_PUSHING | 108 | -| MARIO_ANIM_START_RIDING_SHELL | 109 | -| MARIO_ANIM_PLACE_LIGHT_OBJ | 110 | -| MARIO_ANIM_FORWARD_SPINNING | 111 | -| MARIO_ANIM_BACKWARD_SPINNING | 112 | -| MARIO_ANIM_BREAKDANCE | 113 | -| MARIO_ANIM_RUNNING | 114 | -| MARIO_ANIM_RUNNING_UNUSED | 115 | -| MARIO_ANIM_SOFT_BACK_KB | 116 | -| MARIO_ANIM_SOFT_FRONT_KB | 117 | -| MARIO_ANIM_DYING_IN_QUICKSAND | 118 | -| MARIO_ANIM_IDLE_IN_QUICKSAND | 119 | -| MARIO_ANIM_MOVE_IN_QUICKSAND | 120 | -| MARIO_ANIM_ELECTROCUTION | 121 | -| MARIO_ANIM_SHOCKED | 122 | -| MARIO_ANIM_BACKWARD_KB | 123 | -| MARIO_ANIM_FORWARD_KB | 124 | -| MARIO_ANIM_IDLE_HEAVY_OBJ | 125 | -| MARIO_ANIM_STAND_AGAINST_WALL | 126 | -| MARIO_ANIM_SIDESTEP_LEFT | 127 | -| MARIO_ANIM_SIDESTEP_RIGHT | 128 | -| MARIO_ANIM_START_SLEEP_IDLE | 129 | -| MARIO_ANIM_START_SLEEP_SCRATCH | 130 | -| MARIO_ANIM_START_SLEEP_YAWN | 131 | -| MARIO_ANIM_START_SLEEP_SITTING | 132 | -| MARIO_ANIM_SLEEP_IDLE | 133 | -| MARIO_ANIM_SLEEP_START_LYING | 134 | -| MARIO_ANIM_SLEEP_LYING | 135 | -| MARIO_ANIM_DIVE | 136 | -| MARIO_ANIM_SLIDE_DIVE | 137 | -| MARIO_ANIM_GROUND_BONK | 138 | -| MARIO_ANIM_STOP_SLIDE_LIGHT_OBJ | 139 | -| MARIO_ANIM_SLIDE_KICK | 140 | -| MARIO_ANIM_CROUCH_FROM_SLIDE_KICK | 141 | -| MARIO_ANIM_SLIDE_MOTIONLESS | 142 | -| MARIO_ANIM_STOP_SLIDE | 143 | -| MARIO_ANIM_FALL_FROM_SLIDE | 144 | -| MARIO_ANIM_SLIDE | 145 | -| MARIO_ANIM_TIPTOE | 146 | -| MARIO_ANIM_TWIRL_LAND | 147 | -| MARIO_ANIM_TWIRL | 148 | -| MARIO_ANIM_START_TWIRL | 149 | -| MARIO_ANIM_STOP_CROUCHING | 150 | -| MARIO_ANIM_START_CROUCHING | 151 | -| MARIO_ANIM_CROUCHING | 152 | -| MARIO_ANIM_CRAWLING | 153 | -| MARIO_ANIM_STOP_CRAWLING | 154 | -| MARIO_ANIM_START_CRAWLING | 155 | -| MARIO_ANIM_SUMMON_STAR | 156 | -| MARIO_ANIM_RETURN_STAR_APPROACH_DOOR | 157 | -| MARIO_ANIM_BACKWARDS_WATER_KB | 158 | -| MARIO_ANIM_SWIM_WITH_OBJ_PART1 | 159 | -| MARIO_ANIM_SWIM_WITH_OBJ_PART2 | 160 | -| MARIO_ANIM_FLUTTERKICK_WITH_OBJ | 161 | -| MARIO_ANIM_WATER_ACTION_END_WITH_OBJ | 162 | -| MARIO_ANIM_STOP_GRAB_OBJ_WATER | 163 | -| MARIO_ANIM_WATER_IDLE_WITH_OBJ | 164 | -| MARIO_ANIM_DROWNING_PART1 | 165 | -| MARIO_ANIM_DROWNING_PART2 | 166 | -| MARIO_ANIM_WATER_DYING | 167 | -| MARIO_ANIM_WATER_FORWARD_KB | 168 | -| MARIO_ANIM_FALL_FROM_WATER | 169 | -| MARIO_ANIM_SWIM_PART1 | 170 | -| MARIO_ANIM_SWIM_PART2 | 171 | -| MARIO_ANIM_FLUTTERKICK | 172 | -| MARIO_ANIM_WATER_ACTION_END | 173 | -| MARIO_ANIM_WATER_PICK_UP_OBJ | 174 | -| MARIO_ANIM_WATER_GRAB_OBJ_PART2 | 175 | -| MARIO_ANIM_WATER_GRAB_OBJ_PART1 | 176 | -| MARIO_ANIM_WATER_THROW_OBJ | 177 | -| MARIO_ANIM_WATER_IDLE | 178 | -| MARIO_ANIM_WATER_STAR_DANCE | 179 | -| MARIO_ANIM_RETURN_FROM_WATER_STAR_DANCE | 180 | -| MARIO_ANIM_GRAB_BOWSER | 181 | -| MARIO_ANIM_SWINGING_BOWSER | 182 | -| MARIO_ANIM_RELEASE_BOWSER | 183 | -| MARIO_ANIM_HOLDING_BOWSER | 184 | -| MARIO_ANIM_HEAVY_THROW | 185 | -| MARIO_ANIM_WALK_PANTING | 186 | -| MARIO_ANIM_WALK_WITH_HEAVY_OBJ | 187 | -| MARIO_ANIM_TURNING_PART1 | 188 | -| MARIO_ANIM_TURNING_PART2 | 189 | -| MARIO_ANIM_SLIDEFLIP_LAND | 190 | -| MARIO_ANIM_SLIDEFLIP | 191 | -| MARIO_ANIM_TRIPLE_JUMP_LAND | 192 | -| MARIO_ANIM_TRIPLE_JUMP | 193 | -| MARIO_ANIM_FIRST_PERSON | 194 | -| MARIO_ANIM_IDLE_HEAD_LEFT | 195 | -| MARIO_ANIM_IDLE_HEAD_RIGHT | 196 | -| MARIO_ANIM_IDLE_HEAD_CENTER | 197 | -| MARIO_ANIM_HANDSTAND_LEFT | 198 | -| MARIO_ANIM_HANDSTAND_RIGHT | 199 | -| MARIO_ANIM_WAKE_FROM_SLEEP | 200 | -| MARIO_ANIM_WAKE_FROM_LYING | 201 | -| MARIO_ANIM_START_TIPTOE | 202 | -| MARIO_ANIM_SLIDEJUMP | 203 | -| MARIO_ANIM_START_WALLKICK | 204 | -| MARIO_ANIM_STAR_DANCE | 205 | -| MARIO_ANIM_RETURN_FROM_STAR_DANCE | 206 | -| MARIO_ANIM_FORWARD_SPINNING_FLIP | 207 | -| MARIO_ANIM_TRIPLE_JUMP_FLY | 208 | - [:arrow_up_small:](#)
## [mario_geo_switch_case_ids.h](#mario_geo_switch_case_ids.h) -### [enum MarioCapGSCId](#MarioCapGSCId) -| Identifier | Value | -| :--------- | :---- | -| MARIO_HAS_DEFAULT_CAP_ON | 0 | -| MARIO_HAS_DEFAULT_CAP_OFF | 1 | -| MARIO_HAS_WING_CAP_ON | 2 | -| MARIO_HAS_WING_CAP_OFF | 3 | - ### [enum MarioEyesGSCId](#MarioEyesGSCId) | Identifier | Value | | :--------- | :---- | @@ -2391,14 +2398,6 @@ | MARIO_EYES_LOOK_DOWN | 7 | | MARIO_EYES_DEAD | 8 | -### [enum MarioGrabPosGSCId](#MarioGrabPosGSCId) -| Identifier | Value | -| :--------- | :---- | -| GRAB_POS_NULL | 0 | -| GRAB_POS_LIGHT_OBJ | 1 | -| GRAB_POS_HEAVY_OBJ | 2 | -| GRAB_POS_BOWSER | 3 | - ### [enum MarioHandGSCId](#MarioHandGSCId) | Identifier | Value | | :--------- | :---- | @@ -2409,6 +2408,22 @@ | MARIO_HAND_HOLDING_WING_CAP | 4 | | MARIO_HAND_RIGHT_OPEN | 5 | +### [enum MarioCapGSCId](#MarioCapGSCId) +| Identifier | Value | +| :--------- | :---- | +| MARIO_HAS_DEFAULT_CAP_ON | 0 | +| MARIO_HAS_DEFAULT_CAP_OFF | 1 | +| MARIO_HAS_WING_CAP_ON | 2 | +| MARIO_HAS_WING_CAP_OFF | 3 | + +### [enum MarioGrabPosGSCId](#MarioGrabPosGSCId) +| Identifier | Value | +| :--------- | :---- | +| GRAB_POS_NULL | 0 | +| GRAB_POS_LIGHT_OBJ | 1 | +| GRAB_POS_HEAVY_OBJ | 2 | +| GRAB_POS_BOWSER | 3 | + [:arrow_up_small:](#)
@@ -2422,17 +2437,10 @@
## [network.h](#network.h) -- PACKET_LENGTH -- SYNC_DISTANCE_INFINITE - SYNC_DISTANCE_ONLY_DEATH - SYNC_DISTANCE_ONLY_EVENTS - -### [enum BouncyLevelBounds](#BouncyLevelBounds) -| Identifier | Value | -| :--------- | :---- | -| BOUNCY_LEVEL_BOUNDS_OFF | 0 | -| BOUNCY_LEVEL_BOUNDS_ON | 1 | -| BOUNCY_LEVEL_BOUNDS_ON_CAP | 2 | +- SYNC_DISTANCE_INFINITE +- PACKET_LENGTH ### [enum NetworkSystemType](#NetworkSystemType) | Identifier | Value | @@ -2448,6 +2456,13 @@ | PLAYER_INTERACTIONS_SOLID | 1 | | PLAYER_INTERACTIONS_PVP | 2 | +### [enum BouncyLevelBounds](#BouncyLevelBounds) +| Identifier | Value | +| :--------- | :---- | +| BOUNCY_LEVEL_BOUNDS_OFF | 0 | +| BOUNCY_LEVEL_BOUNDS_ON | 1 | +| BOUNCY_LEVEL_BOUNDS_ON_CAP | 2 | + ### [enum PvpType](#PvpType) | Identifier | Value | | :--------- | :---- | @@ -2459,14 +2474,14 @@
## [network_player.h](#network_player.h) -- MAX_DESCRIPTION_STRING -- MAX_RX_SEQ_IDS -- NETWORK_PLAYER_PING_TIMEOUT -- NETWORK_PLAYER_TIMEOUT -- UNKNOWN_GLOBAL_INDEX - UNKNOWN_LOCAL_INDEX +- UNKNOWN_GLOBAL_INDEX - UNKNOWN_NETWORK_INDEX +- NETWORK_PLAYER_TIMEOUT +- NETWORK_PLAYER_PING_TIMEOUT +- MAX_RX_SEQ_IDS - USE_REAL_PALETTE_VAR +- MAX_DESCRIPTION_STRING ### [enum NetworkPlayerType](#NetworkPlayerType) | Identifier | Value | @@ -2481,25 +2496,25 @@
## [obj_behaviors.c](#obj_behaviors.c) -- OBJ_COL_FLAGS_LANDED - OBJ_COL_FLAG_GROUNDED - OBJ_COL_FLAG_HIT_WALL -- OBJ_COL_FLAG_NO_Y_VEL - OBJ_COL_FLAG_UNDERWATER +- OBJ_COL_FLAG_NO_Y_VEL +- OBJ_COL_FLAGS_LANDED [:arrow_up_small:](#)
## [obj_behaviors_2.h](#obj_behaviors_2.h) +- ATTACK_HANDLER_NOP - ATTACK_HANDLER_DIE_IF_HEALTH_NON_POSITIVE - ATTACK_HANDLER_KNOCKBACK -- ATTACK_HANDLER_NOP -- ATTACK_HANDLER_SET_SPEED_TO_ZERO -- ATTACK_HANDLER_SPECIAL_HUGE_GOOMBA_WEAKLY_ATTACKED -- ATTACK_HANDLER_SPECIAL_KOOPA_LOSE_SHELL -- ATTACK_HANDLER_SPECIAL_WIGGLER_JUMPED_ON - ATTACK_HANDLER_SQUISHED +- ATTACK_HANDLER_SPECIAL_KOOPA_LOSE_SHELL +- ATTACK_HANDLER_SET_SPEED_TO_ZERO +- ATTACK_HANDLER_SPECIAL_WIGGLER_JUMPED_ON +- ATTACK_HANDLER_SPECIAL_HUGE_GOOMBA_WEAKLY_ATTACKED - ATTACK_HANDLER_SQUISHED_WITH_BLUE_COIN [:arrow_up_small:](#) @@ -2507,629 +2522,629 @@
## [object_constants.h](#object_constants.h) -- ACTIVATED_BF_PLAT_TYPE_BITFS_ELEVATOR -- ACTIVATED_BF_PLAT_TYPE_BITFS_MESH_PLAT -- ACTIVATED_BF_PLAT_TYPE_BITS_ARROW_PLAT -- ACTIVE_FLAG_ACTIVE - ACTIVE_FLAG_DEACTIVATED -- ACTIVE_FLAG_DITHERED_ALPHA -- ACTIVE_FLAG_DORMANT +- ACTIVE_FLAG_ACTIVE - ACTIVE_FLAG_FAR_AWAY -- ACTIVE_FLAG_INITIATED_TIME_STOP -- ACTIVE_FLAG_IN_DIFFERENT_ROOM -- ACTIVE_FLAG_MOVE_THROUGH_GRATE -- ACTIVE_FLAG_UNIMPORTANT -- ACTIVE_FLAG_UNK10 - ACTIVE_FLAG_UNK2 +- ACTIVE_FLAG_IN_DIFFERENT_ROOM +- ACTIVE_FLAG_UNIMPORTANT +- ACTIVE_FLAG_INITIATED_TIME_STOP +- ACTIVE_FLAG_MOVE_THROUGH_GRATE +- ACTIVE_FLAG_DITHERED_ALPHA - ACTIVE_FLAG_UNK8 - ACTIVE_FLAG_UNK9 -- ACTIVE_PARTICLE_BREATH -- ACTIVE_PARTICLE_BUBBLE -- ACTIVE_PARTICLE_DIRT -- ACTIVE_PARTICLE_DUST -- ACTIVE_PARTICLE_FIRE -- ACTIVE_PARTICLE_H_STAR -- ACTIVE_PARTICLE_IDLE_WATER_WAVE -- ACTIVE_PARTICLE_LEAF -- ACTIVE_PARTICLE_MIST_CIRCLE -- ACTIVE_PARTICLE_PLUNGE_BUBBLE -- ACTIVE_PARTICLE_SHALLOW_WATER_SPLASH -- ACTIVE_PARTICLE_SHALLOW_WATER_WAVE -- ACTIVE_PARTICLE_SNOW -- ACTIVE_PARTICLE_SPARKLES -- ACTIVE_PARTICLE_TRIANGLE -- ACTIVE_PARTICLE_UNUSED_1 -- ACTIVE_PARTICLE_UNUSED_2 -- ACTIVE_PARTICLE_V_STAR -- ACTIVE_PARTICLE_WATER_SPLASH -- ACTIVE_PARTICLE_WAVE_TRAIL -- AMP_ACT_ATTACK_COOLDOWN -- AMP_ACT_IDLE -- AMP_BP_ROT_RADIUS_0 -- AMP_BP_ROT_RADIUS_200 -- AMP_BP_ROT_RADIUS_300 -- AMP_BP_ROT_RADIUS_400 -- ARROW_LIFT_ACT_IDLE -- ARROW_LIFT_ACT_MOVING_AWAY -- ARROW_LIFT_ACT_MOVING_BACK -- ARROW_LIFT_DONE_MOVING -- ARROW_LIFT_NOT_DONE_MOVING -- BBALL_ACT_INITIALIZE -- BBALL_ACT_ROLL -- BBALL_BP_STYPE_BOB_LOWER -- BBALL_BP_STYPE_BOB_UPPER -- BBALL_BP_STYPE_THI_LARGE -- BBALL_BP_STYPE_THI_SMALL -- BBALL_BP_STYPE_TTM -- BBH_DYNAMIC_SURFACE_ROOM -- BBH_NEAR_MERRY_GO_ROUND_ROOM -- BBH_OUTSIDE_ROOM -- BBH_TILTING_TRAP_PLATFORM_ACT_MARIO_OFF -- BBH_TILTING_TRAP_PLATFORM_ACT_MARIO_ON -- BETA_BOO_KEY_ACT_DROPPED -- BETA_BOO_KEY_ACT_DROPPING -- BETA_BOO_KEY_ACT_IN_BOO -- BETA_CHEST_ACT_IDLE_CLOSED -- BETA_CHEST_ACT_IDLE_OPEN -- BETA_CHEST_ACT_OPENING -- BIRD_ACT_FLY -- BIRD_ACT_INACTIVE -- BIRD_BP_SPAWNED -- BIRD_BP_SPAWNER -- BLUE_COIN_SWITCH_ACT_IDLE -- BLUE_COIN_SWITCH_ACT_RECEDING -- BLUE_COIN_SWITCH_ACT_RESPAWNING -- BLUE_COIN_SWITCH_ACT_TICKING -- BLUE_FISH_ACT_ASCEND -- BLUE_FISH_ACT_DIVE -- BLUE_FISH_ACT_DUPLICATE -- BLUE_FISH_ACT_ROOM -- BLUE_FISH_ACT_SPAWN -- BLUE_FISH_ACT_TURN -- BLUE_FISH_ACT_TURN_BACK -- BOBOMB_ACT_CHASE_MARIO -- BOBOMB_ACT_DEATH_PLANE_DEATH -- BOBOMB_ACT_EXPLODE -- BOBOMB_ACT_LAUNCHED -- BOBOMB_ACT_LAVA_DEATH -- BOBOMB_ACT_PATROL -- BOBOMB_BP_STYPE_GENERIC -- BOBOMB_BP_STYPE_STATIONARY -- BOBOMB_BUDDY_ACT_IDLE -- BOBOMB_BUDDY_ACT_TALK -- BOBOMB_BUDDY_ACT_TURN_TO_TALK -- BOBOMB_BUDDY_BP_STYPE_BOB_CANNON_KBB -- BOBOMB_BUDDY_BP_STYPE_BOB_GRASS -- BOBOMB_BUDDY_BP_STYPE_BOB_GRASS_KBB -- BOBOMB_BUDDY_BP_STYPE_GENERIC -- BOBOMB_BUDDY_CANNON_OPENED -- BOBOMB_BUDDY_CANNON_OPENING -- BOBOMB_BUDDY_CANNON_STOP_TALKING -- BOBOMB_BUDDY_CANNON_UNOPENED -- BOBOMB_BUDDY_HAS_NOT_TALKED -- BOBOMB_BUDDY_HAS_TALKED -- BOBOMB_BUDDY_ROLE_ADVICE -- BOBOMB_BUDDY_ROLE_CANNON -- BOMP_ACT_EXTEND -- BOMP_ACT_POKE_OUT -- BOMP_ACT_RETRACT -- BOMP_ACT_WAIT -- BOO_ATTACKED -- BOO_BOUNCED_ON -- BOO_CAGE_ACT_FALLING -- BOO_CAGE_ACT_IN_BOO -- BOO_CAGE_ACT_MARIO_JUMPING_IN -- BOO_CAGE_ACT_ON_GROUND -- BOO_CAGE_ACT_USELESS -- BOO_DEATH_STATUS_ALIVE -- BOO_DEATH_STATUS_DEAD -- BOO_DEATH_STATUS_DYING -- BOO_NOT_ATTACKED -- BOWSER_PUZZLE_ACT_DONE -- BOWSER_PUZZLE_ACT_SPAWN_PIECES -- BOWSER_PUZZLE_ACT_WAIT_FOR_COMPLETE -- BULLY_ACT_ACTIVATE_AND_FALL -- BULLY_ACT_BACK_UP -- BULLY_ACT_CHASE_MARIO -- BULLY_ACT_DEATH_PLANE_DEATH -- BULLY_ACT_INACTIVE -- BULLY_ACT_KNOCKBACK -- BULLY_ACT_LAVA_DEATH -- BULLY_ACT_PATROL -- BULLY_BP_SIZE_BIG -- BULLY_BP_SIZE_SMALL -- BULLY_STYPE_CHILL -- BULLY_STYPE_GENERIC -- BULLY_STYPE_MINION -- BUTTERFLY_ACT_FOLLOW_MARIO -- BUTTERFLY_ACT_RESTING -- BUTTERFLY_ACT_RETURN_HOME -- CAMERA_LAKITU_BP_FOLLOW_CAMERA -- CAMERA_LAKITU_BP_INTRO -- CAMERA_LAKITU_INTRO_ACT_SPAWN_CLOUD -- CAMERA_LAKITU_INTRO_ACT_TRIGGER_CUTSCENE -- CAMERA_LAKITU_INTRO_ACT_UNK2 -- CANNON_TRAP_DOOR_ACT_CAM_ZOOM -- CANNON_TRAP_DOOR_ACT_CLOSED -- CANNON_TRAP_DOOR_ACT_OPEN -- CANNON_TRAP_DOOR_ACT_OPENING -- CELEB_STAR_ACT_FACE_CAMERA -- CELEB_STAR_ACT_SPIN_AROUND_MARIO -- CHAIN_CHOMP_ACT_MOVE -- CHAIN_CHOMP_ACT_UNINITIALIZED -- CHAIN_CHOMP_ACT_UNLOAD_CHAIN -- CHAIN_CHOMP_CHAIN_PART_BP_PIVOT -- CHAIN_CHOMP_NOT_RELEASED -- CHAIN_CHOMP_RELEASED_BREAK_GATE -- CHAIN_CHOMP_RELEASED_END_CUTSCENE -- CHAIN_CHOMP_RELEASED_JUMP_AWAY -- CHAIN_CHOMP_RELEASED_LUNGE_AROUND -- CHAIN_CHOMP_RELEASED_TRIGGER_CUTSCENE -- CHAIN_CHOMP_SUB_ACT_LUNGE -- CHAIN_CHOMP_SUB_ACT_TURN -- CLOUD_ACT_FWOOSH_HIDDEN -- CLOUD_ACT_MAIN -- CLOUD_ACT_SPAWN_PARTS -- CLOUD_ACT_UNLOAD -- CLOUD_BP_FWOOSH -- CLOUD_BP_LAKITU_CLOUD -- COFFIN_ACT_IDLE -- COFFIN_ACT_STAND_UP -- COFFIN_BP_STATIC -- COFFIN_SPAWNER_ACT_COFFINS_UNLOADED -- DIALOG_UNK1_AWAIT_DIALOG -- DIALOG_UNK1_BEGIN_DIALOG -- DIALOG_UNK1_DISABLE_TIME_STOP -- DIALOG_UNK1_ENABLE_TIME_STOP -- DIALOG_UNK1_FLAG_4 -- DIALOG_UNK1_FLAG_DEFAULT -- DIALOG_UNK1_FLAG_RESPONSE -- DIALOG_UNK1_INTERRUPT_MARIO_ACTION -- DIALOG_UNK2_AWAIT_DIALOG -- DIALOG_UNK2_ENABLE_TIME_STOP -- DIALOG_UNK2_END_DIALOG -- DIALOG_UNK2_FLAG_0 -- DIALOG_UNK2_LEAVE_TIME_STOP_ENABLED -- DIALOG_UNK2_TURN_AND_INTERRUPT_MARIO_ACTION -- DORRIE_ACT_LOWER_HEAD -- DORRIE_ACT_MOVE -- DORRIE_ACT_RAISE_HEAD -- ENEMY_LAKITU_ACT_MAIN -- ENEMY_LAKITU_ACT_UNINITIALIZED -- ENEMY_LAKITU_SUB_ACT_HOLD_SPINY -- ENEMY_LAKITU_SUB_ACT_NO_SPINY -- ENEMY_LAKITU_SUB_ACT_THROW_SPINY -- EYEROK_BOSS_ACT_DEAD -- EYEROK_BOSS_ACT_DIE -- EYEROK_BOSS_ACT_FIGHT -- EYEROK_BOSS_ACT_PAUSE -- EYEROK_BOSS_ACT_SHOW_INTRO_TEXT -- EYEROK_BOSS_ACT_SLEEP -- EYEROK_BOSS_ACT_WAKE_UP -- EYEROK_HAND_ACT_ATTACKED -- EYEROK_HAND_ACT_BECOME_ACTIVE -- EYEROK_HAND_ACT_BEGIN_DOUBLE_POUND -- EYEROK_HAND_ACT_CLOSE -- EYEROK_HAND_ACT_DEAD -- EYEROK_HAND_ACT_DIE -- EYEROK_HAND_ACT_DOUBLE_POUND -- EYEROK_HAND_ACT_FIST_PUSH -- EYEROK_HAND_ACT_FIST_SWEEP -- EYEROK_HAND_ACT_IDLE -- EYEROK_HAND_ACT_OPEN -- EYEROK_HAND_ACT_PAUSE -- EYEROK_HAND_ACT_RECOVER -- EYEROK_HAND_ACT_RETREAT -- EYEROK_HAND_ACT_SHOW_EYE -- EYEROK_HAND_ACT_SLEEP -- EYEROK_HAND_ACT_SMASH -- EYEROK_HAND_ACT_TARGET_MARIO -- FAKE_MONEYBAG_COIN_ACT_IDLE -- FAKE_MONEYBAG_COIN_ACT_TRANSFORM -- FALLING_PILLAR_ACT_FALLING -- FALLING_PILLAR_ACT_IDLE -- FALLING_PILLAR_ACT_TURNING -- FIRE_PIRANHA_PLANT_ACT_GROW -- FIRE_PIRANHA_PLANT_ACT_HIDE -- FIRE_SPITTER_ACT_IDLE -- FIRE_SPITTER_ACT_SPIT_FIRE -- FISH_ACT_FLEE -- FISH_ACT_INIT -- FISH_ACT_ROAM -- FISH_SPAWNER_ACT_IDLE -- FISH_SPAWNER_ACT_RESPAWN -- FISH_SPAWNER_ACT_SPAWN -- FISH_SPAWNER_BP_FEW_BLUE -- FISH_SPAWNER_BP_FEW_CYAN -- FISH_SPAWNER_BP_MANY_BLUE -- FISH_SPAWNER_BP_MANY_CYAN -- FLY_GUY_ACT_APPROACH_MARIO -- FLY_GUY_ACT_IDLE -- FLY_GUY_ACT_LUNGE -- FLY_GUY_ACT_SHOOT_FIRE -- FREE_BBALL_ACT_IDLE -- FREE_BBALL_ACT_RESET -- FREE_BBALL_ACT_ROLL -- GOOMBA_ACT_ATTACKED_MARIO -- GOOMBA_ACT_JUMP -- GOOMBA_ACT_WALK -- GOOMBA_BP_SIZE_MASK -- GOOMBA_BP_TRIPLET_FLAG_MASK -- GOOMBA_SIZE_HUGE -- GOOMBA_SIZE_REGULAR -- GOOMBA_SIZE_TINY -- GOOMBA_TRIPLET_SPAWNER_ACT_LOADED -- GOOMBA_TRIPLET_SPAWNER_ACT_UNLOADED -- GOOMBA_TRIPLET_SPAWNER_BP_EXTRA_GOOMBAS_MASK -- GOOMBA_TRIPLET_SPAWNER_BP_SIZE_MASK -- HAUNTED_BOOKSHELF_ACT_IDLE -- HAUNTED_BOOKSHELF_ACT_RECEDE -- HELD_DROPPED +- ACTIVE_FLAG_UNK10 +- ACTIVE_FLAG_DORMANT +- RESPAWN_INFO_TYPE_NULL +- RESPAWN_INFO_TYPE_32 +- RESPAWN_INFO_TYPE_16 +- RESPAWN_INFO_DONT_RESPAWN +- OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE +- OBJ_FLAG_MOVE_XZ_USING_FVEL +- OBJ_FLAG_MOVE_Y_WITH_TERMINAL_VEL +- OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW +- OBJ_FLAG_SET_FACE_ANGLE_TO_MOVE_ANGLE +- OBJ_FLAG_0020 +- OBJ_FLAG_COMPUTE_DIST_TO_MARIO +- OBJ_FLAG_ACTIVE_FROM_AFAR +- OBJ_FLAG_0100 +- OBJ_FLAG_TRANSFORM_RELATIVE_TO_PARENT +- OBJ_FLAG_HOLDABLE +- OBJ_FLAG_SET_THROW_MATRIX_FROM_TRANSFORM +- OBJ_FLAG_1000 +- OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO +- OBJ_FLAG_PERSISTENT_RESPAWN +- OBJ_FLAG_8000 +- OBJ_FLAG_30 - HELD_FREE - HELD_HELD - HELD_THROWN -- HIDDEN_BLUE_COIN_ACT_ACTIVE +- HELD_DROPPED +- DIALOG_UNK1_ENABLE_TIME_STOP +- DIALOG_UNK1_INTERRUPT_MARIO_ACTION +- DIALOG_UNK1_BEGIN_DIALOG +- DIALOG_UNK1_AWAIT_DIALOG +- DIALOG_UNK1_DISABLE_TIME_STOP +- DIALOG_UNK1_FLAG_DEFAULT +- DIALOG_UNK1_FLAG_RESPONSE +- DIALOG_UNK1_FLAG_4 +- DIALOG_UNK2_ENABLE_TIME_STOP +- DIALOG_UNK2_TURN_AND_INTERRUPT_MARIO_ACTION +- DIALOG_UNK2_AWAIT_DIALOG +- DIALOG_UNK2_END_DIALOG +- DIALOG_UNK2_FLAG_0 +- DIALOG_UNK2_LEAVE_TIME_STOP_ENABLED +- OBJ_MOVE_LANDED +- OBJ_MOVE_ON_GROUND +- OBJ_MOVE_LEFT_GROUND +- OBJ_MOVE_ENTERED_WATER +- OBJ_MOVE_AT_WATER_SURFACE +- OBJ_MOVE_UNDERWATER_OFF_GROUND +- OBJ_MOVE_UNDERWATER_ON_GROUND +- OBJ_MOVE_IN_AIR +- OBJ_MOVE_OUT_SCOPE +- OBJ_MOVE_HIT_WALL +- OBJ_MOVE_HIT_EDGE +- OBJ_MOVE_ABOVE_LAVA +- OBJ_MOVE_LEAVING_WATER +- OBJ_MOVE_BOUNCE +- OBJ_MOVE_ABOVE_DEATH_BARRIER +- OBJ_MOVE_MASK_ON_GROUND +- OBJ_MOVE_MASK_IN_WATER +- ACTIVE_PARTICLE_DUST +- ACTIVE_PARTICLE_UNUSED_1 +- ACTIVE_PARTICLE_UNUSED_2 +- ACTIVE_PARTICLE_SPARKLES +- ACTIVE_PARTICLE_H_STAR +- ACTIVE_PARTICLE_BUBBLE +- ACTIVE_PARTICLE_WATER_SPLASH +- ACTIVE_PARTICLE_IDLE_WATER_WAVE +- ACTIVE_PARTICLE_SHALLOW_WATER_WAVE +- ACTIVE_PARTICLE_PLUNGE_BUBBLE +- ACTIVE_PARTICLE_WAVE_TRAIL +- ACTIVE_PARTICLE_FIRE +- ACTIVE_PARTICLE_SHALLOW_WATER_SPLASH +- ACTIVE_PARTICLE_LEAF +- ACTIVE_PARTICLE_DIRT +- ACTIVE_PARTICLE_MIST_CIRCLE +- ACTIVE_PARTICLE_SNOW +- ACTIVE_PARTICLE_BREATH +- ACTIVE_PARTICLE_V_STAR +- ACTIVE_PARTICLE_TRIANGLE +- OBJ_ACT_LAVA_DEATH +- OBJ_ACT_DEATH_PLANE_DEATH +- OBJ_ACT_HORIZONTAL_KNOCKBACK +- OBJ_ACT_VERTICAL_KNOCKBACK +- OBJ_ACT_SQUISHED +- TTC_SPEED_SLOW +- TTC_SPEED_FAST +- TTC_SPEED_RANDOM +- TTC_SPEED_STOPPED +- BOBOMB_BP_STYPE_GENERIC +- BOBOMB_BP_STYPE_STATIONARY +- BOBOMB_ACT_PATROL +- BOBOMB_ACT_LAUNCHED +- BOBOMB_ACT_CHASE_MARIO +- BOBOMB_ACT_EXPLODE +- BOBOMB_ACT_LAVA_DEATH +- BOBOMB_ACT_DEATH_PLANE_DEATH - HIDDEN_BLUE_COIN_ACT_INACTIVE - HIDDEN_BLUE_COIN_ACT_WAITING +- HIDDEN_BLUE_COIN_ACT_ACTIVE +- BLUE_COIN_SWITCH_ACT_IDLE +- BLUE_COIN_SWITCH_ACT_RECEDING +- BLUE_COIN_SWITCH_ACT_TICKING +- BLUE_COIN_SWITCH_ACT_RESPAWNING +- MOV_BCOIN_ACT_STILL +- MOV_BCOIN_ACT_MOVING +- MOV_YCOIN_ACT_IDLE +- MOV_YCOIN_ACT_BLINKING +- MOV_YCOIN_ACT_LAVA_DEATH +- MOV_YCOIN_ACT_DEATH_PLANE_DEATH +- BOBOMB_BUDDY_BP_STYPE_GENERIC +- BOBOMB_BUDDY_BP_STYPE_BOB_GRASS_KBB +- BOBOMB_BUDDY_BP_STYPE_BOB_CANNON_KBB +- BOBOMB_BUDDY_BP_STYPE_BOB_GRASS +- BOBOMB_BUDDY_ACT_IDLE +- BOBOMB_BUDDY_ACT_TURN_TO_TALK +- BOBOMB_BUDDY_ACT_TALK +- BOBOMB_BUDDY_ROLE_ADVICE +- BOBOMB_BUDDY_ROLE_CANNON +- BOBOMB_BUDDY_CANNON_UNOPENED +- BOBOMB_BUDDY_CANNON_OPENING +- BOBOMB_BUDDY_CANNON_OPENED +- BOBOMB_BUDDY_CANNON_STOP_TALKING +- BOBOMB_BUDDY_HAS_NOT_TALKED +- BOBOMB_BUDDY_HAS_TALKED +- FISH_SPAWNER_ACT_SPAWN +- FISH_SPAWNER_ACT_IDLE +- FISH_SPAWNER_ACT_RESPAWN +- FISH_SPAWNER_BP_MANY_BLUE +- FISH_SPAWNER_BP_FEW_BLUE +- FISH_SPAWNER_BP_MANY_CYAN +- FISH_SPAWNER_BP_FEW_CYAN +- FISH_ACT_INIT +- FISH_ACT_ROAM +- FISH_ACT_FLEE +- BLUE_FISH_ACT_DIVE +- BLUE_FISH_ACT_TURN +- BLUE_FISH_ACT_ASCEND +- BLUE_FISH_ACT_TURN_BACK +- BLUE_FISH_ACT_SPAWN +- BLUE_FISH_ACT_ROOM +- BLUE_FISH_ACT_DUPLICATE +- CANNON_TRAP_DOOR_ACT_CLOSED +- CANNON_TRAP_DOOR_ACT_CAM_ZOOM +- CANNON_TRAP_DOOR_ACT_OPENING +- CANNON_TRAP_DOOR_ACT_OPEN +- HOMING_AMP_ACT_INACTIVE - HOMING_AMP_ACT_APPEAR -- HOMING_AMP_ACT_ATTACK_COOLDOWN - HOMING_AMP_ACT_CHASE - HOMING_AMP_ACT_GIVE_UP -- HOMING_AMP_ACT_INACTIVE +- HOMING_AMP_ACT_ATTACK_COOLDOWN +- AMP_BP_ROT_RADIUS_200 +- AMP_BP_ROT_RADIUS_300 +- AMP_BP_ROT_RADIUS_400 +- AMP_BP_ROT_RADIUS_0 +- AMP_ACT_IDLE +- AMP_ACT_ATTACK_COOLDOWN +- BUTTERFLY_ACT_RESTING +- BUTTERFLY_ACT_FOLLOW_MARIO +- BUTTERFLY_ACT_RETURN_HOME +- HOOT_AVAIL_ASLEEP_IN_TREE +- HOOT_AVAIL_WANTS_TO_TALK +- HOOT_AVAIL_READY_TO_FLY - HOOT_ACT_ASCENT - HOOT_ACT_CARRY - HOOT_ACT_TIRED -- HOOT_AVAIL_ASLEEP_IN_TREE -- HOOT_AVAIL_READY_TO_FLY -- HOOT_AVAIL_WANTS_TO_TALK +- BULLY_BP_SIZE_SMALL +- BULLY_BP_SIZE_BIG +- BULLY_ACT_PATROL +- BULLY_ACT_CHASE_MARIO +- BULLY_ACT_KNOCKBACK +- BULLY_ACT_BACK_UP +- BULLY_ACT_INACTIVE +- BULLY_ACT_ACTIVATE_AND_FALL +- BULLY_ACT_LAVA_DEATH +- BULLY_ACT_DEATH_PLANE_DEATH +- BULLY_STYPE_GENERIC +- BULLY_STYPE_MINION +- BULLY_STYPE_CHILL +- WATER_RING_ACT_NOT_COLLECTED +- WATER_RING_ACT_COLLECTED - JS_RING_SPAWNER_ACT_ACTIVE - JS_RING_SPAWNER_ACT_INACTIVE -- KLEPTO_ACT_APPROACH_TARGET_HOLDING -- KLEPTO_ACT_CIRCLE_TARGET_HOLDING -- KLEPTO_ACT_DIVE_AT_MARIO -- KLEPTO_ACT_RESET_POSITION -- KLEPTO_ACT_RETREAT -- KLEPTO_ACT_STRUCK_BY_MARIO -- KLEPTO_ACT_TURN_TOWARD_MARIO -- KLEPTO_ACT_WAIT_FOR_MARIO -- KLEPTO_ANIM_STATE_HOLDING_CAP -- KLEPTO_ANIM_STATE_HOLDING_NOTHING -- KLEPTO_ANIM_STATE_HOLDING_STAR +- CELEB_STAR_ACT_SPIN_AROUND_MARIO +- CELEB_STAR_ACT_FACE_CAMERA +- LLL_DRAWBRIDGE_ACT_LOWER +- LLL_DRAWBRIDGE_ACT_RAISE +- BOMP_ACT_WAIT +- BOMP_ACT_POKE_OUT +- BOMP_ACT_EXTEND +- BOMP_ACT_RETRACT +- WF_SLID_BRICK_PTFM_BP_MOV_VEL_10 +- WF_SLID_BRICK_PTFM_BP_MOV_VEL_15 +- WF_SLID_BRICK_PTFM_BP_MOV_VEL_20 +- WF_SLID_BRICK_PTFM_ACT_WAIT +- WF_SLID_BRICK_PTFM_ACT_EXTEND +- WF_SLID_BRICK_PTFM_ACT_RETRACT +- FAKE_MONEYBAG_COIN_ACT_IDLE +- FAKE_MONEYBAG_COIN_ACT_TRANSFORM +- MONEYBAG_ACT_APPEAR +- MONEYBAG_ACT_UNUSED_APPEAR +- MONEYBAG_ACT_MOVE_AROUND +- MONEYBAG_ACT_RETURN_HOME +- MONEYBAG_ACT_DISAPPEAR +- MONEYBAG_ACT_DEATH +- MONEYBAG_JUMP_LANDING +- MONEYBAG_JUMP_PREPARE +- MONEYBAG_JUMP_JUMP +- MONEYBAG_JUMP_JUMP_AND_BOUNCE +- MONEYBAG_JUMP_WALK_AROUND +- MONEYBAG_JUMP_WALK_HOME +- BBALL_ACT_INITIALIZE +- BBALL_ACT_ROLL +- BBALL_BP_STYPE_BOB_UPPER +- BBALL_BP_STYPE_TTM +- BBALL_BP_STYPE_BOB_LOWER +- BBALL_BP_STYPE_THI_LARGE +- BBALL_BP_STYPE_THI_SMALL +- FREE_BBALL_ACT_IDLE +- FREE_BBALL_ACT_ROLL +- FREE_BBALL_ACT_RESET +- BETA_CHEST_ACT_IDLE_CLOSED +- BETA_CHEST_ACT_OPENING +- BETA_CHEST_ACT_IDLE_OPEN +- BBH_TILTING_TRAP_PLATFORM_ACT_MARIO_ON +- BBH_TILTING_TRAP_PLATFORM_ACT_MARIO_OFF +- BOO_DEATH_STATUS_ALIVE +- BOO_DEATH_STATUS_DYING +- BOO_DEATH_STATUS_DEAD +- BOO_NOT_ATTACKED +- BOO_ATTACKED +- BOO_BOUNCED_ON +- BETA_BOO_KEY_ACT_IN_BOO +- BETA_BOO_KEY_ACT_DROPPING +- BETA_BOO_KEY_ACT_DROPPED +- BOO_CAGE_ACT_IN_BOO +- BOO_CAGE_ACT_FALLING +- BOO_CAGE_ACT_ON_GROUND +- BOO_CAGE_ACT_MARIO_JUMPING_IN +- BOO_CAGE_ACT_USELESS +- HAUNTED_BOOKSHELF_ACT_IDLE +- HAUNTED_BOOKSHELF_ACT_RECEDE +- BBH_NEAR_MERRY_GO_ROUND_ROOM +- BBH_DYNAMIC_SURFACE_ROOM +- BBH_OUTSIDE_ROOM +- COFFIN_SPAWNER_ACT_COFFINS_UNLOADED +- COFFIN_ACT_IDLE +- COFFIN_ACT_STAND_UP +- COFFIN_BP_STATIC +- ARROW_LIFT_ACT_IDLE +- ARROW_LIFT_ACT_MOVING_AWAY +- ARROW_LIFT_ACT_MOVING_BACK +- ARROW_LIFT_NOT_DONE_MOVING +- ARROW_LIFT_DONE_MOVING +- YOSHI_ACT_IDLE +- YOSHI_ACT_WALK +- YOSHI_ACT_TALK +- YOSHI_ACT_WALK_JUMP_OFF_ROOF +- YOSHI_ACT_FINISH_JUMPING_AND_DESPAWN +- YOSHI_ACT_GIVE_PRESENT +- YOSHI_ACT_CREDITS +- KOOPA_UNSHELLED_ACT_RUN +- KOOPA_UNSHELLED_ACT_DIVE +- KOOPA_UNSHELLED_ACT_LYING +- KOOPA_UNSHELLED_ACT_UNUSED3 +- KOOPA_SHELLED_ACT_STOPPED +- KOOPA_SHELLED_ACT_WALK +- KOOPA_SHELLED_ACT_RUN_FROM_MARIO +- KOOPA_SHELLED_ACT_LYING +- KOOPA_SHELLED_ACT_DIE +- KOOPA_THE_QUICK_ACT_WAIT_BEFORE_RACE +- KOOPA_THE_QUICK_ACT_UNUSED1 +- KOOPA_THE_QUICK_ACT_SHOW_INIT_TEXT +- KOOPA_THE_QUICK_ACT_RACE +- KOOPA_THE_QUICK_ACT_DECELERATE +- KOOPA_THE_QUICK_ACT_STOP +- KOOPA_THE_QUICK_ACT_AFTER_RACE +- KOOPA_SHELLED_SUB_ACT_START_WALK +- KOOPA_SHELLED_SUB_ACT_WALK +- KOOPA_SHELLED_SUB_ACT_STOP_WALK +- KOOPA_THE_QUICK_SUB_ACT_START_RUN +- KOOPA_THE_QUICK_SUB_ACT_RUN +- KOOPA_THE_QUICK_SUB_ACT_JUMP +- KOOPA_THE_QUICK_BOB_INDEX +- KOOPA_THE_QUICK_THI_INDEX +- KOOPA_BP_UNSHELLED +- KOOPA_BP_NORMAL - KOOPA_BP_KOOPA_THE_QUICK_BASE - KOOPA_BP_KOOPA_THE_QUICK_BOB - KOOPA_BP_KOOPA_THE_QUICK_THI -- KOOPA_BP_NORMAL - KOOPA_BP_TINY -- KOOPA_BP_UNSHELLED -- KOOPA_SHELLED_ACT_DIE -- KOOPA_SHELLED_ACT_LYING -- KOOPA_SHELLED_ACT_RUN_FROM_MARIO -- KOOPA_SHELLED_ACT_STOPPED -- KOOPA_SHELLED_ACT_WALK -- KOOPA_SHELLED_SUB_ACT_START_WALK -- KOOPA_SHELLED_SUB_ACT_STOP_WALK -- KOOPA_SHELLED_SUB_ACT_WALK -- KOOPA_THE_QUICK_ACT_AFTER_RACE -- KOOPA_THE_QUICK_ACT_DECELERATE -- KOOPA_THE_QUICK_ACT_RACE -- KOOPA_THE_QUICK_ACT_SHOW_INIT_TEXT -- KOOPA_THE_QUICK_ACT_STOP -- KOOPA_THE_QUICK_ACT_UNUSED1 -- KOOPA_THE_QUICK_ACT_WAIT_BEFORE_RACE -- KOOPA_THE_QUICK_BOB_INDEX -- KOOPA_THE_QUICK_SUB_ACT_JUMP -- KOOPA_THE_QUICK_SUB_ACT_RUN -- KOOPA_THE_QUICK_SUB_ACT_START_RUN -- KOOPA_THE_QUICK_THI_INDEX -- KOOPA_UNSHELLED_ACT_DIVE -- KOOPA_UNSHELLED_ACT_LYING -- KOOPA_UNSHELLED_ACT_RUN -- KOOPA_UNSHELLED_ACT_UNUSED3 -- LLL_DRAWBRIDGE_ACT_LOWER -- LLL_DRAWBRIDGE_ACT_RAISE -- MAD_PIANO_ACT_ATTACK -- MAD_PIANO_ACT_WAIT -- MANTA_ACT_NO_RINGS +- POKEY_ACT_UNINITIALIZED +- POKEY_ACT_WANDER +- POKEY_ACT_UNLOAD_PARTS +- SWOOP_ACT_IDLE +- SWOOP_ACT_MOVE +- FLY_GUY_ACT_IDLE +- FLY_GUY_ACT_APPROACH_MARIO +- FLY_GUY_ACT_LUNGE +- FLY_GUY_ACT_SHOOT_FIRE +- GOOMBA_TRIPLET_SPAWNER_BP_SIZE_MASK +- GOOMBA_TRIPLET_SPAWNER_BP_EXTRA_GOOMBAS_MASK +- GOOMBA_TRIPLET_SPAWNER_ACT_UNLOADED +- GOOMBA_TRIPLET_SPAWNER_ACT_LOADED +- GOOMBA_BP_SIZE_MASK +- GOOMBA_SIZE_REGULAR +- GOOMBA_SIZE_HUGE +- GOOMBA_SIZE_TINY +- GOOMBA_BP_TRIPLET_FLAG_MASK +- GOOMBA_ACT_WALK +- GOOMBA_ACT_ATTACKED_MARIO +- GOOMBA_ACT_JUMP +- CHAIN_CHOMP_ACT_UNINITIALIZED +- CHAIN_CHOMP_ACT_MOVE +- CHAIN_CHOMP_ACT_UNLOAD_CHAIN +- CHAIN_CHOMP_SUB_ACT_TURN +- CHAIN_CHOMP_SUB_ACT_LUNGE +- CHAIN_CHOMP_NOT_RELEASED +- CHAIN_CHOMP_RELEASED_TRIGGER_CUTSCENE +- CHAIN_CHOMP_RELEASED_LUNGE_AROUND +- CHAIN_CHOMP_RELEASED_BREAK_GATE +- CHAIN_CHOMP_RELEASED_JUMP_AWAY +- CHAIN_CHOMP_RELEASED_END_CUTSCENE +- CHAIN_CHOMP_CHAIN_PART_BP_PIVOT +- WOODEN_POST_BP_NO_COINS_MASK +- WIGGLER_ACT_UNINITIALIZED +- WIGGLER_ACT_WALK +- WIGGLER_ACT_KNOCKBACK +- WIGGLER_ACT_JUMPED_ON +- WIGGLER_ACT_SHRINK +- WIGGLER_ACT_FALL_THROUGH_FLOOR +- WIGGLER_TEXT_STATUS_AWAIT_DIALOG +- WIGGLER_TEXT_STATUS_SHOWING_DIALOG +- WIGGLER_TEXT_STATUS_COMPLETED_DIALOG +- SPINY_ACT_WALK +- SPINY_ACT_HELD_BY_LAKITU +- SPINY_ACT_THROWN_BY_LAKITU +- SPINY_ACT_ATTACKED_MARIO +- ENEMY_LAKITU_ACT_UNINITIALIZED +- ENEMY_LAKITU_ACT_MAIN +- ENEMY_LAKITU_SUB_ACT_NO_SPINY +- ENEMY_LAKITU_SUB_ACT_HOLD_SPINY +- ENEMY_LAKITU_SUB_ACT_THROW_SPINY +- CLOUD_ACT_SPAWN_PARTS +- CLOUD_ACT_MAIN +- CLOUD_ACT_UNLOAD +- CLOUD_ACT_FWOOSH_HIDDEN +- CLOUD_BP_FWOOSH +- CLOUD_BP_LAKITU_CLOUD +- CAMERA_LAKITU_INTRO_ACT_TRIGGER_CUTSCENE +- CAMERA_LAKITU_INTRO_ACT_SPAWN_CLOUD +- CAMERA_LAKITU_INTRO_ACT_UNK2 +- CAMERA_LAKITU_BP_FOLLOW_CAMERA +- CAMERA_LAKITU_BP_INTRO - MANTA_ACT_SPAWN_RINGS -- MIPS_ACT_FALL_DOWN -- MIPS_ACT_FOLLOW_PATH -- MIPS_ACT_IDLE -- MIPS_ACT_WAIT_FOR_ANIMATION_DONE -- MIPS_ACT_WAIT_FOR_NEARBY_MARIO -- MIPS_STAR_STATUS_ALREADY_SPAWNED_STAR -- MIPS_STAR_STATUS_HAVENT_SPAWNED_STAR -- MIPS_STAR_STATUS_SHOULD_SPAWN_STAR -- MONEYBAG_ACT_APPEAR -- MONEYBAG_ACT_DEATH -- MONEYBAG_ACT_DISAPPEAR -- MONEYBAG_ACT_MOVE_AROUND -- MONEYBAG_ACT_RETURN_HOME -- MONEYBAG_ACT_UNUSED_APPEAR -- MONEYBAG_JUMP_JUMP -- MONEYBAG_JUMP_JUMP_AND_BOUNCE -- MONEYBAG_JUMP_LANDING -- MONEYBAG_JUMP_PREPARE -- MONEYBAG_JUMP_WALK_AROUND -- MONEYBAG_JUMP_WALK_HOME -- MONTY_MOLE_ACT_BEGIN_JUMP_INTO_HOLE -- MONTY_MOLE_ACT_HIDE -- MONTY_MOLE_ACT_JUMP_INTO_HOLE -- MONTY_MOLE_ACT_JUMP_OUT_OF_HOLE -- MONTY_MOLE_ACT_RISE_FROM_HOLE +- MANTA_ACT_NO_RINGS - MONTY_MOLE_ACT_SELECT_HOLE +- MONTY_MOLE_ACT_RISE_FROM_HOLE - MONTY_MOLE_ACT_SPAWN_ROCK +- MONTY_MOLE_ACT_BEGIN_JUMP_INTO_HOLE - MONTY_MOLE_ACT_THROW_ROCK +- MONTY_MOLE_ACT_JUMP_INTO_HOLE +- MONTY_MOLE_ACT_HIDE +- MONTY_MOLE_ACT_JUMP_OUT_OF_HOLE - MONTY_MOLE_BP_NO_ROCK - MONTY_MOLE_ROCK_ACT_HELD - MONTY_MOLE_ROCK_ACT_MOVE -- MOV_BCOIN_ACT_MOVING -- MOV_BCOIN_ACT_STILL -- MOV_YCOIN_ACT_BLINKING -- MOV_YCOIN_ACT_DEATH_PLANE_DEATH -- MOV_YCOIN_ACT_IDLE -- MOV_YCOIN_ACT_LAVA_DEATH -- MR_BLIZZARD_ACT_BURROW -- MR_BLIZZARD_ACT_DEATH -- MR_BLIZZARD_ACT_HIDE_UNHIDE -- MR_BLIZZARD_ACT_JUMP -- MR_BLIZZARD_ACT_RISE_FROM_GROUND -- MR_BLIZZARD_ACT_ROTATE -- MR_BLIZZARD_ACT_SPAWN_SNOWBALL -- MR_BLIZZARD_ACT_THROW_SNOWBALL -- MR_BLIZZARD_STYPE_JUMPING -- MR_BLIZZARD_STYPE_NO_CAP -- OBJ_ACT_DEATH_PLANE_DEATH -- OBJ_ACT_HORIZONTAL_KNOCKBACK -- OBJ_ACT_LAVA_DEATH -- OBJ_ACT_SQUISHED -- OBJ_ACT_VERTICAL_KNOCKBACK -- OBJ_FLAG_0020 -- OBJ_FLAG_0100 -- OBJ_FLAG_1000 -- OBJ_FLAG_30 -- OBJ_FLAG_8000 -- OBJ_FLAG_ACTIVE_FROM_AFAR -- OBJ_FLAG_COMPUTE_ANGLE_TO_MARIO -- OBJ_FLAG_COMPUTE_DIST_TO_MARIO -- OBJ_FLAG_HOLDABLE -- OBJ_FLAG_MOVE_XZ_USING_FVEL -- OBJ_FLAG_MOVE_Y_WITH_TERMINAL_VEL -- OBJ_FLAG_PERSISTENT_RESPAWN -- OBJ_FLAG_SET_FACE_ANGLE_TO_MOVE_ANGLE -- OBJ_FLAG_SET_FACE_YAW_TO_MOVE_YAW -- OBJ_FLAG_SET_THROW_MATRIX_FROM_TRANSFORM -- OBJ_FLAG_TRANSFORM_RELATIVE_TO_PARENT -- OBJ_FLAG_UPDATE_GFX_POS_AND_ANGLE -- OBJ_MOVE_ABOVE_DEATH_BARRIER -- OBJ_MOVE_ABOVE_LAVA -- OBJ_MOVE_AT_WATER_SURFACE -- OBJ_MOVE_BOUNCE -- OBJ_MOVE_ENTERED_WATER -- OBJ_MOVE_HIT_EDGE -- OBJ_MOVE_HIT_WALL -- OBJ_MOVE_IN_AIR -- OBJ_MOVE_LANDED -- OBJ_MOVE_LEAVING_WATER -- OBJ_MOVE_LEFT_GROUND -- OBJ_MOVE_MASK_IN_WATER -- OBJ_MOVE_MASK_ON_GROUND -- OBJ_MOVE_ON_GROUND -- OBJ_MOVE_OUT_SCOPE -- OBJ_MOVE_UNDERWATER_OFF_GROUND -- OBJ_MOVE_UNDERWATER_ON_GROUND -- PENGUIN_ANIM_IDLE -- PENGUIN_ANIM_WALK -- PENGUIN_WALK_BABY -- PENGUIN_WALK_BIG -- PIRANHA_PLANT_ACT_ATTACKED -- PIRANHA_PLANT_ACT_BITING +- UKIKI_ACT_IDLE +- UKIKI_ACT_RUN +- UKIKI_ACT_TURN_TO_MARIO +- UKIKI_ACT_JUMP +- UKIKI_ACT_GO_TO_CAGE +- UKIKI_ACT_WAIT_TO_RESPAWN +- UKIKI_ACT_UNUSED_TURN +- UKIKI_ACT_RETURN_HOME +- UKIKI_SUB_ACT_TAUNT_NONE +- UKIKI_SUB_ACT_TAUNT_ITCH +- UKIKI_SUB_ACT_TAUNT_SCREECH +- UKIKI_SUB_ACT_TAUNT_JUMP_CLAP +- UKIKI_SUB_ACT_TAUNT_HANDSTAND +- UKIKI_SUB_ACT_CAGE_RUN_TO_CAGE +- UKIKI_SUB_ACT_CAGE_WAIT_FOR_MARIO +- UKIKI_SUB_ACT_CAGE_TALK_TO_MARIO +- UKIKI_SUB_ACT_CAGE_TURN_TO_CAGE +- UKIKI_SUB_ACT_CAGE_JUMP_TO_CAGE +- UKIKI_SUB_ACT_CAGE_LAND_ON_CAGE +- UKIKI_SUB_ACT_CAGE_SPIN_ON_CAGE +- UKIKI_SUB_ACT_CAGE_DESPAWN +- UKIKI_TEXT_DEFAULT +- UKIKI_TEXT_CAGE_TEXTBOX +- UKIKI_TEXT_GO_TO_CAGE +- UKIKI_TEXT_STOLE_CAP +- UKIKI_TEXT_HAS_CAP +- UKIKI_TEXT_GAVE_CAP_BACK +- UKIKI_TEXT_DO_NOT_LET_GO +- UKIKI_TEXT_STEAL_CAP +- UKIKI_CAGE +- UKIKI_CAP +- UKIKI_ANIM_RUN +- UKIKI_ANIM_UNUSED_WALK +- UKIKI_ANIM_UNUSED_APOSE +- UKIKI_ANIM_UNUSED_DEATH +- UKIKI_ANIM_SCREECH +- UKIKI_ANIM_JUMP_CLAP +- UKIKI_ANIM_UNUSED_HOP +- UKIKI_ANIM_LAND +- UKIKI_ANIM_JUMP +- UKIKI_ANIM_ITCH +- UKIKI_ANIM_HANDSTAND +- UKIKI_ANIM_TURN +- UKIKI_ANIM_HELD +- UKIKI_ANIM_STATE_DEFAULT +- UKIKI_ANIM_STATE_EYE_CLOSED +- UKIKI_ANIM_STATE_CAP_ON +- UKIKI_CAP_ON +- UKIKI_CAGE_STAR_ACT_IN_CAGE +- UKIKI_CAGE_STAR_ACT_SPAWN_STAR +- UKIKI_CAGE_ACT_WAIT_FOR_UKIKI +- UKIKI_CAGE_ACT_SPIN +- UKIKI_CAGE_ACT_FALL +- UKIKI_CAGE_ACT_HIDE - PIRANHA_PLANT_ACT_IDLE -- PIRANHA_PLANT_ACT_RESPAWN -- PIRANHA_PLANT_ACT_SHRINK_AND_DIE - PIRANHA_PLANT_ACT_SLEEPING -- PIRANHA_PLANT_ACT_STOPPED_BITING -- PIRANHA_PLANT_ACT_WAIT_TO_RESPAWN +- PIRANHA_PLANT_ACT_BITING - PIRANHA_PLANT_ACT_WOKEN_UP -- PIRANHA_PLANT_BUBBLE_ACT_BURST -- PIRANHA_PLANT_BUBBLE_ACT_GROW_SHRINK_LOOP +- PIRANHA_PLANT_ACT_STOPPED_BITING +- PIRANHA_PLANT_ACT_ATTACKED +- PIRANHA_PLANT_ACT_SHRINK_AND_DIE +- PIRANHA_PLANT_ACT_WAIT_TO_RESPAWN +- PIRANHA_PLANT_ACT_RESPAWN - PIRANHA_PLANT_BUBBLE_ACT_IDLE -- PLATFORM_ON_TRACK_ACT_FALL +- PIRANHA_PLANT_BUBBLE_ACT_GROW_SHRINK_LOOP +- PIRANHA_PLANT_BUBBLE_ACT_BURST - PLATFORM_ON_TRACK_ACT_INIT +- PLATFORM_ON_TRACK_ACT_WAIT_FOR_MARIO - PLATFORM_ON_TRACK_ACT_MOVE_ALONG_TRACK - PLATFORM_ON_TRACK_ACT_PAUSE_BRIEFLY -- PLATFORM_ON_TRACK_ACT_WAIT_FOR_MARIO -- PLATFORM_ON_TRACK_BP_DONT_DISAPPEAR -- PLATFORM_ON_TRACK_BP_DONT_TURN_ROLL -- PLATFORM_ON_TRACK_BP_DONT_TURN_YAW +- PLATFORM_ON_TRACK_ACT_FALL - PLATFORM_ON_TRACK_BP_MASK_PATH - PLATFORM_ON_TRACK_BP_MASK_TYPE - PLATFORM_ON_TRACK_BP_RETURN_TO_START +- PLATFORM_ON_TRACK_BP_DONT_DISAPPEAR +- PLATFORM_ON_TRACK_BP_DONT_TURN_YAW +- PLATFORM_ON_TRACK_BP_DONT_TURN_ROLL - PLATFORM_ON_TRACK_TYPE_CARPET +- PLATFORM_ON_TRACK_TYPE_SKI_LIFT - PLATFORM_ON_TRACK_TYPE_CHECKERED - PLATFORM_ON_TRACK_TYPE_GRATE -- PLATFORM_ON_TRACK_TYPE_SKI_LIFT -- POKEY_ACT_UNINITIALIZED -- POKEY_ACT_UNLOAD_PARTS -- POKEY_ACT_WANDER - PURPLE_SWITCH_IDLE - PURPLE_SWITCH_PRESSED - PURPLE_SWITCH_TICKING - PURPLE_SWITCH_UNPRESSED - PURPLE_SWITCH_WAIT_FOR_MARIO_TO_GET_OFF -- PYRAMID_ELEVATOR_AT_BOTTOM -- PYRAMID_ELEVATOR_CONSTANT_VELOCITY -- PYRAMID_ELEVATOR_END_MOVING - PYRAMID_ELEVATOR_IDLE - PYRAMID_ELEVATOR_START_MOVING +- PYRAMID_ELEVATOR_CONSTANT_VELOCITY +- PYRAMID_ELEVATOR_END_MOVING +- PYRAMID_ELEVATOR_AT_BOTTOM - PYRAMID_TOP_ACT_CHECK_IF_SOLVED -- PYRAMID_TOP_ACT_EXPLODE - PYRAMID_TOP_ACT_SPINNING +- PYRAMID_TOP_ACT_EXPLODE - PYRAMID_WALL_ACT_MOVING_DOWN - PYRAMID_WALL_ACT_MOVING_UP - PYRAMID_WALL_BP_POSITION_HIGH -- PYRAMID_WALL_BP_POSITION_LOW - PYRAMID_WALL_BP_POSITION_MIDDLE -- RACING_PENGUIN_ACT_FINISH_RACE +- PYRAMID_WALL_BP_POSITION_LOW +- PENGUIN_WALK_BABY +- PENGUIN_WALK_BIG +- PENGUIN_ANIM_WALK +- PENGUIN_ANIM_IDLE +- RACING_PENGUIN_ACT_WAIT_FOR_MARIO +- RACING_PENGUIN_ACT_SHOW_INIT_TEXT - RACING_PENGUIN_ACT_PREPARE_FOR_RACE - RACING_PENGUIN_ACT_RACE +- RACING_PENGUIN_ACT_FINISH_RACE - RACING_PENGUIN_ACT_SHOW_FINAL_TEXT -- RACING_PENGUIN_ACT_SHOW_INIT_TEXT -- RACING_PENGUIN_ACT_WAIT_FOR_MARIO -- RESPAWN_INFO_DONT_RESPAWN -- RESPAWN_INFO_TYPE_16 -- RESPAWN_INFO_TYPE_32 -- RESPAWN_INFO_TYPE_NULL +- SL_WALKING_PENGUIN_ACT_MOVING_FORWARDS +- SL_WALKING_PENGUIN_ACT_TURNING_BACK +- SL_WALKING_PENGUIN_ACT_RETURNING +- SL_WALKING_PENGUIN_ACT_TURNING_FORWARDS +- SL_SNOWMAN_WIND_ACT_IDLE +- SL_SNOWMAN_WIND_ACT_TALKING +- SL_SNOWMAN_WIND_ACT_BLOWING +- WATER_BOMB_ACT_SHOT_FROM_CANNON +- WATER_BOMB_ACT_INIT +- WATER_BOMB_ACT_DROP +- WATER_BOMB_ACT_EXPLODE +- TTC_ROTATING_SOLID_BP_CUBE +- TTC_ROTATING_SOLID_BP_TRIANGULAR_PRISM +- TTC_MOVING_BAR_ACT_WAIT +- TTC_MOVING_BAR_ACT_PULL_BACK +- TTC_MOVING_BAR_ACT_EXTEND +- TTC_MOVING_BAR_ACT_RETRACT +- TTC_COG_BP_SHAPE_MASK +- TTC_COG_BP_SHAPE_HEXAGON +- TTC_COG_BP_SHAPE_TRIANGLE +- TTC_COG_BP_DIR_MASK +- TTC_COG_BP_DIR_CCW +- TTC_COG_BP_DIR_CW +- TTC_2D_ROTATOR_BP_HAND +- TTC_2D_ROTATOR_BP_2D_COG +- ACTIVATED_BF_PLAT_TYPE_BITS_ARROW_PLAT +- ACTIVATED_BF_PLAT_TYPE_BITFS_MESH_PLAT +- ACTIVATED_BF_PLAT_TYPE_BITFS_ELEVATOR +- DORRIE_ACT_MOVE +- DORRIE_ACT_LOWER_HEAD +- DORRIE_ACT_RAISE_HEAD +- MAD_PIANO_ACT_WAIT +- MAD_PIANO_ACT_ATTACK +- FIRE_PIRANHA_PLANT_ACT_HIDE +- FIRE_PIRANHA_PLANT_ACT_GROW +- FIRE_SPITTER_ACT_IDLE +- FIRE_SPITTER_ACT_SPIT_FIRE +- EYEROK_BOSS_ACT_SLEEP +- EYEROK_BOSS_ACT_WAKE_UP +- EYEROK_BOSS_ACT_SHOW_INTRO_TEXT +- EYEROK_BOSS_ACT_FIGHT +- EYEROK_BOSS_ACT_DIE +- EYEROK_BOSS_ACT_DEAD +- EYEROK_BOSS_ACT_PAUSE +- EYEROK_HAND_ACT_SLEEP +- EYEROK_HAND_ACT_IDLE +- EYEROK_HAND_ACT_OPEN +- EYEROK_HAND_ACT_SHOW_EYE +- EYEROK_HAND_ACT_CLOSE +- EYEROK_HAND_ACT_RETREAT +- EYEROK_HAND_ACT_TARGET_MARIO +- EYEROK_HAND_ACT_SMASH +- EYEROK_HAND_ACT_FIST_PUSH +- EYEROK_HAND_ACT_FIST_SWEEP +- EYEROK_HAND_ACT_BEGIN_DOUBLE_POUND +- EYEROK_HAND_ACT_DOUBLE_POUND +- EYEROK_HAND_ACT_ATTACKED +- EYEROK_HAND_ACT_RECOVER +- EYEROK_HAND_ACT_BECOME_ACTIVE +- EYEROK_HAND_ACT_DIE +- EYEROK_HAND_ACT_DEAD +- EYEROK_HAND_ACT_PAUSE +- KLEPTO_ACT_CIRCLE_TARGET_HOLDING +- KLEPTO_ACT_APPROACH_TARGET_HOLDING +- KLEPTO_ACT_WAIT_FOR_MARIO +- KLEPTO_ACT_TURN_TOWARD_MARIO +- KLEPTO_ACT_DIVE_AT_MARIO +- KLEPTO_ACT_RESET_POSITION +- KLEPTO_ACT_STRUCK_BY_MARIO +- KLEPTO_ACT_RETREAT +- KLEPTO_ANIM_STATE_HOLDING_NOTHING +- KLEPTO_ANIM_STATE_HOLDING_CAP +- KLEPTO_ANIM_STATE_HOLDING_STAR +- BIRD_ACT_INACTIVE +- BIRD_ACT_FLY +- BIRD_BP_SPAWNED +- BIRD_BP_SPAWNER - SKEETER_ACT_IDLE - SKEETER_ACT_LUNGE - SKEETER_ACT_WALK -- SL_SNOWMAN_WIND_ACT_BLOWING -- SL_SNOWMAN_WIND_ACT_IDLE -- SL_SNOWMAN_WIND_ACT_TALKING -- SL_WALKING_PENGUIN_ACT_MOVING_FORWARDS -- SL_WALKING_PENGUIN_ACT_RETURNING -- SL_WALKING_PENGUIN_ACT_TURNING_BACK -- SL_WALKING_PENGUIN_ACT_TURNING_FORWARDS - SNUFIT_ACT_IDLE - SNUFIT_ACT_SHOOT -- SPINY_ACT_ATTACKED_MARIO -- SPINY_ACT_HELD_BY_LAKITU -- SPINY_ACT_THROWN_BY_LAKITU -- SPINY_ACT_WALK -- SWOOP_ACT_IDLE -- SWOOP_ACT_MOVE -- TRIPLET_BUTTERFLY_ACT_ACTIVATE -- TRIPLET_BUTTERFLY_ACT_EXPLODE -- TRIPLET_BUTTERFLY_ACT_INIT -- TRIPLET_BUTTERFLY_ACT_WANDER -- TRIPLET_BUTTERFLY_BP_BUTTERFLY_NUM -- TRIPLET_BUTTERFLY_BP_NO_BOMBS -- TRIPLET_BUTTERFLY_TYPE_EXPLODES -- TRIPLET_BUTTERFLY_TYPE_NORMAL -- TRIPLET_BUTTERFLY_TYPE_SPAWN_1UP -- TTC_2D_ROTATOR_BP_2D_COG -- TTC_2D_ROTATOR_BP_HAND -- TTC_COG_BP_DIR_CCW -- TTC_COG_BP_DIR_CW -- TTC_COG_BP_DIR_MASK -- TTC_COG_BP_SHAPE_HEXAGON -- TTC_COG_BP_SHAPE_MASK -- TTC_COG_BP_SHAPE_TRIANGLE -- TTC_MOVING_BAR_ACT_EXTEND -- TTC_MOVING_BAR_ACT_PULL_BACK -- TTC_MOVING_BAR_ACT_RETRACT -- TTC_MOVING_BAR_ACT_WAIT -- TTC_ROTATING_SOLID_BP_CUBE -- TTC_ROTATING_SOLID_BP_TRIANGULAR_PRISM -- TTC_SPEED_FAST -- TTC_SPEED_RANDOM -- TTC_SPEED_SLOW -- TTC_SPEED_STOPPED +- TWEESTER_ACT_IDLE - TWEESTER_ACT_CHASE - TWEESTER_ACT_HIDE -- TWEESTER_ACT_IDLE -- TWEESTER_SUB_ACT_CHASE - TWEESTER_SUB_ACT_WAIT -- UKIKI_ACT_GO_TO_CAGE -- UKIKI_ACT_IDLE -- UKIKI_ACT_JUMP -- UKIKI_ACT_RETURN_HOME -- UKIKI_ACT_RUN -- UKIKI_ACT_TURN_TO_MARIO -- UKIKI_ACT_UNUSED_TURN -- UKIKI_ACT_WAIT_TO_RESPAWN -- UKIKI_ANIM_HANDSTAND -- UKIKI_ANIM_HELD -- UKIKI_ANIM_ITCH -- UKIKI_ANIM_JUMP -- UKIKI_ANIM_JUMP_CLAP -- UKIKI_ANIM_LAND -- UKIKI_ANIM_RUN -- UKIKI_ANIM_SCREECH -- UKIKI_ANIM_STATE_CAP_ON -- UKIKI_ANIM_STATE_DEFAULT -- UKIKI_ANIM_STATE_EYE_CLOSED -- UKIKI_ANIM_TURN -- UKIKI_ANIM_UNUSED_APOSE -- UKIKI_ANIM_UNUSED_DEATH -- UKIKI_ANIM_UNUSED_HOP -- UKIKI_ANIM_UNUSED_WALK -- UKIKI_CAGE -- UKIKI_CAGE_ACT_FALL -- UKIKI_CAGE_ACT_HIDE -- UKIKI_CAGE_ACT_SPIN -- UKIKI_CAGE_ACT_WAIT_FOR_UKIKI -- UKIKI_CAGE_STAR_ACT_IN_CAGE -- UKIKI_CAGE_STAR_ACT_SPAWN_STAR -- UKIKI_CAP -- UKIKI_CAP_ON -- UKIKI_SUB_ACT_CAGE_DESPAWN -- UKIKI_SUB_ACT_CAGE_JUMP_TO_CAGE -- UKIKI_SUB_ACT_CAGE_LAND_ON_CAGE -- UKIKI_SUB_ACT_CAGE_RUN_TO_CAGE -- UKIKI_SUB_ACT_CAGE_SPIN_ON_CAGE -- UKIKI_SUB_ACT_CAGE_TALK_TO_MARIO -- UKIKI_SUB_ACT_CAGE_TURN_TO_CAGE -- UKIKI_SUB_ACT_CAGE_WAIT_FOR_MARIO -- UKIKI_SUB_ACT_TAUNT_HANDSTAND -- UKIKI_SUB_ACT_TAUNT_ITCH -- UKIKI_SUB_ACT_TAUNT_JUMP_CLAP -- UKIKI_SUB_ACT_TAUNT_NONE -- UKIKI_SUB_ACT_TAUNT_SCREECH -- UKIKI_TEXT_CAGE_TEXTBOX -- UKIKI_TEXT_DEFAULT -- UKIKI_TEXT_DO_NOT_LET_GO -- UKIKI_TEXT_GAVE_CAP_BACK -- UKIKI_TEXT_GO_TO_CAGE -- UKIKI_TEXT_HAS_CAP -- UKIKI_TEXT_STEAL_CAP -- UKIKI_TEXT_STOLE_CAP -- WATER_BOMB_ACT_DROP -- WATER_BOMB_ACT_EXPLODE -- WATER_BOMB_ACT_INIT -- WATER_BOMB_ACT_SHOT_FROM_CANNON -- WATER_LEVEL_DIAMOND_ACT_CHANGE_WATER_LEVEL -- WATER_LEVEL_DIAMOND_ACT_IDLE -- WATER_LEVEL_DIAMOND_ACT_IDLE_SPINNING +- TWEESTER_SUB_ACT_CHASE +- TRIPLET_BUTTERFLY_ACT_INIT +- TRIPLET_BUTTERFLY_ACT_WANDER +- TRIPLET_BUTTERFLY_ACT_ACTIVATE +- TRIPLET_BUTTERFLY_ACT_EXPLODE +- TRIPLET_BUTTERFLY_BP_BUTTERFLY_NUM +- TRIPLET_BUTTERFLY_BP_NO_BOMBS +- TRIPLET_BUTTERFLY_TYPE_NORMAL +- TRIPLET_BUTTERFLY_TYPE_EXPLODES +- TRIPLET_BUTTERFLY_TYPE_SPAWN_1UP - WATER_LEVEL_DIAMOND_ACT_INIT -- WATER_RING_ACT_COLLECTED -- WATER_RING_ACT_NOT_COLLECTED -- WF_SLID_BRICK_PTFM_ACT_EXTEND -- WF_SLID_BRICK_PTFM_ACT_RETRACT -- WF_SLID_BRICK_PTFM_ACT_WAIT -- WF_SLID_BRICK_PTFM_BP_MOV_VEL_10 -- WF_SLID_BRICK_PTFM_BP_MOV_VEL_15 -- WF_SLID_BRICK_PTFM_BP_MOV_VEL_20 -- WIGGLER_ACT_FALL_THROUGH_FLOOR -- WIGGLER_ACT_JUMPED_ON -- WIGGLER_ACT_KNOCKBACK -- WIGGLER_ACT_SHRINK -- WIGGLER_ACT_UNINITIALIZED -- WIGGLER_ACT_WALK -- WIGGLER_TEXT_STATUS_AWAIT_DIALOG -- WIGGLER_TEXT_STATUS_COMPLETED_DIALOG -- WIGGLER_TEXT_STATUS_SHOWING_DIALOG -- WOODEN_POST_BP_NO_COINS_MASK -- YOSHI_ACT_CREDITS -- YOSHI_ACT_FINISH_JUMPING_AND_DESPAWN -- YOSHI_ACT_GIVE_PRESENT -- YOSHI_ACT_IDLE -- YOSHI_ACT_TALK -- YOSHI_ACT_WALK -- YOSHI_ACT_WALK_JUMP_OFF_ROOF +- WATER_LEVEL_DIAMOND_ACT_IDLE +- WATER_LEVEL_DIAMOND_ACT_CHANGE_WATER_LEVEL +- WATER_LEVEL_DIAMOND_ACT_IDLE_SPINNING +- MIPS_ACT_WAIT_FOR_NEARBY_MARIO +- MIPS_ACT_FOLLOW_PATH +- MIPS_ACT_WAIT_FOR_ANIMATION_DONE +- MIPS_ACT_FALL_DOWN +- MIPS_ACT_IDLE +- MIPS_STAR_STATUS_HAVENT_SPAWNED_STAR +- MIPS_STAR_STATUS_SHOULD_SPAWN_STAR +- MIPS_STAR_STATUS_ALREADY_SPAWNED_STAR +- FALLING_PILLAR_ACT_IDLE +- FALLING_PILLAR_ACT_TURNING +- FALLING_PILLAR_ACT_FALLING +- BOWSER_PUZZLE_ACT_SPAWN_PIECES +- BOWSER_PUZZLE_ACT_WAIT_FOR_COMPLETE +- BOWSER_PUZZLE_ACT_DONE +- MR_BLIZZARD_ACT_SPAWN_SNOWBALL +- MR_BLIZZARD_ACT_HIDE_UNHIDE +- MR_BLIZZARD_ACT_RISE_FROM_GROUND +- MR_BLIZZARD_ACT_ROTATE +- MR_BLIZZARD_ACT_THROW_SNOWBALL +- MR_BLIZZARD_ACT_BURROW +- MR_BLIZZARD_ACT_DEATH +- MR_BLIZZARD_ACT_JUMP +- MR_BLIZZARD_STYPE_NO_CAP +- MR_BLIZZARD_STYPE_JUMPING [:arrow_up_small:](#)
## [object_list_processor.h](#object_list_processor.h) -- OBJECT_POOL_CAPACITY -- TIME_STOP_ACTIVE -- TIME_STOP_ALL_OBJECTS -- TIME_STOP_DIALOG -- TIME_STOP_ENABLED -- TIME_STOP_MARIO_AND_DOORS -- TIME_STOP_MARIO_OPENED_DOOR - TIME_STOP_UNKNOWN_0 +- TIME_STOP_ENABLED +- TIME_STOP_DIALOG +- TIME_STOP_MARIO_AND_DOORS +- TIME_STOP_ALL_OBJECTS +- TIME_STOP_MARIO_OPENED_DOOR +- TIME_STOP_ACTIVE +- OBJECT_POOL_CAPACITY ### [enum ObjectList](#ObjectList) | Identifier | Value | @@ -3154,55 +3169,55 @@
## [os_cont.h](#os_cont.h) -- A_BUTTON -- B_BUTTON -- CONT_A -- CONT_ABSOLUTE -- CONT_ADDR_CRC_ER -- CONT_B -- CONT_C -- CONT_CARD_ON -- CONT_CARD_PULL -- CONT_COLLISION_ERROR -- CONT_D -- CONT_DOWN -- CONT_E -- CONT_EEP16K -- CONT_EEPROM -- CONT_EEPROM_BUSY -- CONT_F -- CONT_FRAME_ERROR -- CONT_G -- CONT_JOYPORT -- CONT_L -- CONT_LEFT - CONT_NO_RESPONSE_ERROR - CONT_OVERRUN_ERROR -- CONT_R +- CONT_FRAME_ERROR +- CONT_COLLISION_ERROR +- CONT_ABSOLUTE - CONT_RELATIVE -- CONT_RIGHT -- CONT_START +- CONT_JOYPORT +- CONT_EEPROM +- CONT_EEP16K - CONT_TYPE_MASK -- CONT_TYPE_MOUSE - CONT_TYPE_NORMAL +- CONT_TYPE_MOUSE - CONT_TYPE_VOICE -- CONT_UP +- CONT_CARD_ON +- CONT_CARD_PULL +- CONT_ADDR_CRC_ER +- CONT_EEPROM_BUSY +- CONT_A +- CONT_B - CONT_X - CONT_Y -- D_CBUTTONS -- D_JPAD -- L_CBUTTONS -- L_JPAD -- L_TRIG -- R_CBUTTONS -- R_JPAD -- R_TRIG -- START_BUTTON -- U_CBUTTONS -- U_JPAD +- CONT_G +- CONT_START +- CONT_UP +- CONT_DOWN +- CONT_LEFT +- CONT_RIGHT +- CONT_L +- CONT_R +- CONT_E +- CONT_D +- CONT_C +- CONT_F +- A_BUTTON +- B_BUTTON - X_BUTTON - Y_BUTTON +- L_TRIG +- R_TRIG - Z_TRIG +- START_BUTTON +- U_JPAD +- L_JPAD +- R_JPAD +- D_JPAD +- U_CBUTTONS +- L_CBUTTONS +- R_CBUTTONS +- D_CBUTTONS [:arrow_up_small:](#) @@ -3232,40 +3247,6 @@ ## [save_file.h](#save_file.h) - EEPROM_SIZE - NUM_SAVE_FILES -- SAVE_FLAG_CAP_ON_GROUND -- SAVE_FLAG_CAP_ON_KLEPTO -- SAVE_FLAG_CAP_ON_MR_BLIZZARD -- SAVE_FLAG_CAP_ON_UKIKI -- SAVE_FLAG_COLLECTED_MIPS_STAR_1 -- SAVE_FLAG_COLLECTED_MIPS_STAR_2 -- SAVE_FLAG_COLLECTED_TOAD_STAR_1 -- SAVE_FLAG_COLLECTED_TOAD_STAR_2 -- SAVE_FLAG_COLLECTED_TOAD_STAR_3 -- SAVE_FLAG_DDD_MOVED_BACK -- SAVE_FLAG_FILE_EXISTS -- SAVE_FLAG_HAVE_KEY_1 -- SAVE_FLAG_HAVE_KEY_2 -- SAVE_FLAG_HAVE_METAL_CAP -- SAVE_FLAG_HAVE_VANISH_CAP -- SAVE_FLAG_HAVE_WING_CAP -- SAVE_FLAG_MOAT_DRAINED -- SAVE_FLAG_UNLOCKED_50_STAR_DOOR -- SAVE_FLAG_UNLOCKED_BASEMENT_DOOR -- SAVE_FLAG_UNLOCKED_BITDW_DOOR -- SAVE_FLAG_UNLOCKED_BITFS_DOOR -- SAVE_FLAG_UNLOCKED_CCM_DOOR -- SAVE_FLAG_UNLOCKED_JRB_DOOR -- SAVE_FLAG_UNLOCKED_PSS_DOOR -- SAVE_FLAG_UNLOCKED_UPSTAIRS_DOOR -- SAVE_FLAG_UNLOCKED_WF_DOOR - -### [enum EuLanguages](#EuLanguages) -| Identifier | Value | -| :--------- | :---- | -| LANGUAGE_ENGLISH | 0 | -| LANGUAGE_FRENCH | 1 | -| LANGUAGE_GERMAN | 2 | -| LANGUAGE_MAX | 3 | ### [enum SaveFileIndex](#SaveFileIndex) | Identifier | Value | @@ -3274,6 +3255,40 @@ | SAVE_FILE_B | 1 | | SAVE_FILE_C | 2 | | SAVE_FILE_D | 3 | +- SAVE_FLAG_FILE_EXISTS +- SAVE_FLAG_HAVE_WING_CAP +- SAVE_FLAG_HAVE_METAL_CAP +- SAVE_FLAG_HAVE_VANISH_CAP +- SAVE_FLAG_HAVE_KEY_1 +- SAVE_FLAG_HAVE_KEY_2 +- SAVE_FLAG_UNLOCKED_BASEMENT_DOOR +- SAVE_FLAG_UNLOCKED_UPSTAIRS_DOOR +- SAVE_FLAG_DDD_MOVED_BACK +- SAVE_FLAG_MOAT_DRAINED +- SAVE_FLAG_UNLOCKED_PSS_DOOR +- SAVE_FLAG_UNLOCKED_WF_DOOR +- SAVE_FLAG_UNLOCKED_CCM_DOOR +- SAVE_FLAG_UNLOCKED_JRB_DOOR +- SAVE_FLAG_UNLOCKED_BITDW_DOOR +- SAVE_FLAG_UNLOCKED_BITFS_DOOR +- SAVE_FLAG_CAP_ON_GROUND +- SAVE_FLAG_CAP_ON_KLEPTO +- SAVE_FLAG_CAP_ON_UKIKI +- SAVE_FLAG_CAP_ON_MR_BLIZZARD +- SAVE_FLAG_UNLOCKED_50_STAR_DOOR +- SAVE_FLAG_COLLECTED_TOAD_STAR_1 +- SAVE_FLAG_COLLECTED_TOAD_STAR_2 +- SAVE_FLAG_COLLECTED_TOAD_STAR_3 +- SAVE_FLAG_COLLECTED_MIPS_STAR_1 +- SAVE_FLAG_COLLECTED_MIPS_STAR_2 + +### [enum EuLanguages](#EuLanguages) +| Identifier | Value | +| :--------- | :---- | +| LANGUAGE_ENGLISH | 0 | +| LANGUAGE_FRENCH | 1 | +| LANGUAGE_GERMAN | 2 | +| LANGUAGE_MAX | 3 | [:arrow_up_small:](#) @@ -3328,369 +3343,369 @@
## [sm64.h](#sm64.h) -- ACT_AIR_HIT_WALL -- ACT_AIR_THROW -- ACT_AIR_THROW_LAND -- ACT_BACKFLIP -- ACT_BACKFLIP_LAND -- ACT_BACKFLIP_LAND_STOP -- ACT_BACKWARD_AIR_KB -- ACT_BACKWARD_GROUND_KB -- ACT_BACKWARD_ROLLOUT -- ACT_BACKWARD_WATER_KB -- ACT_BBH_ENTER_JUMP -- ACT_BBH_ENTER_SPIN -- ACT_BEGIN_SLIDING -- ACT_BRAKING -- ACT_BRAKING_STOP -- ACT_BREASTSTROKE -- ACT_BUBBLED -- ACT_BURNING_FALL -- ACT_BURNING_GROUND -- ACT_BURNING_JUMP -- ACT_BUTT_SLIDE -- ACT_BUTT_SLIDE_AIR -- ACT_BUTT_SLIDE_STOP -- ACT_BUTT_STUCK_IN_GROUND -- ACT_CAUGHT_IN_WHIRLPOOL -- ACT_CLIMBING_POLE -- ACT_COUGHING -- ACT_CRAWLING -- ACT_CRAZY_BOX_BOUNCE -- ACT_CREDITS_CUTSCENE -- ACT_CROUCHING -- ACT_CROUCH_SLIDE -- ACT_DEATH_EXIT -- ACT_DEATH_EXIT_LAND -- ACT_DEATH_ON_BACK -- ACT_DEATH_ON_STOMACH -- ACT_DEBUG_FREE_MOVE -- ACT_DECELERATING -- ACT_DISAPPEARED -- ACT_DIVE -- ACT_DIVE_PICKING_UP -- ACT_DIVE_SLIDE -- ACT_DOUBLE_JUMP -- ACT_DOUBLE_JUMP_LAND -- ACT_DOUBLE_JUMP_LAND_STOP -- ACT_DROWNING -- ACT_EATEN_BY_BUBBA -- ACT_ELECTROCUTION -- ACT_EMERGE_FROM_PIPE -- ACT_END_PEACH_CUTSCENE -- ACT_END_WAVING_CUTSCENE -- ACT_ENTERING_STAR_DOOR -- ACT_EXIT_AIRBORNE -- ACT_EXIT_LAND_SAVE_DIALOG -- ACT_FALLING_DEATH_EXIT -- ACT_FALLING_EXIT_AIRBORNE -- ACT_FALL_AFTER_STAR_GRAB -- ACT_FEET_STUCK_IN_GROUND -- ACT_FINISH_TURNING_AROUND -- ACT_FIRST_PERSON -- ACT_FLAG_AIR -- ACT_FLAG_ALLOW_FIRST_PERSON -- ACT_FLAG_ALLOW_VERTICAL_WIND_ACTION -- ACT_FLAG_ATTACKING -- ACT_FLAG_BUTT_OR_STOMACH_SLIDE -- ACT_FLAG_CONTROL_JUMP_HEIGHT -- ACT_FLAG_CUSTOM_ACTION -- ACT_FLAG_DIVING -- ACT_FLAG_FLYING -- ACT_FLAG_HANGING -- ACT_FLAG_IDLE -- ACT_FLAG_INTANGIBLE -- ACT_FLAG_INVULNERABLE -- ACT_FLAG_METAL_WATER -- ACT_FLAG_MOVING -- ACT_FLAG_ON_POLE -- ACT_FLAG_PAUSE_EXIT -- ACT_FLAG_RIDING_SHELL -- ACT_FLAG_SHORT_HITBOX -- ACT_FLAG_STATIONARY -- ACT_FLAG_SWIMMING -- ACT_FLAG_SWIMMING_OR_FLYING -- ACT_FLAG_THROWING -- ACT_FLAG_WATER_OR_TEXT -- ACT_FLUTTER_KICK -- ACT_FLYING -- ACT_FLYING_TRIPLE_JUMP -- ACT_FORWARD_AIR_KB -- ACT_FORWARD_GROUND_KB -- ACT_FORWARD_ROLLOUT -- ACT_FORWARD_WATER_KB -- ACT_FREEFALL -- ACT_FREEFALL_LAND -- ACT_FREEFALL_LAND_STOP -- ACT_GETTING_BLOWN -- ACT_GRABBED -- ACT_GRAB_POLE_FAST -- ACT_GRAB_POLE_SLOW -- ACT_GROUND_BONK -- ACT_GROUND_POUND -- ACT_GROUND_POUND_LAND -- ACT_GROUP_AIRBORNE -- ACT_GROUP_AUTOMATIC -- ACT_GROUP_CUTSCENE -- ACT_GROUP_MASK -- ACT_GROUP_MOVING -- ACT_GROUP_OBJECT -- ACT_GROUP_STATIONARY -- ACT_GROUP_SUBMERGED -- ACT_HANGING -- ACT_HANG_MOVING -- ACT_HARD_BACKWARD_AIR_KB -- ACT_HARD_BACKWARD_GROUND_KB -- ACT_HARD_FORWARD_AIR_KB -- ACT_HARD_FORWARD_GROUND_KB -- ACT_HEAD_STUCK_IN_GROUND -- ACT_HEAVY_THROW -- ACT_HOLDING_BOWSER -- ACT_HOLDING_POLE -- ACT_HOLD_BEGIN_SLIDING -- ACT_HOLD_BREASTSTROKE -- ACT_HOLD_BUTT_SLIDE -- ACT_HOLD_BUTT_SLIDE_AIR -- ACT_HOLD_BUTT_SLIDE_STOP -- ACT_HOLD_DECELERATING -- ACT_HOLD_FLUTTER_KICK -- ACT_HOLD_FREEFALL -- ACT_HOLD_FREEFALL_LAND -- ACT_HOLD_FREEFALL_LAND_STOP -- ACT_HOLD_HEAVY_IDLE -- ACT_HOLD_HEAVY_WALKING -- ACT_HOLD_IDLE -- ACT_HOLD_JUMP -- ACT_HOLD_JUMP_LAND -- ACT_HOLD_JUMP_LAND_STOP -- ACT_HOLD_METAL_WATER_FALLING -- ACT_HOLD_METAL_WATER_FALL_LAND -- ACT_HOLD_METAL_WATER_JUMP -- ACT_HOLD_METAL_WATER_JUMP_LAND -- ACT_HOLD_METAL_WATER_STANDING -- ACT_HOLD_METAL_WATER_WALKING -- ACT_HOLD_PANTING_UNUSED -- ACT_HOLD_QUICKSAND_JUMP_LAND -- ACT_HOLD_STOMACH_SLIDE -- ACT_HOLD_SWIMMING_END -- ACT_HOLD_WALKING -- ACT_HOLD_WATER_ACTION_END -- ACT_HOLD_WATER_IDLE -- ACT_HOLD_WATER_JUMP -- ACT_IDLE -- ACT_ID_MASK -- ACT_INDEX_MASK -- ACT_INTRO_CUTSCENE -- ACT_IN_CANNON -- ACT_IN_QUICKSAND -- ACT_JUMBO_STAR_CUTSCENE -- ACT_JUMP -- ACT_JUMP_KICK -- ACT_JUMP_LAND -- ACT_JUMP_LAND_STOP -- ACT_LAVA_BOOST -- ACT_LAVA_BOOST_LAND -- ACT_LEDGE_CLIMB_DOWN -- ACT_LEDGE_CLIMB_FAST -- ACT_LEDGE_CLIMB_SLOW_1 -- ACT_LEDGE_CLIMB_SLOW_2 -- ACT_LEDGE_GRAB -- ACT_LONG_JUMP -- ACT_LONG_JUMP_LAND -- ACT_LONG_JUMP_LAND_STOP -- ACT_METAL_WATER_FALLING -- ACT_METAL_WATER_FALL_LAND -- ACT_METAL_WATER_JUMP -- ACT_METAL_WATER_JUMP_LAND -- ACT_METAL_WATER_STANDING -- ACT_METAL_WATER_WALKING -- ACT_MOVE_PUNCHING -- ACT_NUM_ACTIONS_PER_GROUP -- ACT_NUM_GROUPS -- ACT_PANTING -- ACT_PICKING_UP -- ACT_PICKING_UP_BOWSER -- ACT_PLACING_DOWN -- ACT_PULLING_DOOR -- ACT_PUNCHING -- ACT_PUSHING_DOOR -- ACT_PUTTING_ON_CAP -- ACT_QUICKSAND_DEATH -- ACT_QUICKSAND_JUMP_LAND -- ACT_READING_AUTOMATIC_DIALOG -- ACT_READING_NPC_DIALOG -- ACT_READING_SIGN -- ACT_RELEASING_BOWSER -- ACT_RIDING_HOOT -- ACT_RIDING_SHELL_FALL -- ACT_RIDING_SHELL_GROUND -- ACT_RIDING_SHELL_JUMP -- ACT_SHIVERING -- ACT_SHOCKED -- ACT_SHOCKWAVE_BOUNCE -- ACT_SHOT_FROM_CANNON -- ACT_SIDE_FLIP -- ACT_SIDE_FLIP_LAND -- ACT_SIDE_FLIP_LAND_STOP -- ACT_SLEEPING -- ACT_SLIDE_KICK -- ACT_SLIDE_KICK_SLIDE -- ACT_SLIDE_KICK_SLIDE_STOP -- ACT_SOFT_BACKWARD_GROUND_KB -- ACT_SOFT_BONK -- ACT_SOFT_FORWARD_GROUND_KB -- ACT_SPAWN_NO_SPIN_AIRBORNE -- ACT_SPAWN_NO_SPIN_LANDING -- ACT_SPAWN_SPIN_AIRBORNE -- ACT_SPAWN_SPIN_LANDING -- ACT_SPECIAL_DEATH_EXIT -- ACT_SPECIAL_EXIT_AIRBORNE -- ACT_SPECIAL_TRIPLE_JUMP -- ACT_SQUISHED -- ACT_STANDING_AGAINST_WALL -- ACT_STANDING_DEATH -- ACT_START_CRAWLING -- ACT_START_CROUCHING -- ACT_START_HANGING -- ACT_START_SLEEPING -- ACT_STAR_DANCE_EXIT -- ACT_STAR_DANCE_NO_EXIT -- ACT_STAR_DANCE_WATER -- ACT_STEEP_JUMP -- ACT_STOMACH_SLIDE -- ACT_STOMACH_SLIDE_STOP -- ACT_STOP_CRAWLING -- ACT_STOP_CROUCHING -- ACT_SUFFOCATION -- ACT_SWIMMING_END -- ACT_TAKING_OFF_CAP -- ACT_TELEPORT_FADE_IN -- ACT_TELEPORT_FADE_OUT -- ACT_THROWING -- ACT_THROWN_BACKWARD -- ACT_THROWN_FORWARD -- ACT_TOP_OF_POLE -- ACT_TOP_OF_POLE_JUMP -- ACT_TOP_OF_POLE_TRANSITION -- ACT_TORNADO_TWIRLING -- ACT_TRIPLE_JUMP -- ACT_TRIPLE_JUMP_LAND -- ACT_TRIPLE_JUMP_LAND_STOP -- ACT_TURNING_AROUND -- ACT_TWIRLING -- ACT_TWIRL_LAND -- ACT_UNINITIALIZED -- ACT_UNKNOWN_0002020E -- ACT_UNLOCKING_KEY_DOOR -- ACT_UNLOCKING_STAR_DOOR -- ACT_UNUSED_DEATH_EXIT -- ACT_VERTICAL_WIND -- ACT_WAITING_FOR_DIALOG -- ACT_WAKING_UP -- ACT_WALKING -- ACT_WALL_KICK_AIR -- ACT_WARP_DOOR_SPAWN -- ACT_WATER_ACTION_END -- ACT_WATER_DEATH -- ACT_WATER_IDLE -- ACT_WATER_JUMP -- ACT_WATER_PLUNGE -- ACT_WATER_PUNCH -- ACT_WATER_SHELL_SWIMMING -- ACT_WATER_SHOCKED -- ACT_WATER_THROW -- AIR_STEP_CHECK_HANG -- AIR_STEP_CHECK_LEDGE_GRAB -- AIR_STEP_GRABBED_CEILING -- AIR_STEP_GRABBED_LEDGE -- AIR_STEP_HIT_LAVA_WALL -- AIR_STEP_HIT_WALL -- AIR_STEP_LANDED -- AIR_STEP_NONE -- C_BUTTONS -- END_DEMO -- GROUND_STEP_HIT_WALL -- GROUND_STEP_HIT_WALL_CONTINUE_QSTEPS -- GROUND_STEP_HIT_WALL_STOP_QSTEPS -- GROUND_STEP_LEFT_GROUND -- GROUND_STEP_NONE -- INPUT_ABOVE_SLIDE -- INPUT_A_DOWN -- INPUT_A_PRESSED -- INPUT_B_PRESSED -- INPUT_FIRST_PERSON -- INPUT_INTERACT_OBJ_GRABBABLE -- INPUT_IN_POISON_GAS -- INPUT_IN_WATER -- INPUT_NONZERO_ANALOG -- INPUT_OFF_FLOOR -- INPUT_SQUISHED -- INPUT_UNKNOWN_10 -- INPUT_UNKNOWN_12 -- INPUT_ZERO_MOVEMENT -- INPUT_Z_DOWN -- INPUT_Z_PRESSED -- LAYER_ALPHA - LAYER_FORCE - LAYER_OPAQUE - LAYER_OPAQUE_DECAL - LAYER_OPAQUE_INTER +- LAYER_ALPHA - LAYER_TRANSPARENT - LAYER_TRANSPARENT_DECAL - LAYER_TRANSPARENT_INTER -- MARIO_ACTION_SOUND_PLAYED -- MARIO_CAPS -- MARIO_CAP_IN_HAND -- MARIO_CAP_ON_HEAD -- MARIO_KICKING -- MARIO_MARIO_SOUND_PLAYED -- MARIO_METAL_CAP -- MARIO_METAL_SHOCK +- INPUT_NONZERO_ANALOG +- INPUT_A_PRESSED +- INPUT_OFF_FLOOR +- INPUT_ABOVE_SLIDE +- INPUT_FIRST_PERSON +- INPUT_ZERO_MOVEMENT +- INPUT_SQUISHED +- INPUT_A_DOWN +- INPUT_IN_POISON_GAS +- INPUT_IN_WATER +- INPUT_UNKNOWN_10 +- INPUT_INTERACT_OBJ_GRABBABLE +- INPUT_UNKNOWN_12 +- INPUT_B_PRESSED +- INPUT_Z_DOWN +- INPUT_Z_PRESSED +- GROUND_STEP_LEFT_GROUND +- GROUND_STEP_NONE +- GROUND_STEP_HIT_WALL +- GROUND_STEP_HIT_WALL_STOP_QSTEPS +- GROUND_STEP_HIT_WALL_CONTINUE_QSTEPS +- AIR_STEP_CHECK_LEDGE_GRAB +- AIR_STEP_CHECK_HANG +- AIR_STEP_NONE +- AIR_STEP_LANDED +- AIR_STEP_HIT_WALL +- AIR_STEP_GRABBED_LEDGE +- AIR_STEP_GRABBED_CEILING +- AIR_STEP_HIT_LAVA_WALL +- WATER_STEP_NONE +- WATER_STEP_HIT_FLOOR +- WATER_STEP_HIT_CEILING +- WATER_STEP_CANCELLED +- WATER_STEP_HIT_WALL +- STEP_TYPE_GROUND +- STEP_TYPE_AIR +- STEP_TYPE_WATER +- STEP_TYPE_HANG +- PARTICLE_DUST +- PARTICLE_VERTICAL_STAR +- PARTICLE_2 +- PARTICLE_SPARKLES +- PARTICLE_HORIZONTAL_STAR +- PARTICLE_BUBBLE +- PARTICLE_WATER_SPLASH +- PARTICLE_IDLE_WATER_WAVE +- PARTICLE_SHALLOW_WATER_WAVE +- PARTICLE_PLUNGE_BUBBLE +- PARTICLE_WAVE_TRAIL +- PARTICLE_FIRE +- PARTICLE_SHALLOW_WATER_SPLASH +- PARTICLE_LEAF +- PARTICLE_SNOW +- PARTICLE_DIRT +- PARTICLE_MIST_CIRCLE +- PARTICLE_BREATH +- PARTICLE_TRIANGLE +- PARTICLE_19 +- MODEL_STATE_NOISE_ALPHA +- MODEL_STATE_METAL - MARIO_NORMAL_CAP -- MARIO_PUNCHING -- MARIO_SPECIAL_CAPS +- MARIO_VANISH_CAP +- MARIO_METAL_CAP +- MARIO_WING_CAP +- MARIO_CAP_ON_HEAD +- MARIO_CAP_IN_HAND +- MARIO_METAL_SHOCK - MARIO_TELEPORTING -- MARIO_TRIPPING - MARIO_UNKNOWN_08 - MARIO_UNKNOWN_13 +- MARIO_ACTION_SOUND_PLAYED +- MARIO_MARIO_SOUND_PLAYED - MARIO_UNKNOWN_18 +- MARIO_PUNCHING +- MARIO_KICKING +- MARIO_TRIPPING - MARIO_UNKNOWN_25 - MARIO_UNKNOWN_30 - MARIO_UNKNOWN_31 -- MARIO_VANISH_CAP -- MARIO_WING_CAP -- MODEL_STATE_METAL -- MODEL_STATE_NOISE_ALPHA -- PARTICLE_19 -- PARTICLE_2 -- PARTICLE_BREATH -- PARTICLE_BUBBLE -- PARTICLE_DIRT -- PARTICLE_DUST -- PARTICLE_FIRE -- PARTICLE_HORIZONTAL_STAR -- PARTICLE_IDLE_WATER_WAVE -- PARTICLE_LEAF -- PARTICLE_MIST_CIRCLE -- PARTICLE_PLUNGE_BUBBLE -- PARTICLE_SHALLOW_WATER_SPLASH -- PARTICLE_SHALLOW_WATER_WAVE -- PARTICLE_SNOW -- PARTICLE_SPARKLES -- PARTICLE_TRIANGLE -- PARTICLE_VERTICAL_STAR -- PARTICLE_WATER_SPLASH -- PARTICLE_WAVE_TRAIL -- STEP_TYPE_AIR -- STEP_TYPE_GROUND -- STEP_TYPE_HANG -- STEP_TYPE_WATER +- MARIO_SPECIAL_CAPS +- MARIO_CAPS +- ACT_ID_MASK +- ACT_GROUP_MASK +- ACT_GROUP_STATIONARY +- ACT_GROUP_MOVING +- ACT_GROUP_AIRBORNE +- ACT_GROUP_SUBMERGED +- ACT_GROUP_CUTSCENE +- ACT_GROUP_AUTOMATIC +- ACT_GROUP_OBJECT +- ACT_INDEX_MASK +- ACT_NUM_GROUPS +- ACT_NUM_ACTIONS_PER_GROUP +- ACT_FLAG_STATIONARY +- ACT_FLAG_MOVING +- ACT_FLAG_AIR +- ACT_FLAG_INTANGIBLE +- ACT_FLAG_SWIMMING +- ACT_FLAG_METAL_WATER +- ACT_FLAG_SHORT_HITBOX +- ACT_FLAG_RIDING_SHELL +- ACT_FLAG_INVULNERABLE +- ACT_FLAG_BUTT_OR_STOMACH_SLIDE +- ACT_FLAG_DIVING +- ACT_FLAG_ON_POLE +- ACT_FLAG_HANGING +- ACT_FLAG_IDLE +- ACT_FLAG_ATTACKING +- ACT_FLAG_ALLOW_VERTICAL_WIND_ACTION +- ACT_FLAG_CONTROL_JUMP_HEIGHT +- ACT_FLAG_ALLOW_FIRST_PERSON +- ACT_FLAG_PAUSE_EXIT +- ACT_FLAG_SWIMMING_OR_FLYING +- ACT_FLAG_WATER_OR_TEXT +- ACT_FLAG_CUSTOM_ACTION +- ACT_FLAG_THROWING +- ACT_FLAG_FLYING +- ACT_UNINITIALIZED +- ACT_IDLE +- ACT_START_SLEEPING +- ACT_SLEEPING +- ACT_WAKING_UP +- ACT_PANTING +- ACT_HOLD_PANTING_UNUSED +- ACT_HOLD_IDLE +- ACT_HOLD_HEAVY_IDLE +- ACT_STANDING_AGAINST_WALL +- ACT_COUGHING +- ACT_SHIVERING +- ACT_IN_QUICKSAND +- ACT_UNKNOWN_0002020E +- ACT_CROUCHING +- ACT_START_CROUCHING +- ACT_STOP_CROUCHING +- ACT_START_CRAWLING +- ACT_STOP_CRAWLING +- ACT_SLIDE_KICK_SLIDE_STOP +- ACT_SHOCKWAVE_BOUNCE +- ACT_FIRST_PERSON +- ACT_BACKFLIP_LAND_STOP +- ACT_JUMP_LAND_STOP +- ACT_DOUBLE_JUMP_LAND_STOP +- ACT_FREEFALL_LAND_STOP +- ACT_SIDE_FLIP_LAND_STOP +- ACT_HOLD_JUMP_LAND_STOP +- ACT_HOLD_FREEFALL_LAND_STOP +- ACT_AIR_THROW_LAND +- ACT_TWIRL_LAND +- ACT_LAVA_BOOST_LAND +- ACT_TRIPLE_JUMP_LAND_STOP +- ACT_LONG_JUMP_LAND_STOP +- ACT_GROUND_POUND_LAND +- ACT_BRAKING_STOP +- ACT_BUTT_SLIDE_STOP +- ACT_HOLD_BUTT_SLIDE_STOP +- ACT_WALKING +- ACT_HOLD_WALKING +- ACT_TURNING_AROUND +- ACT_FINISH_TURNING_AROUND +- ACT_BRAKING +- ACT_RIDING_SHELL_GROUND +- ACT_HOLD_HEAVY_WALKING +- ACT_CRAWLING +- ACT_BURNING_GROUND +- ACT_DECELERATING +- ACT_HOLD_DECELERATING +- ACT_BEGIN_SLIDING +- ACT_HOLD_BEGIN_SLIDING +- ACT_BUTT_SLIDE +- ACT_STOMACH_SLIDE +- ACT_HOLD_BUTT_SLIDE +- ACT_HOLD_STOMACH_SLIDE +- ACT_DIVE_SLIDE +- ACT_MOVE_PUNCHING +- ACT_CROUCH_SLIDE +- ACT_SLIDE_KICK_SLIDE +- ACT_HARD_BACKWARD_GROUND_KB +- ACT_HARD_FORWARD_GROUND_KB +- ACT_BACKWARD_GROUND_KB +- ACT_FORWARD_GROUND_KB +- ACT_SOFT_BACKWARD_GROUND_KB +- ACT_SOFT_FORWARD_GROUND_KB +- ACT_GROUND_BONK +- ACT_DEATH_EXIT_LAND +- ACT_JUMP_LAND +- ACT_FREEFALL_LAND +- ACT_DOUBLE_JUMP_LAND +- ACT_SIDE_FLIP_LAND +- ACT_HOLD_JUMP_LAND +- ACT_HOLD_FREEFALL_LAND +- ACT_QUICKSAND_JUMP_LAND +- ACT_HOLD_QUICKSAND_JUMP_LAND +- ACT_TRIPLE_JUMP_LAND +- ACT_LONG_JUMP_LAND +- ACT_BACKFLIP_LAND +- ACT_JUMP +- ACT_DOUBLE_JUMP +- ACT_TRIPLE_JUMP +- ACT_BACKFLIP +- ACT_STEEP_JUMP +- ACT_WALL_KICK_AIR +- ACT_SIDE_FLIP +- ACT_LONG_JUMP +- ACT_WATER_JUMP +- ACT_DIVE +- ACT_FREEFALL +- ACT_TOP_OF_POLE_JUMP +- ACT_BUTT_SLIDE_AIR +- ACT_FLYING_TRIPLE_JUMP +- ACT_SHOT_FROM_CANNON +- ACT_FLYING +- ACT_RIDING_SHELL_JUMP +- ACT_RIDING_SHELL_FALL +- ACT_VERTICAL_WIND +- ACT_HOLD_JUMP +- ACT_HOLD_FREEFALL +- ACT_HOLD_BUTT_SLIDE_AIR +- ACT_HOLD_WATER_JUMP +- ACT_TWIRLING +- ACT_FORWARD_ROLLOUT +- ACT_AIR_HIT_WALL +- ACT_RIDING_HOOT +- ACT_GROUND_POUND +- ACT_SLIDE_KICK +- ACT_AIR_THROW +- ACT_JUMP_KICK +- ACT_BACKWARD_ROLLOUT +- ACT_CRAZY_BOX_BOUNCE +- ACT_SPECIAL_TRIPLE_JUMP +- ACT_BACKWARD_AIR_KB +- ACT_FORWARD_AIR_KB +- ACT_HARD_FORWARD_AIR_KB +- ACT_HARD_BACKWARD_AIR_KB +- ACT_BURNING_JUMP +- ACT_BURNING_FALL +- ACT_SOFT_BONK +- ACT_LAVA_BOOST +- ACT_GETTING_BLOWN +- ACT_THROWN_FORWARD +- ACT_THROWN_BACKWARD +- ACT_WATER_IDLE +- ACT_HOLD_WATER_IDLE +- ACT_WATER_ACTION_END +- ACT_HOLD_WATER_ACTION_END +- ACT_DROWNING +- ACT_BACKWARD_WATER_KB +- ACT_FORWARD_WATER_KB +- ACT_WATER_DEATH +- ACT_WATER_SHOCKED +- ACT_BREASTSTROKE +- ACT_SWIMMING_END +- ACT_FLUTTER_KICK +- ACT_HOLD_BREASTSTROKE +- ACT_HOLD_SWIMMING_END +- ACT_HOLD_FLUTTER_KICK +- ACT_WATER_SHELL_SWIMMING +- ACT_WATER_THROW +- ACT_WATER_PUNCH +- ACT_WATER_PLUNGE +- ACT_CAUGHT_IN_WHIRLPOOL +- ACT_METAL_WATER_STANDING +- ACT_HOLD_METAL_WATER_STANDING +- ACT_METAL_WATER_WALKING +- ACT_HOLD_METAL_WATER_WALKING +- ACT_METAL_WATER_FALLING +- ACT_HOLD_METAL_WATER_FALLING +- ACT_METAL_WATER_FALL_LAND +- ACT_HOLD_METAL_WATER_FALL_LAND +- ACT_METAL_WATER_JUMP +- ACT_HOLD_METAL_WATER_JUMP +- ACT_METAL_WATER_JUMP_LAND +- ACT_HOLD_METAL_WATER_JUMP_LAND +- ACT_DISAPPEARED +- ACT_INTRO_CUTSCENE +- ACT_STAR_DANCE_EXIT +- ACT_STAR_DANCE_WATER +- ACT_FALL_AFTER_STAR_GRAB +- ACT_READING_AUTOMATIC_DIALOG +- ACT_READING_NPC_DIALOG +- ACT_STAR_DANCE_NO_EXIT +- ACT_READING_SIGN +- ACT_JUMBO_STAR_CUTSCENE +- ACT_WAITING_FOR_DIALOG +- ACT_DEBUG_FREE_MOVE +- ACT_STANDING_DEATH +- ACT_QUICKSAND_DEATH +- ACT_ELECTROCUTION +- ACT_SUFFOCATION +- ACT_DEATH_ON_STOMACH +- ACT_DEATH_ON_BACK +- ACT_EATEN_BY_BUBBA +- ACT_END_PEACH_CUTSCENE +- ACT_CREDITS_CUTSCENE +- ACT_END_WAVING_CUTSCENE +- ACT_PULLING_DOOR +- ACT_PUSHING_DOOR +- ACT_WARP_DOOR_SPAWN +- ACT_EMERGE_FROM_PIPE +- ACT_SPAWN_SPIN_AIRBORNE +- ACT_SPAWN_SPIN_LANDING +- ACT_EXIT_AIRBORNE +- ACT_EXIT_LAND_SAVE_DIALOG +- ACT_DEATH_EXIT +- ACT_UNUSED_DEATH_EXIT +- ACT_FALLING_DEATH_EXIT +- ACT_SPECIAL_EXIT_AIRBORNE +- ACT_SPECIAL_DEATH_EXIT +- ACT_FALLING_EXIT_AIRBORNE +- ACT_UNLOCKING_KEY_DOOR +- ACT_UNLOCKING_STAR_DOOR +- ACT_ENTERING_STAR_DOOR +- ACT_SPAWN_NO_SPIN_AIRBORNE +- ACT_SPAWN_NO_SPIN_LANDING +- ACT_BBH_ENTER_JUMP +- ACT_BBH_ENTER_SPIN +- ACT_TELEPORT_FADE_OUT +- ACT_TELEPORT_FADE_IN +- ACT_SHOCKED +- ACT_SQUISHED +- ACT_HEAD_STUCK_IN_GROUND +- ACT_BUTT_STUCK_IN_GROUND +- ACT_FEET_STUCK_IN_GROUND +- ACT_PUTTING_ON_CAP +- ACT_TAKING_OFF_CAP +- ACT_HOLDING_POLE +- ACT_GRAB_POLE_SLOW +- ACT_GRAB_POLE_FAST +- ACT_CLIMBING_POLE +- ACT_TOP_OF_POLE_TRANSITION +- ACT_TOP_OF_POLE +- ACT_START_HANGING +- ACT_HANGING +- ACT_HANG_MOVING +- ACT_LEDGE_GRAB +- ACT_LEDGE_CLIMB_SLOW_1 +- ACT_LEDGE_CLIMB_SLOW_2 +- ACT_LEDGE_CLIMB_DOWN +- ACT_LEDGE_CLIMB_FAST +- ACT_GRABBED +- ACT_IN_CANNON +- ACT_TORNADO_TWIRLING +- ACT_BUBBLED +- ACT_PUNCHING +- ACT_PICKING_UP +- ACT_DIVE_PICKING_UP +- ACT_STOMACH_SLIDE_STOP +- ACT_PLACING_DOWN +- ACT_THROWING +- ACT_HEAVY_THROW +- ACT_PICKING_UP_BOWSER +- ACT_HOLDING_BOWSER +- ACT_RELEASING_BOWSER +- END_DEMO - VALID_BUTTONS -- WATER_STEP_CANCELLED -- WATER_STEP_HIT_CEILING -- WATER_STEP_HIT_FLOOR -- WATER_STEP_HIT_WALL -- WATER_STEP_NONE +- C_BUTTONS [:arrow_up_small:](#) @@ -3698,13 +3713,6 @@ ## [smlua_hooks.h](#smlua_hooks.h) -### [enum LuaActionHookType](#LuaActionHookType) -| Identifier | Value | -| :--------- | :---- | -| ACTION_HOOK_EVERY_FRAME | 0 | -| ACTION_HOOK_GRAVITY | 1 | -| ACTION_HOOK_MAX | 2 | - ### [enum LuaHookedEventType](#LuaHookedEventType) | Identifier | Value | | :--------- | :---- | @@ -3763,6 +3771,13 @@ | HOOK_ON_INTERACTIONS | 52 | | HOOK_MAX | 53 | +### [enum LuaActionHookType](#LuaActionHookType) +| Identifier | Value | +| :--------- | :---- | +| ACTION_HOOK_EVERY_FRAME | 0 | +| ACTION_HOOK_GRAVITY | 1 | +| ACTION_HOOK_MAX | 2 | + ### [enum LuaModMenuElementType](#LuaModMenuElementType) | Identifier | Value | | :--------- | :---- | @@ -3779,6 +3794,18 @@ ## [smlua_misc_utils.h](#smlua_misc_utils.h) +### [enum HudDisplayValue](#HudDisplayValue) +| Identifier | Value | +| :--------- | :---- | +| HUD_DISPLAY_LIVES | 0 | +| HUD_DISPLAY_COINS | 1 | +| HUD_DISPLAY_STARS | 2 | +| HUD_DISPLAY_WEDGES | 3 | +| HUD_DISPLAY_KEYS | 4 | +| HUD_DISPLAY_FLAGS | 5 | +| HUD_DISPLAY_TIMER | 6 | +| HUD_DISPLAY_CAMERA_STATUS | 7 | + ### [enum HudDisplayFlags](#HudDisplayFlags) | Identifier | Value | | :--------- | :---- | @@ -3794,18 +3821,6 @@ | HUD_DISPLAY_FLAGS_POWER | 0x0100 | | HUD_DISPLAY_FLAGS_EMPHASIZE_POWER | 0x8000 | -### [enum HudDisplayValue](#HudDisplayValue) -| Identifier | Value | -| :--------- | :---- | -| HUD_DISPLAY_LIVES | 0 | -| HUD_DISPLAY_COINS | 1 | -| HUD_DISPLAY_STARS | 2 | -| HUD_DISPLAY_WEDGES | 3 | -| HUD_DISPLAY_KEYS | 4 | -| HUD_DISPLAY_FLAGS | 5 | -| HUD_DISPLAY_TIMER | 6 | -| HUD_DISPLAY_CAMERA_STATUS | 7 | - [:arrow_up_small:](#)
@@ -4203,600 +4218,566 @@
## [sounds.h](#sounds.h) -- NO_SOUND - SOUNDARGS_MASK_BANK -- SOUNDARGS_MASK_PRIORITY - SOUNDARGS_MASK_SOUNDID +- SOUNDARGS_MASK_PRIORITY - SOUNDARGS_MASK_STATUS - SOUNDARGS_SHIFT_BANK -- SOUNDARGS_SHIFT_PRIORITY - SOUNDARGS_SHIFT_SOUNDID -- SOUND_ACTION_BONK -- SOUND_ACTION_BOUNCE_OFF_OBJECT -- SOUND_ACTION_BRUSH_HAIR -- SOUND_ACTION_CLAP_HANDS_COLD -- SOUND_ACTION_CLIMB_DOWN_TREE -- SOUND_ACTION_CLIMB_UP_POLE -- SOUND_ACTION_CLIMB_UP_TREE -- SOUND_ACTION_FLYING_FAST -- SOUND_ACTION_HANGING_STEP -- SOUND_ACTION_HIT -- SOUND_ACTION_HIT_2 -- SOUND_ACTION_HIT_3 -- SOUND_ACTION_INTRO_UNK45E -- SOUND_ACTION_INTRO_UNK45F -- SOUND_ACTION_KEY_SWISH -- SOUND_ACTION_METAL_BONK -- SOUND_ACTION_METAL_HEAVY_LANDING -- SOUND_ACTION_METAL_JUMP -- SOUND_ACTION_METAL_JUMP_WATER -- SOUND_ACTION_METAL_LANDING -- SOUND_ACTION_METAL_LAND_WATER -- SOUND_ACTION_METAL_STEP -- SOUND_ACTION_METAL_STEP_TIPTOE -- SOUND_ACTION_METAL_STEP_WATER -- SOUND_ACTION_PAT_BACK -- SOUND_ACTION_QUICKSAND_STEP -- SOUND_ACTION_READ_SIGN -- SOUND_ACTION_SHRINK_INTO_BBH -- SOUND_ACTION_SIDE_FLIP_UNK -- SOUND_ACTION_SPIN -- SOUND_ACTION_SWIM -- SOUND_ACTION_SWIM_FAST -- SOUND_ACTION_TELEPORT -- SOUND_ACTION_TERRAIN_BODY_HIT_GROUND -- SOUND_ACTION_TERRAIN_HEAVY_LANDING +- SOUNDARGS_SHIFT_PRIORITY +- SOUND_BANK_ACTION +- SOUND_BANK_MOVING +- SOUND_BANK_MARIO_VOICE +- SOUND_BANK_GENERAL +- SOUND_BANK_ENV +- SOUND_BANK_OBJ +- SOUND_BANK_AIR +- SOUND_BANK_MENU +- SOUND_BANK_GENERAL2 +- SOUND_BANK_OBJ2 +- SOUND_BANK_LUIGI_VOICE +- SOUND_BANK_WARIO_VOICE +- SOUND_BANK_TOAD_VOICE +- SOUND_BANK_COUNT +- SOUND_BANKS_ALL_BITS +- SOUND_BANKS_ALL +- SOUND_BANKS_FOREGROUND +- SOUND_BANKS_BACKGROUND +- SOUND_BANKS_DISABLED_DURING_INTRO_CUTSCENE +- SOUND_BANKS_DISABLED_AFTER_CREDITS +- SOUND_NO_VOLUME_LOSS +- SOUND_VIBRATO +- SOUND_NO_PRIORITY_LOSS +- SOUND_CONSTANT_FREQUENCY +- SOUND_LOWER_BACKGROUND_MUSIC +- SOUND_NO_ECHO +- SOUND_DISCRETE +- SOUND_STATUS_STOPPED +- SOUND_STATUS_WAITING +- SOUND_STATUS_PLAYING +- SOUND_TERRAIN_DEFAULT +- SOUND_TERRAIN_GRASS +- SOUND_TERRAIN_WATER +- SOUND_TERRAIN_STONE +- SOUND_TERRAIN_SPOOKY +- SOUND_TERRAIN_SNOW +- SOUND_TERRAIN_ICE +- SOUND_TERRAIN_SAND +- NO_SOUND - SOUND_ACTION_TERRAIN_JUMP - SOUND_ACTION_TERRAIN_LANDING - SOUND_ACTION_TERRAIN_STEP +- SOUND_ACTION_TERRAIN_BODY_HIT_GROUND - SOUND_ACTION_TERRAIN_STEP_TIPTOE - SOUND_ACTION_TERRAIN_STUCK_IN_GROUND -- SOUND_ACTION_THROW -- SOUND_ACTION_TWIRL -- SOUND_ACTION_UNK3C -- SOUND_ACTION_UNK53 -- SOUND_ACTION_UNK54 -- SOUND_ACTION_UNK55 -- SOUND_ACTION_UNK5D +- SOUND_ACTION_TERRAIN_HEAVY_LANDING +- SOUND_ACTION_METAL_JUMP +- SOUND_ACTION_METAL_LANDING +- SOUND_ACTION_METAL_STEP +- SOUND_ACTION_METAL_HEAVY_LANDING +- SOUND_ACTION_CLAP_HANDS_COLD +- SOUND_ACTION_HANGING_STEP +- SOUND_ACTION_QUICKSAND_STEP +- SOUND_ACTION_METAL_STEP_TIPTOE - SOUND_ACTION_UNKNOWN430 - SOUND_ACTION_UNKNOWN431 - SOUND_ACTION_UNKNOWN432 +- SOUND_ACTION_SWIM - SOUND_ACTION_UNKNOWN434 +- SOUND_ACTION_THROW +- SOUND_ACTION_KEY_SWISH +- SOUND_ACTION_SPIN +- SOUND_ACTION_TWIRL +- SOUND_ACTION_CLIMB_UP_TREE +- SOUND_ACTION_CLIMB_DOWN_TREE +- SOUND_ACTION_UNK3C - SOUND_ACTION_UNKNOWN43D - SOUND_ACTION_UNKNOWN43E -- SOUND_ACTION_UNKNOWN458 -- SOUND_ACTION_UNKNOWN45C +- SOUND_ACTION_PAT_BACK +- SOUND_ACTION_BRUSH_HAIR +- SOUND_ACTION_CLIMB_UP_POLE +- SOUND_ACTION_METAL_BONK - SOUND_ACTION_UNSTUCK_FROM_GROUND -- SOUND_AIR_AMP_BUZZ -- SOUND_AIR_BLOW_FIRE -- SOUND_AIR_BLOW_WIND -- SOUND_AIR_BOBOMB_LIT_FUSE -- SOUND_AIR_BOWSER_SPIT_FIRE -- SOUND_AIR_CASTLE_OUTDOORS_AMBIENT -- SOUND_AIR_CHUCKYA_MOVE -- SOUND_AIR_HEAVEHO_MOVE -- SOUND_AIR_HOWLING_WIND -- SOUND_AIR_LAKITU_FLY -- SOUND_AIR_LAKITU_FLY_HIGHPRIO -- SOUND_AIR_PEACH_TWINKLE -- SOUND_AIR_ROUGH_SLIDE -- SOUND_AIR_UNK01 -- SOUND_AIR_UNK07 -- SOUND_BANKS_ALL -- SOUND_BANKS_ALL_BITS -- SOUND_BANKS_BACKGROUND -- SOUND_BANKS_DISABLED_AFTER_CREDITS -- SOUND_BANKS_DISABLED_DURING_INTRO_CUTSCENE -- SOUND_BANKS_FOREGROUND -- SOUND_BANK_ACTION -- SOUND_BANK_AIR -- SOUND_BANK_COUNT -- SOUND_BANK_ENV -- SOUND_BANK_GENERAL -- SOUND_BANK_GENERAL2 -- SOUND_BANK_LUIGI_VOICE -- SOUND_BANK_MARIO_VOICE -- SOUND_BANK_MENU -- SOUND_BANK_MOVING -- SOUND_BANK_OBJ -- SOUND_BANK_OBJ2 -- SOUND_BANK_TOAD_VOICE -- SOUND_BANK_WARIO_VOICE -- SOUND_CONSTANT_FREQUENCY -- SOUND_DISCRETE -- SOUND_ENV_BOAT_ROCKING1 -- SOUND_ENV_DRONING1 -- SOUND_ENV_DRONING2 -- SOUND_ENV_ELEVATOR1 -- SOUND_ENV_ELEVATOR2 -- SOUND_ENV_ELEVATOR3 -- SOUND_ENV_ELEVATOR4 -- SOUND_ENV_ELEVATOR4_2 -- SOUND_ENV_MERRY_GO_ROUND_CREAKING -- SOUND_ENV_METAL_BOX_PUSH -- SOUND_ENV_MOVINGSAND -- SOUND_ENV_MOVING_SAND_SNOW -- SOUND_ENV_SINK_QUICKSAND -- SOUND_ENV_SLIDING -- SOUND_ENV_STAR -- SOUND_ENV_UNK07 -- SOUND_ENV_UNK12 -- SOUND_ENV_UNKNOWN2 -- SOUND_ENV_UNKNOWN4 -- SOUND_ENV_WATER -- SOUND_ENV_WATERFALL1 -- SOUND_ENV_WATERFALL2 -- SOUND_ENV_WATER_DRAIN -- SOUND_ENV_WIND1 -- SOUND_ENV_WIND2 -- SOUND_GENERAL2_1UP_APPEAR -- SOUND_GENERAL2_BIRD_CHIRP2 -- SOUND_GENERAL2_BOBOMB_EXPLOSION -- SOUND_GENERAL2_BOWSER_EXPLODE -- SOUND_GENERAL2_BOWSER_KEY -- SOUND_GENERAL2_PURPLE_SWITCH -- SOUND_GENERAL2_PYRAMID_TOP_EXPLOSION -- SOUND_GENERAL2_PYRAMID_TOP_SPIN -- SOUND_GENERAL2_RIGHT_ANSWER -- SOUND_GENERAL2_ROTATING_BLOCK_ALERT -- SOUND_GENERAL2_ROTATING_BLOCK_CLICK -- SOUND_GENERAL2_SPINDEL_ROLL -- SOUND_GENERAL2_STAR_APPEARS -- SOUND_GENERAL2_SWITCH_TICK_FAST -- SOUND_GENERAL2_SWITCH_TICK_SLOW +- SOUND_ACTION_HIT +- SOUND_ACTION_HIT_2 +- SOUND_ACTION_HIT_3 +- SOUND_ACTION_BONK +- SOUND_ACTION_SHRINK_INTO_BBH +- SOUND_ACTION_SWIM_FAST +- SOUND_ACTION_METAL_JUMP_WATER +- SOUND_ACTION_METAL_LAND_WATER +- SOUND_ACTION_METAL_STEP_WATER +- SOUND_ACTION_UNK53 +- SOUND_ACTION_UNK54 +- SOUND_ACTION_UNK55 +- SOUND_ACTION_FLYING_FAST +- SOUND_ACTION_TELEPORT +- SOUND_ACTION_UNKNOWN458 +- SOUND_ACTION_BOUNCE_OFF_OBJECT +- SOUND_ACTION_SIDE_FLIP_UNK +- SOUND_ACTION_READ_SIGN +- SOUND_ACTION_UNKNOWN45C +- SOUND_ACTION_UNK5D +- SOUND_ACTION_INTRO_UNK45E +- SOUND_ACTION_INTRO_UNK45F +- SOUND_MOVING_TERRAIN_SLIDE +- SOUND_MOVING_TERRAIN_RIDING_SHELL +- SOUND_MOVING_LAVA_BURN +- SOUND_MOVING_SLIDE_DOWN_POLE +- SOUND_MOVING_SLIDE_DOWN_TREE +- SOUND_MOVING_QUICKSAND_DEATH +- SOUND_MOVING_SHOCKED +- SOUND_MOVING_FLYING +- SOUND_MOVING_ALMOST_DROWNING +- SOUND_MOVING_AIM_CANNON +- SOUND_MOVING_UNK1A +- SOUND_MOVING_RIDING_SHELL_LAVA +- SOUND_MARIO_YAH_WAH_HOO +- SOUND_MARIO_HOOHOO +- SOUND_MARIO_YAHOO +- SOUND_MARIO_UH +- SOUND_MARIO_HRMM +- SOUND_MARIO_WAH2 +- SOUND_MARIO_WHOA +- SOUND_MARIO_EEUH +- SOUND_MARIO_ATTACKED +- SOUND_MARIO_OOOF +- SOUND_MARIO_OOOF2 +- SOUND_MARIO_HERE_WE_GO +- SOUND_MARIO_YAWNING +- SOUND_MARIO_SNORING1 +- SOUND_MARIO_SNORING2 +- SOUND_MARIO_WAAAOOOW +- SOUND_MARIO_HAHA +- SOUND_MARIO_HAHA_2 +- SOUND_MARIO_UH2 +- SOUND_MARIO_UH2_2 +- SOUND_MARIO_ON_FIRE +- SOUND_MARIO_DYING +- SOUND_MARIO_PANTING_COLD +- SOUND_MARIO_PANTING +- SOUND_MARIO_COUGHING1 +- SOUND_MARIO_COUGHING2 +- SOUND_MARIO_COUGHING3 +- SOUND_MARIO_PUNCH_YAH +- SOUND_MARIO_PUNCH_HOO +- SOUND_MARIO_MAMA_MIA +- SOUND_MARIO_OKEY_DOKEY +- SOUND_MARIO_GROUND_POUND_WAH +- SOUND_MARIO_DROWNING +- SOUND_MARIO_PUNCH_WAH +- SOUND_PEACH_DEAR_MARIO +- SOUND_MARIO_YAHOO_WAHA_YIPPEE +- SOUND_MARIO_DOH +- SOUND_MARIO_GAME_OVER +- SOUND_MARIO_HELLO +- SOUND_MARIO_PRESS_START_TO_PLAY +- SOUND_MARIO_TWIRL_BOUNCE +- SOUND_MARIO_SNORING3 +- SOUND_MARIO_SO_LONGA_BOWSER +- SOUND_MARIO_IMA_TIRED +- SOUND_PEACH_MARIO +- SOUND_PEACH_POWER_OF_THE_STARS +- SOUND_PEACH_THANKS_TO_YOU +- SOUND_PEACH_THANK_YOU_MARIO +- SOUND_PEACH_SOMETHING_SPECIAL +- SOUND_PEACH_BAKE_A_CAKE +- SOUND_PEACH_FOR_MARIO +- SOUND_PEACH_MARIO2 +- SOUND_MARIO_LETS_A_GO - SOUND_GENERAL_ACTIVATE_CAP_SWITCH -- SOUND_GENERAL_BIG_CLOCK -- SOUND_GENERAL_BIG_POUND -- SOUND_GENERAL_BIRDS_FLY_AWAY -- SOUND_GENERAL_BOAT_ROCK -- SOUND_GENERAL_BOAT_TILT1 -- SOUND_GENERAL_BOAT_TILT2 -- SOUND_GENERAL_BOING1 -- SOUND_GENERAL_BOING2 -- SOUND_GENERAL_BOING2_LOWPRIO -- SOUND_GENERAL_BOING3 -- SOUND_GENERAL_BOWSER_BOMB_EXPLOSION -- SOUND_GENERAL_BOWSER_PLATFORM -- SOUND_GENERAL_BOWSER_PLATFORM_2 -- SOUND_GENERAL_BOX_LANDING -- SOUND_GENERAL_BOX_LANDING_2 -- SOUND_GENERAL_BREAK_BOX -- SOUND_GENERAL_BUBBLES -- SOUND_GENERAL_BUTTON_PRESS -- SOUND_GENERAL_BUTTON_PRESS_2 -- SOUND_GENERAL_BUTTON_PRESS_2_LOWPRIO -- SOUND_GENERAL_BUTTON_PRESS_LOWPRIO -- SOUND_GENERAL_CAGE_OPEN -- SOUND_GENERAL_CANNON_UP -- SOUND_GENERAL_CASTLE_TRAP_OPEN -- SOUND_GENERAL_CHAIN_CHOMP1 -- SOUND_GENERAL_CHAIN_CHOMP2 -- SOUND_GENERAL_CLAM_SHELL1 -- SOUND_GENERAL_CLAM_SHELL2 -- SOUND_GENERAL_CLAM_SHELL3 -- SOUND_GENERAL_CLOSE_IRON_DOOR -- SOUND_GENERAL_CLOSE_WOOD_DOOR -- SOUND_GENERAL_COIN -- SOUND_GENERAL_COIN_DROP -- SOUND_GENERAL_COIN_SPURT -- SOUND_GENERAL_COIN_SPURT_2 -- SOUND_GENERAL_COIN_SPURT_EU -- SOUND_GENERAL_COIN_WATER -- SOUND_GENERAL_COLLECT_1UP -- SOUND_GENERAL_DONUT_PLATFORM_EXPLOSION -- SOUND_GENERAL_DOOR_INSERT_KEY -- SOUND_GENERAL_DOOR_TURN_KEY -- SOUND_GENERAL_ELEVATOR_MOVE -- SOUND_GENERAL_ELEVATOR_MOVE_2 -- SOUND_GENERAL_ENEMY_ALERT1 -- SOUND_GENERAL_EXPLOSION6 -- SOUND_GENERAL_EXPLOSION7 - SOUND_GENERAL_FLAME_OUT -- SOUND_GENERAL_GRAND_STAR -- SOUND_GENERAL_GRAND_STAR_JUMP -- SOUND_GENERAL_GRINDEL_ROLL -- SOUND_GENERAL_HAUNTED_CHAIR -- SOUND_GENERAL_HAUNTED_CHAIR_MOVE -- SOUND_GENERAL_HEART_SPIN -- SOUND_GENERAL_LEVEL_SELECT_CHANGE +- SOUND_GENERAL_OPEN_WOOD_DOOR +- SOUND_GENERAL_CLOSE_WOOD_DOOR +- SOUND_GENERAL_OPEN_IRON_DOOR +- SOUND_GENERAL_CLOSE_IRON_DOOR +- SOUND_GENERAL_BUBBLES +- SOUND_GENERAL_MOVING_WATER +- SOUND_GENERAL_SWISH_WATER +- SOUND_GENERAL_QUIET_BUBBLE +- SOUND_GENERAL_VOLCANO_EXPLOSION +- SOUND_GENERAL_QUIET_BUBBLE2 +- SOUND_GENERAL_CASTLE_TRAP_OPEN +- SOUND_GENERAL_WALL_EXPLOSION +- SOUND_GENERAL_COIN +- SOUND_GENERAL_COIN_WATER +- SOUND_GENERAL_SHORT_STAR +- SOUND_GENERAL_BIG_CLOCK - SOUND_GENERAL_LOUD_POUND - SOUND_GENERAL_LOUD_POUND2 -- SOUND_GENERAL_METAL_POUND -- SOUND_GENERAL_MOVING_IN_SAND -- SOUND_GENERAL_MOVING_PLATFORM_SWITCH -- SOUND_GENERAL_MOVING_WATER -- SOUND_GENERAL_OPEN_CHEST -- SOUND_GENERAL_OPEN_IRON_DOOR -- SOUND_GENERAL_OPEN_WOOD_DOOR -- SOUND_GENERAL_PAINTING_EJECT -- SOUND_GENERAL_PAINTING_EJECT -- SOUND_GENERAL_PENDULUM_SWING -- SOUND_GENERAL_PLATFORM -- SOUND_GENERAL_POUND_ROCK -- SOUND_GENERAL_POUND_WOOD_POST -- SOUND_GENERAL_QUIET_BUBBLE -- SOUND_GENERAL_QUIET_BUBBLE2 -- SOUND_GENERAL_QUIET_POUND1 -- SOUND_GENERAL_QUIET_POUND1_LOWPRIO -- SOUND_GENERAL_QUIET_POUND2 -- SOUND_GENERAL_RACE_GUN_SHOT -- SOUND_GENERAL_RED_COIN -- SOUND_GENERAL_SHAKE_COFFIN - SOUND_GENERAL_SHORT_POUND1 - SOUND_GENERAL_SHORT_POUND2 - SOUND_GENERAL_SHORT_POUND3 - SOUND_GENERAL_SHORT_POUND4 - SOUND_GENERAL_SHORT_POUND5 - SOUND_GENERAL_SHORT_POUND6 -- SOUND_GENERAL_SHORT_STAR -- SOUND_GENERAL_SOFT_LANDING -- SOUND_GENERAL_SPLATTERING -- SOUND_GENERAL_STAR_APPEARS -- SOUND_GENERAL_STAR_DOOR_CLOSE -- SOUND_GENERAL_STAR_DOOR_OPEN -- SOUND_GENERAL_SWISH_AIR -- SOUND_GENERAL_SWISH_AIR_2 -- SOUND_GENERAL_SWISH_WATER -- SOUND_GENERAL_SWITCH_DOOR_OPEN -- SOUND_GENERAL_UNK32 -- SOUND_GENERAL_UNK45 -- SOUND_GENERAL_UNK46 -- SOUND_GENERAL_UNK46_LOWPRIO +- SOUND_GENERAL_OPEN_CHEST +- SOUND_GENERAL_CLAM_SHELL1 +- SOUND_GENERAL_BOX_LANDING +- SOUND_GENERAL_BOX_LANDING_2 - SOUND_GENERAL_UNKNOWN1 - SOUND_GENERAL_UNKNOWN1_2 +- SOUND_GENERAL_CLAM_SHELL2 +- SOUND_GENERAL_CLAM_SHELL3 +- SOUND_GENERAL_PAINTING_EJECT +- SOUND_GENERAL_PAINTING_EJECT +- SOUND_GENERAL_LEVEL_SELECT_CHANGE +- SOUND_GENERAL_PLATFORM +- SOUND_GENERAL_DONUT_PLATFORM_EXPLOSION +- SOUND_GENERAL_BOWSER_BOMB_EXPLOSION +- SOUND_GENERAL_COIN_SPURT +- SOUND_GENERAL_COIN_SPURT_2 +- SOUND_GENERAL_COIN_SPURT_EU +- SOUND_GENERAL_EXPLOSION6 +- SOUND_GENERAL_UNK32 +- SOUND_GENERAL_BOAT_TILT1 +- SOUND_GENERAL_BOAT_TILT2 +- SOUND_GENERAL_COIN_DROP +- SOUND_GENERAL_UNKNOWN3_LOWPRIO - SOUND_GENERAL_UNKNOWN3 - SOUND_GENERAL_UNKNOWN3_2 -- SOUND_GENERAL_UNKNOWN3_LOWPRIO -- SOUND_GENERAL_UNKNOWN4 +- SOUND_GENERAL_PENDULUM_SWING +- SOUND_GENERAL_CHAIN_CHOMP1 +- SOUND_GENERAL_CHAIN_CHOMP2 +- SOUND_GENERAL_DOOR_TURN_KEY +- SOUND_GENERAL_MOVING_IN_SAND - SOUND_GENERAL_UNKNOWN4_LOWPRIO -- SOUND_GENERAL_VANISH_SFX -- SOUND_GENERAL_VOLCANO_EXPLOSION -- SOUND_GENERAL_WALL_EXPLOSION +- SOUND_GENERAL_UNKNOWN4 +- SOUND_GENERAL_MOVING_PLATFORM_SWITCH +- SOUND_GENERAL_CAGE_OPEN +- SOUND_GENERAL_QUIET_POUND1_LOWPRIO +- SOUND_GENERAL_QUIET_POUND1 +- SOUND_GENERAL_BREAK_BOX +- SOUND_GENERAL_DOOR_INSERT_KEY +- SOUND_GENERAL_QUIET_POUND2 +- SOUND_GENERAL_BIG_POUND +- SOUND_GENERAL_UNK45 +- SOUND_GENERAL_UNK46_LOWPRIO +- SOUND_GENERAL_UNK46 +- SOUND_GENERAL_CANNON_UP +- SOUND_GENERAL_GRINDEL_ROLL +- SOUND_GENERAL_EXPLOSION7 +- SOUND_GENERAL_SHAKE_COFFIN +- SOUND_GENERAL_RACE_GUN_SHOT +- SOUND_GENERAL_STAR_DOOR_OPEN +- SOUND_GENERAL_STAR_DOOR_CLOSE +- SOUND_GENERAL_POUND_ROCK +- SOUND_GENERAL_STAR_APPEARS +- SOUND_GENERAL_COLLECT_1UP +- SOUND_GENERAL_BUTTON_PRESS_LOWPRIO +- SOUND_GENERAL_BUTTON_PRESS +- SOUND_GENERAL_BUTTON_PRESS_2_LOWPRIO +- SOUND_GENERAL_BUTTON_PRESS_2 +- SOUND_GENERAL_ELEVATOR_MOVE +- SOUND_GENERAL_ELEVATOR_MOVE_2 +- SOUND_GENERAL_SWISH_AIR +- SOUND_GENERAL_SWISH_AIR_2 +- SOUND_GENERAL_HAUNTED_CHAIR +- SOUND_GENERAL_SOFT_LANDING +- SOUND_GENERAL_HAUNTED_CHAIR_MOVE +- SOUND_GENERAL_BOWSER_PLATFORM +- SOUND_GENERAL_BOWSER_PLATFORM_2 +- SOUND_GENERAL_HEART_SPIN +- SOUND_GENERAL_POUND_WOOD_POST - SOUND_GENERAL_WATER_LEVEL_TRIG -- SOUND_GENERAL_YOSHI_TALK +- SOUND_GENERAL_SWITCH_DOOR_OPEN +- SOUND_GENERAL_RED_COIN +- SOUND_GENERAL_BIRDS_FLY_AWAY +- SOUND_GENERAL_METAL_POUND +- SOUND_GENERAL_BOING1 +- SOUND_GENERAL_BOING2_LOWPRIO +- SOUND_GENERAL_BOING2 - SOUND_GENERAL_YOSHI_WALK -- SOUND_LOWER_BACKGROUND_MUSIC -- SOUND_MARIO_ATTACKED -- SOUND_MARIO_COUGHING1 -- SOUND_MARIO_COUGHING2 -- SOUND_MARIO_COUGHING3 -- SOUND_MARIO_DOH -- SOUND_MARIO_DROWNING -- SOUND_MARIO_DYING -- SOUND_MARIO_EEUH -- SOUND_MARIO_GAME_OVER -- SOUND_MARIO_GROUND_POUND_WAH -- SOUND_MARIO_HAHA -- SOUND_MARIO_HAHA_2 -- SOUND_MARIO_HELLO -- SOUND_MARIO_HERE_WE_GO -- SOUND_MARIO_HOOHOO -- SOUND_MARIO_HRMM -- SOUND_MARIO_IMA_TIRED -- SOUND_MARIO_LETS_A_GO -- SOUND_MARIO_MAMA_MIA -- SOUND_MARIO_OKEY_DOKEY -- SOUND_MARIO_ON_FIRE -- SOUND_MARIO_OOOF -- SOUND_MARIO_OOOF2 -- SOUND_MARIO_PANTING -- SOUND_MARIO_PANTING_COLD -- SOUND_MARIO_PRESS_START_TO_PLAY -- SOUND_MARIO_PUNCH_HOO -- SOUND_MARIO_PUNCH_WAH -- SOUND_MARIO_PUNCH_YAH -- SOUND_MARIO_SNORING1 -- SOUND_MARIO_SNORING2 -- SOUND_MARIO_SNORING3 -- SOUND_MARIO_SO_LONGA_BOWSER -- SOUND_MARIO_TWIRL_BOUNCE -- SOUND_MARIO_UH -- SOUND_MARIO_UH2 -- SOUND_MARIO_UH2_2 -- SOUND_MARIO_WAAAOOOW -- SOUND_MARIO_WAH2 -- SOUND_MARIO_WHOA -- SOUND_MARIO_YAHOO -- SOUND_MARIO_YAHOO_WAHA_YIPPEE -- SOUND_MARIO_YAH_WAH_HOO -- SOUND_MARIO_YAWNING -- SOUND_MENU_BOWSER_LAUGH -- SOUND_MENU_CAMERA_BUZZ -- SOUND_MENU_CAMERA_TURN -- SOUND_MENU_CAMERA_UNUSED1 -- SOUND_MENU_CAMERA_UNUSED2 -- SOUND_MENU_CAMERA_ZOOM_IN -- SOUND_MENU_CAMERA_ZOOM_OUT -- SOUND_MENU_CHANGE_SELECT -- SOUND_MENU_CLICK_CHANGE_VIEW -- SOUND_MENU_CLICK_FILE_SELECT -- SOUND_MENU_COIN_ITS_A_ME_MARIO -- SOUND_MENU_COLLECT_RED_COIN -- SOUND_MENU_COLLECT_SECRET -- SOUND_MENU_ENTER_HOLE -- SOUND_MENU_ENTER_PIPE -- SOUND_MENU_EXIT_A_SIGN -- SOUND_MENU_EXIT_PIPE -- SOUND_MENU_HAND_APPEAR -- SOUND_MENU_HAND_DISAPPEAR -- SOUND_MENU_LET_GO_MARIO_FACE -- SOUND_MENU_MARIO_CASTLE_WARP -- SOUND_MENU_MARIO_CASTLE_WARP2 -- SOUND_MENU_MESSAGE_APPEAR -- SOUND_MENU_MESSAGE_DISAPPEAR -- SOUND_MENU_MESSAGE_NEXT_PAGE -- SOUND_MENU_PAUSE -- SOUND_MENU_PAUSE_2 -- SOUND_MENU_PAUSE_HIGHPRIO -- SOUND_MENU_PINCH_MARIO_FACE -- SOUND_MENU_POWER_METER -- SOUND_MENU_READ_A_SIGN -- SOUND_MENU_REVERSE_PAUSE -- SOUND_MENU_STAR_SOUND -- SOUND_MENU_STAR_SOUND_LETS_A_GO -- SOUND_MENU_STAR_SOUND_OKEY_DOKEY -- SOUND_MENU_THANK_YOU_PLAYING_MY_GAME -- SOUND_MENU_UNK0C -- SOUND_MENU_UNK10 -- SOUND_MENU_YOSHI_GAIN_LIVES -- SOUND_MOVING_AIM_CANNON -- SOUND_MOVING_ALMOST_DROWNING -- SOUND_MOVING_FLYING -- SOUND_MOVING_LAVA_BURN -- SOUND_MOVING_QUICKSAND_DEATH -- SOUND_MOVING_RIDING_SHELL_LAVA -- SOUND_MOVING_SHOCKED -- SOUND_MOVING_SLIDE_DOWN_POLE -- SOUND_MOVING_SLIDE_DOWN_TREE -- SOUND_MOVING_TERRAIN_RIDING_SHELL -- SOUND_MOVING_TERRAIN_SLIDE -- SOUND_MOVING_UNK1A -- SOUND_NO_ECHO -- SOUND_NO_PRIORITY_LOSS -- SOUND_NO_VOLUME_LOSS -- SOUND_OBJ2_BABY_PENGUIN_YELL -- SOUND_OBJ2_BIRD_CHIRP1 -- SOUND_OBJ2_BOSS_DIALOG_GRUNT -- SOUND_OBJ2_BOWSER_PUZZLE_PIECE_MOVE -- SOUND_OBJ2_BOWSER_ROAR -- SOUND_OBJ2_BOWSER_TELEPORT -- SOUND_OBJ2_BULLY_ATTACKED -- SOUND_OBJ2_EYEROK_SOUND_LONG -- SOUND_OBJ2_EYEROK_SOUND_SHORT -- SOUND_OBJ2_KING_BOBOMB_DAMAGE -- SOUND_OBJ2_LARGE_BULLY_ATTACKED -- SOUND_OBJ2_MONTY_MOLE_APPEAR -- SOUND_OBJ2_MRI_SPINNING -- SOUND_OBJ2_PIRANHA_PLANT_BITE -- SOUND_OBJ2_PIRANHA_PLANT_DYING -- SOUND_OBJ2_SCUTTLEBUG_ALERT -- SOUND_OBJ2_SCUTTLEBUG_WALK -- SOUND_OBJ2_SWOOP -- SOUND_OBJ2_WHOMP_SOUND_SHORT -- SOUND_OBJ_BABY_PENGUIN_DIVE +- SOUND_GENERAL_ENEMY_ALERT1 +- SOUND_GENERAL_YOSHI_TALK +- SOUND_GENERAL_SPLATTERING +- SOUND_GENERAL_BOING3 +- SOUND_GENERAL_GRAND_STAR +- SOUND_GENERAL_GRAND_STAR_JUMP +- SOUND_GENERAL_BOAT_ROCK +- SOUND_GENERAL_VANISH_SFX +- SOUND_ENV_WATERFALL1 +- SOUND_ENV_WATERFALL2 +- SOUND_ENV_ELEVATOR1 +- SOUND_ENV_DRONING1 +- SOUND_ENV_DRONING2 +- SOUND_ENV_WIND1 +- SOUND_ENV_MOVING_SAND_SNOW +- SOUND_ENV_UNK07 +- SOUND_ENV_ELEVATOR2 +- SOUND_ENV_WATER +- SOUND_ENV_UNKNOWN2 +- SOUND_ENV_BOAT_ROCKING1 +- SOUND_ENV_ELEVATOR3 +- SOUND_ENV_ELEVATOR4 +- SOUND_ENV_ELEVATOR4_2 +- SOUND_ENV_MOVINGSAND +- SOUND_ENV_MERRY_GO_ROUND_CREAKING +- SOUND_ENV_WIND2 +- SOUND_ENV_UNK12 +- SOUND_ENV_SLIDING +- SOUND_ENV_STAR +- SOUND_ENV_UNKNOWN4 +- SOUND_ENV_WATER_DRAIN +- SOUND_ENV_METAL_BOX_PUSH +- SOUND_ENV_SINK_QUICKSAND +- SOUND_OBJ_SUSHI_SHARK_WATER_SOUND +- SOUND_OBJ_MRI_SHOOT - SOUND_OBJ_BABY_PENGUIN_WALK -- SOUND_OBJ_BIG_PENGUIN_WALK -- SOUND_OBJ_BIG_PENGUIN_YELL -- SOUND_OBJ_BIRD_CHIRP3 -- SOUND_OBJ_BOBOMB_BUDDY_TALK -- SOUND_OBJ_BOBOMB_WALK -- SOUND_OBJ_BOO_BOUNCE_TOP -- SOUND_OBJ_BOO_LAUGH_LONG -- SOUND_OBJ_BOO_LAUGH_SHORT -- SOUND_OBJ_BOWSER_DEFEATED -- SOUND_OBJ_BOWSER_INHALING -- SOUND_OBJ_BOWSER_INTRO_LAUGH -- SOUND_OBJ_BOWSER_LAUGH -- SOUND_OBJ_BOWSER_SPINNING -- SOUND_OBJ_BOWSER_TAIL_PICKUP - SOUND_OBJ_BOWSER_WALK -- SOUND_OBJ_BUBBA_CHOMP -- SOUND_OBJ_BULLY_EXPLODE -- SOUND_OBJ_BULLY_EXPLODE_2 -- SOUND_OBJ_BULLY_METAL -- SOUND_OBJ_BULLY_WALK -- SOUND_OBJ_BULLY_WALKING +- SOUND_OBJ_BOWSER_TAIL_PICKUP +- SOUND_OBJ_BOWSER_DEFEATED +- SOUND_OBJ_BOWSER_SPINNING +- SOUND_OBJ_BOWSER_INHALING +- SOUND_OBJ_BIG_PENGUIN_WALK +- SOUND_OBJ_BOO_BOUNCE_TOP +- SOUND_OBJ_BOO_LAUGH_SHORT +- SOUND_OBJ_THWOMP - SOUND_OBJ_CANNON1 - SOUND_OBJ_CANNON2 - SOUND_OBJ_CANNON3 -- SOUND_OBJ_CANNON4 -- SOUND_OBJ_CHUCKYA_DEATH -- SOUND_OBJ_DEFAULT_DEATH -- SOUND_OBJ_DIVING_INTO_WATER -- SOUND_OBJ_DIVING_IN_WATER -- SOUND_OBJ_DORRIE -- SOUND_OBJ_DYING_ENEMY1 -- SOUND_OBJ_DYING_ENEMY2 -- SOUND_OBJ_EEL -- SOUND_OBJ_EEL_2 -- SOUND_OBJ_ENEMY_DEATH_HIGH -- SOUND_OBJ_ENEMY_DEATH_LOW -- SOUND_OBJ_ENEMY_DEFEAT_SHRINK -- SOUND_OBJ_EVIL_LAKITU_THROW -- SOUND_OBJ_EYEROK_EXPLODE -- SOUND_OBJ_EYEROK_SHOW_EYE -- SOUND_OBJ_FLAME_BLOWN -- SOUND_OBJ_GOOMBA_ALERT -- SOUND_OBJ_GOOMBA_WALK -- SOUND_OBJ_HEAVEHO_TOSSED - SOUND_OBJ_JUMP_WALK_WATER -- SOUND_OBJ_KING_BOBOMB -- SOUND_OBJ_KING_BOBOMB_JUMP -- SOUND_OBJ_KING_BOBOMB_TALK -- SOUND_OBJ_KING_WHOMP_DEATH -- SOUND_OBJ_KLEPTO1 -- SOUND_OBJ_KLEPTO2 -- SOUND_OBJ_KOOPA_DAMAGE -- SOUND_OBJ_KOOPA_FLYGUY_DEATH -- SOUND_OBJ_KOOPA_TALK -- SOUND_OBJ_KOOPA_THE_QUICK_WALK -- SOUND_OBJ_KOOPA_WALK -- SOUND_OBJ_MAD_PIANO_CHOMPING -- SOUND_OBJ_MIPS_RABBIT -- SOUND_OBJ_MIPS_RABBIT_WATER -- SOUND_OBJ_MONTY_MOLE_ATTACK +- SOUND_OBJ_UNKNOWN2 - SOUND_OBJ_MRI_DEATH -- SOUND_OBJ_MRI_SHOOT -- SOUND_OBJ_MR_BLIZZARD_ALERT -- SOUND_OBJ_PIRANHA_PLANT_APPEAR -- SOUND_OBJ_PIRANHA_PLANT_SHRINK -- SOUND_OBJ_POKEY_DEATH - SOUND_OBJ_POUNDING1 - SOUND_OBJ_POUNDING1_HIGHPRIO +- SOUND_OBJ_WHOMP_LOWPRIO +- SOUND_OBJ_KING_BOBOMB +- SOUND_OBJ_BULLY_METAL +- SOUND_OBJ_BULLY_EXPLODE +- SOUND_OBJ_BULLY_EXPLODE_2 - SOUND_OBJ_POUNDING_CANNON -- SOUND_OBJ_POUNDING_LOUD -- SOUND_OBJ_SKEETER_WALK -- SOUND_OBJ_SNOWMAN_BOUNCE -- SOUND_OBJ_SNOWMAN_EXPLODE -- SOUND_OBJ_SNOW_SAND1 -- SOUND_OBJ_SNOW_SAND2 -- SOUND_OBJ_SNUFIT_SHOOT -- SOUND_OBJ_SNUFIT_SKEETER_DEATH -- SOUND_OBJ_SOMETHING_LANDING -- SOUND_OBJ_SPINY_UNK59 -- SOUND_OBJ_STOMPED -- SOUND_OBJ_SUSHI_SHARK_WATER_SOUND -- SOUND_OBJ_SWOOP_DEATH -- SOUND_OBJ_THWOMP -- SOUND_OBJ_UKIKI_CHATTER_IDLE -- SOUND_OBJ_UKIKI_CHATTER_LONG -- SOUND_OBJ_UKIKI_CHATTER_SHORT -- SOUND_OBJ_UKIKI_STEP_DEFAULT -- SOUND_OBJ_UKIKI_STEP_LEAVES -- SOUND_OBJ_UNK23 -- SOUND_OBJ_UNKNOWN2 +- SOUND_OBJ_BULLY_WALK - SOUND_OBJ_UNKNOWN3 - SOUND_OBJ_UNKNOWN4 -- SOUND_OBJ_UNKNOWN6 -- SOUND_OBJ_WALKING_WATER +- SOUND_OBJ_BABY_PENGUIN_DIVE +- SOUND_OBJ_GOOMBA_WALK +- SOUND_OBJ_UKIKI_CHATTER_LONG +- SOUND_OBJ_MONTY_MOLE_ATTACK +- SOUND_OBJ_EVIL_LAKITU_THROW +- SOUND_OBJ_UNK23 +- SOUND_OBJ_DYING_ENEMY1 +- SOUND_OBJ_CANNON4 +- SOUND_OBJ_DYING_ENEMY2 +- SOUND_OBJ_BOBOMB_WALK +- SOUND_OBJ_SOMETHING_LANDING +- SOUND_OBJ_DIVING_IN_WATER +- SOUND_OBJ_SNOW_SAND1 +- SOUND_OBJ_SNOW_SAND2 +- SOUND_OBJ_DEFAULT_DEATH +- SOUND_OBJ_BIG_PENGUIN_YELL - SOUND_OBJ_WATER_BOMB_BOUNCING -- SOUND_OBJ_WHOMP_LOWPRIO -- SOUND_OBJ_WIGGLER_ATTACKED -- SOUND_OBJ_WIGGLER_DEATH -- SOUND_OBJ_WIGGLER_HIGH_PITCH +- SOUND_OBJ_GOOMBA_ALERT - SOUND_OBJ_WIGGLER_JUMP -- SOUND_OBJ_WIGGLER_LOW_PITCH +- SOUND_OBJ_STOMPED +- SOUND_OBJ_UNKNOWN6 +- SOUND_OBJ_DIVING_INTO_WATER +- SOUND_OBJ_PIRANHA_PLANT_SHRINK +- SOUND_OBJ_KOOPA_THE_QUICK_WALK +- SOUND_OBJ_KOOPA_WALK +- SOUND_OBJ_BULLY_WALKING +- SOUND_OBJ_DORRIE +- SOUND_OBJ_BOWSER_LAUGH +- SOUND_OBJ_UKIKI_CHATTER_SHORT +- SOUND_OBJ_UKIKI_CHATTER_IDLE +- SOUND_OBJ_UKIKI_STEP_DEFAULT +- SOUND_OBJ_UKIKI_STEP_LEAVES +- SOUND_OBJ_KOOPA_TALK +- SOUND_OBJ_KOOPA_DAMAGE +- SOUND_OBJ_KLEPTO1 +- SOUND_OBJ_KLEPTO2 +- SOUND_OBJ_KING_BOBOMB_TALK +- SOUND_OBJ_KING_BOBOMB_JUMP +- SOUND_OBJ_KING_WHOMP_DEATH +- SOUND_OBJ_BOO_LAUGH_LONG +- SOUND_OBJ_EEL +- SOUND_OBJ_EEL_2 +- SOUND_OBJ_EYEROK_SHOW_EYE +- SOUND_OBJ_MR_BLIZZARD_ALERT +- SOUND_OBJ_SNUFIT_SHOOT +- SOUND_OBJ_SKEETER_WALK +- SOUND_OBJ_WALKING_WATER +- SOUND_OBJ_BIRD_CHIRP3 +- SOUND_OBJ_PIRANHA_PLANT_APPEAR +- SOUND_OBJ_FLAME_BLOWN +- SOUND_OBJ_MAD_PIANO_CHOMPING +- SOUND_OBJ_BOBOMB_BUDDY_TALK +- SOUND_OBJ_SPINY_UNK59 +- SOUND_OBJ_WIGGLER_HIGH_PITCH +- SOUND_OBJ_HEAVEHO_TOSSED +- SOUND_OBJ_WIGGLER_DEATH +- SOUND_OBJ_BOWSER_INTRO_LAUGH +- SOUND_OBJ_ENEMY_DEATH_HIGH +- SOUND_OBJ_ENEMY_DEATH_LOW +- SOUND_OBJ_SWOOP_DEATH +- SOUND_OBJ_KOOPA_FLYGUY_DEATH +- SOUND_OBJ_POKEY_DEATH +- SOUND_OBJ_SNOWMAN_BOUNCE +- SOUND_OBJ_SNOWMAN_EXPLODE +- SOUND_OBJ_POUNDING_LOUD +- SOUND_OBJ_MIPS_RABBIT +- SOUND_OBJ_MIPS_RABBIT_WATER +- SOUND_OBJ_EYEROK_EXPLODE +- SOUND_OBJ_CHUCKYA_DEATH - SOUND_OBJ_WIGGLER_TALK -- SOUND_PEACH_BAKE_A_CAKE -- SOUND_PEACH_DEAR_MARIO -- SOUND_PEACH_FOR_MARIO -- SOUND_PEACH_MARIO -- SOUND_PEACH_MARIO2 -- SOUND_PEACH_POWER_OF_THE_STARS -- SOUND_PEACH_SOMETHING_SPECIAL -- SOUND_PEACH_THANKS_TO_YOU -- SOUND_PEACH_THANK_YOU_MARIO -- SOUND_STATUS_PLAYING -- SOUND_STATUS_STOPPED -- SOUND_STATUS_WAITING -- SOUND_TERRAIN_DEFAULT -- SOUND_TERRAIN_GRASS -- SOUND_TERRAIN_ICE -- SOUND_TERRAIN_SAND -- SOUND_TERRAIN_SNOW -- SOUND_TERRAIN_SPOOKY -- SOUND_TERRAIN_STONE -- SOUND_TERRAIN_WATER -- SOUND_VIBRATO +- SOUND_OBJ_WIGGLER_ATTACKED +- SOUND_OBJ_WIGGLER_LOW_PITCH +- SOUND_OBJ_SNUFIT_SKEETER_DEATH +- SOUND_OBJ_BUBBA_CHOMP +- SOUND_OBJ_ENEMY_DEFEAT_SHRINK +- SOUND_AIR_BOWSER_SPIT_FIRE +- SOUND_AIR_UNK01 +- SOUND_AIR_LAKITU_FLY +- SOUND_AIR_LAKITU_FLY_HIGHPRIO +- SOUND_AIR_AMP_BUZZ +- SOUND_AIR_BLOW_FIRE +- SOUND_AIR_BLOW_WIND +- SOUND_AIR_ROUGH_SLIDE +- SOUND_AIR_HEAVEHO_MOVE +- SOUND_AIR_UNK07 +- SOUND_AIR_BOBOMB_LIT_FUSE +- SOUND_AIR_HOWLING_WIND +- SOUND_AIR_CHUCKYA_MOVE +- SOUND_AIR_PEACH_TWINKLE +- SOUND_AIR_CASTLE_OUTDOORS_AMBIENT +- SOUND_MENU_CHANGE_SELECT +- SOUND_MENU_REVERSE_PAUSE +- SOUND_MENU_PAUSE +- SOUND_MENU_PAUSE_HIGHPRIO +- SOUND_MENU_PAUSE_2 +- SOUND_MENU_MESSAGE_APPEAR +- SOUND_MENU_MESSAGE_DISAPPEAR +- SOUND_MENU_CAMERA_ZOOM_IN +- SOUND_MENU_CAMERA_ZOOM_OUT +- SOUND_MENU_PINCH_MARIO_FACE +- SOUND_MENU_LET_GO_MARIO_FACE +- SOUND_MENU_HAND_APPEAR +- SOUND_MENU_HAND_DISAPPEAR +- SOUND_MENU_UNK0C +- SOUND_MENU_POWER_METER +- SOUND_MENU_CAMERA_BUZZ +- SOUND_MENU_CAMERA_TURN +- SOUND_MENU_UNK10 +- SOUND_MENU_CLICK_FILE_SELECT +- SOUND_MENU_MESSAGE_NEXT_PAGE +- SOUND_MENU_COIN_ITS_A_ME_MARIO +- SOUND_MENU_YOSHI_GAIN_LIVES +- SOUND_MENU_ENTER_PIPE +- SOUND_MENU_EXIT_PIPE +- SOUND_MENU_BOWSER_LAUGH +- SOUND_MENU_ENTER_HOLE +- SOUND_MENU_CLICK_CHANGE_VIEW +- SOUND_MENU_CAMERA_UNUSED1 +- SOUND_MENU_CAMERA_UNUSED2 +- SOUND_MENU_MARIO_CASTLE_WARP +- SOUND_MENU_STAR_SOUND +- SOUND_MENU_THANK_YOU_PLAYING_MY_GAME +- SOUND_MENU_READ_A_SIGN +- SOUND_MENU_EXIT_A_SIGN +- SOUND_MENU_MARIO_CASTLE_WARP2 +- SOUND_MENU_STAR_SOUND_OKEY_DOKEY +- SOUND_MENU_STAR_SOUND_LETS_A_GO +- SOUND_MENU_COLLECT_RED_COIN +- SOUND_MENU_COLLECT_SECRET +- SOUND_GENERAL2_BOBOMB_EXPLOSION +- SOUND_GENERAL2_PURPLE_SWITCH +- SOUND_GENERAL2_ROTATING_BLOCK_CLICK +- SOUND_GENERAL2_SPINDEL_ROLL +- SOUND_GENERAL2_PYRAMID_TOP_SPIN +- SOUND_GENERAL2_PYRAMID_TOP_EXPLOSION +- SOUND_GENERAL2_BIRD_CHIRP2 +- SOUND_GENERAL2_SWITCH_TICK_FAST +- SOUND_GENERAL2_SWITCH_TICK_SLOW +- SOUND_GENERAL2_STAR_APPEARS +- SOUND_GENERAL2_ROTATING_BLOCK_ALERT +- SOUND_GENERAL2_BOWSER_EXPLODE +- SOUND_GENERAL2_BOWSER_KEY +- SOUND_GENERAL2_1UP_APPEAR +- SOUND_GENERAL2_RIGHT_ANSWER +- SOUND_OBJ2_BOWSER_ROAR +- SOUND_OBJ2_PIRANHA_PLANT_BITE +- SOUND_OBJ2_PIRANHA_PLANT_DYING +- SOUND_OBJ2_BOWSER_PUZZLE_PIECE_MOVE +- SOUND_OBJ2_BULLY_ATTACKED +- SOUND_OBJ2_KING_BOBOMB_DAMAGE +- SOUND_OBJ2_SCUTTLEBUG_WALK +- SOUND_OBJ2_SCUTTLEBUG_ALERT +- SOUND_OBJ2_BABY_PENGUIN_YELL +- SOUND_OBJ2_SWOOP +- SOUND_OBJ2_BIRD_CHIRP1 +- SOUND_OBJ2_LARGE_BULLY_ATTACKED +- SOUND_OBJ2_EYEROK_SOUND_SHORT +- SOUND_OBJ2_WHOMP_SOUND_SHORT +- SOUND_OBJ2_EYEROK_SOUND_LONG +- SOUND_OBJ2_BOWSER_TELEPORT +- SOUND_OBJ2_MONTY_MOLE_APPEAR +- SOUND_OBJ2_BOSS_DIALOG_GRUNT +- SOUND_OBJ2_MRI_SPINNING [:arrow_up_small:](#)
## [surface_terrains.h](#surface_terrains.h) -- HAZARD_TYPE_HORIZONTAL_WIND -- HAZARD_TYPE_LAVA_FLOOR -- HAZARD_TYPE_LAVA_WALL -- HAZARD_TYPE_QUICKSAND -- HAZARD_TYPE_VERTICAL_WIND -- SURFACE_0004 -- SURFACE_BOSS_FIGHT_CAMERA -- SURFACE_BURNING -- SURFACE_CAMERA_8_DIR -- SURFACE_CAMERA_BOUNDARY -- SURFACE_CAMERA_FREE_ROAM -- SURFACE_CAMERA_MIDDLE -- SURFACE_CAMERA_ROTATE_LEFT -- SURFACE_CAMERA_ROTATE_RIGHT -- SURFACE_CLASS_DEFAULT -- SURFACE_CLASS_NOT_SLIPPERY -- SURFACE_CLASS_SLIPPERY -- SURFACE_CLASS_VERY_SLIPPERY -- SURFACE_CLOSE_CAMERA -- SURFACE_DEATH_PLANE -- SURFACE_DEEP_MOVING_QUICKSAND -- SURFACE_DEEP_QUICKSAND - SURFACE_DEFAULT -- SURFACE_FLAG_DYNAMIC -- SURFACE_FLAG_NO_CAM_COLLISION -- SURFACE_FLAG_X_PROJECTION -- SURFACE_FLOWING_WATER +- SURFACE_BURNING +- SURFACE_RAYCAST +- SURFACE_0004 - SURFACE_HANGABLE -- SURFACE_HARD -- SURFACE_HARD_NOT_SLIPPERY -- SURFACE_HARD_SLIPPERY -- SURFACE_HARD_VERY_SLIPPERY -- SURFACE_HORIZONTAL_WIND -- SURFACE_ICE -- SURFACE_INSTANT_MOVING_QUICKSAND -- SURFACE_INSTANT_QUICKSAND +- SURFACE_SLOW +- SURFACE_DEATH_PLANE +- SURFACE_CLOSE_CAMERA +- SURFACE_WATER +- SURFACE_FLOWING_WATER +- SURFACE_INTANGIBLE +- SURFACE_VERY_SLIPPERY +- SURFACE_SLIPPERY +- SURFACE_NOT_SLIPPERY +- SURFACE_TTM_VINES +- SURFACE_MGR_MUSIC - SURFACE_INSTANT_WARP_1B - SURFACE_INSTANT_WARP_1C - SURFACE_INSTANT_WARP_1D - SURFACE_INSTANT_WARP_1E -- SURFACE_INTANGIBLE -- SURFACE_LOOK_UP_WARP -- SURFACE_MGR_MUSIC +- SURFACE_SHALLOW_QUICKSAND +- SURFACE_DEEP_QUICKSAND +- SURFACE_INSTANT_QUICKSAND +- SURFACE_DEEP_MOVING_QUICKSAND +- SURFACE_SHALLOW_MOVING_QUICKSAND +- SURFACE_QUICKSAND - SURFACE_MOVING_QUICKSAND +- SURFACE_WALL_MISC - SURFACE_NOISE_DEFAULT - SURFACE_NOISE_SLIPPERY -- SURFACE_NOISE_VERY_SLIPPERY +- SURFACE_HORIZONTAL_WIND +- SURFACE_INSTANT_MOVING_QUICKSAND +- SURFACE_ICE +- SURFACE_LOOK_UP_WARP +- SURFACE_HARD +- SURFACE_WARP +- SURFACE_TIMER_START +- SURFACE_TIMER_END +- SURFACE_HARD_SLIPPERY +- SURFACE_HARD_VERY_SLIPPERY +- SURFACE_HARD_NOT_SLIPPERY +- SURFACE_VERTICAL_WIND +- SURFACE_BOSS_FIGHT_CAMERA +- SURFACE_CAMERA_FREE_ROAM +- SURFACE_THI3_WALLKICK +- SURFACE_CAMERA_8_DIR +- SURFACE_CAMERA_MIDDLE +- SURFACE_CAMERA_ROTATE_RIGHT +- SURFACE_CAMERA_ROTATE_LEFT +- SURFACE_CAMERA_BOUNDARY - SURFACE_NOISE_VERY_SLIPPERY_73 - SURFACE_NOISE_VERY_SLIPPERY_74 -- SURFACE_NOT_SLIPPERY +- SURFACE_NOISE_VERY_SLIPPERY - SURFACE_NO_CAM_COLLISION - SURFACE_NO_CAM_COLLISION_77 -- SURFACE_NO_CAM_COL_SLIPPERY - SURFACE_NO_CAM_COL_VERY_SLIPPERY -- SURFACE_PAINTING_WARP_D3 -- SURFACE_PAINTING_WARP_D4 -- SURFACE_PAINTING_WARP_D5 -- SURFACE_PAINTING_WARP_D6 -- SURFACE_PAINTING_WARP_D7 -- SURFACE_PAINTING_WARP_D8 -- SURFACE_PAINTING_WARP_D9 -- SURFACE_PAINTING_WARP_DA -- SURFACE_PAINTING_WARP_DB -- SURFACE_PAINTING_WARP_DC -- SURFACE_PAINTING_WARP_DD -- SURFACE_PAINTING_WARP_DE -- SURFACE_PAINTING_WARP_DF -- SURFACE_PAINTING_WARP_E0 -- SURFACE_PAINTING_WARP_E1 -- SURFACE_PAINTING_WARP_E2 -- SURFACE_PAINTING_WARP_E3 -- SURFACE_PAINTING_WARP_E4 -- SURFACE_PAINTING_WARP_E5 -- SURFACE_PAINTING_WARP_E6 -- SURFACE_PAINTING_WARP_E7 -- SURFACE_PAINTING_WARP_E8 -- SURFACE_PAINTING_WARP_E9 -- SURFACE_PAINTING_WARP_EA -- SURFACE_PAINTING_WARP_EB -- SURFACE_PAINTING_WARP_EC -- SURFACE_PAINTING_WARP_ED -- SURFACE_PAINTING_WARP_EE -- SURFACE_PAINTING_WARP_EF -- SURFACE_PAINTING_WARP_F0 -- SURFACE_PAINTING_WARP_F1 -- SURFACE_PAINTING_WARP_F2 -- SURFACE_PAINTING_WARP_F3 -- SURFACE_PAINTING_WARP_F7 -- SURFACE_PAINTING_WARP_F8 -- SURFACE_PAINTING_WARP_F9 -- SURFACE_PAINTING_WARP_FA -- SURFACE_PAINTING_WARP_FB -- SURFACE_PAINTING_WARP_FC +- SURFACE_NO_CAM_COL_SLIPPERY +- SURFACE_SWITCH +- SURFACE_VANISH_CAP_WALLS - SURFACE_PAINTING_WOBBLE_A6 - SURFACE_PAINTING_WOBBLE_A7 - SURFACE_PAINTING_WOBBLE_A8 @@ -4842,78 +4823,81 @@ - SURFACE_PAINTING_WOBBLE_D0 - SURFACE_PAINTING_WOBBLE_D1 - SURFACE_PAINTING_WOBBLE_D2 -- SURFACE_QUICKSAND -- SURFACE_RAYCAST -- SURFACE_SHALLOW_MOVING_QUICKSAND -- SURFACE_SHALLOW_QUICKSAND -- SURFACE_SLIPPERY -- SURFACE_SLOW -- SURFACE_SWITCH -- SURFACE_THI3_WALLKICK -- SURFACE_TIMER_END -- SURFACE_TIMER_START -- SURFACE_TRAPDOOR +- SURFACE_PAINTING_WARP_D3 +- SURFACE_PAINTING_WARP_D4 +- SURFACE_PAINTING_WARP_D5 +- SURFACE_PAINTING_WARP_D6 +- SURFACE_PAINTING_WARP_D7 +- SURFACE_PAINTING_WARP_D8 +- SURFACE_PAINTING_WARP_D9 +- SURFACE_PAINTING_WARP_DA +- SURFACE_PAINTING_WARP_DB +- SURFACE_PAINTING_WARP_DC +- SURFACE_PAINTING_WARP_DD +- SURFACE_PAINTING_WARP_DE +- SURFACE_PAINTING_WARP_DF +- SURFACE_PAINTING_WARP_E0 +- SURFACE_PAINTING_WARP_E1 +- SURFACE_PAINTING_WARP_E2 +- SURFACE_PAINTING_WARP_E3 +- SURFACE_PAINTING_WARP_E4 +- SURFACE_PAINTING_WARP_E5 +- SURFACE_PAINTING_WARP_E6 +- SURFACE_PAINTING_WARP_E7 +- SURFACE_PAINTING_WARP_E8 +- SURFACE_PAINTING_WARP_E9 +- SURFACE_PAINTING_WARP_EA +- SURFACE_PAINTING_WARP_EB +- SURFACE_PAINTING_WARP_EC +- SURFACE_PAINTING_WARP_ED +- SURFACE_PAINTING_WARP_EE +- SURFACE_PAINTING_WARP_EF +- SURFACE_PAINTING_WARP_F0 +- SURFACE_PAINTING_WARP_F1 +- SURFACE_PAINTING_WARP_F2 +- SURFACE_PAINTING_WARP_F3 - SURFACE_TTC_PAINTING_1 - SURFACE_TTC_PAINTING_2 - SURFACE_TTC_PAINTING_3 -- SURFACE_TTM_VINES -- SURFACE_VANISH_CAP_WALLS -- SURFACE_VERTICAL_WIND -- SURFACE_VERY_SLIPPERY -- SURFACE_WALL_MISC -- SURFACE_WARP -- SURFACE_WATER +- SURFACE_PAINTING_WARP_F7 +- SURFACE_PAINTING_WARP_F8 +- SURFACE_PAINTING_WARP_F9 +- SURFACE_PAINTING_WARP_FA +- SURFACE_PAINTING_WARP_FB +- SURFACE_PAINTING_WARP_FC - SURFACE_WOBBLING_WARP -- TERRAIN_GRASS +- SURFACE_TRAPDOOR +- SURFACE_CLASS_DEFAULT +- SURFACE_CLASS_VERY_SLIPPERY +- SURFACE_CLASS_SLIPPERY +- SURFACE_CLASS_NOT_SLIPPERY +- SURFACE_FLAG_DYNAMIC +- SURFACE_FLAG_NO_CAM_COLLISION +- SURFACE_FLAG_X_PROJECTION +- HAZARD_TYPE_LAVA_FLOOR +- HAZARD_TYPE_LAVA_WALL +- HAZARD_TYPE_QUICKSAND +- HAZARD_TYPE_HORIZONTAL_WIND +- HAZARD_TYPE_VERTICAL_WIND +- TERRAIN_LOAD_VERTICES - TERRAIN_LOAD_CONTINUE - TERRAIN_LOAD_END -- TERRAIN_LOAD_ENVIRONMENT - TERRAIN_LOAD_OBJECTS -- TERRAIN_LOAD_VERTICES -- TERRAIN_MASK -- TERRAIN_SAND -- TERRAIN_SLIDE -- TERRAIN_SNOW -- TERRAIN_SPOOKY +- TERRAIN_LOAD_ENVIRONMENT +- TERRAIN_GRASS - TERRAIN_STONE +- TERRAIN_SNOW +- TERRAIN_SAND +- TERRAIN_SPOOKY - TERRAIN_WATER +- TERRAIN_SLIDE +- TERRAIN_MASK [:arrow_up_small:](#)
## [types.h](#types.h) -- ANIM_FLAG_2 -- ANIM_FLAG_5 -- ANIM_FLAG_6 -- ANIM_FLAG_7 -- ANIM_FLAG_FORWARD -- ANIM_FLAG_HOR_TRANS -- ANIM_FLAG_NOLOOP -- ANIM_FLAG_VERT_TRANS -- COOP_OBJ_FLAG_INITIALIZED -- COOP_OBJ_FLAG_LUA -- COOP_OBJ_FLAG_NETWORK -- COOP_OBJ_FLAG_NON_SYNC -- GRAPH_NODE_GUARD -- MAX_PLAYERS -- OBJECT_CUSTOM_FIELDS_START -- OBJECT_MAX_BHV_STACK -- OBJECT_NUM_CUSTOM_FIELDS -- OBJECT_NUM_FIELDS -- OBJECT_NUM_REGULAR_FIELDS -- PLAY_MODE_CHANGE_AREA -- PLAY_MODE_CHANGE_LEVEL -- PLAY_MODE_FRAME_ADVANCE -- PLAY_MODE_NORMAL -- PLAY_MODE_PAUSED - -### [enum AreaTimerType](#AreaTimerType) -| Identifier | Value | -| :--------- | :---- | -| AREA_TIMER_TYPE_NONE | 0 | -| AREA_TIMER_TYPE_LOOP | 1 | -| AREA_TIMER_TYPE_MAXIMUM | 2 | ### [enum SpTaskState](#SpTaskState) | Identifier | Value | @@ -4924,16 +4908,47 @@ | SPTASK_STATE_FINISHED | 3 | | SPTASK_STATE_FINISHED_DP | 4 | +### [enum AreaTimerType](#AreaTimerType) +| Identifier | Value | +| :--------- | :---- | +| AREA_TIMER_TYPE_NONE | 0 | +| AREA_TIMER_TYPE_LOOP | 1 | +| AREA_TIMER_TYPE_MAXIMUM | 2 | +- ANIM_FLAG_NOLOOP +- ANIM_FLAG_FORWARD +- ANIM_FLAG_2 +- ANIM_FLAG_HOR_TRANS +- ANIM_FLAG_VERT_TRANS +- ANIM_FLAG_5 +- ANIM_FLAG_6 +- ANIM_FLAG_7 +- GRAPH_NODE_GUARD +- OBJECT_MAX_BHV_STACK +- OBJECT_NUM_REGULAR_FIELDS +- OBJECT_NUM_CUSTOM_FIELDS +- OBJECT_CUSTOM_FIELDS_START +- OBJECT_NUM_FIELDS +- PLAY_MODE_NORMAL +- PLAY_MODE_PAUSED +- PLAY_MODE_CHANGE_AREA +- PLAY_MODE_CHANGE_LEVEL +- PLAY_MODE_FRAME_ADVANCE +- MAX_PLAYERS +- COOP_OBJ_FLAG_NETWORK +- COOP_OBJ_FLAG_LUA +- COOP_OBJ_FLAG_NON_SYNC +- COOP_OBJ_FLAG_INITIALIZED + [:arrow_up_small:](#)
## [version.h](#version.h) -- MAX_VERSION_LENGTH -- MINOR_VERSION_NUMBER - SM64COOPDX_VERSION -- VERSION_NUMBER - VERSION_TEXT +- VERSION_NUMBER +- MINOR_VERSION_NUMBER +- MAX_VERSION_LENGTH [:arrow_up_small:](#) diff --git a/docs/lua/functions-2.md b/docs/lua/functions-2.md index fa6ffb4b3..e8e622753 100644 --- a/docs/lua/functions-2.md +++ b/docs/lua/functions-2.md @@ -11,6 +11,174 @@
+## [spawn_mist_particles_variable](#spawn_mist_particles_variable) + +### Description +Spawns mist particles around the current object + +### Lua Example +`spawn_mist_particles_variable(count, offsetY, size)` + +### Parameters +| Field | Type | +| ----- | ---- | +| count | `integer` | +| offsetY | `integer` | +| size | `number` | + +### Returns +- None + +### C Prototype +`void spawn_mist_particles_variable(s32 count, s32 offsetY, f32 size);` + +[:arrow_up_small:](#) + +
+ +## [bhv_spawn_star_no_level_exit](#bhv_spawn_star_no_level_exit) + +### Description +Spawns a Star parented to `object` that won't make Mario exit the level with an ID corresponding to `params`' first byte + +### Lua Example +`bhv_spawn_star_no_level_exit(object, params, networkSendEvent)` + +### Parameters +| Field | Type | +| ----- | ---- | +| object | [Object](structs.md#Object) | +| params | `integer` | +| networkSendEvent | `integer` | + +### Returns +- None + +### C Prototype +`void bhv_spawn_star_no_level_exit(struct Object* object, u32 params, u8 networkSendEvent);` + +[:arrow_up_small:](#) + +
+ +## [spawn_triangle_break_particles](#spawn_triangle_break_particles) + +### Description +Spawns triangle break particles around the current object + +### Lua Example +`spawn_triangle_break_particles(numTris, triModel, triSize, triAnimState)` + +### Parameters +| Field | Type | +| ----- | ---- | +| numTris | `integer` | +| triModel | `integer` | +| triSize | `number` | +| triAnimState | `integer` | + +### Returns +- None + +### C Prototype +`void spawn_triangle_break_particles(s16 numTris, s16 triModel, f32 triSize, s16 triAnimState);` + +[:arrow_up_small:](#) + +
+ +## [spawn_mist_from_global](#spawn_mist_from_global) + +### Description +Spawns mist particles around the current object + +### Lua Example +`spawn_mist_from_global()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void spawn_mist_from_global(void);` + +[:arrow_up_small:](#) + +
+ +## [clear_particle_flags](#clear_particle_flags) + +### Description +Clears the particle flags of the current object + +### Lua Example +`clear_particle_flags(flags)` + +### Parameters +| Field | Type | +| ----- | ---- | +| flags | `integer` | + +### Returns +- None + +### C Prototype +`void clear_particle_flags(u32 flags);` + +[:arrow_up_small:](#) + +
+ +## [spawn_wind_particles](#spawn_wind_particles) + +### Description +Spawns wind particles around the current object + +### Lua Example +`spawn_wind_particles(pitch, yaw)` + +### Parameters +| Field | Type | +| ----- | ---- | +| pitch | `integer` | +| yaw | `integer` | + +### Returns +- None + +### C Prototype +`void spawn_wind_particles(s16 pitch, s16 yaw);` + +[:arrow_up_small:](#) + +
+ +## [check_if_moving_over_floor](#check_if_moving_over_floor) + +### Description +Checks if the current object is moving `a1` units over a floor and within a threshold of `a0` + +### Lua Example +`local integerValue = check_if_moving_over_floor(a0, a1)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a0 | `number` | +| a1 | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 check_if_moving_over_floor(f32 a0, f32 a1);` + +[:arrow_up_small:](#) + +
+ ## [arc_to_goal_pos](#arc_to_goal_pos) ### Description @@ -37,118 +205,136 @@ Calculates the time it takes for the current object to follow an arc from `pos`
-## [bhv_1up_common_init](#bhv_1up_common_init) +## [vec3f_copy_2](#vec3f_copy_2) ### Description -Behavior init function for common 1-Up +Duplicate of vec3f_copy except without bad return ### Lua Example -`bhv_1up_common_init()` +`vec3f_copy_2(dest, src)` ### Parameters -- None +| Field | Type | +| ----- | ---- | +| dest | [Vec3f](structs.md#Vec3f) | +| src | [Vec3f](structs.md#Vec3f) | ### Returns - None ### C Prototype -`void bhv_1up_common_init(void);` +`void vec3f_copy_2(Vec3f dest, Vec3f src);` [:arrow_up_small:](#)
-## [bhv_1up_hidden_in_pole_loop](#bhv_1up_hidden_in_pole_loop) +## [tox_box_move](#tox_box_move) ### Description -Behavior loop function for hidden 1-Up in pole (Green Demon) +Moves Tox Box ### Lua Example -`bhv_1up_hidden_in_pole_loop()` +`tox_box_move(forwardVel, a1, deltaPitch, deltaRoll)` ### Parameters -- None +| Field | Type | +| ----- | ---- | +| forwardVel | `number` | +| a1 | `number` | +| deltaPitch | `integer` | +| deltaRoll | `integer` | ### Returns - None ### C Prototype -`void bhv_1up_hidden_in_pole_loop(void);` +`void tox_box_move(f32 forwardVel, f32 a1, s16 deltaPitch, s16 deltaRoll);` [:arrow_up_small:](#)
-## [bhv_1up_hidden_in_pole_spawner_loop](#bhv_1up_hidden_in_pole_spawner_loop) +## [play_penguin_walking_sound](#play_penguin_walking_sound) ### Description -Behavior loop function for 1-Up hidden in pole spawner +Plays the penguin walking sound ### Lua Example -`bhv_1up_hidden_in_pole_spawner_loop()` +`play_penguin_walking_sound(walk)` ### Parameters -- None +| Field | Type | +| ----- | ---- | +| walk | `integer` | ### Returns - None ### C Prototype -`void bhv_1up_hidden_in_pole_spawner_loop(void);` +`void play_penguin_walking_sound(s32 walk);` [:arrow_up_small:](#)
-## [bhv_1up_hidden_in_pole_trigger_loop](#bhv_1up_hidden_in_pole_trigger_loop) +## [update_angle_from_move_flags](#update_angle_from_move_flags) ### Description -Behavior loop function for 1-Up hidden in pole trigger +Updates the current object's angle from its move flags ### Lua Example -`bhv_1up_hidden_in_pole_trigger_loop()` +`local integerValue = update_angle_from_move_flags(angle)` ### Parameters -- None +| Field | Type | +| ----- | ---- | +| angle | `Pointer` <`integer`> | ### Returns -- None +- `integer` ### C Prototype -`void bhv_1up_hidden_in_pole_trigger_loop(void);` +`s32 update_angle_from_move_flags(s32 *angle);` [:arrow_up_small:](#)
-## [bhv_1up_hidden_loop](#bhv_1up_hidden_loop) +## [cur_obj_spawn_strong_wind_particles](#cur_obj_spawn_strong_wind_particles) ### Description -Behavior loop function for hidden 1-Up +Spawns strong wind particles relative to the current object ### Lua Example -`bhv_1up_hidden_loop()` +`cur_obj_spawn_strong_wind_particles(windSpread, scale, relPosX, relPosY, relPosZ)` ### Parameters -- None +| Field | Type | +| ----- | ---- | +| windSpread | `integer` | +| scale | `number` | +| relPosX | `number` | +| relPosY | `number` | +| relPosZ | `number` | ### Returns - None ### C Prototype -`void bhv_1up_hidden_loop(void);` +`void cur_obj_spawn_strong_wind_particles(s32 windSpread, f32 scale, f32 relPosX, f32 relPosY, f32 relPosZ);` [:arrow_up_small:](#)
-## [bhv_1up_hidden_trigger_loop](#bhv_1up_hidden_trigger_loop) +## [bhv_star_door_loop_2](#bhv_star_door_loop_2) ### Description -Behavior loop function for hidden 1-Up trigger +Behavior loop function for Star Door ### Lua Example -`bhv_1up_hidden_trigger_loop()` +`bhv_star_door_loop_2()` ### Parameters - None @@ -157,19 +343,19 @@ Behavior loop function for hidden 1-Up trigger - None ### C Prototype -`void bhv_1up_hidden_trigger_loop(void);` +`void bhv_star_door_loop_2(void);` [:arrow_up_small:](#)
-## [bhv_1up_init](#bhv_1up_init) +## [bhv_cap_switch_loop](#bhv_cap_switch_loop) ### Description -Behavior init function for 1-Up +Behavior loop function for Cap Switch ### Lua Example -`bhv_1up_init()` +`bhv_cap_switch_loop()` ### Parameters - None @@ -178,19 +364,19 @@ Behavior init function for 1-Up - None ### C Prototype -`void bhv_1up_init(void);` +`void bhv_cap_switch_loop(void);` [:arrow_up_small:](#)
-## [bhv_1up_jump_on_approach_loop](#bhv_1up_jump_on_approach_loop) +## [bhv_tiny_star_particles_init](#bhv_tiny_star_particles_init) ### Description -Behavior loop function for jump on approach 1-Up +Behavior init function for tiny Star particles ### Lua Example -`bhv_1up_jump_on_approach_loop()` +`bhv_tiny_star_particles_init()` ### Parameters - None @@ -199,19 +385,19 @@ Behavior loop function for jump on approach 1-Up - None ### C Prototype -`void bhv_1up_jump_on_approach_loop(void);` +`void bhv_tiny_star_particles_init(void);` [:arrow_up_small:](#)
-## [bhv_1up_loop](#bhv_1up_loop) +## [bhv_grindel_thwomp_loop](#bhv_grindel_thwomp_loop) ### Description -Behavior loop function for 1-Up +Behavior loop function for Grindel and Thwomp ### Lua Example -`bhv_1up_loop()` +`bhv_grindel_thwomp_loop()` ### Parameters - None @@ -220,19 +406,19 @@ Behavior loop function for 1-Up - None ### C Prototype -`void bhv_1up_loop(void);` +`void bhv_grindel_thwomp_loop(void);` [:arrow_up_small:](#)
-## [bhv_1up_running_away_loop](#bhv_1up_running_away_loop) +## [bhv_koopa_shell_underwater_loop](#bhv_koopa_shell_underwater_loop) ### Description -Behavior loop function for running away 1-Up +Behavior loop function for Koopa Shell underwater ### Lua Example -`bhv_1up_running_away_loop()` +`bhv_koopa_shell_underwater_loop()` ### Parameters - None @@ -241,19 +427,19 @@ Behavior loop function for running away 1-Up - None ### C Prototype -`void bhv_1up_running_away_loop(void);` +`void bhv_koopa_shell_underwater_loop(void);` [:arrow_up_small:](#)
-## [bhv_1up_sliding_loop](#bhv_1up_sliding_loop) +## [bhv_door_init](#bhv_door_init) ### Description -Behavior loop function for sliding 1-Up +Behavior init function for door ### Lua Example -`bhv_1up_sliding_loop()` +`bhv_door_init()` ### Parameters - None @@ -262,19 +448,19 @@ Behavior loop function for sliding 1-Up - None ### C Prototype -`void bhv_1up_sliding_loop(void);` +`void bhv_door_init(void);` [:arrow_up_small:](#)
-## [bhv_1up_trigger_init](#bhv_1up_trigger_init) +## [bhv_door_loop](#bhv_door_loop) ### Description -Behavior init function for 1-Up trigger +Behavior loop function for door ### Lua Example -`bhv_1up_trigger_init()` +`bhv_door_loop()` ### Parameters - None @@ -283,19 +469,19 @@ Behavior init function for 1-Up trigger - None ### C Prototype -`void bhv_1up_trigger_init(void);` +`void bhv_door_loop(void);` [:arrow_up_small:](#)
-## [bhv_1up_walking_loop](#bhv_1up_walking_loop) +## [bhv_star_door_loop](#bhv_star_door_loop) ### Description -Behavior loop function for walking 1-Up +Behavior loop function for Star Door ### Lua Example -`bhv_1up_walking_loop()` +`bhv_star_door_loop()` ### Parameters - None @@ -304,19 +490,19 @@ Behavior loop function for walking 1-Up - None ### C Prototype -`void bhv_1up_walking_loop(void);` +`void bhv_star_door_loop(void);` [:arrow_up_small:](#)
-## [bhv_act_selector_init](#bhv_act_selector_init) +## [bhv_mr_i_loop](#bhv_mr_i_loop) ### Description -Behavior init function for Act Selector +Behavior loop function for Mr. I ### Lua Example -`bhv_act_selector_init()` +`bhv_mr_i_loop()` ### Parameters - None @@ -325,19 +511,19 @@ Behavior init function for Act Selector - None ### C Prototype -`void bhv_act_selector_init(void);` +`void bhv_mr_i_loop(void);` [:arrow_up_small:](#)
-## [bhv_act_selector_loop](#bhv_act_selector_loop) +## [bhv_mr_i_body_loop](#bhv_mr_i_body_loop) ### Description -Behavior loop function for Act Selector +Behavior loop function for Mr. I body ### Lua Example -`bhv_act_selector_loop()` +`bhv_mr_i_body_loop()` ### Parameters - None @@ -346,19 +532,19 @@ Behavior loop function for Act Selector - None ### C Prototype -`void bhv_act_selector_loop(void);` +`void bhv_mr_i_body_loop(void);` [:arrow_up_small:](#)
-## [bhv_act_selector_star_type_loop](#bhv_act_selector_star_type_loop) +## [bhv_mr_i_particle_loop](#bhv_mr_i_particle_loop) ### Description -Behavior loop function for Act Selector star type +Behavior loop function for Mr. I particle ### Lua Example -`bhv_act_selector_star_type_loop()` +`bhv_mr_i_particle_loop()` ### Parameters - None @@ -367,19 +553,19 @@ Behavior loop function for Act Selector star type - None ### C Prototype -`void bhv_act_selector_star_type_loop(void);` +`void bhv_mr_i_particle_loop(void);` [:arrow_up_small:](#)
-## [bhv_activated_back_and_forth_platform_init](#bhv_activated_back_and_forth_platform_init) +## [bhv_piranha_particle_loop](#bhv_piranha_particle_loop) ### Description -Behavior init function for activated back and forth platform in Bowser courses +Behavior loop function for Piranha particle ### Lua Example -`bhv_activated_back_and_forth_platform_init()` +`bhv_piranha_particle_loop()` ### Parameters - None @@ -388,19 +574,19 @@ Behavior init function for activated back and forth platform in Bowser courses - None ### C Prototype -`void bhv_activated_back_and_forth_platform_init(void);` +`void bhv_piranha_particle_loop(void);` [:arrow_up_small:](#)
-## [bhv_activated_back_and_forth_platform_update](#bhv_activated_back_and_forth_platform_update) +## [bhv_giant_pole_loop](#bhv_giant_pole_loop) ### Description -Behavior loop function for activated back and forth platform in Bowser courses +Behavior loop function for giant pole ### Lua Example -`bhv_activated_back_and_forth_platform_update()` +`bhv_giant_pole_loop()` ### Parameters - None @@ -409,19 +595,19 @@ Behavior loop function for activated back and forth platform in Bowser courses - None ### C Prototype -`void bhv_activated_back_and_forth_platform_update(void);` +`void bhv_giant_pole_loop(void);` [:arrow_up_small:](#)
-## [bhv_alpha_boo_key_loop](#bhv_alpha_boo_key_loop) +## [bhv_pole_init](#bhv_pole_init) ### Description -Behavior loop function for alpha boo key +Behavior init function for pole ### Lua Example -`bhv_alpha_boo_key_loop()` +`bhv_pole_init()` ### Parameters - None @@ -430,19 +616,19 @@ Behavior loop function for alpha boo key - None ### C Prototype -`void bhv_alpha_boo_key_loop(void);` +`void bhv_pole_init(void);` [:arrow_up_small:](#)
-## [bhv_ambient_light_update](#bhv_ambient_light_update) +## [bhv_pole_base_loop](#bhv_pole_base_loop) ### Description -Behavior loop function for the lighting engine ambient light. Takes the first 3 behavior parameter bytes for RGB color +Behavior loop function for pole base ### Lua Example -`bhv_ambient_light_update()` +`bhv_pole_base_loop()` ### Parameters - None @@ -451,19 +637,19 @@ Behavior loop function for the lighting engine ambient light. Takes the first 3 - None ### C Prototype -`void bhv_ambient_light_update(void);` +`void bhv_pole_base_loop(void);` [:arrow_up_small:](#)
-## [bhv_ambient_sounds_init](#bhv_ambient_sounds_init) +## [bhv_thi_huge_island_top_loop](#bhv_thi_huge_island_top_loop) ### Description -Behavior init function for ambient sounds +Behavior loop function for Tiny Huge Island huge island top ### Lua Example -`bhv_ambient_sounds_init()` +`bhv_thi_huge_island_top_loop()` ### Parameters - None @@ -472,19 +658,19 @@ Behavior init function for ambient sounds - None ### C Prototype -`void bhv_ambient_sounds_init(void);` +`void bhv_thi_huge_island_top_loop(void);` [:arrow_up_small:](#)
-## [bhv_animated_texture_loop](#bhv_animated_texture_loop) +## [bhv_thi_tiny_island_top_loop](#bhv_thi_tiny_island_top_loop) ### Description -Behavior loop function for animated texture +Behavior loop function for Tiny Huge Island tiny island top ### Lua Example -`bhv_animated_texture_loop()` +`bhv_thi_tiny_island_top_loop()` ### Parameters - None @@ -493,19 +679,19 @@ Behavior loop function for animated texture - None ### C Prototype -`void bhv_animated_texture_loop(void);` +`void bhv_thi_tiny_island_top_loop(void);` [:arrow_up_small:](#)
-## [bhv_animates_on_floor_switch_press_init](#bhv_animates_on_floor_switch_press_init) +## [bhv_king_bobomb_loop](#bhv_king_bobomb_loop) ### Description -Behavior init function for animates on floor switch press in Rainbow Ride and Bowser courses +Behavior loop function for King Bob-omb ### Lua Example -`bhv_animates_on_floor_switch_press_init()` +`bhv_king_bobomb_loop()` ### Parameters - None @@ -514,19 +700,19 @@ Behavior init function for animates on floor switch press in Rainbow Ride and Bo - None ### C Prototype -`void bhv_animates_on_floor_switch_press_init(void);` +`void bhv_king_bobomb_loop(void);` [:arrow_up_small:](#)
-## [bhv_animates_on_floor_switch_press_loop](#bhv_animates_on_floor_switch_press_loop) +## [bhv_bobomb_anchor_mario_loop](#bhv_bobomb_anchor_mario_loop) ### Description -Behavior loop function for animates on floor switch press in Rainbow Ride and Bowser courses +Behavior loop function for Bob-omb anchor mario ### Lua Example -`bhv_animates_on_floor_switch_press_loop()` +`bhv_bobomb_anchor_mario_loop()` ### Parameters - None @@ -535,91 +721,7 @@ Behavior loop function for animates on floor switch press in Rainbow Ride and Bo - None ### C Prototype -`void bhv_animates_on_floor_switch_press_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_arrow_lift_loop](#bhv_arrow_lift_loop) - -### Description -Behavior loop function for Wet Dry World arrow lift - -### Lua Example -`bhv_arrow_lift_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_arrow_lift_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bbh_tilting_trap_platform_loop](#bhv_bbh_tilting_trap_platform_loop) - -### Description -Behavior loop function for Big Boo's Haunt tilting trap platform - -### Lua Example -`bhv_bbh_tilting_trap_platform_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bbh_tilting_trap_platform_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_beta_boo_key_loop](#bhv_beta_boo_key_loop) - -### Description -Behavior loop function for beta boo key - -### Lua Example -`bhv_beta_boo_key_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_beta_boo_key_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_beta_bowser_anchor_loop](#bhv_beta_bowser_anchor_loop) - -### Description -Behavior loop function for beta Bowser anchor - -### Lua Example -`bhv_beta_bowser_anchor_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_beta_bowser_anchor_loop(void);` +`void bhv_bobomb_anchor_mario_loop(void);` [:arrow_up_small:](#) @@ -688,13 +790,13 @@ Behavior loop function for beta chest lid
-## [bhv_beta_fish_splash_spawner_loop](#bhv_beta_fish_splash_spawner_loop) +## [bhv_bubble_wave_init](#bhv_bubble_wave_init) ### Description -Behavior loop function for beta fish splash spawner +Behavior init function for bubble wave ### Lua Example -`bhv_beta_fish_splash_spawner_loop()` +`bhv_bubble_wave_init()` ### Parameters - None @@ -703,1666 +805,7 @@ Behavior loop function for beta fish splash spawner - None ### C Prototype -`void bhv_beta_fish_splash_spawner_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_beta_holdable_object_init](#bhv_beta_holdable_object_init) - -### Description -Behavior init function for beta holdable object - -### Lua Example -`bhv_beta_holdable_object_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_beta_holdable_object_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_beta_holdable_object_loop](#bhv_beta_holdable_object_loop) - -### Description -Behavior loop function for beta holdable object - -### Lua Example -`bhv_beta_holdable_object_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_beta_holdable_object_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_beta_moving_flames_loop](#bhv_beta_moving_flames_loop) - -### Description -Behavior loop function for beta moving flames - -### Lua Example -`bhv_beta_moving_flames_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_beta_moving_flames_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_beta_moving_flames_spawn_loop](#bhv_beta_moving_flames_spawn_loop) - -### Description -Behavior loop function for beta moving flames spawn - -### Lua Example -`bhv_beta_moving_flames_spawn_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_beta_moving_flames_spawn_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_beta_trampoline_spring_loop](#bhv_beta_trampoline_spring_loop) - -### Description -Behavior loop function for beta trampoline spring - -### Lua Example -`bhv_beta_trampoline_spring_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_beta_trampoline_spring_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_beta_trampoline_top_loop](#bhv_beta_trampoline_top_loop) - -### Description -Behavior loop function for beta trampoline top - -### Lua Example -`bhv_beta_trampoline_top_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_beta_trampoline_top_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_big_boo_loop](#bhv_big_boo_loop) - -### Description -Behavior loop function for Big Boo - -### Lua Example -`bhv_big_boo_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_big_boo_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_big_boulder_generator_loop](#bhv_big_boulder_generator_loop) - -### Description -Behavior loop function for big boulder generator - -### Lua Example -`bhv_big_boulder_generator_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_big_boulder_generator_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_big_boulder_init](#bhv_big_boulder_init) - -### Description -Behavior init function for big boulder - -### Lua Example -`bhv_big_boulder_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_big_boulder_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_big_boulder_loop](#bhv_big_boulder_loop) - -### Description -Behavior loop function for big boulder - -### Lua Example -`bhv_big_boulder_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_big_boulder_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_big_bully_init](#bhv_big_bully_init) - -### Description -Behavior init function for Big Bully - -### Lua Example -`bhv_big_bully_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_big_bully_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_big_bully_with_minions_init](#bhv_big_bully_with_minions_init) - -### Description -Behavior init function for Big Bully with minions - -### Lua Example -`bhv_big_bully_with_minions_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_big_bully_with_minions_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_big_bully_with_minions_loop](#bhv_big_bully_with_minions_loop) - -### Description -Behavior loop function for Big Bully with minions - -### Lua Example -`bhv_big_bully_with_minions_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_big_bully_with_minions_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bird_update](#bhv_bird_update) - -### Description -Behavior loop function for bird - -### Lua Example -`bhv_bird_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bird_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_birds_sound_loop](#bhv_birds_sound_loop) - -### Description -Behavior loop function for birds sound - -### Lua Example -`bhv_birds_sound_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_birds_sound_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bitfs_sinking_cage_platform_loop](#bhv_bitfs_sinking_cage_platform_loop) - -### Description -Behavior loop function for Bowser in the Fire Sea sinking cage platform - -### Lua Example -`bhv_bitfs_sinking_cage_platform_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bitfs_sinking_cage_platform_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bitfs_sinking_platform_loop](#bhv_bitfs_sinking_platform_loop) - -### Description -Behavior loop function for Bowser in the Fire Sea sinking platform - -### Lua Example -`bhv_bitfs_sinking_platform_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bitfs_sinking_platform_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_black_smoke_bowser_loop](#bhv_black_smoke_bowser_loop) - -### Description -Behavior loop function for black smoke Bowser - -### Lua Example -`bhv_black_smoke_bowser_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_black_smoke_bowser_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_black_smoke_mario_loop](#bhv_black_smoke_mario_loop) - -### Description -Behavior loop function for black smoke Mario - -### Lua Example -`bhv_black_smoke_mario_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_black_smoke_mario_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_black_smoke_upward_loop](#bhv_black_smoke_upward_loop) - -### Description -Behavior loop function for black smoke upward - -### Lua Example -`bhv_black_smoke_upward_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_black_smoke_upward_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_blue_bowser_flame_init](#bhv_blue_bowser_flame_init) - -### Description -Behavior init function for Blue Bowser flame - -### Lua Example -`bhv_blue_bowser_flame_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_blue_bowser_flame_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_blue_bowser_flame_loop](#bhv_blue_bowser_flame_loop) - -### Description -Behavior loop function for Blue Bowser flame - -### Lua Example -`bhv_blue_bowser_flame_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_blue_bowser_flame_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_blue_coin_jumping_loop](#bhv_blue_coin_jumping_loop) - -### Description -Behavior loop function for Blue Coin jumping - -### Lua Example -`bhv_blue_coin_jumping_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_blue_coin_jumping_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_blue_coin_number_loop](#bhv_blue_coin_number_loop) - -### Description -Behavior loop function for Blue Coin number - -### Lua Example -`bhv_blue_coin_number_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_blue_coin_number_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_blue_coin_sliding_jumping_init](#bhv_blue_coin_sliding_jumping_init) - -### Description -Behavior init function for Blue Coin sliding jumping - -### Lua Example -`bhv_blue_coin_sliding_jumping_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_blue_coin_sliding_jumping_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_blue_coin_sliding_loop](#bhv_blue_coin_sliding_loop) - -### Description -Behavior loop function for Blue Coin sliding - -### Lua Example -`bhv_blue_coin_sliding_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_blue_coin_sliding_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_blue_coin_switch_init](#bhv_blue_coin_switch_init) - -### Description -Behavior init function for Blue Coin switch - -### Lua Example -`bhv_blue_coin_switch_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_blue_coin_switch_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_blue_coin_switch_loop](#bhv_blue_coin_switch_loop) - -### Description -Behavior loop function for Blue Coin switch - -### Lua Example -`bhv_blue_coin_switch_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_blue_coin_switch_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_blue_fish_movement_loop](#bhv_blue_fish_movement_loop) - -### Description -Behavior loop function for blue fish movement - -### Lua Example -`bhv_blue_fish_movement_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_blue_fish_movement_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_blue_flames_group_loop](#bhv_blue_flames_group_loop) - -### Description -Behavior loop function for blue flames group - -### Lua Example -`bhv_blue_flames_group_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_blue_flames_group_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bob_pit_bowling_ball_init](#bhv_bob_pit_bowling_ball_init) - -### Description -Behavior init function for Bob-omb Battlefield pit bowling ball - -### Lua Example -`bhv_bob_pit_bowling_ball_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bob_pit_bowling_ball_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bob_pit_bowling_ball_loop](#bhv_bob_pit_bowling_ball_loop) - -### Description -Behavior loop function for Bob-omb Battlefield pit bowling ball - -### Lua Example -`bhv_bob_pit_bowling_ball_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bob_pit_bowling_ball_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bobomb_anchor_mario_loop](#bhv_bobomb_anchor_mario_loop) - -### Description -Behavior loop function for Bob-omb anchor mario - -### Lua Example -`bhv_bobomb_anchor_mario_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bobomb_anchor_mario_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bobomb_buddy_init](#bhv_bobomb_buddy_init) - -### Description -Behavior init function for Bob-omb buddy - -### Lua Example -`bhv_bobomb_buddy_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bobomb_buddy_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bobomb_buddy_loop](#bhv_bobomb_buddy_loop) - -### Description -Behavior loop function for Bob-omb buddy - -### Lua Example -`bhv_bobomb_buddy_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bobomb_buddy_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bobomb_bully_death_smoke_init](#bhv_bobomb_bully_death_smoke_init) - -### Description -Behavior init function for Bob-omb and Bully death smoke - -### Lua Example -`bhv_bobomb_bully_death_smoke_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bobomb_bully_death_smoke_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bobomb_explosion_bubble_init](#bhv_bobomb_explosion_bubble_init) - -### Description -Behavior init function for Bob-omb explosion bubble - -### Lua Example -`bhv_bobomb_explosion_bubble_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bobomb_explosion_bubble_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bobomb_explosion_bubble_loop](#bhv_bobomb_explosion_bubble_loop) - -### Description -Behavior loop function for Bob-omb explosion bubble - -### Lua Example -`bhv_bobomb_explosion_bubble_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bobomb_explosion_bubble_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bobomb_fuse_smoke_init](#bhv_bobomb_fuse_smoke_init) - -### Description -Behavior init function for Bob-omb fuse smoke - -### Lua Example -`bhv_bobomb_fuse_smoke_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bobomb_fuse_smoke_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bobomb_init](#bhv_bobomb_init) - -### Description -Behavior init function for Bob-omb - -### Lua Example -`bhv_bobomb_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bobomb_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bobomb_loop](#bhv_bobomb_loop) - -### Description -Behavior loop function for Bob-omb - -### Lua Example -`bhv_bobomb_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bobomb_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_boo_boss_spawned_bridge_loop](#bhv_boo_boss_spawned_bridge_loop) - -### Description -Behavior loop function for Boo boss spawned bridge - -### Lua Example -`bhv_boo_boss_spawned_bridge_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_boo_boss_spawned_bridge_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_boo_cage_init](#bhv_boo_cage_init) - -### Description -Behavior init function for Boo cage - -### Lua Example -`bhv_boo_cage_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_boo_cage_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_boo_cage_loop](#bhv_boo_cage_loop) - -### Description -Behavior loop function for Boo cage - -### Lua Example -`bhv_boo_cage_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_boo_cage_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_boo_in_castle_loop](#bhv_boo_in_castle_loop) - -### Description -Behavior loop function for the Boo inside the Castle - -### Lua Example -`bhv_boo_in_castle_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_boo_in_castle_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_boo_init](#bhv_boo_init) - -### Description -Behavior init function for Boo - -### Lua Example -`bhv_boo_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_boo_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_boo_loop](#bhv_boo_loop) - -### Description -Behavior loop function for Boo - -### Lua Example -`bhv_boo_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_boo_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_boo_with_cage_init](#bhv_boo_with_cage_init) - -### Description -Behavior init function for Boo with cage - -### Lua Example -`bhv_boo_with_cage_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_boo_with_cage_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_boo_with_cage_loop](#bhv_boo_with_cage_loop) - -### Description -Behavior loop function for Boo with cage - -### Lua Example -`bhv_boo_with_cage_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_boo_with_cage_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_book_switch_loop](#bhv_book_switch_loop) - -### Description -Behavior loop function for Book switch - -### Lua Example -`bhv_book_switch_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_book_switch_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bookend_spawn_loop](#bhv_bookend_spawn_loop) - -### Description -Behavior loop function for Bookend spawn - -### Lua Example -`bhv_bookend_spawn_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bookend_spawn_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bouncing_fireball_flame_loop](#bhv_bouncing_fireball_flame_loop) - -### Description -Behavior loop function for bouncing fireball flame - -### Lua Example -`bhv_bouncing_fireball_flame_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bouncing_fireball_flame_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bouncing_fireball_loop](#bhv_bouncing_fireball_loop) - -### Description -Behavior loop function for bouncing fireball - -### Lua Example -`bhv_bouncing_fireball_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bouncing_fireball_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowling_ball_init](#bhv_bowling_ball_init) - -### Description -Behavior init function for bowling ball - -### Lua Example -`bhv_bowling_ball_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowling_ball_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowling_ball_loop](#bhv_bowling_ball_loop) - -### Description -Behavior loop function for bowling ball - -### Lua Example -`bhv_bowling_ball_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowling_ball_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowser_body_anchor_init](#bhv_bowser_body_anchor_init) - -### Description -Behavior init function for Bowser body anchor - -### Lua Example -`bhv_bowser_body_anchor_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowser_body_anchor_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowser_body_anchor_loop](#bhv_bowser_body_anchor_loop) - -### Description -Behavior loop function for Bowser body anchor - -### Lua Example -`bhv_bowser_body_anchor_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowser_body_anchor_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowser_bomb_explosion_loop](#bhv_bowser_bomb_explosion_loop) - -### Description -Behavior loop function for Bowser bomb explosion - -### Lua Example -`bhv_bowser_bomb_explosion_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowser_bomb_explosion_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowser_bomb_loop](#bhv_bowser_bomb_loop) - -### Description -Behavior loop function for Bowser bomb - -### Lua Example -`bhv_bowser_bomb_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowser_bomb_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowser_bomb_smoke_loop](#bhv_bowser_bomb_smoke_loop) - -### Description -Behavior loop function for Bowser bomb smoke - -### Lua Example -`bhv_bowser_bomb_smoke_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowser_bomb_smoke_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowser_course_red_coin_star_loop](#bhv_bowser_course_red_coin_star_loop) - -### Description -Behavior loop function for Bowser course Red Coin Star - -### Lua Example -`bhv_bowser_course_red_coin_star_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowser_course_red_coin_star_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowser_flame_spawn_loop](#bhv_bowser_flame_spawn_loop) - -### Description -Behavior loop function for Bowser flame spawn - -### Lua Example -`bhv_bowser_flame_spawn_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowser_flame_spawn_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowser_init](#bhv_bowser_init) - -### Description -Behavior init function for Bowser - -### Lua Example -`bhv_bowser_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowser_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowser_key_course_exit_loop](#bhv_bowser_key_course_exit_loop) - -### Description -Behavior loop function for Bowser key course exit - -### Lua Example -`bhv_bowser_key_course_exit_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowser_key_course_exit_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowser_key_init](#bhv_bowser_key_init) - -### Description -Behavior init function for Bowser key - -### Lua Example -`bhv_bowser_key_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowser_key_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowser_key_loop](#bhv_bowser_key_loop) - -### Description -Behavior loop function for Bowser key - -### Lua Example -`bhv_bowser_key_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowser_key_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowser_key_unlock_door_loop](#bhv_bowser_key_unlock_door_loop) - -### Description -Behavior loop function for Bowser key unlock door - -### Lua Example -`bhv_bowser_key_unlock_door_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowser_key_unlock_door_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowser_loop](#bhv_bowser_loop) - -### Description -Behavior loop function for Bowser - -### Lua Example -`bhv_bowser_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowser_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowser_shock_wave_loop](#bhv_bowser_shock_wave_loop) - -### Description -Behavior loop function for Bowser shock wave - -### Lua Example -`bhv_bowser_shock_wave_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowser_shock_wave_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowser_tail_anchor_init](#bhv_bowser_tail_anchor_init) - -### Description -Behavior init function for Bowser tail anchor - -### Lua Example -`bhv_bowser_tail_anchor_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowser_tail_anchor_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowser_tail_anchor_loop](#bhv_bowser_tail_anchor_loop) - -### Description -Behavior loop function for Bowser tail anchor - -### Lua Example -`bhv_bowser_tail_anchor_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowser_tail_anchor_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bowsers_sub_loop](#bhv_bowsers_sub_loop) - -### Description -Behavior loop function for Bowser's submarine - -### Lua Example -`bhv_bowsers_sub_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bowsers_sub_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_breakable_box_loop](#bhv_breakable_box_loop) - -### Description -Behavior loop function for breakable box - -### Lua Example -`bhv_breakable_box_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_breakable_box_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_breakable_box_small_init](#bhv_breakable_box_small_init) - -### Description -Behavior init function for small breakable box - -### Lua Example -`bhv_breakable_box_small_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_breakable_box_small_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_breakable_box_small_loop](#bhv_breakable_box_small_loop) - -### Description -Behavior loop function for small breakable box - -### Lua Example -`bhv_breakable_box_small_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_breakable_box_small_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bub_loop](#bhv_bub_loop) - -### Description -Behavior loop function for Bub - -### Lua Example -`bhv_bub_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bub_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bub_spawner_loop](#bhv_bub_spawner_loop) - -### Description -Behavior loop function for Bub spawner - -### Lua Example -`bhv_bub_spawner_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bub_spawner_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bubba_loop](#bhv_bubba_loop) - -### Description -Behavior loop function for Bubba - -### Lua Example -`bhv_bubba_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bubba_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_bubble_cannon_barrel_loop](#bhv_bubble_cannon_barrel_loop) - -### Description -Behavior loop function for bubble cannon barrel - -### Lua Example -`bhv_bubble_cannon_barrel_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_bubble_cannon_barrel_loop(void);` +`void bhv_bubble_wave_init(void);` [:arrow_up_small:](#) @@ -2410,13 +853,13 @@ Behavior loop function for bubble player
-## [bhv_bubble_splash_init](#bhv_bubble_splash_init) +## [bhv_water_air_bubble_init](#bhv_water_air_bubble_init) ### Description -Behavior init function for bubble splash +Behavior init function for water air bubble ### Lua Example -`bhv_bubble_splash_init()` +`bhv_water_air_bubble_init()` ### Parameters - None @@ -2425,19 +868,19 @@ Behavior init function for bubble splash - None ### C Prototype -`void bhv_bubble_splash_init(void);` +`void bhv_water_air_bubble_init(void);` [:arrow_up_small:](#)
-## [bhv_bubble_wave_init](#bhv_bubble_wave_init) +## [bhv_water_air_bubble_loop](#bhv_water_air_bubble_loop) ### Description -Behavior init function for bubble wave +Behavior loop function for water air bubble ### Lua Example -`bhv_bubble_wave_init()` +`bhv_water_air_bubble_loop()` ### Parameters - None @@ -2446,7 +889,2195 @@ Behavior init function for bubble wave - None ### C Prototype -`void bhv_bubble_wave_init(void);` +`void bhv_water_air_bubble_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_particle_init](#bhv_particle_init) + +### Description +Behavior init function for particle + +### Lua Example +`bhv_particle_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_particle_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_particle_loop](#bhv_particle_loop) + +### Description +Behavior loop function for particle + +### Lua Example +`bhv_particle_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_particle_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_water_waves_init](#bhv_water_waves_init) + +### Description +Behavior init function for water waves + +### Lua Example +`bhv_water_waves_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_water_waves_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_small_bubbles_loop](#bhv_small_bubbles_loop) + +### Description +Behavior loop function for small bubbles + +### Lua Example +`bhv_small_bubbles_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_small_bubbles_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_fish_group_loop](#bhv_fish_group_loop) + +### Description +Behavior loop function for fish group + +### Lua Example +`bhv_fish_group_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_fish_group_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_cannon_base_loop](#bhv_cannon_base_loop) + +### Description +Behavior loop function for cannon base + +### Lua Example +`bhv_cannon_base_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_cannon_base_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_cannon_barrel_loop](#bhv_cannon_barrel_loop) + +### Description +Behavior loop function for cannon barrel + +### Lua Example +`bhv_cannon_barrel_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_cannon_barrel_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_cannon_base_unused_loop](#bhv_cannon_base_unused_loop) + +### Description +Behavior loop function for cannon base unused + +### Lua Example +`bhv_cannon_base_unused_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_cannon_base_unused_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [common_anchor_mario_behavior](#common_anchor_mario_behavior) + +### Description +Common behavior for when Mario's anchoring when grabbed + +### Lua Example +`common_anchor_mario_behavior(sp28, sp2C, sp30)` + +### Parameters +| Field | Type | +| ----- | ---- | +| sp28 | `number` | +| sp2C | `number` | +| sp30 | `integer` | + +### Returns +- None + +### C Prototype +`void common_anchor_mario_behavior(f32 sp28, f32 sp2C, s32 sp30);` + +[:arrow_up_small:](#) + +
+ +## [bhv_chuckya_loop](#bhv_chuckya_loop) + +### Description +Behavior loop function for Chuckya + +### Lua Example +`bhv_chuckya_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_chuckya_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_chuckya_anchor_mario_loop](#bhv_chuckya_anchor_mario_loop) + +### Description +Behavior loop function for Chuckya mario anchor + +### Lua Example +`bhv_chuckya_anchor_mario_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_chuckya_anchor_mario_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_rotating_platform_loop](#bhv_rotating_platform_loop) + +### Description +Behavior loop function for rotating platform + +### Lua Example +`bhv_rotating_platform_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_rotating_platform_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_wf_breakable_wall_loop](#bhv_wf_breakable_wall_loop) + +### Description +Behavior loop function for Whomp's Fortress breakable wall + +### Lua Example +`bhv_wf_breakable_wall_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_wf_breakable_wall_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_kickable_board_loop](#bhv_kickable_board_loop) + +### Description +Behavior loop function for Whomp's Fortress kickable board + +### Lua Example +`bhv_kickable_board_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_kickable_board_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_tower_door_loop](#bhv_tower_door_loop) + +### Description +Behavior loop function for Whomp's Fortress tower door + +### Lua Example +`bhv_tower_door_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_tower_door_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_wf_rotating_wooden_platform_init](#bhv_wf_rotating_wooden_platform_init) + +### Description +Behavior init function for Whomp's Fortress rotating wooden platform + +### Lua Example +`bhv_wf_rotating_wooden_platform_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_wf_rotating_wooden_platform_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_wf_rotating_wooden_platform_loop](#bhv_wf_rotating_wooden_platform_loop) + +### Description +Behavior loop function for Whomp's Fortress rotating wooden platform + +### Lua Example +`bhv_wf_rotating_wooden_platform_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_wf_rotating_wooden_platform_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_fading_warp_loop](#bhv_fading_warp_loop) + +### Description +Behavior loop function for fading warp + +### Lua Example +`bhv_fading_warp_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_fading_warp_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_warp_loop](#bhv_warp_loop) + +### Description +Behavior loop function for warp + +### Lua Example +`bhv_warp_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_warp_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_white_puff_exploding_loop](#bhv_white_puff_exploding_loop) + +### Description +Behavior loop function for white puff exploding + +### Lua Example +`bhv_white_puff_exploding_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_white_puff_exploding_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_spawned_star_init](#bhv_spawned_star_init) + +### Description +Behavior init function for spawned star + +### Lua Example +`bhv_spawned_star_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_spawned_star_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_spawned_star_loop](#bhv_spawned_star_loop) + +### Description +Behavior loop function for Spawned star + +### Lua Example +`bhv_spawned_star_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_spawned_star_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_coin_init](#bhv_coin_init) + +### Description +Behavior init function for Coin + +### Lua Example +`bhv_coin_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_coin_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_coin_loop](#bhv_coin_loop) + +### Description +Behavior loop function for Coin + +### Lua Example +`bhv_coin_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_coin_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_coin_inside_boo_loop](#bhv_coin_inside_boo_loop) + +### Description +Behavior loop function for Coin inside Boo + +### Lua Example +`bhv_coin_inside_boo_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_coin_inside_boo_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_coin_formation_init](#bhv_coin_formation_init) + +### Description +Behavior init function for Coin formation + +### Lua Example +`bhv_coin_formation_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_coin_formation_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_coin_formation_spawn_loop](#bhv_coin_formation_spawn_loop) + +### Description +Behavior loop function for Coin formation spawn + +### Lua Example +`bhv_coin_formation_spawn_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_coin_formation_spawn_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_coin_formation_loop](#bhv_coin_formation_loop) + +### Description +Behavior loop function for Coin formation + +### Lua Example +`bhv_coin_formation_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_coin_formation_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_temp_coin_loop](#bhv_temp_coin_loop) + +### Description +Behavior loop function for despawning Coin + +### Lua Example +`bhv_temp_coin_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_temp_coin_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_coin_sparkles_loop](#bhv_coin_sparkles_loop) + +### Description +Behavior loop function for Coin sparkles + +### Lua Example +`bhv_coin_sparkles_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_coin_sparkles_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_golden_coin_sparkles_loop](#bhv_golden_coin_sparkles_loop) + +### Description +Behavior loop function for golden Coin sparkles + +### Lua Example +`bhv_golden_coin_sparkles_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_golden_coin_sparkles_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_wall_tiny_star_particle_loop](#bhv_wall_tiny_star_particle_loop) + +### Description +Behavior loop function for tiny wall star particle + +### Lua Example +`bhv_wall_tiny_star_particle_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_wall_tiny_star_particle_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_pound_tiny_star_particle_loop](#bhv_pound_tiny_star_particle_loop) + +### Description +Behavior loop function for tiny pound star particle + +### Lua Example +`bhv_pound_tiny_star_particle_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_pound_tiny_star_particle_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_pound_tiny_star_particle_init](#bhv_pound_tiny_star_particle_init) + +### Description +Behavior init function for tiny pound star particle + +### Lua Example +`bhv_pound_tiny_star_particle_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_pound_tiny_star_particle_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_punch_tiny_triangle_loop](#bhv_punch_tiny_triangle_loop) + +### Description +Behavior loop function for tiny punch triangle + +### Lua Example +`bhv_punch_tiny_triangle_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_punch_tiny_triangle_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_punch_tiny_triangle_init](#bhv_punch_tiny_triangle_init) + +### Description +Behavior init function for tiny punch triangle + +### Lua Example +`bhv_punch_tiny_triangle_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_punch_tiny_triangle_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_tumbling_bridge_platform_loop](#bhv_tumbling_bridge_platform_loop) + +### Description +Behavior loop function for tumbling bridge platform + +### Lua Example +`bhv_tumbling_bridge_platform_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_tumbling_bridge_platform_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_tumbling_bridge_loop](#bhv_tumbling_bridge_loop) + +### Description +Behavior loop function for tumbling bridge + +### Lua Example +`bhv_tumbling_bridge_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_tumbling_bridge_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_elevator_init](#bhv_elevator_init) + +### Description +Behavior init function for elevator + +### Lua Example +`bhv_elevator_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_elevator_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_elevator_loop](#bhv_elevator_loop) + +### Description +Behavior loop function for elevator + +### Lua Example +`bhv_elevator_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_elevator_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_water_mist_loop](#bhv_water_mist_loop) + +### Description +Behavior loop function for water mist + +### Lua Example +`bhv_water_mist_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_water_mist_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_water_mist_spawn_loop](#bhv_water_mist_spawn_loop) + +### Description +Behavior loop function for water mist spawn + +### Lua Example +`bhv_water_mist_spawn_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_water_mist_spawn_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_water_mist_2_loop](#bhv_water_mist_2_loop) + +### Description +Behavior loop function for water mist 2 + +### Lua Example +`bhv_water_mist_2_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_water_mist_2_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_pound_white_puffs_init](#bhv_pound_white_puffs_init) + +### Description +Behavior init function for pound white puffs + +### Lua Example +`bhv_pound_white_puffs_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_pound_white_puffs_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_ground_sand_init](#bhv_ground_sand_init) + +### Description +Behavior init function for ground sand + +### Lua Example +`bhv_ground_sand_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_ground_sand_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_ground_snow_init](#bhv_ground_snow_init) + +### Description +Behavior init function for ground snow + +### Lua Example +`bhv_ground_snow_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_ground_snow_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_wind_loop](#bhv_wind_loop) + +### Description +Behavior loop function for wind + +### Lua Example +`bhv_wind_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_wind_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_unused_particle_spawn_loop](#bhv_unused_particle_spawn_loop) + +### Description +Behavior loop function for unused particle spawn + +### Lua Example +`bhv_unused_particle_spawn_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_unused_particle_spawn_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_ukiki_cage_star_loop](#bhv_ukiki_cage_star_loop) + +### Description +Behavior loop function for Ukiki cage Star + +### Lua Example +`bhv_ukiki_cage_star_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_ukiki_cage_star_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_ukiki_cage_loop](#bhv_ukiki_cage_loop) + +### Description +Behavior loop function for Ukiki cage + +### Lua Example +`bhv_ukiki_cage_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_ukiki_cage_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bitfs_sinking_platform_loop](#bhv_bitfs_sinking_platform_loop) + +### Description +Behavior loop function for Bowser in the Fire Sea sinking platform + +### Lua Example +`bhv_bitfs_sinking_platform_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bitfs_sinking_platform_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bitfs_sinking_cage_platform_loop](#bhv_bitfs_sinking_cage_platform_loop) + +### Description +Behavior loop function for Bowser in the Fire Sea sinking cage platform + +### Lua Example +`bhv_bitfs_sinking_cage_platform_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bitfs_sinking_cage_platform_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_ddd_moving_pole_loop](#bhv_ddd_moving_pole_loop) + +### Description +Behavior loop function for Dire Dire Docks moving pole + +### Lua Example +`bhv_ddd_moving_pole_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_ddd_moving_pole_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_platform_normals_init](#bhv_platform_normals_init) + +### Description +Behavior init function for Bowser in the Dark World, Lethal Lava Land, and Bowser in the Fire Sea platform normals + +### Lua Example +`bhv_platform_normals_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_platform_normals_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_tilting_inverted_pyramid_loop](#bhv_tilting_inverted_pyramid_loop) + +### Description +Behavior loop function for Lethal Lava Land and Bowser in the Fire Sea tilting inverted pyramid + +### Lua Example +`bhv_tilting_inverted_pyramid_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_tilting_inverted_pyramid_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_squishable_platform_loop](#bhv_squishable_platform_loop) + +### Description +Behavior loop function for squishable platform + +### Lua Example +`bhv_squishable_platform_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_squishable_platform_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_beta_moving_flames_spawn_loop](#bhv_beta_moving_flames_spawn_loop) + +### Description +Behavior loop function for beta moving flames spawn + +### Lua Example +`bhv_beta_moving_flames_spawn_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_beta_moving_flames_spawn_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_beta_moving_flames_loop](#bhv_beta_moving_flames_loop) + +### Description +Behavior loop function for beta moving flames + +### Lua Example +`bhv_beta_moving_flames_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_beta_moving_flames_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_rr_rotating_bridge_platform_loop](#bhv_rr_rotating_bridge_platform_loop) + +### Description +Behavior loop function for Rainbow Ride rotating bridge platform + +### Lua Example +`bhv_rr_rotating_bridge_platform_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_rr_rotating_bridge_platform_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_flamethrower_loop](#bhv_flamethrower_loop) + +### Description +Behavior loop function for flamethrower + +### Lua Example +`bhv_flamethrower_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_flamethrower_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_flamethrower_flame_loop](#bhv_flamethrower_flame_loop) + +### Description +Behavior loop function for flamethrower flame + +### Lua Example +`bhv_flamethrower_flame_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_flamethrower_flame_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bouncing_fireball_loop](#bhv_bouncing_fireball_loop) + +### Description +Behavior loop function for bouncing fireball + +### Lua Example +`bhv_bouncing_fireball_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bouncing_fireball_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bouncing_fireball_flame_loop](#bhv_bouncing_fireball_flame_loop) + +### Description +Behavior loop function for bouncing fireball flame + +### Lua Example +`bhv_bouncing_fireball_flame_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bouncing_fireball_flame_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bowser_shock_wave_loop](#bhv_bowser_shock_wave_loop) + +### Description +Behavior loop function for Bowser shock wave + +### Lua Example +`bhv_bowser_shock_wave_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bowser_shock_wave_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_flame_mario_loop](#bhv_flame_mario_loop) + +### Description +Behavior loop function for flame Mario + +### Lua Example +`bhv_flame_mario_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_flame_mario_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_black_smoke_mario_loop](#bhv_black_smoke_mario_loop) + +### Description +Behavior loop function for black smoke Mario + +### Lua Example +`bhv_black_smoke_mario_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_black_smoke_mario_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_black_smoke_bowser_loop](#bhv_black_smoke_bowser_loop) + +### Description +Behavior loop function for black smoke Bowser + +### Lua Example +`bhv_black_smoke_bowser_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_black_smoke_bowser_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_black_smoke_upward_loop](#bhv_black_smoke_upward_loop) + +### Description +Behavior loop function for black smoke upward + +### Lua Example +`bhv_black_smoke_upward_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_black_smoke_upward_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_beta_fish_splash_spawner_loop](#bhv_beta_fish_splash_spawner_loop) + +### Description +Behavior loop function for beta fish splash spawner + +### Lua Example +`bhv_beta_fish_splash_spawner_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_beta_fish_splash_spawner_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_spindrift_loop](#bhv_spindrift_loop) + +### Description +Behavior loop function for Spindrift + +### Lua Example +`bhv_spindrift_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_spindrift_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_tower_platform_group_init](#bhv_tower_platform_group_init) + +### Description +Behavior init function for Whomp's Fortress tower platform group + +### Lua Example +`bhv_tower_platform_group_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_tower_platform_group_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_tower_platform_group_loop](#bhv_tower_platform_group_loop) + +### Description +Behavior loop function for Whomp's Fortress tower platform group + +### Lua Example +`bhv_tower_platform_group_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_tower_platform_group_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_wf_sliding_tower_platform_loop](#bhv_wf_sliding_tower_platform_loop) + +### Description +Behavior loop function for Whomp's Fortress sliding tower platform + +### Lua Example +`bhv_wf_sliding_tower_platform_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_wf_sliding_tower_platform_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_wf_elevator_tower_platform_loop](#bhv_wf_elevator_tower_platform_loop) + +### Description +Behavior loop function for Whomp's Fortress elevator tower platform + +### Lua Example +`bhv_wf_elevator_tower_platform_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_wf_elevator_tower_platform_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_wf_solid_tower_platform_loop](#bhv_wf_solid_tower_platform_loop) + +### Description +Behavior loop function for Whomp's Fortress solid tower platform + +### Lua Example +`bhv_wf_solid_tower_platform_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_wf_solid_tower_platform_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_snow_leaf_particle_spawn_init](#bhv_snow_leaf_particle_spawn_init) + +### Description +Behavior init function for snow leaf particle spawn + +### Lua Example +`bhv_snow_leaf_particle_spawn_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_snow_leaf_particle_spawn_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_tree_snow_or_leaf_loop](#bhv_tree_snow_or_leaf_loop) + +### Description +Behavior loop function for tree snow or leaf particle + +### Lua Example +`bhv_tree_snow_or_leaf_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_tree_snow_or_leaf_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_piranha_plant_bubble_loop](#bhv_piranha_plant_bubble_loop) + +### Description +Behavior loop function for Piranha Plant bubble + +### Lua Example +`bhv_piranha_plant_bubble_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_piranha_plant_bubble_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_piranha_plant_waking_bubbles_loop](#bhv_piranha_plant_waking_bubbles_loop) + +### Description +Behavior loop function for Piranha Plant waking bubbles + +### Lua Example +`bhv_piranha_plant_waking_bubbles_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_piranha_plant_waking_bubbles_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_purple_switch_loop](#bhv_purple_switch_loop) + +### Description +Behavior loop function for Purple Switch + +### Lua Example +`bhv_purple_switch_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_purple_switch_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_hidden_object_loop](#bhv_hidden_object_loop) + +### Description +Behavior loop function for Wet Dry World hidden breakable box + +### Lua Example +`bhv_hidden_object_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_hidden_object_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_breakable_box_loop](#bhv_breakable_box_loop) + +### Description +Behavior loop function for breakable box + +### Lua Example +`bhv_breakable_box_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_breakable_box_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_pushable_loop](#bhv_pushable_loop) + +### Description +Behavior loop function for pushable metal box + +### Lua Example +`bhv_pushable_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_pushable_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_small_water_wave_loop](#bhv_small_water_wave_loop) + +### Description +Behavior loop function for small water wave + +### Lua Example +`bhv_small_water_wave_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_small_water_wave_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_yellow_coin_init](#bhv_yellow_coin_init) + +### Description +Behavior init function for Yellow Coin + +### Lua Example +`bhv_yellow_coin_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_yellow_coin_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_yellow_coin_loop](#bhv_yellow_coin_loop) + +### Description +Behavior loop function for Yellow Coin + +### Lua Example +`bhv_yellow_coin_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_yellow_coin_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_squarish_path_moving_loop](#bhv_squarish_path_moving_loop) + +### Description +Behavior loop function for Bowser in the Dark World squarish path moving + +### Lua Example +`bhv_squarish_path_moving_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_squarish_path_moving_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_squarish_path_parent_init](#bhv_squarish_path_parent_init) + +### Description +Behavior init function for Bowser in the Dark World squarish path parent + +### Lua Example +`bhv_squarish_path_parent_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_squarish_path_parent_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_squarish_path_parent_loop](#bhv_squarish_path_parent_loop) + +### Description +Behavior loop function for Bowser in the Dark World Ssuarish path parent + +### Lua Example +`bhv_squarish_path_parent_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_squarish_path_parent_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_heave_ho_loop](#bhv_heave_ho_loop) + +### Description +Behavior loop function for Heave ho + +### Lua Example +`bhv_heave_ho_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_heave_ho_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_heave_ho_throw_mario_loop](#bhv_heave_ho_throw_mario_loop) + +### Description +Behavior loop function for Heave ho throwing Mario + +### Lua Example +`bhv_heave_ho_throw_mario_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_heave_ho_throw_mario_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_ccm_touched_star_spawn_loop](#bhv_ccm_touched_star_spawn_loop) + +### Description +Behavior loop function for Cool, Cool Mountain touched Star spawn + +### Lua Example +`bhv_ccm_touched_star_spawn_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_ccm_touched_star_spawn_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_unused_poundable_platform](#bhv_unused_poundable_platform) + +### Description +Behavior loop function for unused poundable platform + +### Lua Example +`bhv_unused_poundable_platform()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_unused_poundable_platform(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_beta_trampoline_top_loop](#bhv_beta_trampoline_top_loop) + +### Description +Behavior loop function for beta trampoline top + +### Lua Example +`bhv_beta_trampoline_top_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_beta_trampoline_top_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_beta_trampoline_spring_loop](#bhv_beta_trampoline_spring_loop) + +### Description +Behavior loop function for beta trampoline spring + +### Lua Example +`bhv_beta_trampoline_spring_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_beta_trampoline_spring_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_jumping_box_loop](#bhv_jumping_box_loop) + +### Description +Behavior loop function for jumping box + +### Lua Example +`bhv_jumping_box_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_jumping_box_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_boo_cage_init](#bhv_boo_cage_init) + +### Description +Behavior init function for Boo cage + +### Lua Example +`bhv_boo_cage_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_boo_cage_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_boo_cage_loop](#bhv_boo_cage_loop) + +### Description +Behavior loop function for Boo cage + +### Lua Example +`bhv_boo_cage_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_boo_cage_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bowser_key_init](#bhv_bowser_key_init) + +### Description +Behavior init function for Bowser key + +### Lua Example +`bhv_bowser_key_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bowser_key_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bowser_key_loop](#bhv_bowser_key_loop) + +### Description +Behavior loop function for Bowser key + +### Lua Example +`bhv_bowser_key_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bowser_key_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_grand_star_init](#bhv_grand_star_init) + +### Description +Behavior init function for Grand Star + +### Lua Example +`bhv_grand_star_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_grand_star_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_grand_star_loop](#bhv_grand_star_loop) + +### Description +Behavior loop function for Grand Star + +### Lua Example +`bhv_grand_star_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_grand_star_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_beta_boo_key_loop](#bhv_beta_boo_key_loop) + +### Description +Behavior loop function for beta boo key + +### Lua Example +`bhv_beta_boo_key_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_beta_boo_key_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_alpha_boo_key_loop](#bhv_alpha_boo_key_loop) + +### Description +Behavior loop function for alpha boo key + +### Lua Example +`bhv_alpha_boo_key_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_alpha_boo_key_loop(void);` [:arrow_up_small:](#) @@ -2494,13 +3125,13 @@ Behavior loop function for Bullet Bill
-## [bhv_bully_loop](#bhv_bully_loop) +## [bhv_white_puff_smoke_init](#bhv_white_puff_smoke_init) ### Description -Behavior loop function for Bully +Behavior init function for White puff smoke ### Lua Example -`bhv_bully_loop()` +`bhv_white_puff_smoke_init()` ### Parameters - None @@ -2509,19 +3140,19 @@ Behavior loop function for Bully - None ### C Prototype -`void bhv_bully_loop(void);` +`void bhv_white_puff_smoke_init(void);` [:arrow_up_small:](#)
-## [bhv_butterfly_init](#bhv_butterfly_init) +## [bhv_bowser_tail_anchor_init](#bhv_bowser_tail_anchor_init) ### Description -Behavior init function for Butterfly +Behavior init function for Bowser tail anchor ### Lua Example -`bhv_butterfly_init()` +`bhv_bowser_tail_anchor_init()` ### Parameters - None @@ -2530,19 +3161,19 @@ Behavior init function for Butterfly - None ### C Prototype -`void bhv_butterfly_init(void);` +`void bhv_bowser_tail_anchor_init(void);` [:arrow_up_small:](#)
-## [bhv_butterfly_loop](#bhv_butterfly_loop) +## [bhv_bowser_tail_anchor_loop](#bhv_bowser_tail_anchor_loop) ### Description -Behavior loop function for Butterfly +Behavior loop function for Bowser tail anchor ### Lua Example -`bhv_butterfly_loop()` +`bhv_bowser_tail_anchor_loop()` ### Parameters - None @@ -2551,19 +3182,19 @@ Behavior loop function for Butterfly - None ### C Prototype -`void bhv_butterfly_loop(void);` +`void bhv_bowser_tail_anchor_loop(void);` [:arrow_up_small:](#)
-## [bhv_camera_lakitu_init](#bhv_camera_lakitu_init) +## [bhv_bowser_init](#bhv_bowser_init) ### Description -Behavior init function for Camera Lakitu +Behavior init function for Bowser ### Lua Example -`bhv_camera_lakitu_init()` +`bhv_bowser_init()` ### Parameters - None @@ -2572,19 +3203,19 @@ Behavior init function for Camera Lakitu - None ### C Prototype -`void bhv_camera_lakitu_init(void);` +`void bhv_bowser_init(void);` [:arrow_up_small:](#)
-## [bhv_camera_lakitu_update](#bhv_camera_lakitu_update) +## [bhv_bowser_loop](#bhv_bowser_loop) ### Description -Behavior loop function for Camera Lakitu +Behavior loop function for Bowser ### Lua Example -`bhv_camera_lakitu_update()` +`bhv_bowser_loop()` ### Parameters - None @@ -2593,19 +3224,19 @@ Behavior loop function for Camera Lakitu - None ### C Prototype -`void bhv_camera_lakitu_update(void);` +`void bhv_bowser_loop(void);` [:arrow_up_small:](#)
-## [bhv_cannon_barrel_loop](#bhv_cannon_barrel_loop) +## [bhv_bowser_body_anchor_init](#bhv_bowser_body_anchor_init) ### Description -Behavior loop function for cannon barrel +Behavior init function for Bowser body anchor ### Lua Example -`bhv_cannon_barrel_loop()` +`bhv_bowser_body_anchor_init()` ### Parameters - None @@ -2614,19 +3245,19 @@ Behavior loop function for cannon barrel - None ### C Prototype -`void bhv_cannon_barrel_loop(void);` +`void bhv_bowser_body_anchor_init(void);` [:arrow_up_small:](#)
-## [bhv_cannon_base_loop](#bhv_cannon_base_loop) +## [bhv_bowser_body_anchor_loop](#bhv_bowser_body_anchor_loop) ### Description -Behavior loop function for cannon base +Behavior loop function for Bowser body anchor ### Lua Example -`bhv_cannon_base_loop()` +`bhv_bowser_body_anchor_loop()` ### Parameters - None @@ -2635,19 +3266,19 @@ Behavior loop function for cannon base - None ### C Prototype -`void bhv_cannon_base_loop(void);` +`void bhv_bowser_body_anchor_loop(void);` [:arrow_up_small:](#)
-## [bhv_cannon_base_unused_loop](#bhv_cannon_base_unused_loop) +## [bhv_bowser_flame_spawn_loop](#bhv_bowser_flame_spawn_loop) ### Description -Behavior loop function for cannon base unused +Behavior loop function for Bowser flame spawn ### Lua Example -`bhv_cannon_base_unused_loop()` +`bhv_bowser_flame_spawn_loop()` ### Parameters - None @@ -2656,19 +3287,19 @@ Behavior loop function for cannon base unused - None ### C Prototype -`void bhv_cannon_base_unused_loop(void);` +`void bhv_bowser_flame_spawn_loop(void);` [:arrow_up_small:](#)
-## [bhv_cannon_closed_init](#bhv_cannon_closed_init) +## [bhv_tilting_bowser_lava_platform_init](#bhv_tilting_bowser_lava_platform_init) ### Description -Behavior init function for cannon closed +Behavior init function for tilting Bowser in the Fire Sea arena platform ### Lua Example -`bhv_cannon_closed_init()` +`bhv_tilting_bowser_lava_platform_init()` ### Parameters - None @@ -2677,19 +3308,19 @@ Behavior init function for cannon closed - None ### C Prototype -`void bhv_cannon_closed_init(void);` +`void bhv_tilting_bowser_lava_platform_init(void);` [:arrow_up_small:](#)
-## [bhv_cannon_closed_loop](#bhv_cannon_closed_loop) +## [bhv_falling_bowser_platform_loop](#bhv_falling_bowser_platform_loop) ### Description -Behavior loop function for cannon closed +Behavior loop function for falling Bowser in the Sky arena platform ### Lua Example -`bhv_cannon_closed_loop()` +`bhv_falling_bowser_platform_loop()` ### Parameters - None @@ -2698,19 +3329,19 @@ Behavior loop function for cannon closed - None ### C Prototype -`void bhv_cannon_closed_loop(void);` +`void bhv_falling_bowser_platform_loop(void);` [:arrow_up_small:](#)
-## [bhv_cap_switch_loop](#bhv_cap_switch_loop) +## [bhv_blue_bowser_flame_init](#bhv_blue_bowser_flame_init) ### Description -Behavior loop function for Cap Switch +Behavior init function for Blue Bowser flame ### Lua Example -`bhv_cap_switch_loop()` +`bhv_blue_bowser_flame_init()` ### Parameters - None @@ -2719,19 +3350,19 @@ Behavior loop function for Cap Switch - None ### C Prototype -`void bhv_cap_switch_loop(void);` +`void bhv_blue_bowser_flame_init(void);` [:arrow_up_small:](#)
-## [bhv_castle_cannon_grate_init](#bhv_castle_cannon_grate_init) +## [bhv_blue_bowser_flame_loop](#bhv_blue_bowser_flame_loop) ### Description -Behavior init function for Castle cannon grate +Behavior loop function for Blue Bowser flame ### Lua Example -`bhv_castle_cannon_grate_init()` +`bhv_blue_bowser_flame_loop()` ### Parameters - None @@ -2740,19 +3371,19 @@ Behavior init function for Castle cannon grate - None ### C Prototype -`void bhv_castle_cannon_grate_init(void);` +`void bhv_blue_bowser_flame_loop(void);` [:arrow_up_small:](#)
-## [bhv_castle_flag_init](#bhv_castle_flag_init) +## [bhv_flame_floating_landing_init](#bhv_flame_floating_landing_init) ### Description -Behavior init function for castle flag +Behavior init function for flame floating landing ### Lua Example -`bhv_castle_flag_init()` +`bhv_flame_floating_landing_init()` ### Parameters - None @@ -2761,19 +3392,19 @@ Behavior init function for castle flag - None ### C Prototype -`void bhv_castle_flag_init(void);` +`void bhv_flame_floating_landing_init(void);` [:arrow_up_small:](#)
-## [bhv_castle_floor_trap_init](#bhv_castle_floor_trap_init) +## [bhv_flame_floating_landing_loop](#bhv_flame_floating_landing_loop) ### Description -Behavior init function for Bowser in the Dark World floor trap manager +Behavior loop function for flame floating landing ### Lua Example -`bhv_castle_floor_trap_init()` +`bhv_flame_floating_landing_loop()` ### Parameters - None @@ -2782,19 +3413,19 @@ Behavior init function for Bowser in the Dark World floor trap manager - None ### C Prototype -`void bhv_castle_floor_trap_init(void);` +`void bhv_flame_floating_landing_loop(void);` [:arrow_up_small:](#)
-## [bhv_castle_floor_trap_loop](#bhv_castle_floor_trap_loop) +## [bhv_blue_flames_group_loop](#bhv_blue_flames_group_loop) ### Description -Behavior loop function for Bowser in the Dark World floor trap manager +Behavior loop function for blue flames group ### Lua Example -`bhv_castle_floor_trap_loop()` +`bhv_blue_flames_group_loop()` ### Parameters - None @@ -2803,19 +3434,19 @@ Behavior loop function for Bowser in the Dark World floor trap manager - None ### C Prototype -`void bhv_castle_floor_trap_loop(void);` +`void bhv_blue_flames_group_loop(void);` [:arrow_up_small:](#)
-## [bhv_ccm_touched_star_spawn_loop](#bhv_ccm_touched_star_spawn_loop) +## [bhv_flame_bouncing_init](#bhv_flame_bouncing_init) ### Description -Behavior loop function for Cool, Cool Mountain touched Star spawn +Behavior init function for flame bouncing ### Lua Example -`bhv_ccm_touched_star_spawn_loop()` +`bhv_flame_bouncing_init()` ### Parameters - None @@ -2824,19 +3455,19 @@ Behavior loop function for Cool, Cool Mountain touched Star spawn - None ### C Prototype -`void bhv_ccm_touched_star_spawn_loop(void);` +`void bhv_flame_bouncing_init(void);` [:arrow_up_small:](#)
-## [bhv_celebration_star_init](#bhv_celebration_star_init) +## [bhv_flame_bouncing_loop](#bhv_flame_bouncing_loop) ### Description -Behavior init function for Celebration Star +Behavior loop function for flame bouncing ### Lua Example -`bhv_celebration_star_init()` +`bhv_flame_bouncing_loop()` ### Parameters - None @@ -2845,19 +3476,19 @@ Behavior init function for Celebration Star - None ### C Prototype -`void bhv_celebration_star_init(void);` +`void bhv_flame_bouncing_loop(void);` [:arrow_up_small:](#)
-## [bhv_celebration_star_loop](#bhv_celebration_star_loop) +## [bhv_flame_moving_forward_growing_init](#bhv_flame_moving_forward_growing_init) ### Description -Behavior loop function for Celebration Star +Behavior init function for flame moving forward growing ### Lua Example -`bhv_celebration_star_loop()` +`bhv_flame_moving_forward_growing_init()` ### Parameters - None @@ -2866,19 +3497,19 @@ Behavior loop function for Celebration Star - None ### C Prototype -`void bhv_celebration_star_loop(void);` +`void bhv_flame_moving_forward_growing_init(void);` [:arrow_up_small:](#)
-## [bhv_celebration_star_sparkle_loop](#bhv_celebration_star_sparkle_loop) +## [bhv_flame_moving_forward_growing_loop](#bhv_flame_moving_forward_growing_loop) ### Description -Behavior loop function for Celebration Star sparkle +Behavior loop function for flame moving forward growing ### Lua Example -`bhv_celebration_star_sparkle_loop()` +`bhv_flame_moving_forward_growing_loop()` ### Parameters - None @@ -2887,19 +3518,19 @@ Behavior loop function for Celebration Star sparkle - None ### C Prototype -`void bhv_celebration_star_sparkle_loop(void);` +`void bhv_flame_moving_forward_growing_loop(void);` [:arrow_up_small:](#)
-## [bhv_chain_chomp_chain_part_update](#bhv_chain_chomp_chain_part_update) +## [bhv_flame_bowser_init](#bhv_flame_bowser_init) ### Description -Behavior loop function for Chain Chomp chain part +Behavior init function for Bowser flame ### Lua Example -`bhv_chain_chomp_chain_part_update()` +`bhv_flame_bowser_init()` ### Parameters - None @@ -2908,19 +3539,19 @@ Behavior loop function for Chain Chomp chain part - None ### C Prototype -`void bhv_chain_chomp_chain_part_update(void);` +`void bhv_flame_bowser_init(void);` [:arrow_up_small:](#)
-## [bhv_chain_chomp_gate_init](#bhv_chain_chomp_gate_init) +## [bhv_flame_bowser_loop](#bhv_flame_bowser_loop) ### Description -Behavior init function for Chain Chomp gate +Behavior loop function for Bowser flame ### Lua Example -`bhv_chain_chomp_gate_init()` +`bhv_flame_bowser_loop()` ### Parameters - None @@ -2929,19 +3560,19 @@ Behavior init function for Chain Chomp gate - None ### C Prototype -`void bhv_chain_chomp_gate_init(void);` +`void bhv_flame_bowser_loop(void);` [:arrow_up_small:](#)
-## [bhv_chain_chomp_gate_update](#bhv_chain_chomp_gate_update) +## [bhv_flame_large_burning_out_init](#bhv_flame_large_burning_out_init) ### Description -Behavior loop function for Chain Chomp gate +Behavior init function for large flame burning out ### Lua Example -`bhv_chain_chomp_gate_update()` +`bhv_flame_large_burning_out_init()` ### Parameters - None @@ -2950,19 +3581,19 @@ Behavior loop function for Chain Chomp gate - None ### C Prototype -`void bhv_chain_chomp_gate_update(void);` +`void bhv_flame_large_burning_out_init(void);` [:arrow_up_small:](#)
-## [bhv_chain_chomp_update](#bhv_chain_chomp_update) +## [bhv_blue_fish_movement_loop](#bhv_blue_fish_movement_loop) ### Description -Behavior loop function for Chain Chomp +Behavior loop function for blue fish movement ### Lua Example -`bhv_chain_chomp_update()` +`bhv_blue_fish_movement_loop()` ### Parameters - None @@ -2971,7 +3602,28 @@ Behavior loop function for Chain Chomp - None ### C Prototype -`void bhv_chain_chomp_update(void);` +`void bhv_blue_fish_movement_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_tank_fish_group_loop](#bhv_tank_fish_group_loop) + +### Description +Behavior loop function for tank fish group + +### Lua Example +`bhv_tank_fish_group_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_tank_fish_group_loop(void);` [:arrow_up_small:](#) @@ -3061,13 +3713,13 @@ Behavior loop function for checkerboard platform
-## [bhv_chuckya_anchor_mario_loop](#bhv_chuckya_anchor_mario_loop) +## [bhv_bowser_key_unlock_door_loop](#bhv_bowser_key_unlock_door_loop) ### Description -Behavior loop function for Chuckya mario anchor +Behavior loop function for Bowser key unlock door ### Lua Example -`bhv_chuckya_anchor_mario_loop()` +`bhv_bowser_key_unlock_door_loop()` ### Parameters - None @@ -3076,19 +3728,19 @@ Behavior loop function for Chuckya mario anchor - None ### C Prototype -`void bhv_chuckya_anchor_mario_loop(void);` +`void bhv_bowser_key_unlock_door_loop(void);` [:arrow_up_small:](#)
-## [bhv_chuckya_loop](#bhv_chuckya_loop) +## [bhv_bowser_key_course_exit_loop](#bhv_bowser_key_course_exit_loop) ### Description -Behavior loop function for Chuckya +Behavior loop function for Bowser key course exit ### Lua Example -`bhv_chuckya_loop()` +`bhv_bowser_key_course_exit_loop()` ### Parameters - None @@ -3097,2359 +3749,7 @@ Behavior loop function for Chuckya - None ### C Prototype -`void bhv_chuckya_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_circling_amp_init](#bhv_circling_amp_init) - -### Description -Behavior init function for Circling Amp - -### Lua Example -`bhv_circling_amp_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_circling_amp_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_circling_amp_loop](#bhv_circling_amp_loop) - -### Description -Behavior loop function for Circling Amp - -### Lua Example -`bhv_circling_amp_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_circling_amp_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_clam_loop](#bhv_clam_loop) - -### Description -Behavior loop function for Clam - -### Lua Example -`bhv_clam_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_clam_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_cloud_part_update](#bhv_cloud_part_update) - -### Description -Behavior loop function for cloud part - -### Lua Example -`bhv_cloud_part_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_cloud_part_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_cloud_update](#bhv_cloud_update) - -### Description -Behavior loop function for cloud - -### Lua Example -`bhv_cloud_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_cloud_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_coffin_loop](#bhv_coffin_loop) - -### Description -Behavior loop function for coffin - -### Lua Example -`bhv_coffin_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_coffin_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_coffin_spawner_loop](#bhv_coffin_spawner_loop) - -### Description -Behavior loop function for coffin spawner - -### Lua Example -`bhv_coffin_spawner_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_coffin_spawner_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_coin_formation_init](#bhv_coin_formation_init) - -### Description -Behavior init function for Coin formation - -### Lua Example -`bhv_coin_formation_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_coin_formation_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_coin_formation_loop](#bhv_coin_formation_loop) - -### Description -Behavior loop function for Coin formation - -### Lua Example -`bhv_coin_formation_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_coin_formation_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_coin_formation_spawn_loop](#bhv_coin_formation_spawn_loop) - -### Description -Behavior loop function for Coin formation spawn - -### Lua Example -`bhv_coin_formation_spawn_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_coin_formation_spawn_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_coin_init](#bhv_coin_init) - -### Description -Behavior init function for Coin - -### Lua Example -`bhv_coin_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_coin_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_coin_inside_boo_loop](#bhv_coin_inside_boo_loop) - -### Description -Behavior loop function for Coin inside Boo - -### Lua Example -`bhv_coin_inside_boo_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_coin_inside_boo_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_coin_loop](#bhv_coin_loop) - -### Description -Behavior loop function for Coin - -### Lua Example -`bhv_coin_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_coin_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_coin_sparkles_loop](#bhv_coin_sparkles_loop) - -### Description -Behavior loop function for Coin sparkles - -### Lua Example -`bhv_coin_sparkles_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_coin_sparkles_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_collect_star_init](#bhv_collect_star_init) - -### Description -Behavior init function for collectable Star - -### Lua Example -`bhv_collect_star_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_collect_star_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_collect_star_loop](#bhv_collect_star_loop) - -### Description -Behavior loop function for collectable Star - -### Lua Example -`bhv_collect_star_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_collect_star_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_controllable_platform_init](#bhv_controllable_platform_init) - -### Description -Behavior init function for controllable platform - -### Lua Example -`bhv_controllable_platform_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_controllable_platform_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_controllable_platform_loop](#bhv_controllable_platform_loop) - -### Description -Behavior loop function for controllable platform - -### Lua Example -`bhv_controllable_platform_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_controllable_platform_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_controllable_platform_sub_loop](#bhv_controllable_platform_sub_loop) - -### Description -Behavior loop function for controllable sub platform - -### Lua Example -`bhv_controllable_platform_sub_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_controllable_platform_sub_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_courtyard_boo_triplet_init](#bhv_courtyard_boo_triplet_init) - -### Description -Behavior init function for Courtyard Boo triplet - -### Lua Example -`bhv_courtyard_boo_triplet_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_courtyard_boo_triplet_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_ddd_moving_pole_loop](#bhv_ddd_moving_pole_loop) - -### Description -Behavior loop function for Dire Dire Docks moving pole - -### Lua Example -`bhv_ddd_moving_pole_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_ddd_moving_pole_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_ddd_pole_init](#bhv_ddd_pole_init) - -### Description -Behavior init function for Dire Dire Docks pole - -### Lua Example -`bhv_ddd_pole_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_ddd_pole_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_ddd_pole_update](#bhv_ddd_pole_update) - -### Description -Behavior loop function for Dire Dire Docks pole - -### Lua Example -`bhv_ddd_pole_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_ddd_pole_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_ddd_warp_loop](#bhv_ddd_warp_loop) - -### Description -Behavior loop function for Castle Basement Dire Dire Docks warp collision - -### Lua Example -`bhv_ddd_warp_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_ddd_warp_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_decorative_pendulum_init](#bhv_decorative_pendulum_init) - -### Description -Behavior init function for decorative pendulum - -### Lua Example -`bhv_decorative_pendulum_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_decorative_pendulum_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_decorative_pendulum_loop](#bhv_decorative_pendulum_loop) - -### Description -Behavior loop function for decorative pendulum - -### Lua Example -`bhv_decorative_pendulum_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_decorative_pendulum_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_donut_platform_spawner_update](#bhv_donut_platform_spawner_update) - -### Description -Behavior loop function for donut platform spawner - -### Lua Example -`bhv_donut_platform_spawner_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_donut_platform_spawner_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_donut_platform_update](#bhv_donut_platform_update) - -### Description -Behavior loop function for donut platform - -### Lua Example -`bhv_donut_platform_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_donut_platform_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_door_init](#bhv_door_init) - -### Description -Behavior init function for door - -### Lua Example -`bhv_door_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_door_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_door_loop](#bhv_door_loop) - -### Description -Behavior loop function for door - -### Lua Example -`bhv_door_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_door_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_dorrie_update](#bhv_dorrie_update) - -### Description -Behavior loop function for Dorrie - -### Lua Example -`bhv_dorrie_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_dorrie_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_elevator_init](#bhv_elevator_init) - -### Description -Behavior init function for elevator - -### Lua Example -`bhv_elevator_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_elevator_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_elevator_loop](#bhv_elevator_loop) - -### Description -Behavior loop function for elevator - -### Lua Example -`bhv_elevator_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_elevator_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_end_birds_1_loop](#bhv_end_birds_1_loop) - -### Description -Behavior loop function for first end birds - -### Lua Example -`bhv_end_birds_1_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_end_birds_1_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_end_birds_2_loop](#bhv_end_birds_2_loop) - -### Description -Behavior loop function for second end birds - -### Lua Example -`bhv_end_birds_2_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_end_birds_2_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_enemy_lakitu_update](#bhv_enemy_lakitu_update) - -### Description -Behavior loop function for Enemy Lakitu - -### Lua Example -`bhv_enemy_lakitu_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_enemy_lakitu_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_exclamation_box_init](#bhv_exclamation_box_init) - -### Description -Behavior init function for Exclamation Box - -### Lua Example -`bhv_exclamation_box_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_exclamation_box_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_exclamation_box_loop](#bhv_exclamation_box_loop) - -### Description -Behavior loop function for Exclamation Box - -### Lua Example -`bhv_exclamation_box_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_exclamation_box_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_explosion_init](#bhv_explosion_init) - -### Description -Behavior init function for explosion - -### Lua Example -`bhv_explosion_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_explosion_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_explosion_loop](#bhv_explosion_loop) - -### Description -Behavior loop function for explosion - -### Lua Example -`bhv_explosion_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_explosion_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_eyerok_boss_init](#bhv_eyerok_boss_init) - -### Description -Behavior init function for Eyerok boss - -### Lua Example -`bhv_eyerok_boss_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_eyerok_boss_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_eyerok_boss_loop](#bhv_eyerok_boss_loop) - -### Description -Behavior loop function for Eyerok boss - -### Lua Example -`bhv_eyerok_boss_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_eyerok_boss_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_eyerok_hand_loop](#bhv_eyerok_hand_loop) - -### Description -Behavior loop function for Eyerok hand - -### Lua Example -`bhv_eyerok_hand_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_eyerok_hand_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_fading_warp_loop](#bhv_fading_warp_loop) - -### Description -Behavior loop function for fading warp - -### Lua Example -`bhv_fading_warp_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_fading_warp_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_falling_bowser_platform_loop](#bhv_falling_bowser_platform_loop) - -### Description -Behavior loop function for falling Bowser in the Sky arena platform - -### Lua Example -`bhv_falling_bowser_platform_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_falling_bowser_platform_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_falling_pillar_hitbox_loop](#bhv_falling_pillar_hitbox_loop) - -### Description -Behavior loop function for Jolly Roger Bay falling pillar hitbox - -### Lua Example -`bhv_falling_pillar_hitbox_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_falling_pillar_hitbox_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_falling_pillar_init](#bhv_falling_pillar_init) - -### Description -Behavior init function for Jolly Roger Bay falling pillar - -### Lua Example -`bhv_falling_pillar_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_falling_pillar_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_falling_pillar_loop](#bhv_falling_pillar_loop) - -### Description -Behavior loop function for Jolly Roger Bay falling pillar - -### Lua Example -`bhv_falling_pillar_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_falling_pillar_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_ferris_wheel_axle_init](#bhv_ferris_wheel_axle_init) - -### Description -Behavior init function for ferris wheel axle - -### Lua Example -`bhv_ferris_wheel_axle_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_ferris_wheel_axle_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_ferris_wheel_platform_init](#bhv_ferris_wheel_platform_init) - -### Description -Behavior init function for ferris wheel platform - -### Lua Example -`bhv_ferris_wheel_platform_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_ferris_wheel_platform_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_ferris_wheel_platform_update](#bhv_ferris_wheel_platform_update) - -### Description -Behavior loop function for ferris wheel platform - -### Lua Example -`bhv_ferris_wheel_platform_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_ferris_wheel_platform_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_fire_piranha_plant_init](#bhv_fire_piranha_plant_init) - -### Description -Behavior init function for Fire Piranha Plant - -### Lua Example -`bhv_fire_piranha_plant_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_fire_piranha_plant_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_fire_piranha_plant_update](#bhv_fire_piranha_plant_update) - -### Description -Behavior loop function for Fire Piranha Plant - -### Lua Example -`bhv_fire_piranha_plant_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_fire_piranha_plant_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_fire_spitter_update](#bhv_fire_spitter_update) - -### Description -Behavior loop function for Fire spitter - -### Lua Example -`bhv_fire_spitter_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_fire_spitter_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_fish_group_loop](#bhv_fish_group_loop) - -### Description -Behavior loop function for fish group - -### Lua Example -`bhv_fish_group_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_fish_group_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_fish_loop](#bhv_fish_loop) - -### Description -Behavior loop function for fish - -### Lua Example -`bhv_fish_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_fish_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_fish_spawner_loop](#bhv_fish_spawner_loop) - -### Description -Behavior loop function for fish spawner - -### Lua Example -`bhv_fish_spawner_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_fish_spawner_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_flame_bouncing_init](#bhv_flame_bouncing_init) - -### Description -Behavior init function for flame bouncing - -### Lua Example -`bhv_flame_bouncing_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_flame_bouncing_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_flame_bouncing_loop](#bhv_flame_bouncing_loop) - -### Description -Behavior loop function for flame bouncing - -### Lua Example -`bhv_flame_bouncing_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_flame_bouncing_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_flame_bowser_init](#bhv_flame_bowser_init) - -### Description -Behavior init function for Bowser flame - -### Lua Example -`bhv_flame_bowser_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_flame_bowser_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_flame_bowser_loop](#bhv_flame_bowser_loop) - -### Description -Behavior loop function for Bowser flame - -### Lua Example -`bhv_flame_bowser_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_flame_bowser_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_flame_floating_landing_init](#bhv_flame_floating_landing_init) - -### Description -Behavior init function for flame floating landing - -### Lua Example -`bhv_flame_floating_landing_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_flame_floating_landing_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_flame_floating_landing_loop](#bhv_flame_floating_landing_loop) - -### Description -Behavior loop function for flame floating landing - -### Lua Example -`bhv_flame_floating_landing_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_flame_floating_landing_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_flame_large_burning_out_init](#bhv_flame_large_burning_out_init) - -### Description -Behavior init function for large flame burning out - -### Lua Example -`bhv_flame_large_burning_out_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_flame_large_burning_out_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_flame_mario_loop](#bhv_flame_mario_loop) - -### Description -Behavior loop function for flame Mario - -### Lua Example -`bhv_flame_mario_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_flame_mario_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_flame_moving_forward_growing_init](#bhv_flame_moving_forward_growing_init) - -### Description -Behavior init function for flame moving forward growing - -### Lua Example -`bhv_flame_moving_forward_growing_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_flame_moving_forward_growing_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_flame_moving_forward_growing_loop](#bhv_flame_moving_forward_growing_loop) - -### Description -Behavior loop function for flame moving forward growing - -### Lua Example -`bhv_flame_moving_forward_growing_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_flame_moving_forward_growing_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_flamethrower_flame_loop](#bhv_flamethrower_flame_loop) - -### Description -Behavior loop function for flamethrower flame - -### Lua Example -`bhv_flamethrower_flame_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_flamethrower_flame_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_flamethrower_loop](#bhv_flamethrower_loop) - -### Description -Behavior loop function for flamethrower - -### Lua Example -`bhv_flamethrower_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_flamethrower_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_floating_platform_loop](#bhv_floating_platform_loop) - -### Description -Behavior loop function for floating platform - -### Lua Example -`bhv_floating_platform_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_floating_platform_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_floor_trap_in_castle_loop](#bhv_floor_trap_in_castle_loop) - -### Description -Behavior loop function for Bowser in the Dark World floor trap - -### Lua Example -`bhv_floor_trap_in_castle_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_floor_trap_in_castle_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_fly_guy_flame_loop](#bhv_fly_guy_flame_loop) - -### Description -Behavior loop function for Fly Guy flame - -### Lua Example -`bhv_fly_guy_flame_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_fly_guy_flame_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_fly_guy_update](#bhv_fly_guy_update) - -### Description -Behavior loop function for Fly Guy - -### Lua Example -`bhv_fly_guy_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_fly_guy_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_flying_bookend_loop](#bhv_flying_bookend_loop) - -### Description -Behavior loop function for flying bookend - -### Lua Example -`bhv_flying_bookend_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_flying_bookend_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_free_bowling_ball_init](#bhv_free_bowling_ball_init) - -### Description -Behavior init function for free bowling ball - -### Lua Example -`bhv_free_bowling_ball_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_free_bowling_ball_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_free_bowling_ball_loop](#bhv_free_bowling_ball_loop) - -### Description -Behavior loop function for free bowling ball - -### Lua Example -`bhv_free_bowling_ball_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_free_bowling_ball_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_generic_bowling_ball_spawner_init](#bhv_generic_bowling_ball_spawner_init) - -### Description -Behavior init function for generic bowling ball spawner - -### Lua Example -`bhv_generic_bowling_ball_spawner_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_generic_bowling_ball_spawner_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_generic_bowling_ball_spawner_loop](#bhv_generic_bowling_ball_spawner_loop) - -### Description -Behavior loop function for generic bowling ball spawner - -### Lua Example -`bhv_generic_bowling_ball_spawner_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_generic_bowling_ball_spawner_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_giant_pole_loop](#bhv_giant_pole_loop) - -### Description -Behavior loop function for giant pole - -### Lua Example -`bhv_giant_pole_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_giant_pole_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_golden_coin_sparkles_loop](#bhv_golden_coin_sparkles_loop) - -### Description -Behavior loop function for golden Coin sparkles - -### Lua Example -`bhv_golden_coin_sparkles_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_golden_coin_sparkles_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_goomba_init](#bhv_goomba_init) - -### Description -Behavior init function for Goomba - -### Lua Example -`bhv_goomba_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_goomba_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_goomba_triplet_spawner_update](#bhv_goomba_triplet_spawner_update) - -### Description -Behavior loop function for Goomba triplet spawner - -### Lua Example -`bhv_goomba_triplet_spawner_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_goomba_triplet_spawner_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_goomba_update](#bhv_goomba_update) - -### Description -Behavior loop function for Goomba - -### Lua Example -`bhv_goomba_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_goomba_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_grand_star_init](#bhv_grand_star_init) - -### Description -Behavior init function for Grand Star - -### Lua Example -`bhv_grand_star_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_grand_star_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_grand_star_loop](#bhv_grand_star_loop) - -### Description -Behavior loop function for Grand Star - -### Lua Example -`bhv_grand_star_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_grand_star_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_grindel_thwomp_loop](#bhv_grindel_thwomp_loop) - -### Description -Behavior loop function for Grindel and Thwomp - -### Lua Example -`bhv_grindel_thwomp_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_grindel_thwomp_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_ground_sand_init](#bhv_ground_sand_init) - -### Description -Behavior init function for ground sand - -### Lua Example -`bhv_ground_sand_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_ground_sand_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_ground_snow_init](#bhv_ground_snow_init) - -### Description -Behavior init function for ground snow - -### Lua Example -`bhv_ground_snow_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_ground_snow_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_haunted_bookshelf_loop](#bhv_haunted_bookshelf_loop) - -### Description -Behavior loop function for Big Boo's Haunt haunted bookshelf - -### Lua Example -`bhv_haunted_bookshelf_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_haunted_bookshelf_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_haunted_bookshelf_manager_loop](#bhv_haunted_bookshelf_manager_loop) - -### Description -Behavior loop function for haunted bookshelf manager - -### Lua Example -`bhv_haunted_bookshelf_manager_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_haunted_bookshelf_manager_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_haunted_chair_init](#bhv_haunted_chair_init) - -### Description -Behavior init function for Haunted Chair - -### Lua Example -`bhv_haunted_chair_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_haunted_chair_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_haunted_chair_loop](#bhv_haunted_chair_loop) - -### Description -Behavior loop function for Haunted Chair - -### Lua Example -`bhv_haunted_chair_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_haunted_chair_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_heave_ho_loop](#bhv_heave_ho_loop) - -### Description -Behavior loop function for Heave ho - -### Lua Example -`bhv_heave_ho_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_heave_ho_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_heave_ho_throw_mario_loop](#bhv_heave_ho_throw_mario_loop) - -### Description -Behavior loop function for Heave ho throwing Mario - -### Lua Example -`bhv_heave_ho_throw_mario_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_heave_ho_throw_mario_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_hidden_blue_coin_loop](#bhv_hidden_blue_coin_loop) - -### Description -Behavior loop function for hidden Blue Coin - -### Lua Example -`bhv_hidden_blue_coin_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_hidden_blue_coin_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_hidden_object_loop](#bhv_hidden_object_loop) - -### Description -Behavior loop function for Wet Dry World hidden breakable box - -### Lua Example -`bhv_hidden_object_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_hidden_object_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_hidden_red_coin_star_init](#bhv_hidden_red_coin_star_init) - -### Description -Behavior init function for Hidden Red Coin Star - -### Lua Example -`bhv_hidden_red_coin_star_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_hidden_red_coin_star_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_hidden_red_coin_star_loop](#bhv_hidden_red_coin_star_loop) - -### Description -Behavior loop function for Hidden Red Coin Star - -### Lua Example -`bhv_hidden_red_coin_star_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_hidden_red_coin_star_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_hidden_star_init](#bhv_hidden_star_init) - -### Description -Behavior init function for Secret Star - -### Lua Example -`bhv_hidden_star_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_hidden_star_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_hidden_star_loop](#bhv_hidden_star_loop) - -### Description -Behavior loop function for Secret Star - -### Lua Example -`bhv_hidden_star_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_hidden_star_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_hidden_star_trigger_loop](#bhv_hidden_star_trigger_loop) - -### Description -Behavior loop function for Secrets - -### Lua Example -`bhv_hidden_star_trigger_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_hidden_star_trigger_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_homing_amp_init](#bhv_homing_amp_init) - -### Description -Behavior init function for Homing Amp - -### Lua Example -`bhv_homing_amp_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_homing_amp_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_homing_amp_loop](#bhv_homing_amp_loop) - -### Description -Behavior loop function for Homing Amp - -### Lua Example -`bhv_homing_amp_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_homing_amp_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_hoot_init](#bhv_hoot_init) - -### Description -Behavior init function for Hoot - -### Lua Example -`bhv_hoot_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_hoot_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_hoot_loop](#bhv_hoot_loop) - -### Description -Behavior loop function for Hoot - -### Lua Example -`bhv_hoot_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_hoot_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_horizontal_grindel_init](#bhv_horizontal_grindel_init) - -### Description -Behavior init function for horizontal Grindel - -### Lua Example -`bhv_horizontal_grindel_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_horizontal_grindel_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_horizontal_grindel_update](#bhv_horizontal_grindel_update) - -### Description -Behavior loop function for horizontal Grindel - -### Lua Example -`bhv_horizontal_grindel_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_horizontal_grindel_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_idle_water_wave_loop](#bhv_idle_water_wave_loop) - -### Description -Behavior loop function for idle water wave - -### Lua Example -`bhv_idle_water_wave_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_idle_water_wave_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_init_changing_water_level_loop](#bhv_init_changing_water_level_loop) - -### Description -Behavior init function for changing water level, called when Wet Dry World is loaded - -### Lua Example -`bhv_init_changing_water_level_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_init_changing_water_level_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_intro_lakitu_loop](#bhv_intro_lakitu_loop) - -### Description -Behavior loop function for intro Lakitu - -### Lua Example -`bhv_intro_lakitu_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_intro_lakitu_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_intro_peach_loop](#bhv_intro_peach_loop) - -### Description -Behavior loop function for intro Peach - -### Lua Example -`bhv_intro_peach_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_intro_peach_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_intro_scene_loop](#bhv_intro_scene_loop) - -### Description -Behavior loop function for intro scene - -### Lua Example -`bhv_intro_scene_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_intro_scene_loop(void);` +`void bhv_bowser_key_course_exit_loop(void);` [:arrow_up_small:](#) @@ -5497,13 +3797,13 @@ Behavior loop function for Invisible objects under the Castle bridge
-## [bhv_jet_stream_loop](#bhv_jet_stream_loop) +## [bhv_water_level_pillar_init](#bhv_water_level_pillar_init) ### Description -Behavior loop function for jet stream +Behavior init function for Castle Basement water level pillar ### Lua Example -`bhv_jet_stream_loop()` +`bhv_water_level_pillar_init()` ### Parameters - None @@ -5512,19 +3812,19 @@ Behavior loop function for jet stream - None ### C Prototype -`void bhv_jet_stream_loop(void);` +`void bhv_water_level_pillar_init(void);` [:arrow_up_small:](#)
-## [bhv_jet_stream_ring_spawner_loop](#bhv_jet_stream_ring_spawner_loop) +## [bhv_water_level_pillar_loop](#bhv_water_level_pillar_loop) ### Description -Behavior loop function for jet stream ring spawner +Behavior loop function for Castle Basement water level pillar ### Lua Example -`bhv_jet_stream_ring_spawner_loop()` +`bhv_water_level_pillar_loop()` ### Parameters - None @@ -5533,19 +3833,19 @@ Behavior loop function for jet stream ring spawner - None ### C Prototype -`void bhv_jet_stream_ring_spawner_loop(void);` +`void bhv_water_level_pillar_loop(void);` [:arrow_up_small:](#)
-## [bhv_jet_stream_water_ring_init](#bhv_jet_stream_water_ring_init) +## [bhv_ddd_warp_loop](#bhv_ddd_warp_loop) ### Description -Behavior init function for jet stream water ring +Behavior loop function for Castle Basement Dire Dire Docks warp collision ### Lua Example -`bhv_jet_stream_water_ring_init()` +`bhv_ddd_warp_loop()` ### Parameters - None @@ -5554,19 +3854,19 @@ Behavior init function for jet stream water ring - None ### C Prototype -`void bhv_jet_stream_water_ring_init(void);` +`void bhv_ddd_warp_loop(void);` [:arrow_up_small:](#)
-## [bhv_jet_stream_water_ring_loop](#bhv_jet_stream_water_ring_loop) +## [bhv_moat_grills_loop](#bhv_moat_grills_loop) ### Description -Behavior loop function for jet stream water ring +Behavior loop function for moat grills ### Lua Example -`bhv_jet_stream_water_ring_loop()` +`bhv_moat_grills_loop()` ### Parameters - None @@ -5575,19 +3875,19 @@ Behavior loop function for jet stream water ring - None ### C Prototype -`void bhv_jet_stream_water_ring_loop(void);` +`void bhv_moat_grills_loop(void);` [:arrow_up_small:](#)
-## [bhv_jrb_floating_box_loop](#bhv_jrb_floating_box_loop) +## [bhv_rotating_clock_arm_loop](#bhv_rotating_clock_arm_loop) ### Description -Behavior loop function for Jolly Roger Bay floating box +Behavior loop function for rotating clock arm ### Lua Example -`bhv_jrb_floating_box_loop()` +`bhv_rotating_clock_arm_loop()` ### Parameters - None @@ -5596,19 +3896,19 @@ Behavior loop function for Jolly Roger Bay floating box - None ### C Prototype -`void bhv_jrb_floating_box_loop(void);` +`void bhv_rotating_clock_arm_loop(void);` [:arrow_up_small:](#)
-## [bhv_jrb_sliding_box_loop](#bhv_jrb_sliding_box_loop) +## [bhv_ukiki_init](#bhv_ukiki_init) ### Description -Behavior loop function for Jolly Roger Bay sliding box +Behavior init function for Ukiki ### Lua Example -`bhv_jrb_sliding_box_loop()` +`bhv_ukiki_init()` ### Parameters - None @@ -5617,19 +3917,19 @@ Behavior loop function for Jolly Roger Bay sliding box - None ### C Prototype -`void bhv_jrb_sliding_box_loop(void);` +`void bhv_ukiki_init(void);` [:arrow_up_small:](#)
-## [bhv_jumping_box_loop](#bhv_jumping_box_loop) +## [bhv_ukiki_loop](#bhv_ukiki_loop) ### Description -Behavior loop function for jumping box +Behavior loop function for Ukiki ### Lua Example -`bhv_jumping_box_loop()` +`bhv_ukiki_loop()` ### Parameters - None @@ -5638,19 +3938,19 @@ Behavior loop function for jumping box - None ### C Prototype -`void bhv_jumping_box_loop(void);` +`void bhv_ukiki_loop(void);` [:arrow_up_small:](#)
-## [bhv_kickable_board_loop](#bhv_kickable_board_loop) +## [bhv_lll_sinking_rock_block_loop](#bhv_lll_sinking_rock_block_loop) ### Description -Behavior loop function for Whomp's Fortress kickable board +Behavior loop function for Lethal Lava Land sinking rock block ### Lua Example -`bhv_kickable_board_loop()` +`bhv_lll_sinking_rock_block_loop()` ### Parameters - None @@ -5659,364 +3959,7 @@ Behavior loop function for Whomp's Fortress kickable board - None ### C Prototype -`void bhv_kickable_board_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_king_bobomb_loop](#bhv_king_bobomb_loop) - -### Description -Behavior loop function for King Bob-omb - -### Lua Example -`bhv_king_bobomb_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_king_bobomb_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_klepto_init](#bhv_klepto_init) - -### Description -Behavior init function for Klepto - -### Lua Example -`bhv_klepto_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_klepto_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_klepto_update](#bhv_klepto_update) - -### Description -Behavior loop function for Klepto - -### Lua Example -`bhv_klepto_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_klepto_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_koopa_init](#bhv_koopa_init) - -### Description -Behavior init function for Koopa - -### Lua Example -`bhv_koopa_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_koopa_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_koopa_race_endpoint_update](#bhv_koopa_race_endpoint_update) - -### Description -Behavior loop function for Koopa race endpoint - -### Lua Example -`bhv_koopa_race_endpoint_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_koopa_race_endpoint_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_koopa_shell_flame_loop](#bhv_koopa_shell_flame_loop) - -### Description -Behavior loop function for Koopa Shell flame - -### Lua Example -`bhv_koopa_shell_flame_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_koopa_shell_flame_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_koopa_shell_loop](#bhv_koopa_shell_loop) - -### Description -Behavior loop function for Koopa Shell - -### Lua Example -`bhv_koopa_shell_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_koopa_shell_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_koopa_shell_underwater_loop](#bhv_koopa_shell_underwater_loop) - -### Description -Behavior loop function for Koopa Shell underwater - -### Lua Example -`bhv_koopa_shell_underwater_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_koopa_shell_underwater_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_koopa_update](#bhv_koopa_update) - -### Description -Behavior loop function for Koopa - -### Lua Example -`bhv_koopa_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_koopa_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_large_bomp_init](#bhv_large_bomp_init) - -### Description -Behavior init function for Large Bomp (Whomp's Fortress moving wall with eyes) - -### Lua Example -`bhv_large_bomp_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_large_bomp_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_large_bomp_loop](#bhv_large_bomp_loop) - -### Description -Behavior loop function for Large Bomp (Whomp's Fortress moving wall with eyes) - -### Lua Example -`bhv_large_bomp_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_large_bomp_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_lll_bowser_puzzle_loop](#bhv_lll_bowser_puzzle_loop) - -### Description -Behavior loop function for Lethal Lava Land bowser puzzle - -### Lua Example -`bhv_lll_bowser_puzzle_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_lll_bowser_puzzle_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_lll_bowser_puzzle_piece_loop](#bhv_lll_bowser_puzzle_piece_loop) - -### Description -Behavior loop function for Lethal Lava Land bowser puzzle piece - -### Lua Example -`bhv_lll_bowser_puzzle_piece_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_lll_bowser_puzzle_piece_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_lll_drawbridge_loop](#bhv_lll_drawbridge_loop) - -### Description -Behavior loop function for Lethal Lava Land drawbridge - -### Lua Example -`bhv_lll_drawbridge_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_lll_drawbridge_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_lll_drawbridge_spawner_init](#bhv_lll_drawbridge_spawner_init) - -### Description -Behavior init function for Lethal Lava Land drawbridge spawner - -### Lua Example -`bhv_lll_drawbridge_spawner_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_lll_drawbridge_spawner_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_lll_drawbridge_spawner_loop](#bhv_lll_drawbridge_spawner_loop) - -### Description -Behavior loop function for Lethal Lava Land drawbridge spawner - -### Lua Example -`bhv_lll_drawbridge_spawner_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_lll_drawbridge_spawner_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_lll_floating_wood_bridge_loop](#bhv_lll_floating_wood_bridge_loop) - -### Description -Behavior loop function for Lethal Lava Land floating wood bridge - -### Lua Example -`bhv_lll_floating_wood_bridge_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_lll_floating_wood_bridge_loop(void);` +`void bhv_lll_sinking_rock_block_loop(void);` [:arrow_up_small:](#) @@ -6043,27 +3986,6 @@ Behavior loop function for Lethal Lava Land moving octagonal mesh platform
-## [bhv_lll_rolling_log_init](#bhv_lll_rolling_log_init) - -### Description -Behavior init function for Lethal Lava Land rolling log - -### Lua Example -`bhv_lll_rolling_log_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_lll_rolling_log_init(void);` - -[:arrow_up_small:](#) - -
- ## [bhv_lll_rotating_block_fire_bars_loop](#bhv_lll_rotating_block_fire_bars_loop) ### Description @@ -6106,6 +4028,69 @@ Behavior loop function for Lethal Lava Land rotating hex flame
+## [bhv_lll_wood_piece_loop](#bhv_lll_wood_piece_loop) + +### Description +Behavior loop function for Lethal Lava Land wood piece + +### Lua Example +`bhv_lll_wood_piece_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_lll_wood_piece_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_lll_floating_wood_bridge_loop](#bhv_lll_floating_wood_bridge_loop) + +### Description +Behavior loop function for Lethal Lava Land floating wood bridge + +### Lua Example +`bhv_lll_floating_wood_bridge_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_lll_floating_wood_bridge_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_volcano_flames_loop](#bhv_volcano_flames_loop) + +### Description +Behavior loop function for Volcano flames + +### Lua Example +`bhv_volcano_flames_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_volcano_flames_loop(void);` + +[:arrow_up_small:](#) + +
+ ## [bhv_lll_rotating_hexagonal_ring_loop](#bhv_lll_rotating_hexagonal_ring_loop) ### Description @@ -6148,27 +4133,6 @@ Behavior loop function for Lethal Lava Land sinking rectangular platform
-## [bhv_lll_sinking_rock_block_loop](#bhv_lll_sinking_rock_block_loop) - -### Description -Behavior loop function for Lethal Lava Land sinking rock block - -### Lua Example -`bhv_lll_sinking_rock_block_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_lll_sinking_rock_block_loop(void);` - -[:arrow_up_small:](#) - -
- ## [bhv_lll_sinking_square_platforms_loop](#bhv_lll_sinking_square_platforms_loop) ### Description @@ -6190,13 +4154,13 @@ Behavior loop function for Lethal Lava Land sinking square platforms
-## [bhv_lll_wood_piece_loop](#bhv_lll_wood_piece_loop) +## [bhv_koopa_shell_loop](#bhv_koopa_shell_loop) ### Description -Behavior loop function for Lethal Lava Land wood piece +Behavior loop function for Koopa Shell ### Lua Example -`bhv_lll_wood_piece_loop()` +`bhv_koopa_shell_loop()` ### Parameters - None @@ -6205,19 +4169,19 @@ Behavior loop function for Lethal Lava Land wood piece - None ### C Prototype -`void bhv_lll_wood_piece_loop(void);` +`void bhv_koopa_shell_loop(void);` [:arrow_up_small:](#)
-## [bhv_mad_piano_update](#bhv_mad_piano_update) +## [bhv_koopa_shell_flame_loop](#bhv_koopa_shell_flame_loop) ### Description -Behavior loop function for Mad Piano +Behavior loop function for Koopa Shell flame ### Lua Example -`bhv_mad_piano_update()` +`bhv_koopa_shell_flame_loop()` ### Parameters - None @@ -6226,19 +4190,19 @@ Behavior loop function for Mad Piano - None ### C Prototype -`void bhv_mad_piano_update(void);` +`void bhv_koopa_shell_flame_loop(void);` [:arrow_up_small:](#)
-## [bhv_manta_ray_init](#bhv_manta_ray_init) +## [bhv_tox_box_loop](#bhv_tox_box_loop) ### Description -Behavior init function for Manta Ray +Behavior loop function for Tox Box ### Lua Example -`bhv_manta_ray_init()` +`bhv_tox_box_loop()` ### Parameters - None @@ -6247,40 +4211,40 @@ Behavior init function for Manta Ray - None ### C Prototype -`void bhv_manta_ray_init(void);` +`void bhv_tox_box_loop(void);` [:arrow_up_small:](#)
-## [bhv_manta_ray_loop](#bhv_manta_ray_loop) +## [mario_moving_fast_enough_to_make_piranha_plant_bite](#mario_moving_fast_enough_to_make_piranha_plant_bite) ### Description -Behavior loop function for Manta Ray +Checks if Mario is moving fast enough to make Piranha Plant bite. This one is a mouthful ### Lua Example -`bhv_manta_ray_loop()` +`local integerValue = mario_moving_fast_enough_to_make_piranha_plant_bite()` ### Parameters - None ### Returns -- None +- `integer` ### C Prototype -`void bhv_manta_ray_loop(void);` +`s32 mario_moving_fast_enough_to_make_piranha_plant_bite(void);` [:arrow_up_small:](#)
-## [bhv_manta_ray_water_ring_init](#bhv_manta_ray_water_ring_init) +## [bhv_piranha_plant_loop](#bhv_piranha_plant_loop) ### Description -Behavior init function for Manta Ray water ring +Behavior loop function for Piranha Plant ### Lua Example -`bhv_manta_ray_water_ring_init()` +`bhv_piranha_plant_loop()` ### Parameters - None @@ -6289,19 +4253,19 @@ Behavior init function for Manta Ray water ring - None ### C Prototype -`void bhv_manta_ray_water_ring_init(void);` +`void bhv_piranha_plant_loop(void);` [:arrow_up_small:](#)
-## [bhv_manta_ray_water_ring_loop](#bhv_manta_ray_water_ring_loop) +## [bhv_lll_bowser_puzzle_piece_loop](#bhv_lll_bowser_puzzle_piece_loop) ### Description -Behavior loop function for Manta Ray water ring +Behavior loop function for Lethal Lava Land bowser puzzle piece ### Lua Example -`bhv_manta_ray_water_ring_loop()` +`bhv_lll_bowser_puzzle_piece_loop()` ### Parameters - None @@ -6310,7 +4274,1351 @@ Behavior loop function for Manta Ray water ring - None ### C Prototype -`void bhv_manta_ray_water_ring_loop(void);` +`void bhv_lll_bowser_puzzle_piece_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_lll_bowser_puzzle_loop](#bhv_lll_bowser_puzzle_loop) + +### Description +Behavior loop function for Lethal Lava Land bowser puzzle + +### Lua Example +`bhv_lll_bowser_puzzle_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_lll_bowser_puzzle_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_tuxies_mother_loop](#bhv_tuxies_mother_loop) + +### Description +Behavior loop function for Tuxie's mother + +### Lua Example +`bhv_tuxies_mother_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_tuxies_mother_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_small_penguin_loop](#bhv_small_penguin_loop) + +### Description +Behavior loop function for small penguin + +### Lua Example +`bhv_small_penguin_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_small_penguin_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_fish_spawner_loop](#bhv_fish_spawner_loop) + +### Description +Behavior loop function for fish spawner + +### Lua Example +`bhv_fish_spawner_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_fish_spawner_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_fish_loop](#bhv_fish_loop) + +### Description +Behavior loop function for fish + +### Lua Example +`bhv_fish_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_fish_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_wdw_express_elevator_loop](#bhv_wdw_express_elevator_loop) + +### Description +Behavior loop function for Wet Dry World express elevator + +### Lua Example +`bhv_wdw_express_elevator_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_wdw_express_elevator_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bub_spawner_loop](#bhv_bub_spawner_loop) + +### Description +Behavior loop function for Bub spawner + +### Lua Example +`bhv_bub_spawner_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bub_spawner_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bub_loop](#bhv_bub_loop) + +### Description +Behavior loop function for Bub + +### Lua Example +`bhv_bub_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bub_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_exclamation_box_init](#bhv_exclamation_box_init) + +### Description +Behavior init function for Exclamation Box + +### Lua Example +`bhv_exclamation_box_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_exclamation_box_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_exclamation_box_loop](#bhv_exclamation_box_loop) + +### Description +Behavior loop function for Exclamation Box + +### Lua Example +`bhv_exclamation_box_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_exclamation_box_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_rotating_exclamation_box_loop](#bhv_rotating_exclamation_box_loop) + +### Description +Behavior loop function for rotating exclamation mark + +### Lua Example +`bhv_rotating_exclamation_box_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_rotating_exclamation_box_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_sound_spawner_init](#bhv_sound_spawner_init) + +### Description +Behavior init function for sound spawner + +### Lua Example +`bhv_sound_spawner_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_sound_spawner_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bowsers_sub_loop](#bhv_bowsers_sub_loop) + +### Description +Behavior loop function for Bowser's submarine + +### Lua Example +`bhv_bowsers_sub_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bowsers_sub_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_sushi_shark_loop](#bhv_sushi_shark_loop) + +### Description +Behavior loop function for Sushi Shark + +### Lua Example +`bhv_sushi_shark_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_sushi_shark_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_sushi_shark_collision_loop](#bhv_sushi_shark_collision_loop) + +### Description +Behavior loop function for Sushi Shark collision + +### Lua Example +`bhv_sushi_shark_collision_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_sushi_shark_collision_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_jrb_sliding_box_loop](#bhv_jrb_sliding_box_loop) + +### Description +Behavior loop function for Jolly Roger Bay sliding box + +### Lua Example +`bhv_jrb_sliding_box_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_jrb_sliding_box_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_ship_part_3_loop](#bhv_ship_part_3_loop) + +### Description +Behavior loop function for Jolly Roger Bay ship part 3 + +### Lua Example +`bhv_ship_part_3_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_ship_part_3_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_sunken_ship_part_loop](#bhv_sunken_ship_part_loop) + +### Description +Behavior loop function for Jolly Roger Bay sunken ship part + +### Lua Example +`bhv_sunken_ship_part_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_sunken_ship_part_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_white_puff_1_loop](#bhv_white_puff_1_loop) + +### Description +Behavior loop function for white puff 1 + +### Lua Example +`bhv_white_puff_1_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_white_puff_1_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_white_puff_2_loop](#bhv_white_puff_2_loop) + +### Description +Behavior loop function for white puff 2 + +### Lua Example +`bhv_white_puff_2_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_white_puff_2_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_blue_coin_number_loop](#bhv_blue_coin_number_loop) + +### Description +Behavior loop function for Blue Coin number + +### Lua Example +`bhv_blue_coin_number_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_blue_coin_number_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_blue_coin_switch_init](#bhv_blue_coin_switch_init) + +### Description +Behavior init function for Blue Coin switch + +### Lua Example +`bhv_blue_coin_switch_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_blue_coin_switch_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_blue_coin_switch_loop](#bhv_blue_coin_switch_loop) + +### Description +Behavior loop function for Blue Coin switch + +### Lua Example +`bhv_blue_coin_switch_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_blue_coin_switch_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_hidden_blue_coin_loop](#bhv_hidden_blue_coin_loop) + +### Description +Behavior loop function for hidden Blue Coin + +### Lua Example +`bhv_hidden_blue_coin_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_hidden_blue_coin_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_openable_cage_door_loop](#bhv_openable_cage_door_loop) + +### Description +Behavior loop function for openable cage door + +### Lua Example +`bhv_openable_cage_door_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_openable_cage_door_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_openable_grill_loop](#bhv_openable_grill_loop) + +### Description +Behavior loop function for openable grill + +### Lua Example +`bhv_openable_grill_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_openable_grill_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_water_level_diamond_loop](#bhv_water_level_diamond_loop) + +### Description +Behavior loop function for Wet Dry World water level diamond + +### Lua Example +`bhv_water_level_diamond_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_water_level_diamond_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_init_changing_water_level_loop](#bhv_init_changing_water_level_loop) + +### Description +Behavior init function for changing water level, called when Wet Dry World is loaded + +### Lua Example +`bhv_init_changing_water_level_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_init_changing_water_level_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_tweester_sand_particle_loop](#bhv_tweester_sand_particle_loop) + +### Description +Behavior loop function for Tweester sand particle + +### Lua Example +`bhv_tweester_sand_particle_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_tweester_sand_particle_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_tweester_loop](#bhv_tweester_loop) + +### Description +Behavior loop function for Tweester + +### Lua Example +`bhv_tweester_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_tweester_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_merry_go_round_boo_manager_loop](#bhv_merry_go_round_boo_manager_loop) + +### Description +Behavior loop function for Merry Go Round Boo manager + +### Lua Example +`bhv_merry_go_round_boo_manager_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_merry_go_round_boo_manager_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_animated_texture_loop](#bhv_animated_texture_loop) + +### Description +Behavior loop function for animated texture + +### Lua Example +`bhv_animated_texture_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_animated_texture_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_boo_in_castle_loop](#bhv_boo_in_castle_loop) + +### Description +Behavior loop function for the Boo inside the Castle + +### Lua Example +`bhv_boo_in_castle_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_boo_in_castle_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_boo_with_cage_init](#bhv_boo_with_cage_init) + +### Description +Behavior init function for Boo with cage + +### Lua Example +`bhv_boo_with_cage_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_boo_with_cage_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_boo_with_cage_loop](#bhv_boo_with_cage_loop) + +### Description +Behavior loop function for Boo with cage + +### Lua Example +`bhv_boo_with_cage_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_boo_with_cage_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_boo_init](#bhv_boo_init) + +### Description +Behavior init function for Boo + +### Lua Example +`bhv_boo_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_boo_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_big_boo_loop](#bhv_big_boo_loop) + +### Description +Behavior loop function for Big Boo + +### Lua Example +`bhv_big_boo_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_big_boo_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_courtyard_boo_triplet_init](#bhv_courtyard_boo_triplet_init) + +### Description +Behavior init function for Courtyard Boo triplet + +### Lua Example +`bhv_courtyard_boo_triplet_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_courtyard_boo_triplet_init(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_secondary_camera_focus](#obj_set_secondary_camera_focus) + +### Description +Sets the secondary camera focus + +### Lua Example +`obj_set_secondary_camera_focus()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void obj_set_secondary_camera_focus(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_boo_loop](#bhv_boo_loop) + +### Description +Behavior loop function for Boo + +### Lua Example +`bhv_boo_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_boo_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_boo_boss_spawned_bridge_loop](#bhv_boo_boss_spawned_bridge_loop) + +### Description +Behavior loop function for Boo boss spawned bridge + +### Lua Example +`bhv_boo_boss_spawned_bridge_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_boo_boss_spawned_bridge_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bbh_tilting_trap_platform_loop](#bhv_bbh_tilting_trap_platform_loop) + +### Description +Behavior loop function for Big Boo's Haunt tilting trap platform + +### Lua Example +`bhv_bbh_tilting_trap_platform_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bbh_tilting_trap_platform_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_haunted_bookshelf_loop](#bhv_haunted_bookshelf_loop) + +### Description +Behavior loop function for Big Boo's Haunt haunted bookshelf + +### Lua Example +`bhv_haunted_bookshelf_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_haunted_bookshelf_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_merry_go_round_loop](#bhv_merry_go_round_loop) + +### Description +Behavior loop function for Big Boo's Haunt Merry Go Round + +### Lua Example +`bhv_merry_go_round_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_merry_go_round_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_play_music_track_when_touched_loop](#bhv_play_music_track_when_touched_loop) + +### Description +Behavior loop function for playing a jingle when in a 200 unit radius + +### Lua Example +`bhv_play_music_track_when_touched_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_play_music_track_when_touched_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_beta_bowser_anchor_loop](#bhv_beta_bowser_anchor_loop) + +### Description +Behavior loop function for beta Bowser anchor + +### Lua Example +`bhv_beta_bowser_anchor_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_beta_bowser_anchor_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_static_checkered_platform_loop](#bhv_static_checkered_platform_loop) + +### Description +Behavior loop function for static checkered platform + +### Lua Example +`bhv_static_checkered_platform_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_static_checkered_platform_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_castle_floor_trap_init](#bhv_castle_floor_trap_init) + +### Description +Behavior init function for Bowser in the Dark World floor trap manager + +### Lua Example +`bhv_castle_floor_trap_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_castle_floor_trap_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_castle_floor_trap_loop](#bhv_castle_floor_trap_loop) + +### Description +Behavior loop function for Bowser in the Dark World floor trap manager + +### Lua Example +`bhv_castle_floor_trap_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_castle_floor_trap_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_floor_trap_in_castle_loop](#bhv_floor_trap_in_castle_loop) + +### Description +Behavior loop function for Bowser in the Dark World floor trap + +### Lua Example +`bhv_floor_trap_in_castle_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_floor_trap_in_castle_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_sparkle_spawn_loop](#bhv_sparkle_spawn_loop) + +### Description +Behavior loop function for sparkle spawner + +### Lua Example +`bhv_sparkle_spawn_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_sparkle_spawn_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_scuttlebug_loop](#bhv_scuttlebug_loop) + +### Description +Behavior loop function for Scuttlebug + +### Lua Example +`bhv_scuttlebug_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_scuttlebug_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_scuttlebug_spawn_loop](#bhv_scuttlebug_spawn_loop) + +### Description +Behavior loop function for Scuttlebug spawner + +### Lua Example +`bhv_scuttlebug_spawn_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_scuttlebug_spawn_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_whomp_loop](#bhv_whomp_loop) + +### Description +Behavior loop function for Whomp + +### Lua Example +`bhv_whomp_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_whomp_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_water_splash_spawn_droplets](#bhv_water_splash_spawn_droplets) + +### Description +Behavior init function for spawning water splash droplets + +### Lua Example +`bhv_water_splash_spawn_droplets()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_water_splash_spawn_droplets(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_water_droplet_loop](#bhv_water_droplet_loop) + +### Description +Behavior loop function for water droplet + +### Lua Example +`bhv_water_droplet_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_water_droplet_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_water_droplet_splash_init](#bhv_water_droplet_splash_init) + +### Description +Behavior init function for water droplet splash + +### Lua Example +`bhv_water_droplet_splash_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_water_droplet_splash_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bubble_splash_init](#bhv_bubble_splash_init) + +### Description +Behavior init function for bubble splash + +### Lua Example +`bhv_bubble_splash_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bubble_splash_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_idle_water_wave_loop](#bhv_idle_water_wave_loop) + +### Description +Behavior loop function for idle water wave + +### Lua Example +`bhv_idle_water_wave_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_idle_water_wave_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_shallow_water_splash_init](#bhv_shallow_water_splash_init) + +### Description +Behavior init function for shallow water splash + +### Lua Example +`bhv_shallow_water_splash_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_shallow_water_splash_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_wave_trail_shrink](#bhv_wave_trail_shrink) + +### Description +Behavior loop function for shrinking water trail + +### Lua Example +`bhv_wave_trail_shrink()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_wave_trail_shrink(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_strong_wind_particle_loop](#bhv_strong_wind_particle_loop) + +### Description +Behavior loop function for strong wind particle + +### Lua Example +`bhv_strong_wind_particle_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_strong_wind_particle_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_sl_snowman_wind_loop](#bhv_sl_snowman_wind_loop) + +### Description +Behavior loop function for Snowman's Land snowman wind + +### Lua Example +`bhv_sl_snowman_wind_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_sl_snowman_wind_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_sl_walking_penguin_loop](#bhv_sl_walking_penguin_loop) + +### Description +Behavior loop function for Snowman's Land walking penguin + +### Lua Example +`bhv_sl_walking_penguin_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_sl_walking_penguin_loop(void);` [:arrow_up_small:](#) @@ -6400,13 +5708,13 @@ Behavior loop function for File Select button manager
-## [bhv_merry_go_round_boo_manager_loop](#bhv_merry_go_round_boo_manager_loop) +## [bhv_act_selector_star_type_loop](#bhv_act_selector_star_type_loop) ### Description -Behavior loop function for Merry Go Round Boo manager +Behavior loop function for Act Selector star type ### Lua Example -`bhv_merry_go_round_boo_manager_loop()` +`bhv_act_selector_star_type_loop()` ### Parameters - None @@ -6415,19 +5723,19 @@ Behavior loop function for Merry Go Round Boo manager - None ### C Prototype -`void bhv_merry_go_round_boo_manager_loop(void);` +`void bhv_act_selector_star_type_loop(void);` [:arrow_up_small:](#)
-## [bhv_merry_go_round_loop](#bhv_merry_go_round_loop) +## [bhv_act_selector_init](#bhv_act_selector_init) ### Description -Behavior loop function for Big Boo's Haunt Merry Go Round +Behavior init function for Act Selector ### Lua Example -`bhv_merry_go_round_loop()` +`bhv_act_selector_init()` ### Parameters - None @@ -6436,19 +5744,19 @@ Behavior loop function for Big Boo's Haunt Merry Go Round - None ### C Prototype -`void bhv_merry_go_round_loop(void);` +`void bhv_act_selector_init(void);` [:arrow_up_small:](#)
-## [bhv_metal_cap_init](#bhv_metal_cap_init) +## [bhv_act_selector_loop](#bhv_act_selector_loop) ### Description -Behavior init function for Metal Cap +Behavior loop function for Act Selector ### Lua Example -`bhv_metal_cap_init()` +`bhv_act_selector_loop()` ### Parameters - None @@ -6457,280 +5765,7 @@ Behavior init function for Metal Cap - None ### C Prototype -`void bhv_metal_cap_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_metal_cap_loop](#bhv_metal_cap_loop) - -### Description -Behavior loop function for Metal Cap - -### Lua Example -`bhv_metal_cap_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_metal_cap_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_mips_init](#bhv_mips_init) - -### Description -Behavior init function for Mips - -### Lua Example -`bhv_mips_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_mips_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_mips_loop](#bhv_mips_loop) - -### Description -Behavior loop function for Mips - -### Lua Example -`bhv_mips_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_mips_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_moat_grills_loop](#bhv_moat_grills_loop) - -### Description -Behavior loop function for moat grills - -### Lua Example -`bhv_moat_grills_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_moat_grills_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_moneybag_hidden_loop](#bhv_moneybag_hidden_loop) - -### Description -Behavior loop function for Moneybag hidden - -### Lua Example -`bhv_moneybag_hidden_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_moneybag_hidden_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_moneybag_init](#bhv_moneybag_init) - -### Description -Behavior init function for Moneybag - -### Lua Example -`bhv_moneybag_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_moneybag_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_moneybag_loop](#bhv_moneybag_loop) - -### Description -Behavior loop function for Moneybag - -### Lua Example -`bhv_moneybag_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_moneybag_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_monty_mole_hole_update](#bhv_monty_mole_hole_update) - -### Description -Behavior loop function for Monty Mole hole - -### Lua Example -`bhv_monty_mole_hole_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_monty_mole_hole_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_monty_mole_init](#bhv_monty_mole_init) - -### Description -Behavior init function for Monty Mole - -### Lua Example -`bhv_monty_mole_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_monty_mole_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_monty_mole_rock_update](#bhv_monty_mole_rock_update) - -### Description -Behavior loop function for Monty Mole rock - -### Lua Example -`bhv_monty_mole_rock_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_monty_mole_rock_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_monty_mole_update](#bhv_monty_mole_update) - -### Description -Behavior loop function for Monty Mole - -### Lua Example -`bhv_monty_mole_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_monty_mole_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_moving_blue_coin_init](#bhv_moving_blue_coin_init) - -### Description -Behavior init function for moving Blue Coin - -### Lua Example -`bhv_moving_blue_coin_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_moving_blue_coin_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_moving_blue_coin_loop](#bhv_moving_blue_coin_loop) - -### Description -Behavior loop function for moving Blue Coin - -### Lua Example -`bhv_moving_blue_coin_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_moving_blue_coin_loop(void);` +`void bhv_act_selector_loop(void);` [:arrow_up_small:](#) @@ -6778,13 +5813,13 @@ Behavior loop function for moving Yellow Coin
-## [bhv_mr_blizzard_init](#bhv_mr_blizzard_init) +## [bhv_moving_blue_coin_init](#bhv_moving_blue_coin_init) ### Description -Behavior init function for Mr. Blizzard +Behavior init function for moving Blue Coin ### Lua Example -`bhv_mr_blizzard_init()` +`bhv_moving_blue_coin_init()` ### Parameters - None @@ -6793,19 +5828,19 @@ Behavior init function for Mr. Blizzard - None ### C Prototype -`void bhv_mr_blizzard_init(void);` +`void bhv_moving_blue_coin_init(void);` [:arrow_up_small:](#)
-## [bhv_mr_blizzard_snowball](#bhv_mr_blizzard_snowball) +## [bhv_moving_blue_coin_loop](#bhv_moving_blue_coin_loop) ### Description -Behavior loop function for Mr. Blizzard's snowball +Behavior loop function for moving Blue Coin ### Lua Example -`bhv_mr_blizzard_snowball()` +`bhv_moving_blue_coin_loop()` ### Parameters - None @@ -6814,19 +5849,19 @@ Behavior loop function for Mr. Blizzard's snowball - None ### C Prototype -`void bhv_mr_blizzard_snowball(void);` +`void bhv_moving_blue_coin_loop(void);` [:arrow_up_small:](#)
-## [bhv_mr_blizzard_update](#bhv_mr_blizzard_update) +## [bhv_blue_coin_sliding_jumping_init](#bhv_blue_coin_sliding_jumping_init) ### Description -Behavior loop function for Mr. Blizzard +Behavior init function for Blue Coin sliding jumping ### Lua Example -`bhv_mr_blizzard_update()` +`bhv_blue_coin_sliding_jumping_init()` ### Parameters - None @@ -6835,19 +5870,19 @@ Behavior loop function for Mr. Blizzard - None ### C Prototype -`void bhv_mr_blizzard_update(void);` +`void bhv_blue_coin_sliding_jumping_init(void);` [:arrow_up_small:](#)
-## [bhv_mr_i_body_loop](#bhv_mr_i_body_loop) +## [bhv_blue_coin_sliding_loop](#bhv_blue_coin_sliding_loop) ### Description -Behavior loop function for Mr. I body +Behavior loop function for Blue Coin sliding ### Lua Example -`bhv_mr_i_body_loop()` +`bhv_blue_coin_sliding_loop()` ### Parameters - None @@ -6856,19 +5891,19 @@ Behavior loop function for Mr. I body - None ### C Prototype -`void bhv_mr_i_body_loop(void);` +`void bhv_blue_coin_sliding_loop(void);` [:arrow_up_small:](#)
-## [bhv_mr_i_loop](#bhv_mr_i_loop) +## [bhv_blue_coin_jumping_loop](#bhv_blue_coin_jumping_loop) ### Description -Behavior loop function for Mr. I +Behavior loop function for Blue Coin jumping ### Lua Example -`bhv_mr_i_loop()` +`bhv_blue_coin_jumping_loop()` ### Parameters - None @@ -6877,19 +5912,19 @@ Behavior loop function for Mr. I - None ### C Prototype -`void bhv_mr_i_loop(void);` +`void bhv_blue_coin_jumping_loop(void);` [:arrow_up_small:](#)
-## [bhv_mr_i_particle_loop](#bhv_mr_i_particle_loop) +## [bhv_seaweed_init](#bhv_seaweed_init) ### Description -Behavior loop function for Mr. I particle +Behavior init function for seaweed ### Lua Example -`bhv_mr_i_particle_loop()` +`bhv_seaweed_init()` ### Parameters - None @@ -6898,19 +5933,19 @@ Behavior loop function for Mr. I particle - None ### C Prototype -`void bhv_mr_i_particle_loop(void);` +`void bhv_seaweed_init(void);` [:arrow_up_small:](#)
-## [bhv_normal_cap_init](#bhv_normal_cap_init) +## [bhv_seaweed_bundle_init](#bhv_seaweed_bundle_init) ### Description -Behavior init function for Normal Cap +Behavior init function for seaweed bundle ### Lua Example -`bhv_normal_cap_init()` +`bhv_seaweed_bundle_init()` ### Parameters - None @@ -6919,19 +5954,19 @@ Behavior init function for Normal Cap - None ### C Prototype -`void bhv_normal_cap_init(void);` +`void bhv_seaweed_bundle_init(void);` [:arrow_up_small:](#)
-## [bhv_normal_cap_loop](#bhv_normal_cap_loop) +## [bhv_bobomb_init](#bhv_bobomb_init) ### Description -Behavior loop function for Normal Cap +Behavior init function for Bob-omb ### Lua Example -`bhv_normal_cap_loop()` +`bhv_bobomb_init()` ### Parameters - None @@ -6940,7 +5975,406 @@ Behavior loop function for Normal Cap - None ### C Prototype -`void bhv_normal_cap_loop(void);` +`void bhv_bobomb_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bobomb_loop](#bhv_bobomb_loop) + +### Description +Behavior loop function for Bob-omb + +### Lua Example +`bhv_bobomb_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bobomb_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bobomb_fuse_smoke_init](#bhv_bobomb_fuse_smoke_init) + +### Description +Behavior init function for Bob-omb fuse smoke + +### Lua Example +`bhv_bobomb_fuse_smoke_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bobomb_fuse_smoke_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bobomb_buddy_init](#bhv_bobomb_buddy_init) + +### Description +Behavior init function for Bob-omb buddy + +### Lua Example +`bhv_bobomb_buddy_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bobomb_buddy_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bobomb_buddy_loop](#bhv_bobomb_buddy_loop) + +### Description +Behavior loop function for Bob-omb buddy + +### Lua Example +`bhv_bobomb_buddy_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bobomb_buddy_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_cannon_closed_init](#bhv_cannon_closed_init) + +### Description +Behavior init function for cannon closed + +### Lua Example +`bhv_cannon_closed_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_cannon_closed_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_cannon_closed_loop](#bhv_cannon_closed_loop) + +### Description +Behavior loop function for cannon closed + +### Lua Example +`bhv_cannon_closed_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_cannon_closed_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_whirlpool_init](#bhv_whirlpool_init) + +### Description +Behavior init function for whirlpool + +### Lua Example +`bhv_whirlpool_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_whirlpool_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_whirlpool_loop](#bhv_whirlpool_loop) + +### Description +Behavior loop function for whirlpool + +### Lua Example +`bhv_whirlpool_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_whirlpool_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_jet_stream_loop](#bhv_jet_stream_loop) + +### Description +Behavior loop function for jet stream + +### Lua Example +`bhv_jet_stream_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_jet_stream_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_homing_amp_init](#bhv_homing_amp_init) + +### Description +Behavior init function for Homing Amp + +### Lua Example +`bhv_homing_amp_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_homing_amp_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_homing_amp_loop](#bhv_homing_amp_loop) + +### Description +Behavior loop function for Homing Amp + +### Lua Example +`bhv_homing_amp_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_homing_amp_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_circling_amp_init](#bhv_circling_amp_init) + +### Description +Behavior init function for Circling Amp + +### Lua Example +`bhv_circling_amp_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_circling_amp_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_circling_amp_loop](#bhv_circling_amp_loop) + +### Description +Behavior loop function for Circling Amp + +### Lua Example +`bhv_circling_amp_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_circling_amp_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_butterfly_init](#bhv_butterfly_init) + +### Description +Behavior init function for Butterfly + +### Lua Example +`bhv_butterfly_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_butterfly_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_butterfly_loop](#bhv_butterfly_loop) + +### Description +Behavior loop function for Butterfly + +### Lua Example +`bhv_butterfly_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_butterfly_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_hoot_init](#bhv_hoot_init) + +### Description +Behavior init function for Hoot + +### Lua Example +`bhv_hoot_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_hoot_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_hoot_loop](#bhv_hoot_loop) + +### Description +Behavior loop function for Hoot + +### Lua Example +`bhv_hoot_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_hoot_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_beta_holdable_object_init](#bhv_beta_holdable_object_init) + +### Description +Behavior init function for beta holdable object + +### Lua Example +`bhv_beta_holdable_object_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_beta_holdable_object_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_beta_holdable_object_loop](#bhv_beta_holdable_object_loop) + +### Description +Behavior loop function for beta holdable object + +### Lua Example +`bhv_beta_holdable_object_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_beta_holdable_object_loop(void);` [:arrow_up_small:](#) @@ -7030,13 +6464,13 @@ Behavior loop function for water wave object
-## [bhv_openable_cage_door_loop](#bhv_openable_cage_door_loop) +## [bhv_explosion_init](#bhv_explosion_init) ### Description -Behavior loop function for openable cage door +Behavior init function for explosion ### Lua Example -`bhv_openable_cage_door_loop()` +`bhv_explosion_init()` ### Parameters - None @@ -7045,19 +6479,19 @@ Behavior loop function for openable cage door - None ### C Prototype -`void bhv_openable_cage_door_loop(void);` +`void bhv_explosion_init(void);` [:arrow_up_small:](#)
-## [bhv_openable_grill_loop](#bhv_openable_grill_loop) +## [bhv_explosion_loop](#bhv_explosion_loop) ### Description -Behavior loop function for openable grill +Behavior loop function for explosion ### Lua Example -`bhv_openable_grill_loop()` +`bhv_explosion_loop()` ### Parameters - None @@ -7066,19 +6500,19 @@ Behavior loop function for openable grill - None ### C Prototype -`void bhv_openable_grill_loop(void);` +`void bhv_explosion_loop(void);` [:arrow_up_small:](#)
-## [bhv_orange_number_init](#bhv_orange_number_init) +## [bhv_bobomb_bully_death_smoke_init](#bhv_bobomb_bully_death_smoke_init) ### Description -Behavior init function for orange number +Behavior init function for Bob-omb and Bully death smoke ### Lua Example -`bhv_orange_number_init()` +`bhv_bobomb_bully_death_smoke_init()` ### Parameters - None @@ -7087,19 +6521,19 @@ Behavior init function for orange number - None ### C Prototype -`void bhv_orange_number_init(void);` +`void bhv_bobomb_bully_death_smoke_init(void);` [:arrow_up_small:](#)
-## [bhv_orange_number_loop](#bhv_orange_number_loop) +## [bhv_bobomb_explosion_bubble_init](#bhv_bobomb_explosion_bubble_init) ### Description -Behavior loop function for orange number +Behavior init function for Bob-omb explosion bubble ### Lua Example -`bhv_orange_number_loop()` +`bhv_bobomb_explosion_bubble_init()` ### Parameters - None @@ -7108,19 +6542,19 @@ Behavior loop function for orange number - None ### C Prototype -`void bhv_orange_number_loop(void);` +`void bhv_bobomb_explosion_bubble_init(void);` [:arrow_up_small:](#)
-## [bhv_particle_init](#bhv_particle_init) +## [bhv_bobomb_explosion_bubble_loop](#bhv_bobomb_explosion_bubble_loop) ### Description -Behavior init function for particle +Behavior loop function for Bob-omb explosion bubble ### Lua Example -`bhv_particle_init()` +`bhv_bobomb_explosion_bubble_loop()` ### Parameters - None @@ -7129,19 +6563,19 @@ Behavior init function for particle - None ### C Prototype -`void bhv_particle_init(void);` +`void bhv_bobomb_explosion_bubble_loop(void);` [:arrow_up_small:](#)
-## [bhv_particle_loop](#bhv_particle_loop) +## [bhv_respawner_loop](#bhv_respawner_loop) ### Description -Behavior loop function for particle +Behavior loop function for respawner ### Lua Example -`bhv_particle_loop()` +`bhv_respawner_loop()` ### Parameters - None @@ -7150,19 +6584,19 @@ Behavior loop function for particle - None ### C Prototype -`void bhv_particle_loop(void);` +`void bhv_respawner_loop(void);` [:arrow_up_small:](#)
-## [bhv_penguin_race_finish_line_update](#bhv_penguin_race_finish_line_update) +## [bhv_small_bully_init](#bhv_small_bully_init) ### Description -Behavior loop function for Penguin race finish line +Behavior init function for Small Bully ### Lua Example -`bhv_penguin_race_finish_line_update()` +`bhv_small_bully_init()` ### Parameters - None @@ -7171,19 +6605,19 @@ Behavior loop function for Penguin race finish line - None ### C Prototype -`void bhv_penguin_race_finish_line_update(void);` +`void bhv_small_bully_init(void);` [:arrow_up_small:](#)
-## [bhv_penguin_race_shortcut_check_update](#bhv_penguin_race_shortcut_check_update) +## [bhv_bully_loop](#bhv_bully_loop) ### Description -Behavior loop function for Penguin race shortcut check +Behavior loop function for Bully ### Lua Example -`bhv_penguin_race_shortcut_check_update()` +`bhv_bully_loop()` ### Parameters - None @@ -7192,19 +6626,19 @@ Behavior loop function for Penguin race shortcut check - None ### C Prototype -`void bhv_penguin_race_shortcut_check_update(void);` +`void bhv_bully_loop(void);` [:arrow_up_small:](#)
-## [bhv_piranha_particle_loop](#bhv_piranha_particle_loop) +## [bhv_big_bully_init](#bhv_big_bully_init) ### Description -Behavior loop function for Piranha particle +Behavior init function for Big Bully ### Lua Example -`bhv_piranha_particle_loop()` +`bhv_big_bully_init()` ### Parameters - None @@ -7213,19 +6647,19 @@ Behavior loop function for Piranha particle - None ### C Prototype -`void bhv_piranha_particle_loop(void);` +`void bhv_big_bully_init(void);` [:arrow_up_small:](#)
-## [bhv_piranha_plant_bubble_loop](#bhv_piranha_plant_bubble_loop) +## [bhv_big_bully_with_minions_init](#bhv_big_bully_with_minions_init) ### Description -Behavior loop function for Piranha Plant bubble +Behavior init function for Big Bully with minions ### Lua Example -`bhv_piranha_plant_bubble_loop()` +`bhv_big_bully_with_minions_init()` ### Parameters - None @@ -7234,19 +6668,19 @@ Behavior loop function for Piranha Plant bubble - None ### C Prototype -`void bhv_piranha_plant_bubble_loop(void);` +`void bhv_big_bully_with_minions_init(void);` [:arrow_up_small:](#)
-## [bhv_piranha_plant_loop](#bhv_piranha_plant_loop) +## [bhv_big_bully_with_minions_loop](#bhv_big_bully_with_minions_loop) ### Description -Behavior loop function for Piranha Plant +Behavior loop function for Big Bully with minions ### Lua Example -`bhv_piranha_plant_loop()` +`bhv_big_bully_with_minions_loop()` ### Parameters - None @@ -7255,19 +6689,19 @@ Behavior loop function for Piranha Plant - None ### C Prototype -`void bhv_piranha_plant_loop(void);` +`void bhv_big_bully_with_minions_loop(void);` [:arrow_up_small:](#)
-## [bhv_piranha_plant_waking_bubbles_loop](#bhv_piranha_plant_waking_bubbles_loop) +## [bhv_jet_stream_ring_spawner_loop](#bhv_jet_stream_ring_spawner_loop) ### Description -Behavior loop function for Piranha Plant waking bubbles +Behavior loop function for jet stream ring spawner ### Lua Example -`bhv_piranha_plant_waking_bubbles_loop()` +`bhv_jet_stream_ring_spawner_loop()` ### Parameters - None @@ -7276,19 +6710,19 @@ Behavior loop function for Piranha Plant waking bubbles - None ### C Prototype -`void bhv_piranha_plant_waking_bubbles_loop(void);` +`void bhv_jet_stream_ring_spawner_loop(void);` [:arrow_up_small:](#)
-## [bhv_platform_normals_init](#bhv_platform_normals_init) +## [bhv_jet_stream_water_ring_init](#bhv_jet_stream_water_ring_init) ### Description -Behavior init function for Bowser in the Dark World, Lethal Lava Land, and Bowser in the Fire Sea platform normals +Behavior init function for jet stream water ring ### Lua Example -`bhv_platform_normals_init()` +`bhv_jet_stream_water_ring_init()` ### Parameters - None @@ -7297,19 +6731,19 @@ Behavior init function for Bowser in the Dark World, Lethal Lava Land, and Bowse - None ### C Prototype -`void bhv_platform_normals_init(void);` +`void bhv_jet_stream_water_ring_init(void);` [:arrow_up_small:](#)
-## [bhv_platform_on_track_init](#bhv_platform_on_track_init) +## [bhv_jet_stream_water_ring_loop](#bhv_jet_stream_water_ring_loop) ### Description -Behavior init function for platform on track +Behavior loop function for jet stream water ring ### Lua Example -`bhv_platform_on_track_init()` +`bhv_jet_stream_water_ring_loop()` ### Parameters - None @@ -7318,19 +6752,19 @@ Behavior init function for platform on track - None ### C Prototype -`void bhv_platform_on_track_init(void);` +`void bhv_jet_stream_water_ring_loop(void);` [:arrow_up_small:](#)
-## [bhv_platform_on_track_update](#bhv_platform_on_track_update) +## [bhv_manta_ray_water_ring_init](#bhv_manta_ray_water_ring_init) ### Description -Behavior loop function for platform on track +Behavior init function for Manta Ray water ring ### Lua Example -`bhv_platform_on_track_update()` +`bhv_manta_ray_water_ring_init()` ### Parameters - None @@ -7339,19 +6773,19 @@ Behavior loop function for platform on track - None ### C Prototype -`void bhv_platform_on_track_update(void);` +`void bhv_manta_ray_water_ring_init(void);` [:arrow_up_small:](#)
-## [bhv_play_music_track_when_touched_loop](#bhv_play_music_track_when_touched_loop) +## [bhv_manta_ray_water_ring_loop](#bhv_manta_ray_water_ring_loop) ### Description -Behavior loop function for playing a jingle when in a 200 unit radius +Behavior loop function for Manta Ray water ring ### Lua Example -`bhv_play_music_track_when_touched_loop()` +`bhv_manta_ray_water_ring_loop()` ### Parameters - None @@ -7360,19 +6794,19 @@ Behavior loop function for playing a jingle when in a 200 unit radius - None ### C Prototype -`void bhv_play_music_track_when_touched_loop(void);` +`void bhv_manta_ray_water_ring_loop(void);` [:arrow_up_small:](#)
-## [bhv_point_light_init](#bhv_point_light_init) +## [bhv_bowser_bomb_loop](#bhv_bowser_bomb_loop) ### Description -Behavior init function for the lighting engine point light. Takes the first 3 behavior parameter bytes for RGB color and the last for radius +Behavior loop function for Bowser bomb ### Lua Example -`bhv_point_light_init()` +`bhv_bowser_bomb_loop()` ### Parameters - None @@ -7381,19 +6815,19 @@ Behavior init function for the lighting engine point light. Takes the first 3 be - None ### C Prototype -`void bhv_point_light_init(void);` +`void bhv_bowser_bomb_loop(void);` [:arrow_up_small:](#)
-## [bhv_point_light_loop](#bhv_point_light_loop) +## [bhv_bowser_bomb_explosion_loop](#bhv_bowser_bomb_explosion_loop) ### Description -Behavior loop function for the lighting engine point light +Behavior loop function for Bowser bomb explosion ### Lua Example -`bhv_point_light_loop()` +`bhv_bowser_bomb_explosion_loop()` ### Parameters - None @@ -7402,19 +6836,19 @@ Behavior loop function for the lighting engine point light - None ### C Prototype -`void bhv_point_light_loop(void);` +`void bhv_bowser_bomb_explosion_loop(void);` [:arrow_up_small:](#)
-## [bhv_pokey_body_part_update](#bhv_pokey_body_part_update) +## [bhv_bowser_bomb_smoke_loop](#bhv_bowser_bomb_smoke_loop) ### Description -Behavior loop function for Pokey body part +Behavior loop function for Bowser bomb smoke ### Lua Example -`bhv_pokey_body_part_update()` +`bhv_bowser_bomb_smoke_loop()` ### Parameters - None @@ -7423,19 +6857,19 @@ Behavior loop function for Pokey body part - None ### C Prototype -`void bhv_pokey_body_part_update(void);` +`void bhv_bowser_bomb_smoke_loop(void);` [:arrow_up_small:](#)
-## [bhv_pokey_update](#bhv_pokey_update) +## [bhv_celebration_star_init](#bhv_celebration_star_init) ### Description -Behavior loop function for Pokey +Behavior init function for Celebration Star ### Lua Example -`bhv_pokey_update()` +`bhv_celebration_star_init()` ### Parameters - None @@ -7444,19 +6878,19 @@ Behavior loop function for Pokey - None ### C Prototype -`void bhv_pokey_update(void);` +`void bhv_celebration_star_init(void);` [:arrow_up_small:](#)
-## [bhv_pole_base_loop](#bhv_pole_base_loop) +## [bhv_celebration_star_loop](#bhv_celebration_star_loop) ### Description -Behavior loop function for pole base +Behavior loop function for Celebration Star ### Lua Example -`bhv_pole_base_loop()` +`bhv_celebration_star_loop()` ### Parameters - None @@ -7465,19 +6899,19 @@ Behavior loop function for pole base - None ### C Prototype -`void bhv_pole_base_loop(void);` +`void bhv_celebration_star_loop(void);` [:arrow_up_small:](#)
-## [bhv_pole_init](#bhv_pole_init) +## [bhv_celebration_star_sparkle_loop](#bhv_celebration_star_sparkle_loop) ### Description -Behavior init function for pole +Behavior loop function for Celebration Star sparkle ### Lua Example -`bhv_pole_init()` +`bhv_celebration_star_sparkle_loop()` ### Parameters - None @@ -7486,19 +6920,19 @@ Behavior init function for pole - None ### C Prototype -`void bhv_pole_init(void);` +`void bhv_celebration_star_sparkle_loop(void);` [:arrow_up_small:](#)
-## [bhv_pound_tiny_star_particle_init](#bhv_pound_tiny_star_particle_init) +## [bhv_star_key_collection_puff_spawner_loop](#bhv_star_key_collection_puff_spawner_loop) ### Description -Behavior init function for tiny pound star particle +Behavior loop function for Star and key collection puff spawner ### Lua Example -`bhv_pound_tiny_star_particle_init()` +`bhv_star_key_collection_puff_spawner_loop()` ### Parameters - None @@ -7507,19 +6941,19 @@ Behavior init function for tiny pound star particle - None ### C Prototype -`void bhv_pound_tiny_star_particle_init(void);` +`void bhv_star_key_collection_puff_spawner_loop(void);` [:arrow_up_small:](#)
-## [bhv_pound_tiny_star_particle_loop](#bhv_pound_tiny_star_particle_loop) +## [bhv_lll_drawbridge_spawner_init](#bhv_lll_drawbridge_spawner_init) ### Description -Behavior loop function for tiny pound star particle +Behavior init function for Lethal Lava Land drawbridge spawner ### Lua Example -`bhv_pound_tiny_star_particle_loop()` +`bhv_lll_drawbridge_spawner_init()` ### Parameters - None @@ -7528,19 +6962,19 @@ Behavior loop function for tiny pound star particle - None ### C Prototype -`void bhv_pound_tiny_star_particle_loop(void);` +`void bhv_lll_drawbridge_spawner_init(void);` [:arrow_up_small:](#)
-## [bhv_pound_white_puffs_init](#bhv_pound_white_puffs_init) +## [bhv_lll_drawbridge_spawner_loop](#bhv_lll_drawbridge_spawner_loop) ### Description -Behavior init function for pound white puffs +Behavior loop function for Lethal Lava Land drawbridge spawner ### Lua Example -`bhv_pound_white_puffs_init()` +`bhv_lll_drawbridge_spawner_loop()` ### Parameters - None @@ -7549,19 +6983,19 @@ Behavior init function for pound white puffs - None ### C Prototype -`void bhv_pound_white_puffs_init(void);` +`void bhv_lll_drawbridge_spawner_loop(void);` [:arrow_up_small:](#)
-## [bhv_punch_tiny_triangle_init](#bhv_punch_tiny_triangle_init) +## [bhv_lll_drawbridge_loop](#bhv_lll_drawbridge_loop) ### Description -Behavior init function for tiny punch triangle +Behavior loop function for Lethal Lava Land drawbridge ### Lua Example -`bhv_punch_tiny_triangle_init()` +`bhv_lll_drawbridge_loop()` ### Parameters - None @@ -7570,19 +7004,19 @@ Behavior init function for tiny punch triangle - None ### C Prototype -`void bhv_punch_tiny_triangle_init(void);` +`void bhv_lll_drawbridge_loop(void);` [:arrow_up_small:](#)
-## [bhv_punch_tiny_triangle_loop](#bhv_punch_tiny_triangle_loop) +## [bhv_small_bomp_init](#bhv_small_bomp_init) ### Description -Behavior loop function for tiny punch triangle +Behavior init function for Small Bomp (Whomp's Fortress moving wall with eyes) ### Lua Example -`bhv_punch_tiny_triangle_loop()` +`bhv_small_bomp_init()` ### Parameters - None @@ -7591,19 +7025,19 @@ Behavior loop function for tiny punch triangle - None ### C Prototype -`void bhv_punch_tiny_triangle_loop(void);` +`void bhv_small_bomp_init(void);` [:arrow_up_small:](#)
-## [bhv_purple_switch_loop](#bhv_purple_switch_loop) +## [bhv_small_bomp_loop](#bhv_small_bomp_loop) ### Description -Behavior loop function for Purple Switch +Behavior loop function for Small Bomp (Whomp's Fortress moving wall with eyes) ### Lua Example -`bhv_purple_switch_loop()` +`bhv_small_bomp_loop()` ### Parameters - None @@ -7612,19 +7046,19 @@ Behavior loop function for Purple Switch - None ### C Prototype -`void bhv_purple_switch_loop(void);` +`void bhv_small_bomp_loop(void);` [:arrow_up_small:](#)
-## [bhv_pushable_loop](#bhv_pushable_loop) +## [bhv_large_bomp_init](#bhv_large_bomp_init) ### Description -Behavior loop function for pushable metal box +Behavior init function for Large Bomp (Whomp's Fortress moving wall with eyes) ### Lua Example -`bhv_pushable_loop()` +`bhv_large_bomp_init()` ### Parameters - None @@ -7633,7 +7067,448 @@ Behavior loop function for pushable metal box - None ### C Prototype -`void bhv_pushable_loop(void);` +`void bhv_large_bomp_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_large_bomp_loop](#bhv_large_bomp_loop) + +### Description +Behavior loop function for Large Bomp (Whomp's Fortress moving wall with eyes) + +### Lua Example +`bhv_large_bomp_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_large_bomp_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_wf_sliding_platform_init](#bhv_wf_sliding_platform_init) + +### Description +Behavior init function for Whomp's Fortress sliding platform + +### Lua Example +`bhv_wf_sliding_platform_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_wf_sliding_platform_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_wf_sliding_platform_loop](#bhv_wf_sliding_platform_loop) + +### Description +Behavior loop function for Whomp's Fortress sliding platform + +### Lua Example +`bhv_wf_sliding_platform_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_wf_sliding_platform_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_moneybag_init](#bhv_moneybag_init) + +### Description +Behavior init function for Moneybag + +### Lua Example +`bhv_moneybag_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_moneybag_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_moneybag_loop](#bhv_moneybag_loop) + +### Description +Behavior loop function for Moneybag + +### Lua Example +`bhv_moneybag_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_moneybag_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_moneybag_hidden_loop](#bhv_moneybag_hidden_loop) + +### Description +Behavior loop function for Moneybag hidden + +### Lua Example +`bhv_moneybag_hidden_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_moneybag_hidden_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bob_pit_bowling_ball_init](#bhv_bob_pit_bowling_ball_init) + +### Description +Behavior init function for Bob-omb Battlefield pit bowling ball + +### Lua Example +`bhv_bob_pit_bowling_ball_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bob_pit_bowling_ball_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bob_pit_bowling_ball_loop](#bhv_bob_pit_bowling_ball_loop) + +### Description +Behavior loop function for Bob-omb Battlefield pit bowling ball + +### Lua Example +`bhv_bob_pit_bowling_ball_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bob_pit_bowling_ball_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_free_bowling_ball_init](#bhv_free_bowling_ball_init) + +### Description +Behavior init function for free bowling ball + +### Lua Example +`bhv_free_bowling_ball_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_free_bowling_ball_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_free_bowling_ball_loop](#bhv_free_bowling_ball_loop) + +### Description +Behavior loop function for free bowling ball + +### Lua Example +`bhv_free_bowling_ball_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_free_bowling_ball_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bowling_ball_init](#bhv_bowling_ball_init) + +### Description +Behavior init function for bowling ball + +### Lua Example +`bhv_bowling_ball_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bowling_ball_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bowling_ball_loop](#bhv_bowling_ball_loop) + +### Description +Behavior loop function for bowling ball + +### Lua Example +`bhv_bowling_ball_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bowling_ball_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_generic_bowling_ball_spawner_init](#bhv_generic_bowling_ball_spawner_init) + +### Description +Behavior init function for generic bowling ball spawner + +### Lua Example +`bhv_generic_bowling_ball_spawner_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_generic_bowling_ball_spawner_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_generic_bowling_ball_spawner_loop](#bhv_generic_bowling_ball_spawner_loop) + +### Description +Behavior loop function for generic bowling ball spawner + +### Lua Example +`bhv_generic_bowling_ball_spawner_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_generic_bowling_ball_spawner_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_thi_bowling_ball_spawner_loop](#bhv_thi_bowling_ball_spawner_loop) + +### Description +Behavior loop function for Tiny Huge Island bowling ball spawner + +### Lua Example +`bhv_thi_bowling_ball_spawner_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_thi_bowling_ball_spawner_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_rr_cruiser_wing_init](#bhv_rr_cruiser_wing_init) + +### Description +Behavior init function for Rainbow Ride cruiser wing + +### Lua Example +`bhv_rr_cruiser_wing_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_rr_cruiser_wing_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_rr_cruiser_wing_loop](#bhv_rr_cruiser_wing_loop) + +### Description +Behavior loop function for Rainbow Ride cruiser wing + +### Lua Example +`bhv_rr_cruiser_wing_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_rr_cruiser_wing_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_spindel_init](#bhv_spindel_init) + +### Description +Behavior init function for Spindel + +### Lua Example +`bhv_spindel_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_spindel_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_spindel_loop](#bhv_spindel_loop) + +### Description +Behavior loop function for Spindel + +### Lua Example +`bhv_spindel_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_spindel_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_ssl_moving_pyramid_wall_init](#bhv_ssl_moving_pyramid_wall_init) + +### Description +Behavior init function for Ssl moving pyramid wall + +### Lua Example +`bhv_ssl_moving_pyramid_wall_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_ssl_moving_pyramid_wall_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_ssl_moving_pyramid_wall_loop](#bhv_ssl_moving_pyramid_wall_loop) + +### Description +Behavior loop function for Ssl moving pyramid wall + +### Lua Example +`bhv_ssl_moving_pyramid_wall_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_ssl_moving_pyramid_wall_loop(void);` [:arrow_up_small:](#) @@ -7702,13 +7577,13 @@ Behavior loop function for Pyramid elevator trajectory marker ball
-## [bhv_pyramid_pillar_touch_detector_loop](#bhv_pyramid_pillar_touch_detector_loop) +## [bhv_pyramid_top_init](#bhv_pyramid_top_init) ### Description -Behavior loop function for Pyramid pillar touch detector +Behavior init function for Pyramid top ### Lua Example -`bhv_pyramid_pillar_touch_detector_loop()` +`bhv_pyramid_top_init()` ### Parameters - None @@ -7717,7 +7592,28 @@ Behavior loop function for Pyramid pillar touch detector - None ### C Prototype -`void bhv_pyramid_pillar_touch_detector_loop(void);` +`void bhv_pyramid_top_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_pyramid_top_loop](#bhv_pyramid_top_loop) + +### Description +Behavior loop function for Pyramid top + +### Lua Example +`bhv_pyramid_top_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_pyramid_top_loop(void);` [:arrow_up_small:](#) @@ -7765,13 +7661,13 @@ Behavior loop function for Pyramid top fragment
-## [bhv_pyramid_top_init](#bhv_pyramid_top_init) +## [bhv_pyramid_pillar_touch_detector_loop](#bhv_pyramid_pillar_touch_detector_loop) ### Description -Behavior init function for Pyramid top +Behavior loop function for Pyramid pillar touch detector ### Lua Example -`bhv_pyramid_top_init()` +`bhv_pyramid_pillar_touch_detector_loop()` ### Parameters - None @@ -7780,19 +7676,19 @@ Behavior init function for Pyramid top - None ### C Prototype -`void bhv_pyramid_top_init(void);` +`void bhv_pyramid_pillar_touch_detector_loop(void);` [:arrow_up_small:](#)
-## [bhv_pyramid_top_loop](#bhv_pyramid_top_loop) +## [bhv_waterfall_sound_loop](#bhv_waterfall_sound_loop) ### Description -Behavior loop function for Pyramid top +Behavior loop function for waterfall sound ### Lua Example -`bhv_pyramid_top_loop()` +`bhv_waterfall_sound_loop()` ### Parameters - None @@ -7801,19 +7697,19 @@ Behavior loop function for Pyramid top - None ### C Prototype -`void bhv_pyramid_top_loop(void);` +`void bhv_waterfall_sound_loop(void);` [:arrow_up_small:](#)
-## [bhv_racing_penguin_init](#bhv_racing_penguin_init) +## [bhv_volcano_sound_loop](#bhv_volcano_sound_loop) ### Description -Behavior init function for Racing Penguin +Behavior loop function for volcano sound ### Lua Example -`bhv_racing_penguin_init()` +`bhv_volcano_sound_loop()` ### Parameters - None @@ -7822,19 +7718,19 @@ Behavior init function for Racing Penguin - None ### C Prototype -`void bhv_racing_penguin_init(void);` +`void bhv_volcano_sound_loop(void);` [:arrow_up_small:](#)
-## [bhv_racing_penguin_update](#bhv_racing_penguin_update) +## [bhv_castle_flag_init](#bhv_castle_flag_init) ### Description -Behavior loop function for Racing Penguin +Behavior init function for castle flag ### Lua Example -`bhv_racing_penguin_update()` +`bhv_castle_flag_init()` ### Parameters - None @@ -7843,19 +7739,19 @@ Behavior loop function for Racing Penguin - None ### C Prototype -`void bhv_racing_penguin_update(void);` +`void bhv_castle_flag_init(void);` [:arrow_up_small:](#)
-## [bhv_recovery_heart_loop](#bhv_recovery_heart_loop) +## [bhv_birds_sound_loop](#bhv_birds_sound_loop) ### Description -Behavior loop function for Recovery Heart +Behavior loop function for birds sound ### Lua Example -`bhv_recovery_heart_loop()` +`bhv_birds_sound_loop()` ### Parameters - None @@ -7864,19 +7760,19 @@ Behavior loop function for Recovery Heart - None ### C Prototype -`void bhv_recovery_heart_loop(void);` +`void bhv_birds_sound_loop(void);` [:arrow_up_small:](#)
-## [bhv_red_coin_init](#bhv_red_coin_init) +## [bhv_ambient_sounds_init](#bhv_ambient_sounds_init) ### Description -Behavior init function for Red Coin +Behavior init function for ambient sounds ### Lua Example -`bhv_red_coin_init()` +`bhv_ambient_sounds_init()` ### Parameters - None @@ -7885,259 +7781,7 @@ Behavior init function for Red Coin - None ### C Prototype -`void bhv_red_coin_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_red_coin_loop](#bhv_red_coin_loop) - -### Description -Behavior loop function for Red Coin - -### Lua Example -`bhv_red_coin_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_red_coin_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_red_coin_star_marker_init](#bhv_red_coin_star_marker_init) - -### Description -Behavior init function for Red Coin Star marker - -### Lua Example -`bhv_red_coin_star_marker_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_red_coin_star_marker_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_respawner_loop](#bhv_respawner_loop) - -### Description -Behavior loop function for respawner - -### Lua Example -`bhv_respawner_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_respawner_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_rolling_log_loop](#bhv_rolling_log_loop) - -### Description -Behavior loop function for rolling log - -### Lua Example -`bhv_rolling_log_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_rolling_log_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_rotating_clock_arm_loop](#bhv_rotating_clock_arm_loop) - -### Description -Behavior loop function for rotating clock arm - -### Lua Example -`bhv_rotating_clock_arm_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_rotating_clock_arm_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_rotating_exclamation_box_loop](#bhv_rotating_exclamation_box_loop) - -### Description -Behavior loop function for rotating exclamation mark - -### Lua Example -`bhv_rotating_exclamation_box_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_rotating_exclamation_box_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_rotating_octagonal_plat_init](#bhv_rotating_octagonal_plat_init) - -### Description -Behavior init function for Rotating octagonal platform in Rainbow Ride and Bowser in the Sky - -### Lua Example -`bhv_rotating_octagonal_plat_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_rotating_octagonal_plat_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_rotating_octagonal_plat_loop](#bhv_rotating_octagonal_plat_loop) - -### Description -Behavior loop function for Rotating octagonal platform in Rainbow Ride and Bowser in the Sky - -### Lua Example -`bhv_rotating_octagonal_plat_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_rotating_octagonal_plat_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_rotating_platform_loop](#bhv_rotating_platform_loop) - -### Description -Behavior loop function for rotating platform - -### Lua Example -`bhv_rotating_platform_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_rotating_platform_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_rr_cruiser_wing_init](#bhv_rr_cruiser_wing_init) - -### Description -Behavior init function for Rainbow Ride cruiser wing - -### Lua Example -`bhv_rr_cruiser_wing_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_rr_cruiser_wing_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_rr_cruiser_wing_loop](#bhv_rr_cruiser_wing_loop) - -### Description -Behavior loop function for Rainbow Ride cruiser wing - -### Lua Example -`bhv_rr_cruiser_wing_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_rr_cruiser_wing_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_rr_rotating_bridge_platform_loop](#bhv_rr_rotating_bridge_platform_loop) - -### Description -Behavior loop function for Rainbow Ride rotating bridge platform - -### Lua Example -`bhv_rr_rotating_bridge_platform_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_rr_rotating_bridge_platform_loop(void);` +`void bhv_ambient_sounds_init(void);` [:arrow_up_small:](#) @@ -8164,13 +7808,13 @@ Behavior loop function for sand sound
-## [bhv_scuttlebug_loop](#bhv_scuttlebug_loop) +## [bhv_castle_cannon_grate_init](#bhv_castle_cannon_grate_init) ### Description -Behavior loop function for Scuttlebug +Behavior init function for Castle cannon grate ### Lua Example -`bhv_scuttlebug_loop()` +`bhv_castle_cannon_grate_init()` ### Parameters - None @@ -8179,511 +7823,7 @@ Behavior loop function for Scuttlebug - None ### C Prototype -`void bhv_scuttlebug_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_scuttlebug_spawn_loop](#bhv_scuttlebug_spawn_loop) - -### Description -Behavior loop function for Scuttlebug spawner - -### Lua Example -`bhv_scuttlebug_spawn_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_scuttlebug_spawn_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_seaweed_bundle_init](#bhv_seaweed_bundle_init) - -### Description -Behavior init function for seaweed bundle - -### Lua Example -`bhv_seaweed_bundle_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_seaweed_bundle_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_seaweed_init](#bhv_seaweed_init) - -### Description -Behavior init function for seaweed - -### Lua Example -`bhv_seaweed_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_seaweed_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_seesaw_platform_init](#bhv_seesaw_platform_init) - -### Description -Behavior init function for seesaw platform - -### Lua Example -`bhv_seesaw_platform_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_seesaw_platform_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_seesaw_platform_update](#bhv_seesaw_platform_update) - -### Description -Behavior loop function for seesaw platform - -### Lua Example -`bhv_seesaw_platform_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_seesaw_platform_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_shallow_water_splash_init](#bhv_shallow_water_splash_init) - -### Description -Behavior init function for shallow water splash - -### Lua Example -`bhv_shallow_water_splash_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_shallow_water_splash_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_ship_part_3_loop](#bhv_ship_part_3_loop) - -### Description -Behavior loop function for Jolly Roger Bay ship part 3 - -### Lua Example -`bhv_ship_part_3_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_ship_part_3_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_skeeter_update](#bhv_skeeter_update) - -### Description -Behavior loop function for Skeeter - -### Lua Example -`bhv_skeeter_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_skeeter_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_skeeter_wave_update](#bhv_skeeter_wave_update) - -### Description -Behavior loop function for Skeeter wave - -### Lua Example -`bhv_skeeter_wave_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_skeeter_wave_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_sl_snowman_wind_loop](#bhv_sl_snowman_wind_loop) - -### Description -Behavior loop function for Snowman's Land snowman wind - -### Lua Example -`bhv_sl_snowman_wind_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_sl_snowman_wind_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_sl_walking_penguin_loop](#bhv_sl_walking_penguin_loop) - -### Description -Behavior loop function for Snowman's Land walking penguin - -### Lua Example -`bhv_sl_walking_penguin_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_sl_walking_penguin_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_sliding_plat_2_init](#bhv_sliding_plat_2_init) - -### Description -Behavior init function for sliding platform 2 in Rainbow Ride and Bowser courses - -### Lua Example -`bhv_sliding_plat_2_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_sliding_plat_2_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_sliding_plat_2_loop](#bhv_sliding_plat_2_loop) - -### Description -Behavior loop function for sliding platform 2 in Rainbow Ride and Bowser courses - -### Lua Example -`bhv_sliding_plat_2_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_sliding_plat_2_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_sliding_snow_mound_loop](#bhv_sliding_snow_mound_loop) - -### Description -Behavior loop function for sliding snow mound - -### Lua Example -`bhv_sliding_snow_mound_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_sliding_snow_mound_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_small_bomp_init](#bhv_small_bomp_init) - -### Description -Behavior init function for Small Bomp (Whomp's Fortress moving wall with eyes) - -### Lua Example -`bhv_small_bomp_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_small_bomp_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_small_bomp_loop](#bhv_small_bomp_loop) - -### Description -Behavior loop function for Small Bomp (Whomp's Fortress moving wall with eyes) - -### Lua Example -`bhv_small_bomp_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_small_bomp_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_small_bubbles_loop](#bhv_small_bubbles_loop) - -### Description -Behavior loop function for small bubbles - -### Lua Example -`bhv_small_bubbles_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_small_bubbles_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_small_bully_init](#bhv_small_bully_init) - -### Description -Behavior init function for Small Bully - -### Lua Example -`bhv_small_bully_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_small_bully_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_small_penguin_loop](#bhv_small_penguin_loop) - -### Description -Behavior loop function for small penguin - -### Lua Example -`bhv_small_penguin_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_small_penguin_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_small_piranha_flame_loop](#bhv_small_piranha_flame_loop) - -### Description -Behavior loop function for Small Piranha flame - -### Lua Example -`bhv_small_piranha_flame_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_small_piranha_flame_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_small_water_wave_loop](#bhv_small_water_wave_loop) - -### Description -Behavior loop function for small water wave - -### Lua Example -`bhv_small_water_wave_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_small_water_wave_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_snow_leaf_particle_spawn_init](#bhv_snow_leaf_particle_spawn_init) - -### Description -Behavior init function for snow leaf particle spawn - -### Lua Example -`bhv_snow_leaf_particle_spawn_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_snow_leaf_particle_spawn_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_snow_mound_spawn_loop](#bhv_snow_mound_spawn_loop) - -### Description -Behavior loop function for snow mound spawn - -### Lua Example -`bhv_snow_mound_spawn_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_snow_mound_spawn_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_snowmans_body_checkpoint_loop](#bhv_snowmans_body_checkpoint_loop) - -### Description -Behavior loop function for Snowman's body checkpoint - -### Lua Example -`bhv_snowmans_body_checkpoint_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_snowmans_body_checkpoint_loop(void);` +`void bhv_castle_cannon_grate_init(void);` [:arrow_up_small:](#) @@ -8773,13 +7913,13 @@ Behavior loop function for Snowman's head
-## [bhv_snufit_balls_loop](#bhv_snufit_balls_loop) +## [bhv_snowmans_body_checkpoint_loop](#bhv_snowmans_body_checkpoint_loop) ### Description -Behavior loop function for Snufit balls +Behavior loop function for Snowman's body checkpoint ### Lua Example -`bhv_snufit_balls_loop()` +`bhv_snowmans_body_checkpoint_loop()` ### Parameters - None @@ -8788,19 +7928,19 @@ Behavior loop function for Snufit balls - None ### C Prototype -`void bhv_snufit_balls_loop(void);` +`void bhv_snowmans_body_checkpoint_loop(void);` [:arrow_up_small:](#)
-## [bhv_snufit_loop](#bhv_snufit_loop) +## [bhv_big_boulder_init](#bhv_big_boulder_init) ### Description -Behavior loop function for Snufit +Behavior init function for big boulder ### Lua Example -`bhv_snufit_loop()` +`bhv_big_boulder_init()` ### Parameters - None @@ -8809,19 +7949,19 @@ Behavior loop function for Snufit - None ### C Prototype -`void bhv_snufit_loop(void);` +`void bhv_big_boulder_init(void);` [:arrow_up_small:](#)
-## [bhv_sound_spawner_init](#bhv_sound_spawner_init) +## [bhv_big_boulder_loop](#bhv_big_boulder_loop) ### Description -Behavior init function for sound spawner +Behavior loop function for big boulder ### Lua Example -`bhv_sound_spawner_init()` +`bhv_big_boulder_loop()` ### Parameters - None @@ -8830,19 +7970,19 @@ Behavior init function for sound spawner - None ### C Prototype -`void bhv_sound_spawner_init(void);` +`void bhv_big_boulder_loop(void);` [:arrow_up_small:](#)
-## [bhv_sparkle_spawn_loop](#bhv_sparkle_spawn_loop) +## [bhv_big_boulder_generator_loop](#bhv_big_boulder_generator_loop) ### Description -Behavior loop function for sparkle spawner +Behavior loop function for big boulder generator ### Lua Example -`bhv_sparkle_spawn_loop()` +`bhv_big_boulder_generator_loop()` ### Parameters - None @@ -8851,44 +7991,40 @@ Behavior loop function for sparkle spawner - None ### C Prototype -`void bhv_sparkle_spawn_loop(void);` +`void bhv_big_boulder_generator_loop(void);` [:arrow_up_small:](#)
-## [bhv_spawn_star_no_level_exit](#bhv_spawn_star_no_level_exit) +## [bhv_wing_cap_init](#bhv_wing_cap_init) ### Description -Spawns a Star parented to `object` that won't make Mario exit the level with an ID corresponding to `params`' first byte +Behavior init function for Wing Cap ### Lua Example -`bhv_spawn_star_no_level_exit(object, params, networkSendEvent)` +`bhv_wing_cap_init()` ### Parameters -| Field | Type | -| ----- | ---- | -| object | [Object](structs.md#Object) | -| params | `integer` | -| networkSendEvent | `integer` | +- None ### Returns - None ### C Prototype -`void bhv_spawn_star_no_level_exit(struct Object* object, u32 params, u8 networkSendEvent);` +`void bhv_wing_cap_init(void);` [:arrow_up_small:](#)
-## [bhv_spawned_star_init](#bhv_spawned_star_init) +## [bhv_wing_vanish_cap_loop](#bhv_wing_vanish_cap_loop) ### Description -Behavior init function for spawned star +Behavior loop function for Wing and Vanish caps ### Lua Example -`bhv_spawned_star_init()` +`bhv_wing_vanish_cap_loop()` ### Parameters - None @@ -8897,19 +8033,19 @@ Behavior init function for spawned star - None ### C Prototype -`void bhv_spawned_star_init(void);` +`void bhv_wing_vanish_cap_loop(void);` [:arrow_up_small:](#)
-## [bhv_spawned_star_loop](#bhv_spawned_star_loop) +## [bhv_metal_cap_init](#bhv_metal_cap_init) ### Description -Behavior loop function for Spawned star +Behavior init function for Metal Cap ### Lua Example -`bhv_spawned_star_loop()` +`bhv_metal_cap_init()` ### Parameters - None @@ -8918,19 +8054,19 @@ Behavior loop function for Spawned star - None ### C Prototype -`void bhv_spawned_star_loop(void);` +`void bhv_metal_cap_init(void);` [:arrow_up_small:](#)
-## [bhv_spindel_init](#bhv_spindel_init) +## [bhv_metal_cap_loop](#bhv_metal_cap_loop) ### Description -Behavior init function for Spindel +Behavior loop function for Metal Cap ### Lua Example -`bhv_spindel_init()` +`bhv_metal_cap_loop()` ### Parameters - None @@ -8939,19 +8075,19 @@ Behavior init function for Spindel - None ### C Prototype -`void bhv_spindel_init(void);` +`void bhv_metal_cap_loop(void);` [:arrow_up_small:](#)
-## [bhv_spindel_loop](#bhv_spindel_loop) +## [bhv_normal_cap_init](#bhv_normal_cap_init) ### Description -Behavior loop function for Spindel +Behavior init function for Normal Cap ### Lua Example -`bhv_spindel_loop()` +`bhv_normal_cap_init()` ### Parameters - None @@ -8960,19 +8096,19 @@ Behavior loop function for Spindel - None ### C Prototype -`void bhv_spindel_loop(void);` +`void bhv_normal_cap_init(void);` [:arrow_up_small:](#)
-## [bhv_spindrift_loop](#bhv_spindrift_loop) +## [bhv_normal_cap_loop](#bhv_normal_cap_loop) ### Description -Behavior loop function for Spindrift +Behavior loop function for Normal Cap ### Lua Example -`bhv_spindrift_loop()` +`bhv_normal_cap_loop()` ### Parameters - None @@ -8981,19 +8117,19 @@ Behavior loop function for Spindrift - None ### C Prototype -`void bhv_spindrift_loop(void);` +`void bhv_normal_cap_loop(void);` [:arrow_up_small:](#)
-## [bhv_spiny_update](#bhv_spiny_update) +## [bhv_vanish_cap_init](#bhv_vanish_cap_init) ### Description -Behavior loop function for Spiny +Behavior init function for Vanish Cap ### Lua Example -`bhv_spiny_update()` +`bhv_vanish_cap_init()` ### Parameters - None @@ -9002,196 +8138,7 @@ Behavior loop function for Spiny - None ### C Prototype -`void bhv_spiny_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_squarish_path_moving_loop](#bhv_squarish_path_moving_loop) - -### Description -Behavior loop function for Bowser in the Dark World squarish path moving - -### Lua Example -`bhv_squarish_path_moving_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_squarish_path_moving_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_squarish_path_parent_init](#bhv_squarish_path_parent_init) - -### Description -Behavior init function for Bowser in the Dark World squarish path parent - -### Lua Example -`bhv_squarish_path_parent_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_squarish_path_parent_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_squarish_path_parent_loop](#bhv_squarish_path_parent_loop) - -### Description -Behavior loop function for Bowser in the Dark World Ssuarish path parent - -### Lua Example -`bhv_squarish_path_parent_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_squarish_path_parent_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_squishable_platform_loop](#bhv_squishable_platform_loop) - -### Description -Behavior loop function for squishable platform - -### Lua Example -`bhv_squishable_platform_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_squishable_platform_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_ssl_moving_pyramid_wall_init](#bhv_ssl_moving_pyramid_wall_init) - -### Description -Behavior init function for Ssl moving pyramid wall - -### Lua Example -`bhv_ssl_moving_pyramid_wall_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_ssl_moving_pyramid_wall_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_ssl_moving_pyramid_wall_loop](#bhv_ssl_moving_pyramid_wall_loop) - -### Description -Behavior loop function for Ssl moving pyramid wall - -### Lua Example -`bhv_ssl_moving_pyramid_wall_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_ssl_moving_pyramid_wall_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_star_door_loop](#bhv_star_door_loop) - -### Description -Behavior loop function for Star Door - -### Lua Example -`bhv_star_door_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_star_door_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_star_door_loop_2](#bhv_star_door_loop_2) - -### Description -Behavior loop function for Star Door - -### Lua Example -`bhv_star_door_loop_2()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_star_door_loop_2(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_star_key_collection_puff_spawner_loop](#bhv_star_key_collection_puff_spawner_loop) - -### Description -Behavior loop function for Star and key collection puff spawner - -### Lua Example -`bhv_star_key_collection_puff_spawner_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_star_key_collection_puff_spawner_loop(void);` +`void bhv_vanish_cap_init(void);` [:arrow_up_small:](#) @@ -9218,6 +8165,69 @@ Behavior loop function for Star number
+## [spawn_star_number](#spawn_star_number) + +### Description +Spawns a star number + +### Lua Example +`spawn_star_number()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void spawn_star_number(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_collect_star_init](#bhv_collect_star_init) + +### Description +Behavior init function for collectable Star + +### Lua Example +`bhv_collect_star_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_collect_star_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_collect_star_loop](#bhv_collect_star_loop) + +### Description +Behavior loop function for collectable Star + +### Lua Example +`bhv_collect_star_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_collect_star_loop(void);` + +[:arrow_up_small:](#) + +
+ ## [bhv_star_spawn_init](#bhv_star_spawn_init) ### Description @@ -9260,13 +8270,13 @@ Behavior loop function for Star spawn
-## [bhv_static_checkered_platform_loop](#bhv_static_checkered_platform_loop) +## [bhv_hidden_red_coin_star_init](#bhv_hidden_red_coin_star_init) ### Description -Behavior loop function for static checkered platform +Behavior init function for Hidden Red Coin Star ### Lua Example -`bhv_static_checkered_platform_loop()` +`bhv_hidden_red_coin_star_init()` ### Parameters - None @@ -9275,19 +8285,19 @@ Behavior loop function for static checkered platform - None ### C Prototype -`void bhv_static_checkered_platform_loop(void);` +`void bhv_hidden_red_coin_star_init(void);` [:arrow_up_small:](#)
-## [bhv_strong_wind_particle_loop](#bhv_strong_wind_particle_loop) +## [bhv_hidden_red_coin_star_loop](#bhv_hidden_red_coin_star_loop) ### Description -Behavior loop function for strong wind particle +Behavior loop function for Hidden Red Coin Star ### Lua Example -`bhv_strong_wind_particle_loop()` +`bhv_hidden_red_coin_star_loop()` ### Parameters - None @@ -9296,19 +8306,19 @@ Behavior loop function for strong wind particle - None ### C Prototype -`void bhv_strong_wind_particle_loop(void);` +`void bhv_hidden_red_coin_star_loop(void);` [:arrow_up_small:](#)
-## [bhv_sunken_ship_part_loop](#bhv_sunken_ship_part_loop) +## [bhv_red_coin_init](#bhv_red_coin_init) ### Description -Behavior loop function for Jolly Roger Bay sunken ship part +Behavior init function for Red Coin ### Lua Example -`bhv_sunken_ship_part_loop()` +`bhv_red_coin_init()` ### Parameters - None @@ -9317,19 +8327,19 @@ Behavior loop function for Jolly Roger Bay sunken ship part - None ### C Prototype -`void bhv_sunken_ship_part_loop(void);` +`void bhv_red_coin_init(void);` [:arrow_up_small:](#)
-## [bhv_sushi_shark_collision_loop](#bhv_sushi_shark_collision_loop) +## [bhv_red_coin_loop](#bhv_red_coin_loop) ### Description -Behavior loop function for Sushi Shark collision +Behavior loop function for Red Coin ### Lua Example -`bhv_sushi_shark_collision_loop()` +`bhv_red_coin_loop()` ### Parameters - None @@ -9338,19 +8348,19 @@ Behavior loop function for Sushi Shark collision - None ### C Prototype -`void bhv_sushi_shark_collision_loop(void);` +`void bhv_red_coin_loop(void);` [:arrow_up_small:](#)
-## [bhv_sushi_shark_loop](#bhv_sushi_shark_loop) +## [bhv_bowser_course_red_coin_star_loop](#bhv_bowser_course_red_coin_star_loop) ### Description -Behavior loop function for Sushi Shark +Behavior loop function for Bowser course Red Coin Star ### Lua Example -`bhv_sushi_shark_loop()` +`bhv_bowser_course_red_coin_star_loop()` ### Parameters - None @@ -9359,19 +8369,19 @@ Behavior loop function for Sushi Shark - None ### C Prototype -`void bhv_sushi_shark_loop(void);` +`void bhv_bowser_course_red_coin_star_loop(void);` [:arrow_up_small:](#)
-## [bhv_swing_platform_init](#bhv_swing_platform_init) +## [bhv_hidden_star_init](#bhv_hidden_star_init) ### Description -Behavior init function for swing platform +Behavior init function for Secret Star ### Lua Example -`bhv_swing_platform_init()` +`bhv_hidden_star_init()` ### Parameters - None @@ -9380,19 +8390,19 @@ Behavior init function for swing platform - None ### C Prototype -`void bhv_swing_platform_init(void);` +`void bhv_hidden_star_init(void);` [:arrow_up_small:](#)
-## [bhv_swing_platform_update](#bhv_swing_platform_update) +## [bhv_hidden_star_loop](#bhv_hidden_star_loop) ### Description -Behavior loop function for swing platform +Behavior loop function for Secret Star ### Lua Example -`bhv_swing_platform_update()` +`bhv_hidden_star_loop()` ### Parameters - None @@ -9401,19 +8411,19 @@ Behavior loop function for swing platform - None ### C Prototype -`void bhv_swing_platform_update(void);` +`void bhv_hidden_star_loop(void);` [:arrow_up_small:](#)
-## [bhv_swoop_update](#bhv_swoop_update) +## [bhv_hidden_star_trigger_loop](#bhv_hidden_star_trigger_loop) ### Description -Behavior loop function for Swoop +Behavior loop function for Secrets ### Lua Example -`bhv_swoop_update()` +`bhv_hidden_star_trigger_loop()` ### Parameters - None @@ -9422,19 +8432,19 @@ Behavior loop function for Swoop - None ### C Prototype -`void bhv_swoop_update(void);` +`void bhv_hidden_star_trigger_loop(void);` [:arrow_up_small:](#)
-## [bhv_tank_fish_group_loop](#bhv_tank_fish_group_loop) +## [bhv_ttm_rolling_log_init](#bhv_ttm_rolling_log_init) ### Description -Behavior loop function for tank fish group +Behavior init function for Tall, Tall Mountain rolling log ### Lua Example -`bhv_tank_fish_group_loop()` +`bhv_ttm_rolling_log_init()` ### Parameters - None @@ -9443,19 +8453,19 @@ Behavior loop function for tank fish group - None ### C Prototype -`void bhv_tank_fish_group_loop(void);` +`void bhv_ttm_rolling_log_init(void);` [:arrow_up_small:](#)
-## [bhv_temp_coin_loop](#bhv_temp_coin_loop) +## [bhv_rolling_log_loop](#bhv_rolling_log_loop) ### Description -Behavior loop function for despawning Coin +Behavior loop function for rolling log ### Lua Example -`bhv_temp_coin_loop()` +`bhv_rolling_log_loop()` ### Parameters - None @@ -9464,19 +8474,19 @@ Behavior loop function for despawning Coin - None ### C Prototype -`void bhv_temp_coin_loop(void);` +`void bhv_rolling_log_loop(void);` [:arrow_up_small:](#)
-## [bhv_thi_bowling_ball_spawner_loop](#bhv_thi_bowling_ball_spawner_loop) +## [bhv_lll_rolling_log_init](#bhv_lll_rolling_log_init) ### Description -Behavior loop function for Tiny Huge Island bowling ball spawner +Behavior init function for Lethal Lava Land rolling log ### Lua Example -`bhv_thi_bowling_ball_spawner_loop()` +`bhv_lll_rolling_log_init()` ### Parameters - None @@ -9485,19 +8495,19 @@ Behavior loop function for Tiny Huge Island bowling ball spawner - None ### C Prototype -`void bhv_thi_bowling_ball_spawner_loop(void);` +`void bhv_lll_rolling_log_init(void);` [:arrow_up_small:](#)
-## [bhv_thi_huge_island_top_loop](#bhv_thi_huge_island_top_loop) +## [bhv_1up_trigger_init](#bhv_1up_trigger_init) ### Description -Behavior loop function for Tiny Huge Island huge island top +Behavior init function for 1-Up trigger ### Lua Example -`bhv_thi_huge_island_top_loop()` +`bhv_1up_trigger_init()` ### Parameters - None @@ -9506,19 +8516,19 @@ Behavior loop function for Tiny Huge Island huge island top - None ### C Prototype -`void bhv_thi_huge_island_top_loop(void);` +`void bhv_1up_trigger_init(void);` [:arrow_up_small:](#)
-## [bhv_thi_tiny_island_top_loop](#bhv_thi_tiny_island_top_loop) +## [bhv_1up_common_init](#bhv_1up_common_init) ### Description -Behavior loop function for Tiny Huge Island tiny island top +Behavior init function for common 1-Up ### Lua Example -`bhv_thi_tiny_island_top_loop()` +`bhv_1up_common_init()` ### Parameters - None @@ -9527,19 +8537,19 @@ Behavior loop function for Tiny Huge Island tiny island top - None ### C Prototype -`void bhv_thi_tiny_island_top_loop(void);` +`void bhv_1up_common_init(void);` [:arrow_up_small:](#)
-## [bhv_tilting_bowser_lava_platform_init](#bhv_tilting_bowser_lava_platform_init) +## [bhv_1up_walking_loop](#bhv_1up_walking_loop) ### Description -Behavior init function for tilting Bowser in the Fire Sea arena platform +Behavior loop function for walking 1-Up ### Lua Example -`bhv_tilting_bowser_lava_platform_init()` +`bhv_1up_walking_loop()` ### Parameters - None @@ -9548,19 +8558,19 @@ Behavior init function for tilting Bowser in the Fire Sea arena platform - None ### C Prototype -`void bhv_tilting_bowser_lava_platform_init(void);` +`void bhv_1up_walking_loop(void);` [:arrow_up_small:](#)
-## [bhv_tilting_inverted_pyramid_loop](#bhv_tilting_inverted_pyramid_loop) +## [bhv_1up_running_away_loop](#bhv_1up_running_away_loop) ### Description -Behavior loop function for Lethal Lava Land and Bowser in the Fire Sea tilting inverted pyramid +Behavior loop function for running away 1-Up ### Lua Example -`bhv_tilting_inverted_pyramid_loop()` +`bhv_1up_running_away_loop()` ### Parameters - None @@ -9569,19 +8579,19 @@ Behavior loop function for Lethal Lava Land and Bowser in the Fire Sea tilting i - None ### C Prototype -`void bhv_tilting_inverted_pyramid_loop(void);` +`void bhv_1up_running_away_loop(void);` [:arrow_up_small:](#)
-## [bhv_tiny_star_particles_init](#bhv_tiny_star_particles_init) +## [bhv_1up_sliding_loop](#bhv_1up_sliding_loop) ### Description -Behavior init function for tiny Star particles +Behavior loop function for sliding 1-Up ### Lua Example -`bhv_tiny_star_particles_init()` +`bhv_1up_sliding_loop()` ### Parameters - None @@ -9590,19 +8600,19 @@ Behavior init function for tiny Star particles - None ### C Prototype -`void bhv_tiny_star_particles_init(void);` +`void bhv_1up_sliding_loop(void);` [:arrow_up_small:](#)
-## [bhv_tower_door_loop](#bhv_tower_door_loop) +## [bhv_1up_init](#bhv_1up_init) ### Description -Behavior loop function for Whomp's Fortress tower door +Behavior init function for 1-Up ### Lua Example -`bhv_tower_door_loop()` +`bhv_1up_init()` ### Parameters - None @@ -9611,19 +8621,19 @@ Behavior loop function for Whomp's Fortress tower door - None ### C Prototype -`void bhv_tower_door_loop(void);` +`void bhv_1up_init(void);` [:arrow_up_small:](#)
-## [bhv_tower_platform_group_init](#bhv_tower_platform_group_init) +## [bhv_1up_loop](#bhv_1up_loop) ### Description -Behavior init function for Whomp's Fortress tower platform group +Behavior loop function for 1-Up ### Lua Example -`bhv_tower_platform_group_init()` +`bhv_1up_loop()` ### Parameters - None @@ -9632,19 +8642,19 @@ Behavior init function for Whomp's Fortress tower platform group - None ### C Prototype -`void bhv_tower_platform_group_init(void);` +`void bhv_1up_loop(void);` [:arrow_up_small:](#)
-## [bhv_tower_platform_group_loop](#bhv_tower_platform_group_loop) +## [bhv_1up_jump_on_approach_loop](#bhv_1up_jump_on_approach_loop) ### Description -Behavior loop function for Whomp's Fortress tower platform group +Behavior loop function for jump on approach 1-Up ### Lua Example -`bhv_tower_platform_group_loop()` +`bhv_1up_jump_on_approach_loop()` ### Parameters - None @@ -9653,19 +8663,19 @@ Behavior loop function for Whomp's Fortress tower platform group - None ### C Prototype -`void bhv_tower_platform_group_loop(void);` +`void bhv_1up_jump_on_approach_loop(void);` [:arrow_up_small:](#)
-## [bhv_tox_box_loop](#bhv_tox_box_loop) +## [bhv_1up_hidden_loop](#bhv_1up_hidden_loop) ### Description -Behavior loop function for Tox Box +Behavior loop function for hidden 1-Up ### Lua Example -`bhv_tox_box_loop()` +`bhv_1up_hidden_loop()` ### Parameters - None @@ -9674,19 +8684,19 @@ Behavior loop function for Tox Box - None ### C Prototype -`void bhv_tox_box_loop(void);` +`void bhv_1up_hidden_loop(void);` [:arrow_up_small:](#)
-## [bhv_track_ball_update](#bhv_track_ball_update) +## [bhv_1up_hidden_trigger_loop](#bhv_1up_hidden_trigger_loop) ### Description -Behavior loop function for track ball +Behavior loop function for hidden 1-Up trigger ### Lua Example -`bhv_track_ball_update()` +`bhv_1up_hidden_trigger_loop()` ### Parameters - None @@ -9695,19 +8705,19 @@ Behavior loop function for track ball - None ### C Prototype -`void bhv_track_ball_update(void);` +`void bhv_1up_hidden_trigger_loop(void);` [:arrow_up_small:](#)
-## [bhv_treasure_chest_bottom_init](#bhv_treasure_chest_bottom_init) +## [bhv_1up_hidden_in_pole_loop](#bhv_1up_hidden_in_pole_loop) ### Description -Behavior init function for treasure chest bottom +Behavior loop function for hidden 1-Up in pole (Green Demon) ### Lua Example -`bhv_treasure_chest_bottom_init()` +`bhv_1up_hidden_in_pole_loop()` ### Parameters - None @@ -9716,19 +8726,19 @@ Behavior init function for treasure chest bottom - None ### C Prototype -`void bhv_treasure_chest_bottom_init(void);` +`void bhv_1up_hidden_in_pole_loop(void);` [:arrow_up_small:](#)
-## [bhv_treasure_chest_bottom_loop](#bhv_treasure_chest_bottom_loop) +## [bhv_1up_hidden_in_pole_trigger_loop](#bhv_1up_hidden_in_pole_trigger_loop) ### Description -Behavior loop function for treasure chest bottom +Behavior loop function for 1-Up hidden in pole trigger ### Lua Example -`bhv_treasure_chest_bottom_loop()` +`bhv_1up_hidden_in_pole_trigger_loop()` ### Parameters - None @@ -9737,19 +8747,19 @@ Behavior loop function for treasure chest bottom - None ### C Prototype -`void bhv_treasure_chest_bottom_loop(void);` +`void bhv_1up_hidden_in_pole_trigger_loop(void);` [:arrow_up_small:](#)
-## [bhv_treasure_chest_init](#bhv_treasure_chest_init) +## [bhv_1up_hidden_in_pole_spawner_loop](#bhv_1up_hidden_in_pole_spawner_loop) ### Description -Behavior init function for treasure chest +Behavior loop function for 1-Up hidden in pole spawner ### Lua Example -`bhv_treasure_chest_init()` +`bhv_1up_hidden_in_pole_spawner_loop()` ### Parameters - None @@ -9758,19 +8768,19 @@ Behavior init function for treasure chest - None ### C Prototype -`void bhv_treasure_chest_init(void);` +`void bhv_1up_hidden_in_pole_spawner_loop(void);` [:arrow_up_small:](#)
-## [bhv_treasure_chest_jrb_init](#bhv_treasure_chest_jrb_init) +## [bhv_controllable_platform_init](#bhv_controllable_platform_init) ### Description -Behavior init function for treasure chest jrb +Behavior init function for controllable platform ### Lua Example -`bhv_treasure_chest_jrb_init()` +`bhv_controllable_platform_init()` ### Parameters - None @@ -9779,19 +8789,19 @@ Behavior init function for treasure chest jrb - None ### C Prototype -`void bhv_treasure_chest_jrb_init(void);` +`void bhv_controllable_platform_init(void);` [:arrow_up_small:](#)
-## [bhv_treasure_chest_jrb_loop](#bhv_treasure_chest_jrb_loop) +## [bhv_controllable_platform_loop](#bhv_controllable_platform_loop) ### Description -Behavior loop function for treasure chest jrb +Behavior loop function for controllable platform ### Lua Example -`bhv_treasure_chest_jrb_loop()` +`bhv_controllable_platform_loop()` ### Parameters - None @@ -9800,19 +8810,19 @@ Behavior loop function for treasure chest jrb - None ### C Prototype -`void bhv_treasure_chest_jrb_loop(void);` +`void bhv_controllable_platform_loop(void);` [:arrow_up_small:](#)
-## [bhv_treasure_chest_loop](#bhv_treasure_chest_loop) +## [bhv_controllable_platform_sub_loop](#bhv_controllable_platform_sub_loop) ### Description -Behavior loop function for treasure chest +Behavior loop function for controllable sub platform ### Lua Example -`bhv_treasure_chest_loop()` +`bhv_controllable_platform_sub_loop()` ### Parameters - None @@ -9821,7 +8831,343 @@ Behavior loop function for treasure chest - None ### C Prototype -`void bhv_treasure_chest_loop(void);` +`void bhv_controllable_platform_sub_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_breakable_box_small_init](#bhv_breakable_box_small_init) + +### Description +Behavior init function for small breakable box + +### Lua Example +`bhv_breakable_box_small_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_breakable_box_small_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_breakable_box_small_loop](#bhv_breakable_box_small_loop) + +### Description +Behavior loop function for small breakable box + +### Lua Example +`bhv_breakable_box_small_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_breakable_box_small_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_sliding_snow_mound_loop](#bhv_sliding_snow_mound_loop) + +### Description +Behavior loop function for sliding snow mound + +### Lua Example +`bhv_sliding_snow_mound_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_sliding_snow_mound_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_snow_mound_spawn_loop](#bhv_snow_mound_spawn_loop) + +### Description +Behavior loop function for snow mound spawn + +### Lua Example +`bhv_snow_mound_spawn_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_snow_mound_spawn_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_floating_platform_loop](#bhv_floating_platform_loop) + +### Description +Behavior loop function for floating platform + +### Lua Example +`bhv_floating_platform_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_floating_platform_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_arrow_lift_loop](#bhv_arrow_lift_loop) + +### Description +Behavior loop function for Wet Dry World arrow lift + +### Lua Example +`bhv_arrow_lift_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_arrow_lift_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_orange_number_init](#bhv_orange_number_init) + +### Description +Behavior init function for orange number + +### Lua Example +`bhv_orange_number_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_orange_number_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_orange_number_loop](#bhv_orange_number_loop) + +### Description +Behavior loop function for orange number + +### Lua Example +`bhv_orange_number_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_orange_number_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_manta_ray_init](#bhv_manta_ray_init) + +### Description +Behavior init function for Manta Ray + +### Lua Example +`bhv_manta_ray_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_manta_ray_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_manta_ray_loop](#bhv_manta_ray_loop) + +### Description +Behavior loop function for Manta Ray + +### Lua Example +`bhv_manta_ray_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_manta_ray_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_falling_pillar_init](#bhv_falling_pillar_init) + +### Description +Behavior init function for Jolly Roger Bay falling pillar + +### Lua Example +`bhv_falling_pillar_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_falling_pillar_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_falling_pillar_loop](#bhv_falling_pillar_loop) + +### Description +Behavior loop function for Jolly Roger Bay falling pillar + +### Lua Example +`bhv_falling_pillar_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_falling_pillar_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_falling_pillar_hitbox_loop](#bhv_falling_pillar_hitbox_loop) + +### Description +Behavior loop function for Jolly Roger Bay falling pillar hitbox + +### Lua Example +`bhv_falling_pillar_hitbox_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_falling_pillar_hitbox_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_jrb_floating_box_loop](#bhv_jrb_floating_box_loop) + +### Description +Behavior loop function for Jolly Roger Bay floating box + +### Lua Example +`bhv_jrb_floating_box_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_jrb_floating_box_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_decorative_pendulum_init](#bhv_decorative_pendulum_init) + +### Description +Behavior init function for decorative pendulum + +### Lua Example +`bhv_decorative_pendulum_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_decorative_pendulum_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_decorative_pendulum_loop](#bhv_decorative_pendulum_loop) + +### Description +Behavior loop function for decorative pendulum + +### Lua Example +`bhv_decorative_pendulum_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_decorative_pendulum_loop(void);` [:arrow_up_small:](#) @@ -9869,6 +9215,132 @@ Behavior loop function for treasure chest ship
+## [bhv_treasure_chest_jrb_init](#bhv_treasure_chest_jrb_init) + +### Description +Behavior init function for treasure chest jrb + +### Lua Example +`bhv_treasure_chest_jrb_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_treasure_chest_jrb_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_treasure_chest_jrb_loop](#bhv_treasure_chest_jrb_loop) + +### Description +Behavior loop function for treasure chest jrb + +### Lua Example +`bhv_treasure_chest_jrb_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_treasure_chest_jrb_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_treasure_chest_init](#bhv_treasure_chest_init) + +### Description +Behavior init function for treasure chest + +### Lua Example +`bhv_treasure_chest_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_treasure_chest_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_treasure_chest_loop](#bhv_treasure_chest_loop) + +### Description +Behavior loop function for treasure chest + +### Lua Example +`bhv_treasure_chest_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_treasure_chest_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_treasure_chest_bottom_init](#bhv_treasure_chest_bottom_init) + +### Description +Behavior init function for treasure chest bottom + +### Lua Example +`bhv_treasure_chest_bottom_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_treasure_chest_bottom_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_treasure_chest_bottom_loop](#bhv_treasure_chest_bottom_loop) + +### Description +Behavior loop function for treasure chest bottom + +### Lua Example +`bhv_treasure_chest_bottom_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_treasure_chest_bottom_loop(void);` + +[:arrow_up_small:](#) + +
+ ## [bhv_treasure_chest_top_loop](#bhv_treasure_chest_top_loop) ### Description @@ -9890,13 +9362,13 @@ Behavior loop function for treasure chest top
-## [bhv_tree_snow_or_leaf_loop](#bhv_tree_snow_or_leaf_loop) +## [bhv_mips_init](#bhv_mips_init) ### Description -Behavior loop function for tree snow or leaf particle +Behavior init function for Mips ### Lua Example -`bhv_tree_snow_or_leaf_loop()` +`bhv_mips_init()` ### Parameters - None @@ -9905,19 +9377,19 @@ Behavior loop function for tree snow or leaf particle - None ### C Prototype -`void bhv_tree_snow_or_leaf_loop(void);` +`void bhv_mips_init(void);` [:arrow_up_small:](#)
-## [bhv_triplet_butterfly_update](#bhv_triplet_butterfly_update) +## [bhv_mips_loop](#bhv_mips_loop) ### Description -Behavior loop function for a triplet of butterflies +Behavior loop function for Mips ### Lua Example -`bhv_triplet_butterfly_update()` +`bhv_mips_loop()` ### Parameters - None @@ -9926,19 +9398,19 @@ Behavior loop function for a triplet of butterflies - None ### C Prototype -`void bhv_triplet_butterfly_update(void);` +`void bhv_mips_loop(void);` [:arrow_up_small:](#)
-## [bhv_ttc_2d_rotator_init](#bhv_ttc_2d_rotator_init) +## [bhv_yoshi_init](#bhv_yoshi_init) ### Description -Behavior init function for Tick Tock Clock 2D rotator +Behavior init function for Yoshi ### Lua Example -`bhv_ttc_2d_rotator_init()` +`bhv_yoshi_init()` ### Parameters - None @@ -9947,19 +9419,19 @@ Behavior init function for Tick Tock Clock 2D rotator - None ### C Prototype -`void bhv_ttc_2d_rotator_init(void);` +`void bhv_yoshi_init(void);` [:arrow_up_small:](#)
-## [bhv_ttc_2d_rotator_update](#bhv_ttc_2d_rotator_update) +## [bhv_koopa_init](#bhv_koopa_init) ### Description -Behavior loop function for Tick Tock Clock 2D rotator +Behavior init function for Koopa ### Lua Example -`bhv_ttc_2d_rotator_update()` +`bhv_koopa_init()` ### Parameters - None @@ -9968,19 +9440,19 @@ Behavior loop function for Tick Tock Clock 2D rotator - None ### C Prototype -`void bhv_ttc_2d_rotator_update(void);` +`void bhv_koopa_init(void);` [:arrow_up_small:](#)
-## [bhv_ttc_cog_init](#bhv_ttc_cog_init) +## [bhv_koopa_update](#bhv_koopa_update) ### Description -Behavior init function for Tick Tock Clock cog +Behavior loop function for Koopa ### Lua Example -`bhv_ttc_cog_init()` +`bhv_koopa_update()` ### Parameters - None @@ -9989,19 +9461,19 @@ Behavior init function for Tick Tock Clock cog - None ### C Prototype -`void bhv_ttc_cog_init(void);` +`void bhv_koopa_update(void);` [:arrow_up_small:](#)
-## [bhv_ttc_cog_update](#bhv_ttc_cog_update) +## [bhv_koopa_race_endpoint_update](#bhv_koopa_race_endpoint_update) ### Description -Behavior loop function for Tick Tock Clock cog +Behavior loop function for Koopa race endpoint ### Lua Example -`bhv_ttc_cog_update()` +`bhv_koopa_race_endpoint_update()` ### Parameters - None @@ -10010,19 +9482,19 @@ Behavior loop function for Tick Tock Clock cog - None ### C Prototype -`void bhv_ttc_cog_update(void);` +`void bhv_koopa_race_endpoint_update(void);` [:arrow_up_small:](#)
-## [bhv_ttc_elevator_init](#bhv_ttc_elevator_init) +## [bhv_pokey_update](#bhv_pokey_update) ### Description -Behavior init function for Tick Tock Clock elevator +Behavior loop function for Pokey ### Lua Example -`bhv_ttc_elevator_init()` +`bhv_pokey_update()` ### Parameters - None @@ -10031,19 +9503,19 @@ Behavior init function for Tick Tock Clock elevator - None ### C Prototype -`void bhv_ttc_elevator_init(void);` +`void bhv_pokey_update(void);` [:arrow_up_small:](#)
-## [bhv_ttc_elevator_update](#bhv_ttc_elevator_update) +## [bhv_pokey_body_part_update](#bhv_pokey_body_part_update) ### Description -Behavior loop function for Tick Tock Clock elevator +Behavior loop function for Pokey body part ### Lua Example -`bhv_ttc_elevator_update()` +`bhv_pokey_body_part_update()` ### Parameters - None @@ -10052,19 +9524,19 @@ Behavior loop function for Tick Tock Clock elevator - None ### C Prototype -`void bhv_ttc_elevator_update(void);` +`void bhv_pokey_body_part_update(void);` [:arrow_up_small:](#)
-## [bhv_ttc_moving_bar_init](#bhv_ttc_moving_bar_init) +## [bhv_swoop_update](#bhv_swoop_update) ### Description -Behavior init function for Tick Tock Clock moving bar +Behavior loop function for Swoop ### Lua Example -`bhv_ttc_moving_bar_init()` +`bhv_swoop_update()` ### Parameters - None @@ -10073,19 +9545,19 @@ Behavior init function for Tick Tock Clock moving bar - None ### C Prototype -`void bhv_ttc_moving_bar_init(void);` +`void bhv_swoop_update(void);` [:arrow_up_small:](#)
-## [bhv_ttc_moving_bar_update](#bhv_ttc_moving_bar_update) +## [bhv_fly_guy_update](#bhv_fly_guy_update) ### Description -Behavior loop function for Tick Tock Clock moving bar +Behavior loop function for Fly Guy ### Lua Example -`bhv_ttc_moving_bar_update()` +`bhv_fly_guy_update()` ### Parameters - None @@ -10094,19 +9566,19 @@ Behavior loop function for Tick Tock Clock moving bar - None ### C Prototype -`void bhv_ttc_moving_bar_update(void);` +`void bhv_fly_guy_update(void);` [:arrow_up_small:](#)
-## [bhv_ttc_pendulum_init](#bhv_ttc_pendulum_init) +## [bhv_goomba_init](#bhv_goomba_init) ### Description -Behavior init function for Tick Tock Clock pendulum +Behavior init function for Goomba ### Lua Example -`bhv_ttc_pendulum_init()` +`bhv_goomba_init()` ### Parameters - None @@ -10115,19 +9587,19 @@ Behavior init function for Tick Tock Clock pendulum - None ### C Prototype -`void bhv_ttc_pendulum_init(void);` +`void bhv_goomba_init(void);` [:arrow_up_small:](#)
-## [bhv_ttc_pendulum_update](#bhv_ttc_pendulum_update) +## [bhv_goomba_update](#bhv_goomba_update) ### Description -Behavior loop function for Tick Tock Clock pendulum +Behavior loop function for Goomba ### Lua Example -`bhv_ttc_pendulum_update()` +`bhv_goomba_update()` ### Parameters - None @@ -10136,19 +9608,19 @@ Behavior loop function for Tick Tock Clock pendulum - None ### C Prototype -`void bhv_ttc_pendulum_update(void);` +`void bhv_goomba_update(void);` [:arrow_up_small:](#)
-## [bhv_ttc_pit_block_init](#bhv_ttc_pit_block_init) +## [bhv_goomba_triplet_spawner_update](#bhv_goomba_triplet_spawner_update) ### Description -Behavior init function for Tick Tock Clock pit block +Behavior loop function for Goomba triplet spawner ### Lua Example -`bhv_ttc_pit_block_init()` +`bhv_goomba_triplet_spawner_update()` ### Parameters - None @@ -10157,19 +9629,19 @@ Behavior init function for Tick Tock Clock pit block - None ### C Prototype -`void bhv_ttc_pit_block_init(void);` +`void bhv_goomba_triplet_spawner_update(void);` [:arrow_up_small:](#)
-## [bhv_ttc_pit_block_update](#bhv_ttc_pit_block_update) +## [bhv_chain_chomp_update](#bhv_chain_chomp_update) ### Description -Behavior loop function for Tick Tock Clock pit block +Behavior loop function for Chain Chomp ### Lua Example -`bhv_ttc_pit_block_update()` +`bhv_chain_chomp_update()` ### Parameters - None @@ -10178,7 +9650,574 @@ Behavior loop function for Tick Tock Clock pit block - None ### C Prototype -`void bhv_ttc_pit_block_update(void);` +`void bhv_chain_chomp_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_chain_chomp_chain_part_update](#bhv_chain_chomp_chain_part_update) + +### Description +Behavior loop function for Chain Chomp chain part + +### Lua Example +`bhv_chain_chomp_chain_part_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_chain_chomp_chain_part_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_wooden_post_update](#bhv_wooden_post_update) + +### Description +Behavior loop function for ground poundable wooden post + +### Lua Example +`bhv_wooden_post_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_wooden_post_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_chain_chomp_gate_init](#bhv_chain_chomp_gate_init) + +### Description +Behavior init function for Chain Chomp gate + +### Lua Example +`bhv_chain_chomp_gate_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_chain_chomp_gate_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_chain_chomp_gate_update](#bhv_chain_chomp_gate_update) + +### Description +Behavior loop function for Chain Chomp gate + +### Lua Example +`bhv_chain_chomp_gate_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_chain_chomp_gate_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_wiggler_update](#bhv_wiggler_update) + +### Description +Behavior loop function for Wiggler + +### Lua Example +`bhv_wiggler_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_wiggler_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_wiggler_body_part_update](#bhv_wiggler_body_part_update) + +### Description +Behavior loop function for Wiggler body part + +### Lua Example +`bhv_wiggler_body_part_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_wiggler_body_part_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_enemy_lakitu_update](#bhv_enemy_lakitu_update) + +### Description +Behavior loop function for Enemy Lakitu + +### Lua Example +`bhv_enemy_lakitu_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_enemy_lakitu_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_camera_lakitu_init](#bhv_camera_lakitu_init) + +### Description +Behavior init function for Camera Lakitu + +### Lua Example +`bhv_camera_lakitu_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_camera_lakitu_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_camera_lakitu_update](#bhv_camera_lakitu_update) + +### Description +Behavior loop function for Camera Lakitu + +### Lua Example +`bhv_camera_lakitu_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_camera_lakitu_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_cloud_update](#bhv_cloud_update) + +### Description +Behavior loop function for cloud + +### Lua Example +`bhv_cloud_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_cloud_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_cloud_part_update](#bhv_cloud_part_update) + +### Description +Behavior loop function for cloud part + +### Lua Example +`bhv_cloud_part_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_cloud_part_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_spiny_update](#bhv_spiny_update) + +### Description +Behavior loop function for Spiny + +### Lua Example +`bhv_spiny_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_spiny_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_monty_mole_init](#bhv_monty_mole_init) + +### Description +Behavior init function for Monty Mole + +### Lua Example +`bhv_monty_mole_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_monty_mole_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_monty_mole_update](#bhv_monty_mole_update) + +### Description +Behavior loop function for Monty Mole + +### Lua Example +`bhv_monty_mole_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_monty_mole_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_monty_mole_hole_update](#bhv_monty_mole_hole_update) + +### Description +Behavior loop function for Monty Mole hole + +### Lua Example +`bhv_monty_mole_hole_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_monty_mole_hole_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_monty_mole_rock_update](#bhv_monty_mole_rock_update) + +### Description +Behavior loop function for Monty Mole rock + +### Lua Example +`bhv_monty_mole_rock_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_monty_mole_rock_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_platform_on_track_init](#bhv_platform_on_track_init) + +### Description +Behavior init function for platform on track + +### Lua Example +`bhv_platform_on_track_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_platform_on_track_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_platform_on_track_update](#bhv_platform_on_track_update) + +### Description +Behavior loop function for platform on track + +### Lua Example +`bhv_platform_on_track_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_platform_on_track_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_track_ball_update](#bhv_track_ball_update) + +### Description +Behavior loop function for track ball + +### Lua Example +`bhv_track_ball_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_track_ball_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_seesaw_platform_init](#bhv_seesaw_platform_init) + +### Description +Behavior init function for seesaw platform + +### Lua Example +`bhv_seesaw_platform_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_seesaw_platform_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_seesaw_platform_update](#bhv_seesaw_platform_update) + +### Description +Behavior loop function for seesaw platform + +### Lua Example +`bhv_seesaw_platform_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_seesaw_platform_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_ferris_wheel_axle_init](#bhv_ferris_wheel_axle_init) + +### Description +Behavior init function for ferris wheel axle + +### Lua Example +`bhv_ferris_wheel_axle_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_ferris_wheel_axle_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_ferris_wheel_platform_init](#bhv_ferris_wheel_platform_init) + +### Description +Behavior init function for ferris wheel platform + +### Lua Example +`bhv_ferris_wheel_platform_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_ferris_wheel_platform_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_ferris_wheel_platform_update](#bhv_ferris_wheel_platform_update) + +### Description +Behavior loop function for ferris wheel platform + +### Lua Example +`bhv_ferris_wheel_platform_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_ferris_wheel_platform_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_water_bomb_spawner_update](#bhv_water_bomb_spawner_update) + +### Description +Behavior loop function for water bomb spawner + +### Lua Example +`bhv_water_bomb_spawner_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_water_bomb_spawner_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_water_bomb_update](#bhv_water_bomb_update) + +### Description +Behavior loop function for water bomb + +### Lua Example +`bhv_water_bomb_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_water_bomb_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_water_bomb_shadow_update](#bhv_water_bomb_shadow_update) + +### Description +Behavior loop function for water bomb shadow + +### Lua Example +`bhv_water_bomb_shadow_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_water_bomb_shadow_update(void);` [:arrow_up_small:](#) @@ -10226,13 +10265,13 @@ Behavior loop function for Tick Tock Clock rotating solid
-## [bhv_ttc_spinner_update](#bhv_ttc_spinner_update) +## [bhv_ttc_pendulum_init](#bhv_ttc_pendulum_init) ### Description -Behavior loop function for Tick Tock Clock spinner +Behavior init function for Tick Tock Clock pendulum ### Lua Example -`bhv_ttc_spinner_update()` +`bhv_ttc_pendulum_init()` ### Parameters - None @@ -10241,7 +10280,28 @@ Behavior loop function for Tick Tock Clock spinner - None ### C Prototype -`void bhv_ttc_spinner_update(void);` +`void bhv_ttc_pendulum_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_ttc_pendulum_update](#bhv_ttc_pendulum_update) + +### Description +Behavior loop function for Tick Tock Clock pendulum + +### Lua Example +`bhv_ttc_pendulum_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_ttc_pendulum_update(void);` [:arrow_up_small:](#) @@ -10289,13 +10349,13 @@ Behavior loop function for Tick Tock Clock treadmill
-## [bhv_ttm_rolling_log_init](#bhv_ttm_rolling_log_init) +## [bhv_ttc_moving_bar_init](#bhv_ttc_moving_bar_init) ### Description -Behavior init function for Tall, Tall Mountain rolling log +Behavior init function for Tick Tock Clock moving bar ### Lua Example -`bhv_ttm_rolling_log_init()` +`bhv_ttc_moving_bar_init()` ### Parameters - None @@ -10304,19 +10364,19 @@ Behavior init function for Tall, Tall Mountain rolling log - None ### C Prototype -`void bhv_ttm_rolling_log_init(void);` +`void bhv_ttc_moving_bar_init(void);` [:arrow_up_small:](#)
-## [bhv_tumbling_bridge_loop](#bhv_tumbling_bridge_loop) +## [bhv_ttc_moving_bar_update](#bhv_ttc_moving_bar_update) ### Description -Behavior loop function for tumbling bridge +Behavior loop function for Tick Tock Clock moving bar ### Lua Example -`bhv_tumbling_bridge_loop()` +`bhv_ttc_moving_bar_update()` ### Parameters - None @@ -10325,19 +10385,19 @@ Behavior loop function for tumbling bridge - None ### C Prototype -`void bhv_tumbling_bridge_loop(void);` +`void bhv_ttc_moving_bar_update(void);` [:arrow_up_small:](#)
-## [bhv_tumbling_bridge_platform_loop](#bhv_tumbling_bridge_platform_loop) +## [bhv_ttc_cog_init](#bhv_ttc_cog_init) ### Description -Behavior loop function for tumbling bridge platform +Behavior init function for Tick Tock Clock cog ### Lua Example -`bhv_tumbling_bridge_platform_loop()` +`bhv_ttc_cog_init()` ### Parameters - None @@ -10346,19 +10406,19 @@ Behavior loop function for tumbling bridge platform - None ### C Prototype -`void bhv_tumbling_bridge_platform_loop(void);` +`void bhv_ttc_cog_init(void);` [:arrow_up_small:](#)
-## [bhv_tuxies_mother_loop](#bhv_tuxies_mother_loop) +## [bhv_ttc_cog_update](#bhv_ttc_cog_update) ### Description -Behavior loop function for Tuxie's mother +Behavior loop function for Tick Tock Clock cog ### Lua Example -`bhv_tuxies_mother_loop()` +`bhv_ttc_cog_update()` ### Parameters - None @@ -10367,19 +10427,19 @@ Behavior loop function for Tuxie's mother - None ### C Prototype -`void bhv_tuxies_mother_loop(void);` +`void bhv_ttc_cog_update(void);` [:arrow_up_small:](#)
-## [bhv_tweester_loop](#bhv_tweester_loop) +## [bhv_ttc_pit_block_init](#bhv_ttc_pit_block_init) ### Description -Behavior loop function for Tweester +Behavior init function for Tick Tock Clock pit block ### Lua Example -`bhv_tweester_loop()` +`bhv_ttc_pit_block_init()` ### Parameters - None @@ -10388,19 +10448,19 @@ Behavior loop function for Tweester - None ### C Prototype -`void bhv_tweester_loop(void);` +`void bhv_ttc_pit_block_init(void);` [:arrow_up_small:](#)
-## [bhv_tweester_sand_particle_loop](#bhv_tweester_sand_particle_loop) +## [bhv_ttc_pit_block_update](#bhv_ttc_pit_block_update) ### Description -Behavior loop function for Tweester sand particle +Behavior loop function for Tick Tock Clock pit block ### Lua Example -`bhv_tweester_sand_particle_loop()` +`bhv_ttc_pit_block_update()` ### Parameters - None @@ -10409,19 +10469,19 @@ Behavior loop function for Tweester sand particle - None ### C Prototype -`void bhv_tweester_sand_particle_loop(void);` +`void bhv_ttc_pit_block_update(void);` [:arrow_up_small:](#)
-## [bhv_ukiki_cage_loop](#bhv_ukiki_cage_loop) +## [bhv_ttc_elevator_init](#bhv_ttc_elevator_init) ### Description -Behavior loop function for Ukiki cage +Behavior init function for Tick Tock Clock elevator ### Lua Example -`bhv_ukiki_cage_loop()` +`bhv_ttc_elevator_init()` ### Parameters - None @@ -10430,19 +10490,19 @@ Behavior loop function for Ukiki cage - None ### C Prototype -`void bhv_ukiki_cage_loop(void);` +`void bhv_ttc_elevator_init(void);` [:arrow_up_small:](#)
-## [bhv_ukiki_cage_star_loop](#bhv_ukiki_cage_star_loop) +## [bhv_ttc_elevator_update](#bhv_ttc_elevator_update) ### Description -Behavior loop function for Ukiki cage Star +Behavior loop function for Tick Tock Clock elevator ### Lua Example -`bhv_ukiki_cage_star_loop()` +`bhv_ttc_elevator_update()` ### Parameters - None @@ -10451,19 +10511,19 @@ Behavior loop function for Ukiki cage Star - None ### C Prototype -`void bhv_ukiki_cage_star_loop(void);` +`void bhv_ttc_elevator_update(void);` [:arrow_up_small:](#)
-## [bhv_ukiki_init](#bhv_ukiki_init) +## [bhv_ttc_2d_rotator_init](#bhv_ttc_2d_rotator_init) ### Description -Behavior init function for Ukiki +Behavior init function for Tick Tock Clock 2D rotator ### Lua Example -`bhv_ukiki_init()` +`bhv_ttc_2d_rotator_init()` ### Parameters - None @@ -10472,19 +10532,19 @@ Behavior init function for Ukiki - None ### C Prototype -`void bhv_ukiki_init(void);` +`void bhv_ttc_2d_rotator_init(void);` [:arrow_up_small:](#)
-## [bhv_ukiki_loop](#bhv_ukiki_loop) +## [bhv_ttc_2d_rotator_update](#bhv_ttc_2d_rotator_update) ### Description -Behavior loop function for Ukiki +Behavior loop function for Tick Tock Clock 2D rotator ### Lua Example -`bhv_ukiki_loop()` +`bhv_ttc_2d_rotator_update()` ### Parameters - None @@ -10493,7 +10553,322 @@ Behavior loop function for Ukiki - None ### C Prototype -`void bhv_ukiki_loop(void);` +`void bhv_ttc_2d_rotator_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_ttc_spinner_update](#bhv_ttc_spinner_update) + +### Description +Behavior loop function for Tick Tock Clock spinner + +### Lua Example +`bhv_ttc_spinner_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_ttc_spinner_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_mr_blizzard_init](#bhv_mr_blizzard_init) + +### Description +Behavior init function for Mr. Blizzard + +### Lua Example +`bhv_mr_blizzard_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_mr_blizzard_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_mr_blizzard_update](#bhv_mr_blizzard_update) + +### Description +Behavior loop function for Mr. Blizzard + +### Lua Example +`bhv_mr_blizzard_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_mr_blizzard_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_mr_blizzard_snowball](#bhv_mr_blizzard_snowball) + +### Description +Behavior loop function for Mr. Blizzard's snowball + +### Lua Example +`bhv_mr_blizzard_snowball()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_mr_blizzard_snowball(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_sliding_plat_2_init](#bhv_sliding_plat_2_init) + +### Description +Behavior init function for sliding platform 2 in Rainbow Ride and Bowser courses + +### Lua Example +`bhv_sliding_plat_2_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_sliding_plat_2_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_sliding_plat_2_loop](#bhv_sliding_plat_2_loop) + +### Description +Behavior loop function for sliding platform 2 in Rainbow Ride and Bowser courses + +### Lua Example +`bhv_sliding_plat_2_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_sliding_plat_2_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_rotating_octagonal_plat_init](#bhv_rotating_octagonal_plat_init) + +### Description +Behavior init function for Rotating octagonal platform in Rainbow Ride and Bowser in the Sky + +### Lua Example +`bhv_rotating_octagonal_plat_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_rotating_octagonal_plat_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_rotating_octagonal_plat_loop](#bhv_rotating_octagonal_plat_loop) + +### Description +Behavior loop function for Rotating octagonal platform in Rainbow Ride and Bowser in the Sky + +### Lua Example +`bhv_rotating_octagonal_plat_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_rotating_octagonal_plat_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_animates_on_floor_switch_press_init](#bhv_animates_on_floor_switch_press_init) + +### Description +Behavior init function for animates on floor switch press in Rainbow Ride and Bowser courses + +### Lua Example +`bhv_animates_on_floor_switch_press_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_animates_on_floor_switch_press_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_animates_on_floor_switch_press_loop](#bhv_animates_on_floor_switch_press_loop) + +### Description +Behavior loop function for animates on floor switch press in Rainbow Ride and Bowser courses + +### Lua Example +`bhv_animates_on_floor_switch_press_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_animates_on_floor_switch_press_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_activated_back_and_forth_platform_init](#bhv_activated_back_and_forth_platform_init) + +### Description +Behavior init function for activated back and forth platform in Bowser courses + +### Lua Example +`bhv_activated_back_and_forth_platform_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_activated_back_and_forth_platform_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_activated_back_and_forth_platform_update](#bhv_activated_back_and_forth_platform_update) + +### Description +Behavior loop function for activated back and forth platform in Bowser courses + +### Lua Example +`bhv_activated_back_and_forth_platform_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_activated_back_and_forth_platform_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_recovery_heart_loop](#bhv_recovery_heart_loop) + +### Description +Behavior loop function for Recovery Heart + +### Lua Example +`bhv_recovery_heart_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_recovery_heart_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_water_bomb_cannon_loop](#bhv_water_bomb_cannon_loop) + +### Description +Behavior loop function for water bomb cannon + +### Lua Example +`bhv_water_bomb_cannon_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_water_bomb_cannon_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_bubble_cannon_barrel_loop](#bhv_bubble_cannon_barrel_loop) + +### Description +Behavior loop function for bubble cannon barrel + +### Lua Example +`bhv_bubble_cannon_barrel_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_bubble_cannon_barrel_loop(void);` [:arrow_up_small:](#) @@ -10562,13 +10937,13 @@ Behavior loop function for Unagi subobject
-## [bhv_unused_particle_spawn_loop](#bhv_unused_particle_spawn_loop) +## [bhv_dorrie_update](#bhv_dorrie_update) ### Description -Behavior loop function for unused particle spawn +Behavior loop function for Dorrie ### Lua Example -`bhv_unused_particle_spawn_loop()` +`bhv_dorrie_update()` ### Parameters - None @@ -10577,19 +10952,19 @@ Behavior loop function for unused particle spawn - None ### C Prototype -`void bhv_unused_particle_spawn_loop(void);` +`void bhv_dorrie_update(void);` [:arrow_up_small:](#)
-## [bhv_unused_poundable_platform](#bhv_unused_poundable_platform) +## [bhv_haunted_chair_init](#bhv_haunted_chair_init) ### Description -Behavior loop function for unused poundable platform +Behavior init function for Haunted Chair ### Lua Example -`bhv_unused_poundable_platform()` +`bhv_haunted_chair_init()` ### Parameters - None @@ -10598,19 +10973,19 @@ Behavior loop function for unused poundable platform - None ### C Prototype -`void bhv_unused_poundable_platform(void);` +`void bhv_haunted_chair_init(void);` [:arrow_up_small:](#)
-## [bhv_vanish_cap_init](#bhv_vanish_cap_init) +## [bhv_haunted_chair_loop](#bhv_haunted_chair_loop) ### Description -Behavior init function for Vanish Cap +Behavior loop function for Haunted Chair ### Lua Example -`bhv_vanish_cap_init()` +`bhv_haunted_chair_loop()` ### Parameters - None @@ -10619,19 +10994,19 @@ Behavior init function for Vanish Cap - None ### C Prototype -`void bhv_vanish_cap_init(void);` +`void bhv_haunted_chair_loop(void);` [:arrow_up_small:](#)
-## [bhv_volcano_flames_loop](#bhv_volcano_flames_loop) +## [bhv_mad_piano_update](#bhv_mad_piano_update) ### Description -Behavior loop function for Volcano flames +Behavior loop function for Mad Piano ### Lua Example -`bhv_volcano_flames_loop()` +`bhv_mad_piano_update()` ### Parameters - None @@ -10640,19 +11015,19 @@ Behavior loop function for Volcano flames - None ### C Prototype -`void bhv_volcano_flames_loop(void);` +`void bhv_mad_piano_update(void);` [:arrow_up_small:](#)
-## [bhv_volcano_sound_loop](#bhv_volcano_sound_loop) +## [bhv_flying_bookend_loop](#bhv_flying_bookend_loop) ### Description -Behavior loop function for volcano sound +Behavior loop function for flying bookend ### Lua Example -`bhv_volcano_sound_loop()` +`bhv_flying_bookend_loop()` ### Parameters - None @@ -10661,19 +11036,19 @@ Behavior loop function for volcano sound - None ### C Prototype -`void bhv_volcano_sound_loop(void);` +`void bhv_flying_bookend_loop(void);` [:arrow_up_small:](#)
-## [bhv_volcano_trap_loop](#bhv_volcano_trap_loop) +## [bhv_bookend_spawn_loop](#bhv_bookend_spawn_loop) ### Description -Behavior loop function for volcano trap +Behavior loop function for Bookend spawn ### Lua Example -`bhv_volcano_trap_loop()` +`bhv_bookend_spawn_loop()` ### Parameters - None @@ -10682,19 +11057,19 @@ Behavior loop function for volcano trap - None ### C Prototype -`void bhv_volcano_trap_loop(void);` +`void bhv_bookend_spawn_loop(void);` [:arrow_up_small:](#)
-## [bhv_wall_tiny_star_particle_loop](#bhv_wall_tiny_star_particle_loop) +## [bhv_haunted_bookshelf_manager_loop](#bhv_haunted_bookshelf_manager_loop) ### Description -Behavior loop function for tiny wall star particle +Behavior loop function for haunted bookshelf manager ### Lua Example -`bhv_wall_tiny_star_particle_loop()` +`bhv_haunted_bookshelf_manager_loop()` ### Parameters - None @@ -10703,19 +11078,19 @@ Behavior loop function for tiny wall star particle - None ### C Prototype -`void bhv_wall_tiny_star_particle_loop(void);` +`void bhv_haunted_bookshelf_manager_loop(void);` [:arrow_up_small:](#)
-## [bhv_warp_loop](#bhv_warp_loop) +## [bhv_book_switch_loop](#bhv_book_switch_loop) ### Description -Behavior loop function for warp +Behavior loop function for Book switch ### Lua Example -`bhv_warp_loop()` +`bhv_book_switch_loop()` ### Parameters - None @@ -10724,19 +11099,19 @@ Behavior loop function for warp - None ### C Prototype -`void bhv_warp_loop(void);` +`void bhv_book_switch_loop(void);` [:arrow_up_small:](#)
-## [bhv_water_air_bubble_init](#bhv_water_air_bubble_init) +## [bhv_fire_piranha_plant_init](#bhv_fire_piranha_plant_init) ### Description -Behavior init function for water air bubble +Behavior init function for Fire Piranha Plant ### Lua Example -`bhv_water_air_bubble_init()` +`bhv_fire_piranha_plant_init()` ### Parameters - None @@ -10745,19 +11120,19 @@ Behavior init function for water air bubble - None ### C Prototype -`void bhv_water_air_bubble_init(void);` +`void bhv_fire_piranha_plant_init(void);` [:arrow_up_small:](#)
-## [bhv_water_air_bubble_loop](#bhv_water_air_bubble_loop) +## [bhv_fire_piranha_plant_update](#bhv_fire_piranha_plant_update) ### Description -Behavior loop function for water air bubble +Behavior loop function for Fire Piranha Plant ### Lua Example -`bhv_water_air_bubble_loop()` +`bhv_fire_piranha_plant_update()` ### Parameters - None @@ -10766,19 +11141,19 @@ Behavior loop function for water air bubble - None ### C Prototype -`void bhv_water_air_bubble_loop(void);` +`void bhv_fire_piranha_plant_update(void);` [:arrow_up_small:](#)
-## [bhv_water_bomb_cannon_loop](#bhv_water_bomb_cannon_loop) +## [bhv_small_piranha_flame_loop](#bhv_small_piranha_flame_loop) ### Description -Behavior loop function for water bomb cannon +Behavior loop function for Small Piranha flame ### Lua Example -`bhv_water_bomb_cannon_loop()` +`bhv_small_piranha_flame_loop()` ### Parameters - None @@ -10787,19 +11162,19 @@ Behavior loop function for water bomb cannon - None ### C Prototype -`void bhv_water_bomb_cannon_loop(void);` +`void bhv_small_piranha_flame_loop(void);` [:arrow_up_small:](#)
-## [bhv_water_bomb_shadow_update](#bhv_water_bomb_shadow_update) +## [bhv_fire_spitter_update](#bhv_fire_spitter_update) ### Description -Behavior loop function for water bomb shadow +Behavior loop function for Fire spitter ### Lua Example -`bhv_water_bomb_shadow_update()` +`bhv_fire_spitter_update()` ### Parameters - None @@ -10808,19 +11183,19 @@ Behavior loop function for water bomb shadow - None ### C Prototype -`void bhv_water_bomb_shadow_update(void);` +`void bhv_fire_spitter_update(void);` [:arrow_up_small:](#)
-## [bhv_water_bomb_spawner_update](#bhv_water_bomb_spawner_update) +## [bhv_fly_guy_flame_loop](#bhv_fly_guy_flame_loop) ### Description -Behavior loop function for water bomb spawner +Behavior loop function for Fly Guy flame ### Lua Example -`bhv_water_bomb_spawner_update()` +`bhv_fly_guy_flame_loop()` ### Parameters - None @@ -10829,19 +11204,19 @@ Behavior loop function for water bomb spawner - None ### C Prototype -`void bhv_water_bomb_spawner_update(void);` +`void bhv_fly_guy_flame_loop(void);` [:arrow_up_small:](#)
-## [bhv_water_bomb_update](#bhv_water_bomb_update) +## [bhv_snufit_loop](#bhv_snufit_loop) ### Description -Behavior loop function for water bomb +Behavior loop function for Snufit ### Lua Example -`bhv_water_bomb_update()` +`bhv_snufit_loop()` ### Parameters - None @@ -10850,19 +11225,19 @@ Behavior loop function for water bomb - None ### C Prototype -`void bhv_water_bomb_update(void);` +`void bhv_snufit_loop(void);` [:arrow_up_small:](#)
-## [bhv_water_droplet_loop](#bhv_water_droplet_loop) +## [bhv_snufit_balls_loop](#bhv_snufit_balls_loop) ### Description -Behavior loop function for water droplet +Behavior loop function for Snufit balls ### Lua Example -`bhv_water_droplet_loop()` +`bhv_snufit_balls_loop()` ### Parameters - None @@ -10871,19 +11246,19 @@ Behavior loop function for water droplet - None ### C Prototype -`void bhv_water_droplet_loop(void);` +`void bhv_snufit_balls_loop(void);` [:arrow_up_small:](#)
-## [bhv_water_droplet_splash_init](#bhv_water_droplet_splash_init) +## [bhv_horizontal_grindel_init](#bhv_horizontal_grindel_init) ### Description -Behavior init function for water droplet splash +Behavior init function for horizontal Grindel ### Lua Example -`bhv_water_droplet_splash_init()` +`bhv_horizontal_grindel_init()` ### Parameters - None @@ -10892,19 +11267,19 @@ Behavior init function for water droplet splash - None ### C Prototype -`void bhv_water_droplet_splash_init(void);` +`void bhv_horizontal_grindel_init(void);` [:arrow_up_small:](#)
-## [bhv_water_level_diamond_loop](#bhv_water_level_diamond_loop) +## [bhv_horizontal_grindel_update](#bhv_horizontal_grindel_update) ### Description -Behavior loop function for Wet Dry World water level diamond +Behavior loop function for horizontal Grindel ### Lua Example -`bhv_water_level_diamond_loop()` +`bhv_horizontal_grindel_update()` ### Parameters - None @@ -10913,19 +11288,19 @@ Behavior loop function for Wet Dry World water level diamond - None ### C Prototype -`void bhv_water_level_diamond_loop(void);` +`void bhv_horizontal_grindel_update(void);` [:arrow_up_small:](#)
-## [bhv_water_level_pillar_init](#bhv_water_level_pillar_init) +## [bhv_eyerok_boss_init](#bhv_eyerok_boss_init) ### Description -Behavior init function for Castle Basement water level pillar +Behavior init function for Eyerok boss ### Lua Example -`bhv_water_level_pillar_init()` +`bhv_eyerok_boss_init()` ### Parameters - None @@ -10934,19 +11309,19 @@ Behavior init function for Castle Basement water level pillar - None ### C Prototype -`void bhv_water_level_pillar_init(void);` +`void bhv_eyerok_boss_init(void);` [:arrow_up_small:](#)
-## [bhv_water_level_pillar_loop](#bhv_water_level_pillar_loop) +## [bhv_eyerok_boss_loop](#bhv_eyerok_boss_loop) ### Description -Behavior loop function for Castle Basement water level pillar +Behavior loop function for Eyerok boss ### Lua Example -`bhv_water_level_pillar_loop()` +`bhv_eyerok_boss_loop()` ### Parameters - None @@ -10955,19 +11330,19 @@ Behavior loop function for Castle Basement water level pillar - None ### C Prototype -`void bhv_water_level_pillar_loop(void);` +`void bhv_eyerok_boss_loop(void);` [:arrow_up_small:](#)
-## [bhv_water_mist_2_loop](#bhv_water_mist_2_loop) +## [bhv_eyerok_hand_loop](#bhv_eyerok_hand_loop) ### Description -Behavior loop function for water mist 2 +Behavior loop function for Eyerok hand ### Lua Example -`bhv_water_mist_2_loop()` +`bhv_eyerok_hand_loop()` ### Parameters - None @@ -10976,19 +11351,19 @@ Behavior loop function for water mist 2 - None ### C Prototype -`void bhv_water_mist_2_loop(void);` +`void bhv_eyerok_hand_loop(void);` [:arrow_up_small:](#)
-## [bhv_water_mist_loop](#bhv_water_mist_loop) +## [bhv_klepto_init](#bhv_klepto_init) ### Description -Behavior loop function for water mist +Behavior init function for Klepto ### Lua Example -`bhv_water_mist_loop()` +`bhv_klepto_init()` ### Parameters - None @@ -10997,19 +11372,19 @@ Behavior loop function for water mist - None ### C Prototype -`void bhv_water_mist_loop(void);` +`void bhv_klepto_init(void);` [:arrow_up_small:](#)
-## [bhv_water_mist_spawn_loop](#bhv_water_mist_spawn_loop) +## [bhv_klepto_update](#bhv_klepto_update) ### Description -Behavior loop function for water mist spawn +Behavior loop function for Klepto ### Lua Example -`bhv_water_mist_spawn_loop()` +`bhv_klepto_update()` ### Parameters - None @@ -11018,19 +11393,19 @@ Behavior loop function for water mist spawn - None ### C Prototype -`void bhv_water_mist_spawn_loop(void);` +`void bhv_klepto_update(void);` [:arrow_up_small:](#)
-## [bhv_water_splash_spawn_droplets](#bhv_water_splash_spawn_droplets) +## [bhv_bird_update](#bhv_bird_update) ### Description -Behavior init function for spawning water splash droplets +Behavior loop function for bird ### Lua Example -`bhv_water_splash_spawn_droplets()` +`bhv_bird_update()` ### Parameters - None @@ -11039,19 +11414,19 @@ Behavior init function for spawning water splash droplets - None ### C Prototype -`void bhv_water_splash_spawn_droplets(void);` +`void bhv_bird_update(void);` [:arrow_up_small:](#)
-## [bhv_water_waves_init](#bhv_water_waves_init) +## [bhv_racing_penguin_init](#bhv_racing_penguin_init) ### Description -Behavior init function for water waves +Behavior init function for Racing Penguin ### Lua Example -`bhv_water_waves_init()` +`bhv_racing_penguin_init()` ### Parameters - None @@ -11060,19 +11435,19 @@ Behavior init function for water waves - None ### C Prototype -`void bhv_water_waves_init(void);` +`void bhv_racing_penguin_init(void);` [:arrow_up_small:](#)
-## [bhv_waterfall_sound_loop](#bhv_waterfall_sound_loop) +## [bhv_racing_penguin_update](#bhv_racing_penguin_update) ### Description -Behavior loop function for waterfall sound +Behavior loop function for Racing Penguin ### Lua Example -`bhv_waterfall_sound_loop()` +`bhv_racing_penguin_update()` ### Parameters - None @@ -11081,19 +11456,19 @@ Behavior loop function for waterfall sound - None ### C Prototype -`void bhv_waterfall_sound_loop(void);` +`void bhv_racing_penguin_update(void);` [:arrow_up_small:](#)
-## [bhv_wave_trail_shrink](#bhv_wave_trail_shrink) +## [bhv_penguin_race_finish_line_update](#bhv_penguin_race_finish_line_update) ### Description -Behavior loop function for shrinking water trail +Behavior loop function for Penguin race finish line ### Lua Example -`bhv_wave_trail_shrink()` +`bhv_penguin_race_finish_line_update()` ### Parameters - None @@ -11102,19 +11477,19 @@ Behavior loop function for shrinking water trail - None ### C Prototype -`void bhv_wave_trail_shrink(void);` +`void bhv_penguin_race_finish_line_update(void);` [:arrow_up_small:](#)
-## [bhv_wdw_express_elevator_loop](#bhv_wdw_express_elevator_loop) +## [bhv_penguin_race_shortcut_check_update](#bhv_penguin_race_shortcut_check_update) ### Description -Behavior loop function for Wet Dry World express elevator +Behavior loop function for Penguin race shortcut check ### Lua Example -`bhv_wdw_express_elevator_loop()` +`bhv_penguin_race_shortcut_check_update()` ### Parameters - None @@ -11123,19 +11498,19 @@ Behavior loop function for Wet Dry World express elevator - None ### C Prototype -`void bhv_wdw_express_elevator_loop(void);` +`void bhv_penguin_race_shortcut_check_update(void);` [:arrow_up_small:](#)
-## [bhv_wf_breakable_wall_loop](#bhv_wf_breakable_wall_loop) +## [bhv_coffin_spawner_loop](#bhv_coffin_spawner_loop) ### Description -Behavior loop function for Whomp's Fortress breakable wall +Behavior loop function for coffin spawner ### Lua Example -`bhv_wf_breakable_wall_loop()` +`bhv_coffin_spawner_loop()` ### Parameters - None @@ -11144,19 +11519,19 @@ Behavior loop function for Whomp's Fortress breakable wall - None ### C Prototype -`void bhv_wf_breakable_wall_loop(void);` +`void bhv_coffin_spawner_loop(void);` [:arrow_up_small:](#)
-## [bhv_wf_elevator_tower_platform_loop](#bhv_wf_elevator_tower_platform_loop) +## [bhv_coffin_loop](#bhv_coffin_loop) ### Description -Behavior loop function for Whomp's Fortress elevator tower platform +Behavior loop function for coffin ### Lua Example -`bhv_wf_elevator_tower_platform_loop()` +`bhv_coffin_loop()` ### Parameters - None @@ -11165,19 +11540,19 @@ Behavior loop function for Whomp's Fortress elevator tower platform - None ### C Prototype -`void bhv_wf_elevator_tower_platform_loop(void);` +`void bhv_coffin_loop(void);` [:arrow_up_small:](#)
-## [bhv_wf_rotating_wooden_platform_init](#bhv_wf_rotating_wooden_platform_init) +## [bhv_clam_loop](#bhv_clam_loop) ### Description -Behavior init function for Whomp's Fortress rotating wooden platform +Behavior loop function for Clam ### Lua Example -`bhv_wf_rotating_wooden_platform_init()` +`bhv_clam_loop()` ### Parameters - None @@ -11186,19 +11561,19 @@ Behavior init function for Whomp's Fortress rotating wooden platform - None ### C Prototype -`void bhv_wf_rotating_wooden_platform_init(void);` +`void bhv_clam_loop(void);` [:arrow_up_small:](#)
-## [bhv_wf_rotating_wooden_platform_loop](#bhv_wf_rotating_wooden_platform_loop) +## [bhv_skeeter_update](#bhv_skeeter_update) ### Description -Behavior loop function for Whomp's Fortress rotating wooden platform +Behavior loop function for Skeeter ### Lua Example -`bhv_wf_rotating_wooden_platform_loop()` +`bhv_skeeter_update()` ### Parameters - None @@ -11207,19 +11582,19 @@ Behavior loop function for Whomp's Fortress rotating wooden platform - None ### C Prototype -`void bhv_wf_rotating_wooden_platform_loop(void);` +`void bhv_skeeter_update(void);` [:arrow_up_small:](#)
-## [bhv_wf_sliding_platform_init](#bhv_wf_sliding_platform_init) +## [bhv_skeeter_wave_update](#bhv_skeeter_wave_update) ### Description -Behavior init function for Whomp's Fortress sliding platform +Behavior loop function for Skeeter wave ### Lua Example -`bhv_wf_sliding_platform_init()` +`bhv_skeeter_wave_update()` ### Parameters - None @@ -11228,19 +11603,19 @@ Behavior init function for Whomp's Fortress sliding platform - None ### C Prototype -`void bhv_wf_sliding_platform_init(void);` +`void bhv_skeeter_wave_update(void);` [:arrow_up_small:](#)
-## [bhv_wf_sliding_platform_loop](#bhv_wf_sliding_platform_loop) +## [bhv_swing_platform_init](#bhv_swing_platform_init) ### Description -Behavior loop function for Whomp's Fortress sliding platform +Behavior init function for swing platform ### Lua Example -`bhv_wf_sliding_platform_loop()` +`bhv_swing_platform_init()` ### Parameters - None @@ -11249,19 +11624,19 @@ Behavior loop function for Whomp's Fortress sliding platform - None ### C Prototype -`void bhv_wf_sliding_platform_loop(void);` +`void bhv_swing_platform_init(void);` [:arrow_up_small:](#)
-## [bhv_wf_sliding_tower_platform_loop](#bhv_wf_sliding_tower_platform_loop) +## [bhv_swing_platform_update](#bhv_swing_platform_update) ### Description -Behavior loop function for Whomp's Fortress sliding tower platform +Behavior loop function for swing platform ### Lua Example -`bhv_wf_sliding_tower_platform_loop()` +`bhv_swing_platform_update()` ### Parameters - None @@ -11270,19 +11645,19 @@ Behavior loop function for Whomp's Fortress sliding tower platform - None ### C Prototype -`void bhv_wf_sliding_tower_platform_loop(void);` +`void bhv_swing_platform_update(void);` [:arrow_up_small:](#)
-## [bhv_wf_solid_tower_platform_loop](#bhv_wf_solid_tower_platform_loop) +## [bhv_donut_platform_spawner_update](#bhv_donut_platform_spawner_update) ### Description -Behavior loop function for Whomp's Fortress solid tower platform +Behavior loop function for donut platform spawner ### Lua Example -`bhv_wf_solid_tower_platform_loop()` +`bhv_donut_platform_spawner_update()` ### Parameters - None @@ -11291,19 +11666,19 @@ Behavior loop function for Whomp's Fortress solid tower platform - None ### C Prototype -`void bhv_wf_solid_tower_platform_loop(void);` +`void bhv_donut_platform_spawner_update(void);` [:arrow_up_small:](#)
-## [bhv_whirlpool_init](#bhv_whirlpool_init) +## [bhv_donut_platform_update](#bhv_donut_platform_update) ### Description -Behavior init function for whirlpool +Behavior loop function for donut platform ### Lua Example -`bhv_whirlpool_init()` +`bhv_donut_platform_update()` ### Parameters - None @@ -11312,19 +11687,19 @@ Behavior init function for whirlpool - None ### C Prototype -`void bhv_whirlpool_init(void);` +`void bhv_donut_platform_update(void);` [:arrow_up_small:](#)
-## [bhv_whirlpool_loop](#bhv_whirlpool_loop) +## [bhv_ddd_pole_init](#bhv_ddd_pole_init) ### Description -Behavior loop function for whirlpool +Behavior init function for Dire Dire Docks pole ### Lua Example -`bhv_whirlpool_loop()` +`bhv_ddd_pole_init()` ### Parameters - None @@ -11333,19 +11708,19 @@ Behavior loop function for whirlpool - None ### C Prototype -`void bhv_whirlpool_loop(void);` +`void bhv_ddd_pole_init(void);` [:arrow_up_small:](#)
-## [bhv_white_puff_1_loop](#bhv_white_puff_1_loop) +## [bhv_ddd_pole_update](#bhv_ddd_pole_update) ### Description -Behavior loop function for white puff 1 +Behavior loop function for Dire Dire Docks pole ### Lua Example -`bhv_white_puff_1_loop()` +`bhv_ddd_pole_update()` ### Parameters - None @@ -11354,19 +11729,19 @@ Behavior loop function for white puff 1 - None ### C Prototype -`void bhv_white_puff_1_loop(void);` +`void bhv_ddd_pole_update(void);` [:arrow_up_small:](#)
-## [bhv_white_puff_2_loop](#bhv_white_puff_2_loop) +## [bhv_red_coin_star_marker_init](#bhv_red_coin_star_marker_init) ### Description -Behavior loop function for white puff 2 +Behavior init function for Red Coin Star marker ### Lua Example -`bhv_white_puff_2_loop()` +`bhv_red_coin_star_marker_init()` ### Parameters - None @@ -11375,19 +11750,19 @@ Behavior loop function for white puff 2 - None ### C Prototype -`void bhv_white_puff_2_loop(void);` +`void bhv_red_coin_star_marker_init(void);` [:arrow_up_small:](#)
-## [bhv_white_puff_exploding_loop](#bhv_white_puff_exploding_loop) +## [bhv_triplet_butterfly_update](#bhv_triplet_butterfly_update) ### Description -Behavior loop function for white puff exploding +Behavior loop function for a triplet of butterflies ### Lua Example -`bhv_white_puff_exploding_loop()` +`bhv_triplet_butterfly_update()` ### Parameters - None @@ -11396,19 +11771,19 @@ Behavior loop function for white puff exploding - None ### C Prototype -`void bhv_white_puff_exploding_loop(void);` +`void bhv_triplet_butterfly_update(void);` [:arrow_up_small:](#)
-## [bhv_white_puff_smoke_init](#bhv_white_puff_smoke_init) +## [bhv_bubba_loop](#bhv_bubba_loop) ### Description -Behavior init function for White puff smoke +Behavior loop function for Bubba ### Lua Example -`bhv_white_puff_smoke_init()` +`bhv_bubba_loop()` ### Parameters - None @@ -11417,19 +11792,19 @@ Behavior init function for White puff smoke - None ### C Prototype -`void bhv_white_puff_smoke_init(void);` +`void bhv_bubba_loop(void);` [:arrow_up_small:](#)
-## [bhv_whomp_loop](#bhv_whomp_loop) +## [bhv_intro_lakitu_loop](#bhv_intro_lakitu_loop) ### Description -Behavior loop function for Whomp +Behavior loop function for intro Lakitu ### Lua Example -`bhv_whomp_loop()` +`bhv_intro_lakitu_loop()` ### Parameters - None @@ -11438,19 +11813,19 @@ Behavior loop function for Whomp - None ### C Prototype -`void bhv_whomp_loop(void);` +`void bhv_intro_lakitu_loop(void);` [:arrow_up_small:](#)
-## [bhv_wiggler_body_part_update](#bhv_wiggler_body_part_update) +## [bhv_intro_peach_loop](#bhv_intro_peach_loop) ### Description -Behavior loop function for Wiggler body part +Behavior loop function for intro Peach ### Lua Example -`bhv_wiggler_body_part_update()` +`bhv_intro_peach_loop()` ### Parameters - None @@ -11459,19 +11834,19 @@ Behavior loop function for Wiggler body part - None ### C Prototype -`void bhv_wiggler_body_part_update(void);` +`void bhv_intro_peach_loop(void);` [:arrow_up_small:](#)
-## [bhv_wiggler_update](#bhv_wiggler_update) +## [bhv_end_birds_1_loop](#bhv_end_birds_1_loop) ### Description -Behavior loop function for Wiggler +Behavior loop function for first end birds ### Lua Example -`bhv_wiggler_update()` +`bhv_end_birds_1_loop()` ### Parameters - None @@ -11480,19 +11855,19 @@ Behavior loop function for Wiggler - None ### C Prototype -`void bhv_wiggler_update(void);` +`void bhv_end_birds_1_loop(void);` [:arrow_up_small:](#)
-## [bhv_wind_loop](#bhv_wind_loop) +## [bhv_end_birds_2_loop](#bhv_end_birds_2_loop) ### Description -Behavior loop function for wind +Behavior loop function for second end birds ### Lua Example -`bhv_wind_loop()` +`bhv_end_birds_2_loop()` ### Parameters - None @@ -11501,19 +11876,19 @@ Behavior loop function for wind - None ### C Prototype -`void bhv_wind_loop(void);` +`void bhv_end_birds_2_loop(void);` [:arrow_up_small:](#)
-## [bhv_wing_cap_init](#bhv_wing_cap_init) +## [bhv_intro_scene_loop](#bhv_intro_scene_loop) ### Description -Behavior init function for Wing Cap +Behavior loop function for intro scene ### Lua Example -`bhv_wing_cap_init()` +`bhv_intro_scene_loop()` ### Parameters - None @@ -11522,112 +11897,7 @@ Behavior init function for Wing Cap - None ### C Prototype -`void bhv_wing_cap_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_wing_vanish_cap_loop](#bhv_wing_vanish_cap_loop) - -### Description -Behavior loop function for Wing and Vanish caps - -### Lua Example -`bhv_wing_vanish_cap_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_wing_vanish_cap_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_wooden_post_update](#bhv_wooden_post_update) - -### Description -Behavior loop function for ground poundable wooden post - -### Lua Example -`bhv_wooden_post_update()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_wooden_post_update(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_yellow_coin_init](#bhv_yellow_coin_init) - -### Description -Behavior init function for Yellow Coin - -### Lua Example -`bhv_yellow_coin_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_yellow_coin_init(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_yellow_coin_loop](#bhv_yellow_coin_loop) - -### Description -Behavior loop function for Yellow Coin - -### Lua Example -`bhv_yellow_coin_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_yellow_coin_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_yoshi_init](#bhv_yoshi_init) - -### Description -Behavior init function for Yoshi - -### Lua Example -`bhv_yoshi_init()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_yoshi_init(void);` +`void bhv_intro_scene_loop(void);` [:arrow_up_small:](#) @@ -11654,133 +11924,34 @@ Behavior loop function for Yoshi
-## [check_if_moving_over_floor](#check_if_moving_over_floor) +## [bhv_volcano_trap_loop](#bhv_volcano_trap_loop) ### Description -Checks if the current object is moving `a1` units over a floor and within a threshold of `a0` +Behavior loop function for volcano trap ### Lua Example -`local integerValue = check_if_moving_over_floor(a0, a1)` +`bhv_volcano_trap_loop()` ### Parameters -| Field | Type | -| ----- | ---- | -| a0 | `number` | -| a1 | `number` | +- None ### Returns -- `integer` +- None ### C Prototype -`s32 check_if_moving_over_floor(f32 a0, f32 a1);` +`void bhv_volcano_trap_loop(void);` [:arrow_up_small:](#)
-## [clear_particle_flags](#clear_particle_flags) +## [uv_update_scroll](#uv_update_scroll) ### Description -Clears the particle flags of the current object +Behavior loop function for UV texture scrolling ### Lua Example -`clear_particle_flags(flags)` - -### Parameters -| Field | Type | -| ----- | ---- | -| flags | `integer` | - -### Returns -- None - -### C Prototype -`void clear_particle_flags(u32 flags);` - -[:arrow_up_small:](#) - -
- -## [common_anchor_mario_behavior](#common_anchor_mario_behavior) - -### Description -Common behavior for when Mario's anchoring when grabbed - -### Lua Example -`common_anchor_mario_behavior(sp28, sp2C, sp30)` - -### Parameters -| Field | Type | -| ----- | ---- | -| sp28 | `number` | -| sp2C | `number` | -| sp30 | `integer` | - -### Returns -- None - -### C Prototype -`void common_anchor_mario_behavior(f32 sp28, f32 sp2C, s32 sp30);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_spawn_strong_wind_particles](#cur_obj_spawn_strong_wind_particles) - -### Description -Spawns strong wind particles relative to the current object - -### Lua Example -`cur_obj_spawn_strong_wind_particles(windSpread, scale, relPosX, relPosY, relPosZ)` - -### Parameters -| Field | Type | -| ----- | ---- | -| windSpread | `integer` | -| scale | `number` | -| relPosX | `number` | -| relPosY | `number` | -| relPosZ | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_spawn_strong_wind_particles(s32 windSpread, f32 scale, f32 relPosX, f32 relPosY, f32 relPosZ);` - -[:arrow_up_small:](#) - -
- -## [mario_moving_fast_enough_to_make_piranha_plant_bite](#mario_moving_fast_enough_to_make_piranha_plant_bite) - -### Description -Checks if Mario is moving fast enough to make Piranha Plant bite. This one is a mouthful - -### Lua Example -`local integerValue = mario_moving_fast_enough_to_make_piranha_plant_bite()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 mario_moving_fast_enough_to_make_piranha_plant_bite(void);` - -[:arrow_up_small:](#) - -
- -## [obj_set_secondary_camera_focus](#obj_set_secondary_camera_focus) - -### Description -Sets the secondary camera focus - -### Lua Example -`obj_set_secondary_camera_focus()` +`uv_update_scroll()` ### Parameters - None @@ -11789,30 +11960,7 @@ Sets the secondary camera focus - None ### C Prototype -`void obj_set_secondary_camera_focus(void);` - -[:arrow_up_small:](#) - -
- -## [play_penguin_walking_sound](#play_penguin_walking_sound) - -### Description -Plays the penguin walking sound - -### Lua Example -`play_penguin_walking_sound(walk)` - -### Parameters -| Field | Type | -| ----- | ---- | -| walk | `integer` | - -### Returns -- None - -### C Prototype -`void play_penguin_walking_sound(s32 walk);` +`void uv_update_scroll(void);` [:arrow_up_small:](#) @@ -11846,102 +11994,6 @@ Spawns a lighting engine point light
-## [spawn_default_star](#spawn_default_star) - -### Description -Spawns a Star with an ID corresponding to the current object's first behavior parameter byte - -### Lua Example -`local ObjectValue = spawn_default_star(x, y, z)` - -### Parameters -| Field | Type | -| ----- | ---- | -| x | `number` | -| y | `number` | -| z | `number` | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object* spawn_default_star(f32 x, f32 y, f32 z);` - -[:arrow_up_small:](#) - -
- -## [spawn_mist_from_global](#spawn_mist_from_global) - -### Description -Spawns mist particles around the current object - -### Lua Example -`spawn_mist_from_global()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void spawn_mist_from_global(void);` - -[:arrow_up_small:](#) - -
- -## [spawn_mist_particles_variable](#spawn_mist_particles_variable) - -### Description -Spawns mist particles around the current object - -### Lua Example -`spawn_mist_particles_variable(count, offsetY, size)` - -### Parameters -| Field | Type | -| ----- | ---- | -| count | `integer` | -| offsetY | `integer` | -| size | `number` | - -### Returns -- None - -### C Prototype -`void spawn_mist_particles_variable(s32 count, s32 offsetY, f32 size);` - -[:arrow_up_small:](#) - -
- -## [spawn_no_exit_star](#spawn_no_exit_star) - -### Description -Spawns a Star that won't make Mario exit the level with an ID corresponding to the current object's first behavior parameter byte - -### Lua Example -`local ObjectValue = spawn_no_exit_star(x, y, z)` - -### Parameters -| Field | Type | -| ----- | ---- | -| x | `number` | -| y | `number` | -| z | `number` | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object* spawn_no_exit_star(f32 x, f32 y, f32 z);` - -[:arrow_up_small:](#) - -
- ## [spawn_point_light](#spawn_point_light) ### Description @@ -11971,6 +12023,94 @@ Spawns a lighting engine ambient light
+## [bhv_ambient_light_update](#bhv_ambient_light_update) + +### Description +Behavior loop function for the lighting engine ambient light. Takes the first 3 behavior parameter bytes for RGB color + +### Lua Example +`bhv_ambient_light_update()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_ambient_light_update(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_point_light_init](#bhv_point_light_init) + +### Description +Behavior init function for the lighting engine point light. Takes the first 3 behavior parameter bytes for RGB color and the last for radius + +### Lua Example +`bhv_point_light_init()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_point_light_init(void);` + +[:arrow_up_small:](#) + +
+ +## [bhv_point_light_loop](#bhv_point_light_loop) + +### Description +Behavior loop function for the lighting engine point light + +### Lua Example +`bhv_point_light_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_point_light_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [spawn_default_star](#spawn_default_star) + +### Description +Spawns a Star with an ID corresponding to the current object's first behavior parameter byte + +### Lua Example +`local ObjectValue = spawn_default_star(x, y, z)` + +### Parameters +| Field | Type | +| ----- | ---- | +| x | `number` | +| y | `number` | +| z | `number` | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object* spawn_default_star(f32 x, f32 y, f32 z);` + +[:arrow_up_small:](#) + +
+ ## [spawn_red_coin_cutscene_star](#spawn_red_coin_cutscene_star) ### Description @@ -11996,166 +12136,26 @@ Spawns a Red Coin cutscene star with an ID corresponding to the current object's
-## [spawn_star_number](#spawn_star_number) +## [spawn_no_exit_star](#spawn_no_exit_star) ### Description -Spawns a star number +Spawns a Star that won't make Mario exit the level with an ID corresponding to the current object's first behavior parameter byte ### Lua Example -`spawn_star_number()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void spawn_star_number(void);` - -[:arrow_up_small:](#) - -
- -## [spawn_triangle_break_particles](#spawn_triangle_break_particles) - -### Description -Spawns triangle break particles around the current object - -### Lua Example -`spawn_triangle_break_particles(numTris, triModel, triSize, triAnimState)` +`local ObjectValue = spawn_no_exit_star(x, y, z)` ### Parameters | Field | Type | | ----- | ---- | -| numTris | `integer` | -| triModel | `integer` | -| triSize | `number` | -| triAnimState | `integer` | +| x | `number` | +| y | `number` | +| z | `number` | ### Returns -- None +[Object](structs.md#Object) ### C Prototype -`void spawn_triangle_break_particles(s16 numTris, s16 triModel, f32 triSize, s16 triAnimState);` - -[:arrow_up_small:](#) - -
- -## [spawn_wind_particles](#spawn_wind_particles) - -### Description -Spawns wind particles around the current object - -### Lua Example -`spawn_wind_particles(pitch, yaw)` - -### Parameters -| Field | Type | -| ----- | ---- | -| pitch | `integer` | -| yaw | `integer` | - -### Returns -- None - -### C Prototype -`void spawn_wind_particles(s16 pitch, s16 yaw);` - -[:arrow_up_small:](#) - -
- -## [tox_box_move](#tox_box_move) - -### Description -Moves Tox Box - -### Lua Example -`tox_box_move(forwardVel, a1, deltaPitch, deltaRoll)` - -### Parameters -| Field | Type | -| ----- | ---- | -| forwardVel | `number` | -| a1 | `number` | -| deltaPitch | `integer` | -| deltaRoll | `integer` | - -### Returns -- None - -### C Prototype -`void tox_box_move(f32 forwardVel, f32 a1, s16 deltaPitch, s16 deltaRoll);` - -[:arrow_up_small:](#) - -
- -## [update_angle_from_move_flags](#update_angle_from_move_flags) - -### Description -Updates the current object's angle from its move flags - -### Lua Example -`local integerValue = update_angle_from_move_flags(angle)` - -### Parameters -| Field | Type | -| ----- | ---- | -| angle | `Pointer` <`integer`> | - -### Returns -- `integer` - -### C Prototype -`s32 update_angle_from_move_flags(s32 *angle);` - -[:arrow_up_small:](#) - -
- -## [uv_update_scroll](#uv_update_scroll) - -### Description -Behavior loop function for UV texture scrolling - -### Lua Example -`uv_update_scroll()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void uv_update_scroll(void);` - -[:arrow_up_small:](#) - -
- -## [vec3f_copy_2](#vec3f_copy_2) - -### Description -Duplicate of vec3f_copy except without bad return - -### Lua Example -`vec3f_copy_2(dest, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3f](structs.md#Vec3f) | -| src | [Vec3f](structs.md#Vec3f) | - -### Returns -- None - -### C Prototype -`void vec3f_copy_2(Vec3f dest, Vec3f src);` +`struct Object* spawn_no_exit_star(f32 x, f32 y, f32 z);` [:arrow_up_small:](#) diff --git a/docs/lua/functions-3.md b/docs/lua/functions-3.md index 05ed93131..998ab69c5 100644 --- a/docs/lua/functions-3.md +++ b/docs/lua/functions-3.md @@ -11,78 +11,13 @@
-## [draw_distance_scalar](#draw_distance_scalar) +## [random_u16](#random_u16) ### Description -Gets the draw distance scalar +Generates a pseudo random integer between 0 and 65535 ### Lua Example -`local numberValue = draw_distance_scalar()` - -### Parameters -- None - -### Returns -- `number` - -### C Prototype -`f32 draw_distance_scalar(void);` - -[:arrow_up_small:](#) - -
- -## [obj_update_gfx_pos_and_angle](#obj_update_gfx_pos_and_angle) - -### Description -Updates an object's graphical position and angle - -### Lua Example -`obj_update_gfx_pos_and_angle(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_update_gfx_pos_and_angle(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [position_based_random_float_position](#position_based_random_float_position) - -### Description -Sets the current object's position to random floats between 0.0 and 1.0 - -### Lua Example -`local numberValue = position_based_random_float_position()` - -### Parameters -- None - -### Returns -- `number` - -### C Prototype -`f32 position_based_random_float_position(void);` - -[:arrow_up_small:](#) - -
- -## [position_based_random_u16](#position_based_random_u16) - -### Description -Sets the current object's position to random integers between 0 and 65536 - -### Lua Example -`local integerValue = position_based_random_u16()` +`local integerValue = random_u16()` ### Parameters - None @@ -91,7 +26,7 @@ Sets the current object's position to random integers between 0 and 65536 - `integer` ### C Prototype -`u16 position_based_random_u16(void);` +`u16 random_u16(void);` [:arrow_up_small:](#) @@ -139,13 +74,36 @@ Returns either 1 or -1 with a pseudo 50:50 chance
-## [random_u16](#random_u16) +## [obj_update_gfx_pos_and_angle](#obj_update_gfx_pos_and_angle) ### Description -Generates a pseudo random integer between 0 and 65535 +Updates an object's graphical position and angle ### Lua Example -`local integerValue = random_u16()` +`obj_update_gfx_pos_and_angle(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_update_gfx_pos_and_angle(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [position_based_random_u16](#position_based_random_u16) + +### Description +Sets the current object's position to random integers between 0 and 65536 + +### Lua Example +`local integerValue = position_based_random_u16()` ### Parameters - None @@ -154,7 +112,49 @@ Generates a pseudo random integer between 0 and 65535 - `integer` ### C Prototype -`u16 random_u16(void);` +`u16 position_based_random_u16(void);` + +[:arrow_up_small:](#) + +
+ +## [position_based_random_float_position](#position_based_random_float_position) + +### Description +Sets the current object's position to random floats between 0.0 and 1.0 + +### Lua Example +`local numberValue = position_based_random_float_position()` + +### Parameters +- None + +### Returns +- `number` + +### C Prototype +`f32 position_based_random_float_position(void);` + +[:arrow_up_small:](#) + +
+ +## [draw_distance_scalar](#draw_distance_scalar) + +### Description +Gets the draw distance scalar + +### Lua Example +`local numberValue = draw_distance_scalar()` + +### Parameters +- None + +### Returns +- `number` + +### C Prototype +`f32 draw_distance_scalar(void);` [:arrow_up_small:](#) @@ -166,6 +166,52 @@ Generates a pseudo random integer between 0 and 65535
+## [get_id_from_behavior](#get_id_from_behavior) + +### Description +Gets a behavior ID from a behavior script + +### Lua Example +`local enumValue = get_id_from_behavior(behavior)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behavior | `Pointer` <`BehaviorScript`> | + +### Returns +[enum BehaviorId](constants.md#enum-BehaviorId) + +### C Prototype +`enum BehaviorId get_id_from_behavior(const BehaviorScript* behavior);` + +[:arrow_up_small:](#) + +
+ +## [get_id_from_vanilla_behavior](#get_id_from_vanilla_behavior) + +### Description +Gets a behavior ID from only vanilla behavior scripts + +### Lua Example +`local enumValue = get_id_from_vanilla_behavior(behavior)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behavior | `Pointer` <`BehaviorScript`> | + +### Returns +[enum BehaviorId](constants.md#enum-BehaviorId) + +### C Prototype +`enum BehaviorId get_id_from_vanilla_behavior(const BehaviorScript* behavior);` + +[:arrow_up_small:](#) + +
+ ## [get_behavior_from_id](#get_behavior_from_id) ### Description @@ -212,29 +258,6 @@ Gets a behavior name from a behavior ID (bhvMyGreatMODCustom004)
-## [get_id_from_behavior](#get_id_from_behavior) - -### Description -Gets a behavior ID from a behavior script - -### Lua Example -`local enumValue = get_id_from_behavior(behavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | - -### Returns -[enum BehaviorId](constants.md#enum-BehaviorId) - -### C Prototype -`enum BehaviorId get_id_from_behavior(const BehaviorScript* behavior);` - -[:arrow_up_small:](#) - -
- ## [get_id_from_behavior_name](#get_id_from_behavior_name) ### Description @@ -258,80 +281,530 @@ gets a behavior ID from a behavior name
-## [get_id_from_vanilla_behavior](#get_id_from_vanilla_behavior) - -### Description -Gets a behavior ID from only vanilla behavior scripts - -### Lua Example -`local enumValue = get_id_from_vanilla_behavior(behavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | - -### Returns -[enum BehaviorId](constants.md#enum-BehaviorId) - -### C Prototype -`enum BehaviorId get_id_from_vanilla_behavior(const BehaviorScript* behavior);` - -[:arrow_up_small:](#) - -
- --- # functions from camera.h
-## [approach_camera_height](#approach_camera_height) +## [skip_camera_interpolation](#skip_camera_interpolation) ### Description -Adjusts the camera's height toward a target value (`goalHeight`) while respecting terrain and obstructions. This is really wonky and probably shouldn't be used, prefer `gLakituStates` +Skips camera interpolation for a frame, locking the camera instantly to the target position. Useful for immediate changes in camera state or position without smooth transitions ### Lua Example -`approach_camera_height(c, goal, inc)` +`skip_camera_interpolation()` ### Parameters -| Field | Type | -| ----- | ---- | -| c | [Camera](structs.md#Camera) | -| goal | `number` | -| inc | `number` | +- None ### Returns - None ### C Prototype -`void approach_camera_height(struct Camera *c, f32 goal, f32 inc);` +`void skip_camera_interpolation(void);` [:arrow_up_small:](#)
-## [approach_f32_asymptotic](#approach_f32_asymptotic) +## [set_camera_shake_from_hit](#set_camera_shake_from_hit) ### Description -Gradually approaches a floating-point value (`target`) using asymptotic smoothing. The rate of approach is controlled by the `multiplier`. Useful for smoothly adjusting camera parameters like field-of-view or position +Applies a shake effect to the camera based on a hit type. Different shake types simulate various impacts, such as attacks, falls, or shocks ### Lua Example -`local numberValue = approach_f32_asymptotic(current, target, multiplier)` +`set_camera_shake_from_hit(shake)` ### Parameters | Field | Type | | ----- | ---- | -| current | `number` | -| target | `number` | -| multiplier | `number` | +| shake | `integer` | ### Returns -- `number` +- None ### C Prototype -`f32 approach_f32_asymptotic(f32 current, f32 target, f32 multiplier);` +`void set_camera_shake_from_hit(s16 shake);` + +[:arrow_up_small:](#) + +
+ +## [set_environmental_camera_shake](#set_environmental_camera_shake) + +### Description +Applies an environmental shake effect to the camera. Handles predefined shake types triggered by environmental events like explosions or platform movements + +### Lua Example +`set_environmental_camera_shake(shake)` + +### Parameters +| Field | Type | +| ----- | ---- | +| shake | `integer` | + +### Returns +- None + +### C Prototype +`void set_environmental_camera_shake(s16 shake);` + +[:arrow_up_small:](#) + +
+ +## [set_camera_shake_from_point](#set_camera_shake_from_point) + +### Description +Applies a shake effect to the camera, scaled by its proximity to a specified point. The intensity decreases with distance from the point + +### Lua Example +`set_camera_shake_from_point(shake, posX, posY, posZ)` + +### Parameters +| Field | Type | +| ----- | ---- | +| shake | `integer` | +| posX | `number` | +| posY | `number` | +| posZ | `number` | + +### Returns +- None + +### C Prototype +`void set_camera_shake_from_point(s16 shake, f32 posX, f32 posY, f32 posZ);` + +[:arrow_up_small:](#) + +
+ +## [move_mario_head_c_up](#move_mario_head_c_up) + +### Description +Moves Mario's head slightly upward when the C-Up button is pressed. This function aligns the camera to match the head movement for consistency + +### Lua Example +`move_mario_head_c_up(c)` + +### Parameters +| Field | Type | +| ----- | ---- | +| c | [Camera](structs.md#Camera) | + +### Returns +- None + +### C Prototype +`void move_mario_head_c_up(UNUSED struct Camera *c);` + +[:arrow_up_small:](#) + +
+ +## [transition_next_state](#transition_next_state) + +### Description +Transitions the camera to the next state over a specified number of frames. This is typically used for cutscenes or scripted sequences + +### Lua Example +`transition_next_state(c, frames)` + +### Parameters +| Field | Type | +| ----- | ---- | +| c | [Camera](structs.md#Camera) | +| frames | `integer` | + +### Returns +- None + +### C Prototype +`void transition_next_state(UNUSED struct Camera *c, s16 frames);` + +[:arrow_up_small:](#) + +
+ +## [set_camera_mode](#set_camera_mode) + +### Description +Changes the camera to a new mode, optionally interpolating over a specified number of frames. Useful for transitioning between different camera behaviors dynamically + +### Lua Example +`set_camera_mode(c, mode, frames)` + +### Parameters +| Field | Type | +| ----- | ---- | +| c | [Camera](structs.md#Camera) | +| mode | `integer` | +| frames | `integer` | + +### Returns +- None + +### C Prototype +`void set_camera_mode(struct Camera *c, s16 mode, s16 frames);` + +[:arrow_up_small:](#) + +
+ +## [soft_reset_camera](#soft_reset_camera) + +### Description +Resets the camera's state while retaining some settings, such as position or mode. This is often used when soft-resetting gameplay without reinitialization + +### Lua Example +`soft_reset_camera(c)` + +### Parameters +| Field | Type | +| ----- | ---- | +| c | [Camera](structs.md#Camera) | + +### Returns +- None + +### C Prototype +`void soft_reset_camera(struct Camera* c);` + +[:arrow_up_small:](#) + +
+ +## [reset_camera](#reset_camera) + +### Description +Fully resets the camera to its default state and reinitializes all settings. This is typically used when restarting gameplay or loading a new area + +### Lua Example +`reset_camera(c)` + +### Parameters +| Field | Type | +| ----- | ---- | +| c | [Camera](structs.md#Camera) | + +### Returns +- None + +### C Prototype +`void reset_camera(struct Camera *c);` + +[:arrow_up_small:](#) + +
+ +## [select_mario_cam_mode](#select_mario_cam_mode) + +### Description +Selects the appropriate camera mode for Mario based on the current gameplay context. Adapts camera behavior dynamically to match Mario's environment or state + +### Lua Example +`select_mario_cam_mode()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void select_mario_cam_mode(void);` + +[:arrow_up_small:](#) + +
+ +## [vec3f_sub](#vec3f_sub) + +### Description +Subtracts one 3D vector (`src`) from another (`dst`). Stores the result in the destination vector + +### Lua Example +`vec3f_sub(dst, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dst | [Vec3f](structs.md#Vec3f) | +| src | [Vec3f](structs.md#Vec3f) | + +### Returns +- None + +### C Prototype +`void vec3f_sub(Vec3f dst, Vec3f src);` + +[:arrow_up_small:](#) + +
+ +## [object_pos_to_vec3f](#object_pos_to_vec3f) + +### Description +Converts an object's position to a `Vec3f` format. Useful for aligning object behaviors or interactions with the camera system + +### Lua Example +`object_pos_to_vec3f(dst, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dst | [Vec3f](structs.md#Vec3f) | +| o | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void object_pos_to_vec3f(Vec3f dst, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [vec3f_to_object_pos](#vec3f_to_object_pos) + +### Description +Converts a `Vec3f` position to an object's internal format. Useful for syncing 3D positions between objects and the game world + +### Lua Example +`vec3f_to_object_pos(o, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| src | [Vec3f](structs.md#Vec3f) | + +### Returns +- None + +### C Prototype +`void vec3f_to_object_pos(struct Object *o, Vec3f src);` + +[:arrow_up_small:](#) + +
+ +## [cam_select_alt_mode](#cam_select_alt_mode) + +### Description +Selects an alternate camera mode based on the given angle. Used to toggle between predefined camera modes dynamically + +### Lua Example +`local integerValue = cam_select_alt_mode(angle)` + +### Parameters +| Field | Type | +| ----- | ---- | +| angle | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cam_select_alt_mode(s32 angle);` + +[:arrow_up_small:](#) + +
+ +## [set_cam_angle](#set_cam_angle) + +### Description +Sets the camera's angle based on the specified mode. Handles rotation and focus adjustments for predefined camera behaviors + +### Lua Example +`local integerValue = set_cam_angle(mode)` + +### Parameters +| Field | Type | +| ----- | ---- | +| mode | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 set_cam_angle(s32 mode);` + +[:arrow_up_small:](#) + +
+ +## [set_handheld_shake](#set_handheld_shake) + +### Description +Applies a handheld camera shake effect with configurable parameters. Can be used to simulate dynamic, realistic camera movement + +### Lua Example +`set_handheld_shake(mode)` + +### Parameters +| Field | Type | +| ----- | ---- | +| mode | `integer` | + +### Returns +- None + +### C Prototype +`void set_handheld_shake(u8 mode);` + +[:arrow_up_small:](#) + +
+ +## [shake_camera_handheld](#shake_camera_handheld) + +### Description +Activates a handheld camera shake effect. Calculates positional and focus adjustments to simulate manual movement + +### Lua Example +`shake_camera_handheld(pos, focus)` + +### Parameters +| Field | Type | +| ----- | ---- | +| pos | [Vec3f](structs.md#Vec3f) | +| focus | [Vec3f](structs.md#Vec3f) | + +### Returns +- None + +### C Prototype +`void shake_camera_handheld(Vec3f pos, Vec3f focus);` + +[:arrow_up_small:](#) + +
+ +## [find_c_buttons_pressed](#find_c_buttons_pressed) + +### Description +Determines which C-buttons are currently pressed by the player. Returns a bitmask indicating the active buttons for camera control + +### Lua Example +`local integerValue = find_c_buttons_pressed(currentState, buttonsPressed, buttonsDown)` + +### Parameters +| Field | Type | +| ----- | ---- | +| currentState | `integer` | +| buttonsPressed | `integer` | +| buttonsDown | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 find_c_buttons_pressed(u16 currentState, u16 buttonsPressed, u16 buttonsDown);` + +[:arrow_up_small:](#) + +
+ +## [collide_with_walls](#collide_with_walls) + +### Description +Checks for collisions between the camera and level geometry. Adjusts the camera's position to avoid clipping into walls or obstacles + +### Lua Example +`local integerValue = collide_with_walls(pos, offsetY, radius)` + +### Parameters +| Field | Type | +| ----- | ---- | +| pos | [Vec3f](structs.md#Vec3f) | +| offsetY | `number` | +| radius | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 collide_with_walls(Vec3f pos, f32 offsetY, f32 radius);` + +[:arrow_up_small:](#) + +
+ +## [clamp_pitch](#clamp_pitch) + +### Description +Clamps the camera's pitch angle between a maximum and minimum value. Prevents over-rotation and maintains a consistent viewing angle + +### Lua Example +`local integerValue = clamp_pitch(from, to, maxPitch, minPitch)` + +### Parameters +| Field | Type | +| ----- | ---- | +| from | [Vec3f](structs.md#Vec3f) | +| to | [Vec3f](structs.md#Vec3f) | +| maxPitch | `integer` | +| minPitch | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 clamp_pitch(Vec3f from, Vec3f to, s16 maxPitch, s16 minPitch);` + +[:arrow_up_small:](#) + +
+ +## [is_within_100_units_of_mario](#is_within_100_units_of_mario) + +### Description +Checks if a position is within 100 units of Mario's current position. Returns true if the position is within the specified radius and false otherwise + +### Lua Example +`local integerValue = is_within_100_units_of_mario(posX, posY, posZ)` + +### Parameters +| Field | Type | +| ----- | ---- | +| posX | `number` | +| posY | `number` | +| posZ | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 is_within_100_units_of_mario(f32 posX, f32 posY, f32 posZ);` + +[:arrow_up_small:](#) + +
+ +## [set_or_approach_f32_asymptotic](#set_or_approach_f32_asymptotic) + +### Description +Smoothly transitions or directly sets a floating-point value (`dst`) to approach a target (`goal`). Uses asymptotic scaling for gradual adjustments or direct assignment + +### Lua Example +`local integerValue = set_or_approach_f32_asymptotic(dst, goal, scale)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dst | `Pointer` <`number`> | +| goal | `number` | +| scale | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 set_or_approach_f32_asymptotic(f32 *dst, f32 goal, f32 scale);` [:arrow_up_small:](#) @@ -362,26 +835,26 @@ Gradually adjusts a floating-point value (`current`) towards a target (`target`)
-## [approach_s16_asymptotic](#approach_s16_asymptotic) +## [approach_f32_asymptotic](#approach_f32_asymptotic) ### Description -Gradually approaches a signed 16-bit integer (`target`) using asymptotic smoothing. The divisor controls the rate of the adjustment. Useful for adjusting angles or positions smoothly +Gradually approaches a floating-point value (`target`) using asymptotic smoothing. The rate of approach is controlled by the `multiplier`. Useful for smoothly adjusting camera parameters like field-of-view or position ### Lua Example -`local integerValue = approach_s16_asymptotic(current, target, divisor)` +`local numberValue = approach_f32_asymptotic(current, target, multiplier)` ### Parameters | Field | Type | | ----- | ---- | -| current | `integer` | -| target | `integer` | -| divisor | `integer` | +| current | `number` | +| target | `number` | +| multiplier | `number` | ### Returns -- `integer` +- `number` ### C Prototype -`s32 approach_s16_asymptotic(s16 current, s16 target, s16 divisor);` +`f32 approach_f32_asymptotic(f32 current, f32 target, f32 multiplier);` [:arrow_up_small:](#) @@ -412,6 +885,31 @@ Gradually adjusts a signed 16-bit integer (`current`) towards a target (`target`
+## [approach_s16_asymptotic](#approach_s16_asymptotic) + +### Description +Gradually approaches a signed 16-bit integer (`target`) using asymptotic smoothing. The divisor controls the rate of the adjustment. Useful for adjusting angles or positions smoothly + +### Lua Example +`local integerValue = approach_s16_asymptotic(current, target, divisor)` + +### Parameters +| Field | Type | +| ----- | ---- | +| current | `integer` | +| target | `integer` | +| divisor | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 approach_s16_asymptotic(s16 current, s16 target, s16 divisor);` + +[:arrow_up_small:](#) + +
+ ## [approach_vec3f_asymptotic](#approach_vec3f_asymptotic) ### Description @@ -439,75 +937,235 @@ Smoothly transitions a 3D vector (`current`) towards a target vector (`target`)
-## [calc_abs_dist](#calc_abs_dist) +## [set_or_approach_vec3f_asymptotic](#set_or_approach_vec3f_asymptotic) ### Description -Calculates the absolute distance between two 3D points (`a` and `b`). Returns the distance as a floating-point value. Useful for determining proximity between objects in 3D space +Smoothly transitions a 3D vector (`current`) toward a target vector (`goal`) using asymptotic scaling. Allows gradual or instantaneous alignment of 3D positions. Scaling values (the `Mul` variables) for x, y, and z axes determine the speed of adjustment for each component ### Lua Example -`local numberValue = calc_abs_dist(a, b)` +`set_or_approach_vec3f_asymptotic(dst, goal, xMul, yMul, zMul)` ### Parameters | Field | Type | | ----- | ---- | -| a | [Vec3f](structs.md#Vec3f) | -| b | [Vec3f](structs.md#Vec3f) | +| dst | [Vec3f](structs.md#Vec3f) | +| goal | [Vec3f](structs.md#Vec3f) | +| xMul | `number` | +| yMul | `number` | +| zMul | `number` | ### Returns -- `number` +- None ### C Prototype -`f32 calc_abs_dist(Vec3f a, Vec3f b);` +`void set_or_approach_vec3f_asymptotic(Vec3f dst, Vec3f goal, f32 xMul, f32 yMul, f32 zMul);` [:arrow_up_small:](#)
-## [calc_hor_dist](#calc_hor_dist) +## [camera_approach_s16_symmetric_bool](#camera_approach_s16_symmetric_bool) ### Description -Calculates the horizontal (XZ-plane) distance between two 3D points (`a` and `b`). Returns the distance as a floating-point value. Useful for terrain navigation or collision detection +Adjusts a signed 16-bit integer (`current`) towards a target (`target`) symmetrically with a fixed increment (`increment`). Returns true if the value reaches the target and false otherwise ### Lua Example -`local numberValue = calc_hor_dist(a, b)` +`local integerValue = camera_approach_s16_symmetric_bool(current, target, increment)` ### Parameters | Field | Type | | ----- | ---- | -| a | [Vec3f](structs.md#Vec3f) | -| b | [Vec3f](structs.md#Vec3f) | +| current | `Pointer` <`integer`> | +| target | `integer` | +| increment | `integer` | ### Returns -- `number` +- `integer` ### C Prototype -`f32 calc_hor_dist(Vec3f a, Vec3f b);` +`s32 camera_approach_s16_symmetric_bool(s16 *current, s16 target, s16 increment);` [:arrow_up_small:](#)
-## [calculate_angles](#calculate_angles) +## [set_or_approach_s16_symmetric](#set_or_approach_s16_symmetric) ### Description -Calculates the pitch and yaw angles from one 3D position (`from`) to another (`to`). Updates the provided pointers with the computed pitch and yaw values +Smoothly transitions or directly sets a signed 16-bit value (`current`) to approach a target (`target`). Uses symmetric scaling for gradual or immediate adjustments ### Lua Example -`calculate_angles(from, to, pitch, yaw)` +`local integerValue = set_or_approach_s16_symmetric(current, target, increment)` + +### Parameters +| Field | Type | +| ----- | ---- | +| current | `Pointer` <`integer`> | +| target | `integer` | +| increment | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 set_or_approach_s16_symmetric(s16 *current, s16 target, s16 increment);` + +[:arrow_up_small:](#) + +
+ +## [camera_approach_f32_symmetric_bool](#camera_approach_f32_symmetric_bool) + +### Description +Adjusts a floating-point value (`current`) towards a target (`target`) symmetrically with a fixed increment (`increment`). Returns true if the value reaches the target and false otherwise + +### Lua Example +`local integerValue = camera_approach_f32_symmetric_bool(current, target, increment)` + +### Parameters +| Field | Type | +| ----- | ---- | +| current | `Pointer` <`number`> | +| target | `number` | +| increment | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 camera_approach_f32_symmetric_bool(f32 *current, f32 target, f32 increment);` + +[:arrow_up_small:](#) + +
+ +## [camera_approach_f32_symmetric](#camera_approach_f32_symmetric) + +### Description +Symmetrically approaches a floating-point value (`target`) with a fixed increment (`increment`) per frame. Limits the rate of change to ensure gradual transitions + +### Lua Example +`local numberValue = camera_approach_f32_symmetric(value, target, increment)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `number` | +| target | `number` | +| increment | `number` | + +### Returns +- `number` + +### C Prototype +`f32 camera_approach_f32_symmetric(f32 value, f32 target, f32 increment);` + +[:arrow_up_small:](#) + +
+ +## [random_vec3s](#random_vec3s) + +### Description +Generates a random 3D vector with short integer components. Useful for randomized offsets or environmental effects + +### Lua Example +`random_vec3s(dst, xRange, yRange, zRange)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dst | [Vec3s](structs.md#Vec3s) | +| xRange | `integer` | +| yRange | `integer` | +| zRange | `integer` | + +### Returns +- None + +### C Prototype +`void random_vec3s(Vec3s dst, s16 xRange, s16 yRange, s16 zRange);` + +[:arrow_up_small:](#) + +
+ +## [clamp_positions_and_find_yaw](#clamp_positions_and_find_yaw) + +### Description +Clamps a position within specified X and Z bounds and calculates the yaw angle from the origin. Prevents the camera from moving outside of the designated area + +### Lua Example +`local integerValue = clamp_positions_and_find_yaw(pos, origin, xMax, xMin, zMax, zMin)` + +### Parameters +| Field | Type | +| ----- | ---- | +| pos | [Vec3f](structs.md#Vec3f) | +| origin | [Vec3f](structs.md#Vec3f) | +| xMax | `number` | +| xMin | `number` | +| zMax | `number` | +| zMin | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 clamp_positions_and_find_yaw(Vec3f pos, Vec3f origin, f32 xMax, f32 xMin, f32 zMax, f32 zMin);` + +[:arrow_up_small:](#) + +
+ +## [is_range_behind_surface](#is_range_behind_surface) + +### Description +Determines if a range is obstructed by a surface relative to the camera. Returns true if the range is behind the specified surface + +### Lua Example +`local integerValue = is_range_behind_surface(from, to, surf, range, surfType)` ### Parameters | Field | Type | | ----- | ---- | | from | [Vec3f](structs.md#Vec3f) | | to | [Vec3f](structs.md#Vec3f) | -| pitch | `Pointer` <`integer`> | -| yaw | `Pointer` <`integer`> | +| surf | [Surface](structs.md#Surface) | +| range | `integer` | +| surfType | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 is_range_behind_surface(Vec3f from, Vec3f to, struct Surface *surf, s16 range, s16 surfType);` + +[:arrow_up_small:](#) + +
+ +## [scale_along_line](#scale_along_line) + +### Description +Scales a point along a line between two 3D points (`from` and `to`). The scaling factor determines how far along the line the resulting point will be. The result is stored in the destination vector (`dest`) + +### Lua Example +`scale_along_line(dest, from, to, scale)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3f](structs.md#Vec3f) | +| from | [Vec3f](structs.md#Vec3f) | +| to | [Vec3f](structs.md#Vec3f) | +| scale | `number` | ### Returns - None ### C Prototype -`void calculate_angles(Vec3f from, Vec3f to, s16 *pitch, s16 *yaw);` +`void scale_along_line(Vec3f dest, Vec3f from, Vec3f to, f32 scale);` [:arrow_up_small:](#) @@ -561,1000 +1219,75 @@ Determines the yaw angle (rotation around the Y-axis) from one 3D position (`fro
-## [cam_select_alt_mode](#cam_select_alt_mode) +## [calculate_angles](#calculate_angles) ### Description -Selects an alternate camera mode based on the given angle. Used to toggle between predefined camera modes dynamically +Calculates the pitch and yaw angles from one 3D position (`from`) to another (`to`). Updates the provided pointers with the computed pitch and yaw values ### Lua Example -`local integerValue = cam_select_alt_mode(angle)` +`calculate_angles(from, to, pitch, yaw)` ### Parameters | Field | Type | | ----- | ---- | -| angle | `integer` | +| from | [Vec3f](structs.md#Vec3f) | +| to | [Vec3f](structs.md#Vec3f) | +| pitch | `Pointer` <`integer`> | +| yaw | `Pointer` <`integer`> | ### Returns -- `integer` +- None ### C Prototype -`s32 cam_select_alt_mode(s32 angle);` +`void calculate_angles(Vec3f from, Vec3f to, s16 *pitch, s16 *yaw);` [:arrow_up_small:](#)
-## [camera_approach_f32_symmetric](#camera_approach_f32_symmetric) +## [calc_abs_dist](#calc_abs_dist) ### Description -Symmetrically approaches a floating-point value (`target`) with a fixed increment (`increment`) per frame. Limits the rate of change to ensure gradual transitions +Calculates the absolute distance between two 3D points (`a` and `b`). Returns the distance as a floating-point value. Useful for determining proximity between objects in 3D space ### Lua Example -`local numberValue = camera_approach_f32_symmetric(value, target, increment)` +`local numberValue = calc_abs_dist(a, b)` ### Parameters | Field | Type | | ----- | ---- | -| value | `number` | -| target | `number` | -| increment | `number` | +| a | [Vec3f](structs.md#Vec3f) | +| b | [Vec3f](structs.md#Vec3f) | ### Returns - `number` ### C Prototype -`f32 camera_approach_f32_symmetric(f32 value, f32 target, f32 increment);` +`f32 calc_abs_dist(Vec3f a, Vec3f b);` [:arrow_up_small:](#)
-## [camera_approach_f32_symmetric_bool](#camera_approach_f32_symmetric_bool) +## [calc_hor_dist](#calc_hor_dist) ### Description -Adjusts a floating-point value (`current`) towards a target (`target`) symmetrically with a fixed increment (`increment`). Returns true if the value reaches the target and false otherwise +Calculates the horizontal (XZ-plane) distance between two 3D points (`a` and `b`). Returns the distance as a floating-point value. Useful for terrain navigation or collision detection ### Lua Example -`local integerValue = camera_approach_f32_symmetric_bool(current, target, increment)` +`local numberValue = calc_hor_dist(a, b)` ### Parameters | Field | Type | | ----- | ---- | -| current | `Pointer` <`number`> | -| target | `number` | -| increment | `number` | +| a | [Vec3f](structs.md#Vec3f) | +| b | [Vec3f](structs.md#Vec3f) | ### Returns -- `integer` +- `number` ### C Prototype -`s32 camera_approach_f32_symmetric_bool(f32 *current, f32 target, f32 increment);` - -[:arrow_up_small:](#) - -
- -## [camera_approach_s16_symmetric_bool](#camera_approach_s16_symmetric_bool) - -### Description -Adjusts a signed 16-bit integer (`current`) towards a target (`target`) symmetrically with a fixed increment (`increment`). Returns true if the value reaches the target and false otherwise - -### Lua Example -`local integerValue = camera_approach_s16_symmetric_bool(current, target, increment)` - -### Parameters -| Field | Type | -| ----- | ---- | -| current | `Pointer` <`integer`> | -| target | `integer` | -| increment | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 camera_approach_s16_symmetric_bool(s16 *current, s16 target, s16 increment);` - -[:arrow_up_small:](#) - -
- -## [camera_course_processing](#camera_course_processing) - -### Description -Processes course-specific camera settings, such as predefined positions or modes. Adjusts the camera to match the design and gameplay requirements of the current course - -### Lua Example -`local integerValue = camera_course_processing(c)` - -### Parameters -| Field | Type | -| ----- | ---- | -| c | [Camera](structs.md#Camera) | - -### Returns -- `integer` - -### C Prototype -`s16 camera_course_processing(struct Camera *c);` - -[:arrow_up_small:](#) - -
- -## [camera_set_use_course_specific_settings](#camera_set_use_course_specific_settings) - -### Description -Toggles whether the camera uses course-specific settings. This is useful for enabling or disabling custom behaviors in specific courses or areas - -### Lua Example -`camera_set_use_course_specific_settings(enable)` - -### Parameters -| Field | Type | -| ----- | ---- | -| enable | `integer` | - -### Returns -- None - -### C Prototype -`void camera_set_use_course_specific_settings(u8 enable);` - -[:arrow_up_small:](#) - -
- -## [center_rom_hack_camera](#center_rom_hack_camera) - -### Description -Centers the ROM hack camera. This function is designed for non-standard level layouts and modded game environments - -### Lua Example -`center_rom_hack_camera()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void center_rom_hack_camera(void);` - -[:arrow_up_small:](#) - -
- -## [clamp_pitch](#clamp_pitch) - -### Description -Clamps the camera's pitch angle between a maximum and minimum value. Prevents over-rotation and maintains a consistent viewing angle - -### Lua Example -`local integerValue = clamp_pitch(from, to, maxPitch, minPitch)` - -### Parameters -| Field | Type | -| ----- | ---- | -| from | [Vec3f](structs.md#Vec3f) | -| to | [Vec3f](structs.md#Vec3f) | -| maxPitch | `integer` | -| minPitch | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 clamp_pitch(Vec3f from, Vec3f to, s16 maxPitch, s16 minPitch);` - -[:arrow_up_small:](#) - -
- -## [clamp_positions_and_find_yaw](#clamp_positions_and_find_yaw) - -### Description -Clamps a position within specified X and Z bounds and calculates the yaw angle from the origin. Prevents the camera from moving outside of the designated area - -### Lua Example -`local integerValue = clamp_positions_and_find_yaw(pos, origin, xMax, xMin, zMax, zMin)` - -### Parameters -| Field | Type | -| ----- | ---- | -| pos | [Vec3f](structs.md#Vec3f) | -| origin | [Vec3f](structs.md#Vec3f) | -| xMax | `number` | -| xMin | `number` | -| zMax | `number` | -| zMin | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 clamp_positions_and_find_yaw(Vec3f pos, Vec3f origin, f32 xMax, f32 xMin, f32 zMax, f32 zMin);` - -[:arrow_up_small:](#) - -
- -## [collide_with_walls](#collide_with_walls) - -### Description -Checks for collisions between the camera and level geometry. Adjusts the camera's position to avoid clipping into walls or obstacles - -### Lua Example -`local integerValue = collide_with_walls(pos, offsetY, radius)` - -### Parameters -| Field | Type | -| ----- | ---- | -| pos | [Vec3f](structs.md#Vec3f) | -| offsetY | `number` | -| radius | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 collide_with_walls(Vec3f pos, f32 offsetY, f32 radius);` - -[:arrow_up_small:](#) - -
- -## [cutscene_object](#cutscene_object) - -### Description -Initiates a cutscene focusing on a specific object in the game world. The camera transitions smoothly to the object, adapting its position as needed - -### Lua Example -`local integerValue = cutscene_object(cutscene, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| cutscene | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`s16 cutscene_object(u8 cutscene, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [cutscene_object_with_dialog](#cutscene_object_with_dialog) - -### Description -Starts a cutscene involving an object and displays dialog during the sequence. The camera focuses on the object while synchronizing dialog with the scene - -### Lua Example -`local integerValue = cutscene_object_with_dialog(cutscene, o, dialogID)` - -### Parameters -| Field | Type | -| ----- | ---- | -| cutscene | `integer` | -| o | [Object](structs.md#Object) | -| dialogID | `integer` | - -### Returns -- `integer` - -### C Prototype -`s16 cutscene_object_with_dialog(u8 cutscene, struct Object *o, s16 dialogID);` - -[:arrow_up_small:](#) - -
- -## [cutscene_object_without_dialog](#cutscene_object_without_dialog) - -### Description -Starts a cutscene involving an object without dialog. The camera transitions smoothly to focus on the object - -### Lua Example -`local integerValue = cutscene_object_without_dialog(cutscene, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| cutscene | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`s16 cutscene_object_without_dialog(u8 cutscene, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [cutscene_set_fov_shake_preset](#cutscene_set_fov_shake_preset) - -### Description -Applies a preset field-of-view shake effect during a cutscene. This creates dynamic visual effects, such as zoom or focus disruptions - -### Lua Example -`cutscene_set_fov_shake_preset(preset)` - -### Parameters -| Field | Type | -| ----- | ---- | -| preset | `integer` | - -### Returns -- None - -### C Prototype -`void cutscene_set_fov_shake_preset(u8 preset);` - -[:arrow_up_small:](#) - -
- -## [cutscene_spawn_obj](#cutscene_spawn_obj) - -### Description -Spawns an object as part of a cutscene, such as props or interactive elements. Returns the spawned object's reference for further manipulation - -### Lua Example -`local integerValue = cutscene_spawn_obj(obj, frame)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | `integer` | -| frame | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cutscene_spawn_obj(u32 obj, s16 frame);` - -[:arrow_up_small:](#) - -
- -## [find_c_buttons_pressed](#find_c_buttons_pressed) - -### Description -Determines which C-buttons are currently pressed by the player. Returns a bitmask indicating the active buttons for camera control - -### Lua Example -`local integerValue = find_c_buttons_pressed(currentState, buttonsPressed, buttonsDown)` - -### Parameters -| Field | Type | -| ----- | ---- | -| currentState | `integer` | -| buttonsPressed | `integer` | -| buttonsDown | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 find_c_buttons_pressed(u16 currentState, u16 buttonsPressed, u16 buttonsDown);` - -[:arrow_up_small:](#) - -
- -## [find_mario_floor_and_ceil](#find_mario_floor_and_ceil) - -### Description -Finds the floor and ceiling directly above and below Mario's position. Updates Mario's geometry information for camera calculations - -### Lua Example -`find_mario_floor_and_ceil(pg)` - -### Parameters -| Field | Type | -| ----- | ---- | -| pg | [PlayerGeometry](structs.md#PlayerGeometry) | - -### Returns -- None - -### C Prototype -`void find_mario_floor_and_ceil(struct PlayerGeometry *pg);` - -[:arrow_up_small:](#) - -
- -## [get_cutscene_from_mario_status](#get_cutscene_from_mario_status) - -### Description -Gets the appropriate cutscene to play based on Mario's current gameplay state. This function helps determine transitions for cinematic or scripted sequences - -### Lua Example -`local integerValue = get_cutscene_from_mario_status(c)` - -### Parameters -| Field | Type | -| ----- | ---- | -| c | [Camera](structs.md#Camera) | - -### Returns -- `integer` - -### C Prototype -`u8 get_cutscene_from_mario_status(struct Camera *c);` - -[:arrow_up_small:](#) - -
- -## [handle_c_button_movement](#handle_c_button_movement) - -### Description -Handles camera movement based on input from the C-buttons. Updates the camera's position or angle to match directional player input - -### Lua Example -`handle_c_button_movement(c)` - -### Parameters -| Field | Type | -| ----- | ---- | -| c | [Camera](structs.md#Camera) | - -### Returns -- None - -### C Prototype -`void handle_c_button_movement(struct Camera *c);` - -[:arrow_up_small:](#) - -
- -## [is_range_behind_surface](#is_range_behind_surface) - -### Description -Determines if a range is obstructed by a surface relative to the camera. Returns true if the range is behind the specified surface - -### Lua Example -`local integerValue = is_range_behind_surface(from, to, surf, range, surfType)` - -### Parameters -| Field | Type | -| ----- | ---- | -| from | [Vec3f](structs.md#Vec3f) | -| to | [Vec3f](structs.md#Vec3f) | -| surf | [Surface](structs.md#Surface) | -| range | `integer` | -| surfType | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 is_range_behind_surface(Vec3f from, Vec3f to, struct Surface *surf, s16 range, s16 surfType);` - -[:arrow_up_small:](#) - -
- -## [is_within_100_units_of_mario](#is_within_100_units_of_mario) - -### Description -Checks if a position is within 100 units of Mario's current position. Returns true if the position is within the specified radius and false otherwise - -### Lua Example -`local integerValue = is_within_100_units_of_mario(posX, posY, posZ)` - -### Parameters -| Field | Type | -| ----- | ---- | -| posX | `number` | -| posY | `number` | -| posZ | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 is_within_100_units_of_mario(f32 posX, f32 posY, f32 posZ);` - -[:arrow_up_small:](#) - -
- -## [move_mario_head_c_up](#move_mario_head_c_up) - -### Description -Moves Mario's head slightly upward when the C-Up button is pressed. This function aligns the camera to match the head movement for consistency - -### Lua Example -`move_mario_head_c_up(c)` - -### Parameters -| Field | Type | -| ----- | ---- | -| c | [Camera](structs.md#Camera) | - -### Returns -- None - -### C Prototype -`void move_mario_head_c_up(UNUSED struct Camera *c);` - -[:arrow_up_small:](#) - -
- -## [next_lakitu_state](#next_lakitu_state) - -### Description -Transitions the camera to the next Lakitu state, updating position and focus. This function handles smooth transitions between different gameplay scenarios - -### Lua Example -`local integerValue = next_lakitu_state(newPos, newFoc, curPos, curFoc, oldPos, oldFoc, yaw)` - -### Parameters -| Field | Type | -| ----- | ---- | -| newPos | [Vec3f](structs.md#Vec3f) | -| newFoc | [Vec3f](structs.md#Vec3f) | -| curPos | [Vec3f](structs.md#Vec3f) | -| curFoc | [Vec3f](structs.md#Vec3f) | -| oldPos | [Vec3f](structs.md#Vec3f) | -| oldFoc | [Vec3f](structs.md#Vec3f) | -| yaw | `integer` | - -### Returns -- `integer` - -### C Prototype -`s16 next_lakitu_state(Vec3f newPos, Vec3f newFoc, Vec3f curPos, Vec3f curFoc, Vec3f oldPos, Vec3f oldFoc, s16 yaw);` - -[:arrow_up_small:](#) - -
- -## [obj_rotate_towards_point](#obj_rotate_towards_point) - -### Description -Rotates an object toward a specific point in 3D space. Gradually updates the object's pitch and yaw angles to face the target - -### Lua Example -`obj_rotate_towards_point(o, point, pitchOff, yawOff, pitchDiv, yawDiv)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| point | [Vec3f](structs.md#Vec3f) | -| pitchOff | `integer` | -| yawOff | `integer` | -| pitchDiv | `integer` | -| yawDiv | `integer` | - -### Returns -- None - -### C Prototype -`void obj_rotate_towards_point(struct Object *o, Vec3f point, s16 pitchOff, s16 yawOff, s16 pitchDiv, s16 yawDiv);` - -[:arrow_up_small:](#) - -
- -## [object_pos_to_vec3f](#object_pos_to_vec3f) - -### Description -Converts an object's position to a `Vec3f` format. Useful for aligning object behaviors or interactions with the camera system - -### Lua Example -`object_pos_to_vec3f(dst, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dst | [Vec3f](structs.md#Vec3f) | -| o | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void object_pos_to_vec3f(Vec3f dst, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [offset_rotated](#offset_rotated) - -### Description -Offsets a vector by rotating it in 3D space relative to a reference position. This is useful for creating radial effects or dynamic transformations - -### Lua Example -`offset_rotated(dst, from, to, rotation)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dst | [Vec3f](structs.md#Vec3f) | -| from | [Vec3f](structs.md#Vec3f) | -| to | [Vec3f](structs.md#Vec3f) | -| rotation | [Vec3s](structs.md#Vec3s) | - -### Returns -- None - -### C Prototype -`void offset_rotated(Vec3f dst, Vec3f from, Vec3f to, Vec3s rotation);` - -[:arrow_up_small:](#) - -
- -## [offset_yaw_outward_radial](#offset_yaw_outward_radial) - -### Description -Calculates an outward radial offset based on the camera's yaw angle. Returns the offset yaw, used for positioning or alignment - -### Lua Example -`local integerValue = offset_yaw_outward_radial(c, areaYaw)` - -### Parameters -| Field | Type | -| ----- | ---- | -| c | [Camera](structs.md#Camera) | -| areaYaw | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 offset_yaw_outward_radial(struct Camera *c, s16 areaYaw);` - -[:arrow_up_small:](#) - -
- -## [play_camera_buzz_if_c_sideways](#play_camera_buzz_if_c_sideways) - -### Description -Plays a buzzing sound effect when the camera's position is misaligned with the player's perspective. Used as audio feedback for incorrect camera behavior - -### Lua Example -`play_camera_buzz_if_c_sideways()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_camera_buzz_if_c_sideways(void);` - -[:arrow_up_small:](#) - -
- -## [play_camera_buzz_if_cbutton](#play_camera_buzz_if_cbutton) - -### Description -Plays a buzzing sound effect when a blocked C-button action is attempted. Used to signal invalid input or restricted camera movement - -### Lua Example -`play_camera_buzz_if_cbutton()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_camera_buzz_if_cbutton(void);` - -[:arrow_up_small:](#) - -
- -## [play_camera_buzz_if_cdown](#play_camera_buzz_if_cdown) - -### Description -Plays a buzzing sound effect when the camera attempts to move downward but is restricted. Provides feedback for invalid C-Down input actions - -### Lua Example -`play_camera_buzz_if_cdown()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_camera_buzz_if_cdown(void);` - -[:arrow_up_small:](#) - -
- -## [play_cutscene](#play_cutscene) - -### Description -Starts the execution of a predefined cutscene. The camera transitions dynamically to follow the scripted sequence - -### Lua Example -`play_cutscene(c)` - -### Parameters -| Field | Type | -| ----- | ---- | -| c | [Camera](structs.md#Camera) | - -### Returns -- None - -### C Prototype -`void play_cutscene(struct Camera *c);` - -[:arrow_up_small:](#) - -
- -## [play_sound_button_change_blocked](#play_sound_button_change_blocked) - -### Description -Plays a sound effect when a blocked action changes the camera mode. This provides feedback for invalid attempts to switch the camera state - -### Lua Example -`play_sound_button_change_blocked()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_sound_button_change_blocked(void);` - -[:arrow_up_small:](#) - -
- -## [play_sound_cbutton_down](#play_sound_cbutton_down) - -### Description -Plays a sound effect when the C-Down button is pressed for camera movement. Provides auditory feedback for valid camera input - -### Lua Example -`play_sound_cbutton_down()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_sound_cbutton_down(void);` - -[:arrow_up_small:](#) - -
- -## [play_sound_cbutton_side](#play_sound_cbutton_side) - -### Description -Plays a sound effect when the C-Side button (left or right) is pressed for camera movement. Used as audio feedback for horizontal adjustments to the camera - -### Lua Example -`play_sound_cbutton_side()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_sound_cbutton_side(void);` - -[:arrow_up_small:](#) - -
- -## [play_sound_cbutton_up](#play_sound_cbutton_up) - -### Description -Plays a sound effect when the C-Up button is pressed for camera movement. Provides feedback for vertical camera adjustments - -### Lua Example -`play_sound_cbutton_up()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_sound_cbutton_up(void);` - -[:arrow_up_small:](#) - -
- -## [play_sound_if_cam_switched_to_lakitu_or_mario](#play_sound_if_cam_switched_to_lakitu_or_mario) - -### Description -Plays a sound effect when the camera switches between Lakitu and Mario perspectives. Signals a successful change in camera mode - -### Lua Example -`play_sound_if_cam_switched_to_lakitu_or_mario()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_sound_if_cam_switched_to_lakitu_or_mario(void);` - -[:arrow_up_small:](#) - -
- -## [play_sound_rbutton_changed](#play_sound_rbutton_changed) - -### Description -Plays a sound effect when the R-Button camera mode is changed. Provides feedback for toggling camera behaviors - -### Lua Example -`play_sound_rbutton_changed()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_sound_rbutton_changed(void);` - -[:arrow_up_small:](#) - -
- -## [radial_camera_input](#radial_camera_input) - -### Description -Handles radial camera movement based on player input. Updates the camera's position or orientation accordingly - -### Lua Example -`local integerValue = radial_camera_input(c, unused)` - -### Parameters -| Field | Type | -| ----- | ---- | -| c | [Camera](structs.md#Camera) | -| unused | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 radial_camera_input(struct Camera *c, UNUSED f32 unused);` - -[:arrow_up_small:](#) - -
- -## [random_vec3s](#random_vec3s) - -### Description -Generates a random 3D vector with short integer components. Useful for randomized offsets or environmental effects - -### Lua Example -`random_vec3s(dst, xRange, yRange, zRange)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dst | [Vec3s](structs.md#Vec3s) | -| xRange | `integer` | -| yRange | `integer` | -| zRange | `integer` | - -### Returns -- None - -### C Prototype -`void random_vec3s(Vec3s dst, s16 xRange, s16 yRange, s16 zRange);` - -[:arrow_up_small:](#) - -
- -## [reset_camera](#reset_camera) - -### Description -Fully resets the camera to its default state and reinitializes all settings. This is typically used when restarting gameplay or loading a new area - -### Lua Example -`reset_camera(c)` - -### Parameters -| Field | Type | -| ----- | ---- | -| c | [Camera](structs.md#Camera) | - -### Returns -- None - -### C Prototype -`void reset_camera(struct Camera *c);` - -[:arrow_up_small:](#) - -
- -## [resolve_geometry_collisions](#resolve_geometry_collisions) - -### Description -Resolves collisions between the camera and level geometry. Adjusts the camera's position to prevent clipping or intersecting with objects - -### Lua Example -`resolve_geometry_collisions(pos, lastGood)` - -### Parameters -| Field | Type | -| ----- | ---- | -| pos | [Vec3f](structs.md#Vec3f) | -| lastGood | [Vec3f](structs.md#Vec3f) | - -### Returns -- None - -### C Prototype -`void resolve_geometry_collisions(Vec3f pos, UNUSED Vec3f lastGood);` - -[:arrow_up_small:](#) - -
- -## [rotate_camera_around_walls](#rotate_camera_around_walls) - -### Description -Rotates the camera to avoid walls or other obstructions. Ensures clear visibility of the player or target objects - -### Lua Example -`local integerValue = rotate_camera_around_walls(c, cPos, avoidYaw, yawRange)` - -### Parameters -| Field | Type | -| ----- | ---- | -| c | [Camera](structs.md#Camera) | -| cPos | [Vec3f](structs.md#Vec3f) | -| avoidYaw | `Pointer` <`integer`> | -| yawRange | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 rotate_camera_around_walls(struct Camera *c, Vec3f cPos, s16 *avoidYaw, s16 yawRange);` +`f32 calc_hor_dist(Vec3f a, Vec3f b);` [:arrow_up_small:](#) @@ -1610,127 +1343,6 @@ Rotates a vector around the YZ-plane by a specified pitch angle. The result is s
-## [scale_along_line](#scale_along_line) - -### Description -Scales a point along a line between two 3D points (`from` and `to`). The scaling factor determines how far along the line the resulting point will be. The result is stored in the destination vector (`dest`) - -### Lua Example -`scale_along_line(dest, from, to, scale)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3f](structs.md#Vec3f) | -| from | [Vec3f](structs.md#Vec3f) | -| to | [Vec3f](structs.md#Vec3f) | -| scale | `number` | - -### Returns -- None - -### C Prototype -`void scale_along_line(Vec3f dest, Vec3f from, Vec3f to, f32 scale);` - -[:arrow_up_small:](#) - -
- -## [select_mario_cam_mode](#select_mario_cam_mode) - -### Description -Selects the appropriate camera mode for Mario based on the current gameplay context. Adapts camera behavior dynamically to match Mario's environment or state - -### Lua Example -`select_mario_cam_mode()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void select_mario_cam_mode(void);` - -[:arrow_up_small:](#) - -
- -## [set_cam_angle](#set_cam_angle) - -### Description -Sets the camera's angle based on the specified mode. Handles rotation and focus adjustments for predefined camera behaviors - -### Lua Example -`local integerValue = set_cam_angle(mode)` - -### Parameters -| Field | Type | -| ----- | ---- | -| mode | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 set_cam_angle(s32 mode);` - -[:arrow_up_small:](#) - -
- -## [set_camera_mode](#set_camera_mode) - -### Description -Changes the camera to a new mode, optionally interpolating over a specified number of frames. Useful for transitioning between different camera behaviors dynamically - -### Lua Example -`set_camera_mode(c, mode, frames)` - -### Parameters -| Field | Type | -| ----- | ---- | -| c | [Camera](structs.md#Camera) | -| mode | `integer` | -| frames | `integer` | - -### Returns -- None - -### C Prototype -`void set_camera_mode(struct Camera *c, s16 mode, s16 frames);` - -[:arrow_up_small:](#) - -
- -## [set_camera_mode_fixed](#set_camera_mode_fixed) - -### Description -Activates a fixed camera mode and aligns the camera to specific X, Y, Z coordinates. This is useful for predefined static views in specific areas - -### Lua Example -`local integerValue = set_camera_mode_fixed(c, x, y, z)` - -### Parameters -| Field | Type | -| ----- | ---- | -| c | [Camera](structs.md#Camera) | -| x | `integer` | -| y | `integer` | -| z | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 set_camera_mode_fixed(struct Camera* c, s16 x, s16 y, s16 z);` - -[:arrow_up_small:](#) - -
- ## [set_camera_pitch_shake](#set_camera_pitch_shake) ### Description @@ -1756,80 +1368,6 @@ Applies a pitch-based shake effect to the camera. The shake's magnitude, decay,
-## [set_camera_roll_shake](#set_camera_roll_shake) - -### Description -Applies a roll-based shake effect to the camera. Simulates rotational disturbances for dynamic camera effects - -### Lua Example -`set_camera_roll_shake(mag, decay, inc)` - -### Parameters -| Field | Type | -| ----- | ---- | -| mag | `integer` | -| decay | `integer` | -| inc | `integer` | - -### Returns -- None - -### C Prototype -`void set_camera_roll_shake(s16 mag, s16 decay, s16 inc);` - -[:arrow_up_small:](#) - -
- -## [set_camera_shake_from_hit](#set_camera_shake_from_hit) - -### Description -Applies a shake effect to the camera based on a hit type. Different shake types simulate various impacts, such as attacks, falls, or shocks - -### Lua Example -`set_camera_shake_from_hit(shake)` - -### Parameters -| Field | Type | -| ----- | ---- | -| shake | `integer` | - -### Returns -- None - -### C Prototype -`void set_camera_shake_from_hit(s16 shake);` - -[:arrow_up_small:](#) - -
- -## [set_camera_shake_from_point](#set_camera_shake_from_point) - -### Description -Applies a shake effect to the camera, scaled by its proximity to a specified point. The intensity decreases with distance from the point - -### Lua Example -`set_camera_shake_from_point(shake, posX, posY, posZ)` - -### Parameters -| Field | Type | -| ----- | ---- | -| shake | `integer` | -| posX | `number` | -| posY | `number` | -| posZ | `number` | - -### Returns -- None - -### C Prototype -`void set_camera_shake_from_point(s16 shake, f32 posX, f32 posY, f32 posZ);` - -[:arrow_up_small:](#) - -
- ## [set_camera_yaw_shake](#set_camera_yaw_shake) ### Description @@ -1855,218 +1393,26 @@ Applies a yaw-based shake effect to the camera. Simulates horizontal vibrations
-## [set_environmental_camera_shake](#set_environmental_camera_shake) +## [set_camera_roll_shake](#set_camera_roll_shake) ### Description -Applies an environmental shake effect to the camera. Handles predefined shake types triggered by environmental events like explosions or platform movements +Applies a roll-based shake effect to the camera. Simulates rotational disturbances for dynamic camera effects ### Lua Example -`set_environmental_camera_shake(shake)` +`set_camera_roll_shake(mag, decay, inc)` ### Parameters | Field | Type | | ----- | ---- | -| shake | `integer` | - -### Returns -- None - -### C Prototype -`void set_environmental_camera_shake(s16 shake);` - -[:arrow_up_small:](#) - -
- -## [set_fixed_cam_axis_sa_lobby](#set_fixed_cam_axis_sa_lobby) - -### Lua Example -`set_fixed_cam_axis_sa_lobby(preset)` - -### Parameters -| Field | Type | -| ----- | ---- | -| preset | `integer` | - -### Returns -- None - -### C Prototype -`void set_fixed_cam_axis_sa_lobby(UNUSED s16 preset);` - -[:arrow_up_small:](#) - -
- -## [set_fov_function](#set_fov_function) - -### Description -Assigns a custom function for dynamic field-of-view adjustments. This allows precise control over the camera's zoom behavior during gameplay - -### Lua Example -`set_fov_function(func)` - -### Parameters -| Field | Type | -| ----- | ---- | -| func | `integer` | - -### Returns -- None - -### C Prototype -`void set_fov_function(u8 func);` - -[:arrow_up_small:](#) - -
- -## [set_fov_shake](#set_fov_shake) - -### Description -Applies a field-of-view shake effect to simulate zoom or focus disruptions. Shake parameters, such as amplitude and decay, control the intensity - -### Lua Example -`set_fov_shake(amplitude, decay, shakeSpeed)` - -### Parameters -| Field | Type | -| ----- | ---- | -| amplitude | `integer` | +| mag | `integer` | | decay | `integer` | -| shakeSpeed | `integer` | +| inc | `integer` | ### Returns - None ### C Prototype -`void set_fov_shake(s16 amplitude, s16 decay, s16 shakeSpeed);` - -[:arrow_up_small:](#) - -
- -## [set_fov_shake_from_point_preset](#set_fov_shake_from_point_preset) - -### Description -Applies a preset field-of-view shake effect relative to a specific point. The intensity diminishes as the distance from the point increases - -### Lua Example -`set_fov_shake_from_point_preset(preset, posX, posY, posZ)` - -### Parameters -| Field | Type | -| ----- | ---- | -| preset | `integer` | -| posX | `number` | -| posY | `number` | -| posZ | `number` | - -### Returns -- None - -### C Prototype -`void set_fov_shake_from_point_preset(u8 preset, f32 posX, f32 posY, f32 posZ);` - -[:arrow_up_small:](#) - -
- -## [set_handheld_shake](#set_handheld_shake) - -### Description -Applies a handheld camera shake effect with configurable parameters. Can be used to simulate dynamic, realistic camera movement - -### Lua Example -`set_handheld_shake(mode)` - -### Parameters -| Field | Type | -| ----- | ---- | -| mode | `integer` | - -### Returns -- None - -### C Prototype -`void set_handheld_shake(u8 mode);` - -[:arrow_up_small:](#) - -
- -## [set_or_approach_f32_asymptotic](#set_or_approach_f32_asymptotic) - -### Description -Smoothly transitions or directly sets a floating-point value (`dst`) to approach a target (`goal`). Uses asymptotic scaling for gradual adjustments or direct assignment - -### Lua Example -`local integerValue = set_or_approach_f32_asymptotic(dst, goal, scale)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dst | `Pointer` <`number`> | -| goal | `number` | -| scale | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 set_or_approach_f32_asymptotic(f32 *dst, f32 goal, f32 scale);` - -[:arrow_up_small:](#) - -
- -## [set_or_approach_s16_symmetric](#set_or_approach_s16_symmetric) - -### Description -Smoothly transitions or directly sets a signed 16-bit value (`current`) to approach a target (`target`). Uses symmetric scaling for gradual or immediate adjustments - -### Lua Example -`local integerValue = set_or_approach_s16_symmetric(current, target, increment)` - -### Parameters -| Field | Type | -| ----- | ---- | -| current | `Pointer` <`integer`> | -| target | `integer` | -| increment | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 set_or_approach_s16_symmetric(s16 *current, s16 target, s16 increment);` - -[:arrow_up_small:](#) - -
- -## [set_or_approach_vec3f_asymptotic](#set_or_approach_vec3f_asymptotic) - -### Description -Smoothly transitions a 3D vector (`current`) toward a target vector (`goal`) using asymptotic scaling. Allows gradual or instantaneous alignment of 3D positions. Scaling values (the `Mul` variables) for x, y, and z axes determine the speed of adjustment for each component - -### Lua Example -`set_or_approach_vec3f_asymptotic(dst, goal, xMul, yMul, zMul)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dst | [Vec3f](structs.md#Vec3f) | -| goal | [Vec3f](structs.md#Vec3f) | -| xMul | `number` | -| yMul | `number` | -| zMul | `number` | - -### Returns -- None - -### C Prototype -`void set_or_approach_vec3f_asymptotic(Vec3f dst, Vec3f goal, f32 xMul, f32 yMul, f32 zMul);` +`void set_camera_roll_shake(s16 mag, s16 decay, s16 inc);` [:arrow_up_small:](#) @@ -2101,30 +1447,6 @@ Applies a pitch shake effect to the camera, scaled by proximity to a specified p
-## [shake_camera_handheld](#shake_camera_handheld) - -### Description -Activates a handheld camera shake effect. Calculates positional and focus adjustments to simulate manual movement - -### Lua Example -`shake_camera_handheld(pos, focus)` - -### Parameters -| Field | Type | -| ----- | ---- | -| pos | [Vec3f](structs.md#Vec3f) | -| focus | [Vec3f](structs.md#Vec3f) | - -### Returns -- None - -### C Prototype -`void shake_camera_handheld(Vec3f pos, Vec3f focus);` - -[:arrow_up_small:](#) - -
- ## [shake_camera_pitch](#shake_camera_pitch) ### Description @@ -2149,29 +1471,6 @@ Activates a pitch-based shake effect. Adds vertical vibrational movement to the
-## [shake_camera_roll](#shake_camera_roll) - -### Description -Applies a roll-based shake effect to the camera. Simulates rotational disturbances caused by impacts or other events - -### Lua Example -`shake_camera_roll(roll)` - -### Parameters -| Field | Type | -| ----- | ---- | -| roll | `Pointer` <`integer`> | - -### Returns -- None - -### C Prototype -`void shake_camera_roll(s16 *roll);` - -[:arrow_up_small:](#) - -
- ## [shake_camera_yaw](#shake_camera_yaw) ### Description @@ -2196,57 +1495,296 @@ Activates a yaw-based shake effect. Adds horizontal vibrational movement to the
-## [skip_camera_interpolation](#skip_camera_interpolation) +## [shake_camera_roll](#shake_camera_roll) ### Description -Skips camera interpolation for a frame, locking the camera instantly to the target position. Useful for immediate changes in camera state or position without smooth transitions +Applies a roll-based shake effect to the camera. Simulates rotational disturbances caused by impacts or other events ### Lua Example -`skip_camera_interpolation()` +`shake_camera_roll(roll)` ### Parameters -- None +| Field | Type | +| ----- | ---- | +| roll | `Pointer` <`integer`> | ### Returns - None ### C Prototype -`void skip_camera_interpolation(void);` +`void shake_camera_roll(s16 *roll);` [:arrow_up_small:](#)
-## [snap_to_45_degrees](#snap_to_45_degrees) +## [offset_yaw_outward_radial](#offset_yaw_outward_radial) ### Description -Takes in an SM64 angle unit and returns the nearest 45 degree angle, also in SM64 angle units. Useful when needing to align angles (camera, yaw, etc.) +Calculates an outward radial offset based on the camera's yaw angle. Returns the offset yaw, used for positioning or alignment ### Lua Example -`local integerValue = snap_to_45_degrees(angle)` +`local integerValue = offset_yaw_outward_radial(c, areaYaw)` ### Parameters | Field | Type | | ----- | ---- | -| angle | `integer` | +| c | [Camera](structs.md#Camera) | +| areaYaw | `integer` | ### Returns - `integer` ### C Prototype -`s32 snap_to_45_degrees(s16 angle);` +`s32 offset_yaw_outward_radial(struct Camera *c, s16 areaYaw);` [:arrow_up_small:](#)
-## [soft_reset_camera](#soft_reset_camera) +## [play_camera_buzz_if_cdown](#play_camera_buzz_if_cdown) ### Description -Resets the camera's state while retaining some settings, such as position or mode. This is often used when soft-resetting gameplay without reinitialization +Plays a buzzing sound effect when the camera attempts to move downward but is restricted. Provides feedback for invalid C-Down input actions ### Lua Example -`soft_reset_camera(c)` +`play_camera_buzz_if_cdown()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void play_camera_buzz_if_cdown(void);` + +[:arrow_up_small:](#) + +
+ +## [play_camera_buzz_if_cbutton](#play_camera_buzz_if_cbutton) + +### Description +Plays a buzzing sound effect when a blocked C-button action is attempted. Used to signal invalid input or restricted camera movement + +### Lua Example +`play_camera_buzz_if_cbutton()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void play_camera_buzz_if_cbutton(void);` + +[:arrow_up_small:](#) + +
+ +## [play_camera_buzz_if_c_sideways](#play_camera_buzz_if_c_sideways) + +### Description +Plays a buzzing sound effect when the camera's position is misaligned with the player's perspective. Used as audio feedback for incorrect camera behavior + +### Lua Example +`play_camera_buzz_if_c_sideways()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void play_camera_buzz_if_c_sideways(void);` + +[:arrow_up_small:](#) + +
+ +## [play_sound_cbutton_up](#play_sound_cbutton_up) + +### Description +Plays a sound effect when the C-Up button is pressed for camera movement. Provides feedback for vertical camera adjustments + +### Lua Example +`play_sound_cbutton_up()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void play_sound_cbutton_up(void);` + +[:arrow_up_small:](#) + +
+ +## [play_sound_cbutton_down](#play_sound_cbutton_down) + +### Description +Plays a sound effect when the C-Down button is pressed for camera movement. Provides auditory feedback for valid camera input + +### Lua Example +`play_sound_cbutton_down()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void play_sound_cbutton_down(void);` + +[:arrow_up_small:](#) + +
+ +## [play_sound_cbutton_side](#play_sound_cbutton_side) + +### Description +Plays a sound effect when the C-Side button (left or right) is pressed for camera movement. Used as audio feedback for horizontal adjustments to the camera + +### Lua Example +`play_sound_cbutton_side()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void play_sound_cbutton_side(void);` + +[:arrow_up_small:](#) + +
+ +## [play_sound_button_change_blocked](#play_sound_button_change_blocked) + +### Description +Plays a sound effect when a blocked action changes the camera mode. This provides feedback for invalid attempts to switch the camera state + +### Lua Example +`play_sound_button_change_blocked()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void play_sound_button_change_blocked(void);` + +[:arrow_up_small:](#) + +
+ +## [play_sound_rbutton_changed](#play_sound_rbutton_changed) + +### Description +Plays a sound effect when the R-Button camera mode is changed. Provides feedback for toggling camera behaviors + +### Lua Example +`play_sound_rbutton_changed()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void play_sound_rbutton_changed(void);` + +[:arrow_up_small:](#) + +
+ +## [play_sound_if_cam_switched_to_lakitu_or_mario](#play_sound_if_cam_switched_to_lakitu_or_mario) + +### Description +Plays a sound effect when the camera switches between Lakitu and Mario perspectives. Signals a successful change in camera mode + +### Lua Example +`play_sound_if_cam_switched_to_lakitu_or_mario()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void play_sound_if_cam_switched_to_lakitu_or_mario(void);` + +[:arrow_up_small:](#) + +
+ +## [radial_camera_input](#radial_camera_input) + +### Description +Handles radial camera movement based on player input. Updates the camera's position or orientation accordingly + +### Lua Example +`local integerValue = radial_camera_input(c, unused)` + +### Parameters +| Field | Type | +| ----- | ---- | +| c | [Camera](structs.md#Camera) | +| unused | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 radial_camera_input(struct Camera *c, UNUSED f32 unused);` + +[:arrow_up_small:](#) + +
+ +## [trigger_cutscene_dialog](#trigger_cutscene_dialog) + +### Description +Triggers a dialog sequence during a cutscene. The dialog is synchronized with the camera's position and movement + +### Lua Example +`local integerValue = trigger_cutscene_dialog(trigger)` + +### Parameters +| Field | Type | +| ----- | ---- | +| trigger | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 trigger_cutscene_dialog(s32 trigger);` + +[:arrow_up_small:](#) + +
+ +## [handle_c_button_movement](#handle_c_button_movement) + +### Description +Handles camera movement based on input from the C-buttons. Updates the camera's position or angle to match directional player input + +### Lua Example +`handle_c_button_movement(c)` ### Parameters | Field | Type | @@ -2257,7 +1795,7 @@ Resets the camera's state while retaining some settings, such as position or mod - None ### C Prototype -`void soft_reset_camera(struct Camera* c);` +`void handle_c_button_movement(struct Camera *c);` [:arrow_up_small:](#) @@ -2287,119 +1825,24 @@ Starts a cutscene based on the provided ID. The camera transitions to predefined
-## [start_object_cutscene_without_focus](#start_object_cutscene_without_focus) +## [get_cutscene_from_mario_status](#get_cutscene_from_mario_status) ### Description -Starts a cutscene focused on an object without requiring focus to remain locked. This is useful for dynamic events where the camera adjusts freely +Gets the appropriate cutscene to play based on Mario's current gameplay state. This function helps determine transitions for cinematic or scripted sequences ### Lua Example -`local integerValue = start_object_cutscene_without_focus(cutscene)` - -### Parameters -| Field | Type | -| ----- | ---- | -| cutscene | `integer` | - -### Returns -- `integer` - -### C Prototype -`u8 start_object_cutscene_without_focus(u8 cutscene);` - -[:arrow_up_small:](#) - -
- -## [transition_next_state](#transition_next_state) - -### Description -Transitions the camera to the next state over a specified number of frames. This is typically used for cutscenes or scripted sequences - -### Lua Example -`transition_next_state(c, frames)` +`local integerValue = get_cutscene_from_mario_status(c)` ### Parameters | Field | Type | | ----- | ---- | | c | [Camera](structs.md#Camera) | -| frames | `integer` | - -### Returns -- None - -### C Prototype -`void transition_next_state(UNUSED struct Camera *c, s16 frames);` - -[:arrow_up_small:](#) - -
- -## [trigger_cutscene_dialog](#trigger_cutscene_dialog) - -### Description -Triggers a dialog sequence during a cutscene. The dialog is synchronized with the camera's position and movement - -### Lua Example -`local integerValue = trigger_cutscene_dialog(trigger)` - -### Parameters -| Field | Type | -| ----- | ---- | -| trigger | `integer` | ### Returns - `integer` ### C Prototype -`s32 trigger_cutscene_dialog(s32 trigger);` - -[:arrow_up_small:](#) - -
- -## [vec3f_sub](#vec3f_sub) - -### Description -Subtracts one 3D vector (`src`) from another (`dst`). Stores the result in the destination vector - -### Lua Example -`vec3f_sub(dst, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dst | [Vec3f](structs.md#Vec3f) | -| src | [Vec3f](structs.md#Vec3f) | - -### Returns -- None - -### C Prototype -`void vec3f_sub(Vec3f dst, Vec3f src);` - -[:arrow_up_small:](#) - -
- -## [vec3f_to_object_pos](#vec3f_to_object_pos) - -### Description -Converts a `Vec3f` position to an object's internal format. Useful for syncing 3D positions between objects and the game world - -### Lua Example -`vec3f_to_object_pos(o, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| src | [Vec3f](structs.md#Vec3f) | - -### Returns -- None - -### C Prototype -`void vec3f_to_object_pos(struct Object *o, Vec3f src);` +`u8 get_cutscene_from_mario_status(struct Camera *c);` [:arrow_up_small:](#) @@ -2430,6 +1873,563 @@ Moves the camera to a specified warp destination. This function handles transiti
+## [approach_camera_height](#approach_camera_height) + +### Description +Adjusts the camera's height toward a target value (`goalHeight`) while respecting terrain and obstructions. This is really wonky and probably shouldn't be used, prefer `gLakituStates` + +### Lua Example +`approach_camera_height(c, goal, inc)` + +### Parameters +| Field | Type | +| ----- | ---- | +| c | [Camera](structs.md#Camera) | +| goal | `number` | +| inc | `number` | + +### Returns +- None + +### C Prototype +`void approach_camera_height(struct Camera *c, f32 goal, f32 inc);` + +[:arrow_up_small:](#) + +
+ +## [offset_rotated](#offset_rotated) + +### Description +Offsets a vector by rotating it in 3D space relative to a reference position. This is useful for creating radial effects or dynamic transformations + +### Lua Example +`offset_rotated(dst, from, to, rotation)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dst | [Vec3f](structs.md#Vec3f) | +| from | [Vec3f](structs.md#Vec3f) | +| to | [Vec3f](structs.md#Vec3f) | +| rotation | [Vec3s](structs.md#Vec3s) | + +### Returns +- None + +### C Prototype +`void offset_rotated(Vec3f dst, Vec3f from, Vec3f to, Vec3s rotation);` + +[:arrow_up_small:](#) + +
+ +## [next_lakitu_state](#next_lakitu_state) + +### Description +Transitions the camera to the next Lakitu state, updating position and focus. This function handles smooth transitions between different gameplay scenarios + +### Lua Example +`local integerValue = next_lakitu_state(newPos, newFoc, curPos, curFoc, oldPos, oldFoc, yaw)` + +### Parameters +| Field | Type | +| ----- | ---- | +| newPos | [Vec3f](structs.md#Vec3f) | +| newFoc | [Vec3f](structs.md#Vec3f) | +| curPos | [Vec3f](structs.md#Vec3f) | +| curFoc | [Vec3f](structs.md#Vec3f) | +| oldPos | [Vec3f](structs.md#Vec3f) | +| oldFoc | [Vec3f](structs.md#Vec3f) | +| yaw | `integer` | + +### Returns +- `integer` + +### C Prototype +`s16 next_lakitu_state(Vec3f newPos, Vec3f newFoc, Vec3f curPos, Vec3f curFoc, Vec3f oldPos, Vec3f oldFoc, s16 yaw);` + +[:arrow_up_small:](#) + +
+ +## [set_fixed_cam_axis_sa_lobby](#set_fixed_cam_axis_sa_lobby) + +### Lua Example +`set_fixed_cam_axis_sa_lobby(preset)` + +### Parameters +| Field | Type | +| ----- | ---- | +| preset | `integer` | + +### Returns +- None + +### C Prototype +`void set_fixed_cam_axis_sa_lobby(UNUSED s16 preset);` + +[:arrow_up_small:](#) + +
+ +## [camera_course_processing](#camera_course_processing) + +### Description +Processes course-specific camera settings, such as predefined positions or modes. Adjusts the camera to match the design and gameplay requirements of the current course + +### Lua Example +`local integerValue = camera_course_processing(c)` + +### Parameters +| Field | Type | +| ----- | ---- | +| c | [Camera](structs.md#Camera) | + +### Returns +- `integer` + +### C Prototype +`s16 camera_course_processing(struct Camera *c);` + +[:arrow_up_small:](#) + +
+ +## [resolve_geometry_collisions](#resolve_geometry_collisions) + +### Description +Resolves collisions between the camera and level geometry. Adjusts the camera's position to prevent clipping or intersecting with objects + +### Lua Example +`resolve_geometry_collisions(pos, lastGood)` + +### Parameters +| Field | Type | +| ----- | ---- | +| pos | [Vec3f](structs.md#Vec3f) | +| lastGood | [Vec3f](structs.md#Vec3f) | + +### Returns +- None + +### C Prototype +`void resolve_geometry_collisions(Vec3f pos, UNUSED Vec3f lastGood);` + +[:arrow_up_small:](#) + +
+ +## [rotate_camera_around_walls](#rotate_camera_around_walls) + +### Description +Rotates the camera to avoid walls or other obstructions. Ensures clear visibility of the player or target objects + +### Lua Example +`local integerValue = rotate_camera_around_walls(c, cPos, avoidYaw, yawRange)` + +### Parameters +| Field | Type | +| ----- | ---- | +| c | [Camera](structs.md#Camera) | +| cPos | [Vec3f](structs.md#Vec3f) | +| avoidYaw | `Pointer` <`integer`> | +| yawRange | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 rotate_camera_around_walls(struct Camera *c, Vec3f cPos, s16 *avoidYaw, s16 yawRange);` + +[:arrow_up_small:](#) + +
+ +## [find_mario_floor_and_ceil](#find_mario_floor_and_ceil) + +### Description +Finds the floor and ceiling directly above and below Mario's position. Updates Mario's geometry information for camera calculations + +### Lua Example +`find_mario_floor_and_ceil(pg)` + +### Parameters +| Field | Type | +| ----- | ---- | +| pg | [PlayerGeometry](structs.md#PlayerGeometry) | + +### Returns +- None + +### C Prototype +`void find_mario_floor_and_ceil(struct PlayerGeometry *pg);` + +[:arrow_up_small:](#) + +
+ +## [start_object_cutscene_without_focus](#start_object_cutscene_without_focus) + +### Description +Starts a cutscene focused on an object without requiring focus to remain locked. This is useful for dynamic events where the camera adjusts freely + +### Lua Example +`local integerValue = start_object_cutscene_without_focus(cutscene)` + +### Parameters +| Field | Type | +| ----- | ---- | +| cutscene | `integer` | + +### Returns +- `integer` + +### C Prototype +`u8 start_object_cutscene_without_focus(u8 cutscene);` + +[:arrow_up_small:](#) + +
+ +## [cutscene_object_with_dialog](#cutscene_object_with_dialog) + +### Description +Starts a cutscene involving an object and displays dialog during the sequence. The camera focuses on the object while synchronizing dialog with the scene + +### Lua Example +`local integerValue = cutscene_object_with_dialog(cutscene, o, dialogID)` + +### Parameters +| Field | Type | +| ----- | ---- | +| cutscene | `integer` | +| o | [Object](structs.md#Object) | +| dialogID | `integer` | + +### Returns +- `integer` + +### C Prototype +`s16 cutscene_object_with_dialog(u8 cutscene, struct Object *o, s16 dialogID);` + +[:arrow_up_small:](#) + +
+ +## [cutscene_object_without_dialog](#cutscene_object_without_dialog) + +### Description +Starts a cutscene involving an object without dialog. The camera transitions smoothly to focus on the object + +### Lua Example +`local integerValue = cutscene_object_without_dialog(cutscene, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| cutscene | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`s16 cutscene_object_without_dialog(u8 cutscene, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [cutscene_object](#cutscene_object) + +### Description +Initiates a cutscene focusing on a specific object in the game world. The camera transitions smoothly to the object, adapting its position as needed + +### Lua Example +`local integerValue = cutscene_object(cutscene, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| cutscene | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`s16 cutscene_object(u8 cutscene, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [play_cutscene](#play_cutscene) + +### Description +Starts the execution of a predefined cutscene. The camera transitions dynamically to follow the scripted sequence + +### Lua Example +`play_cutscene(c)` + +### Parameters +| Field | Type | +| ----- | ---- | +| c | [Camera](structs.md#Camera) | + +### Returns +- None + +### C Prototype +`void play_cutscene(struct Camera *c);` + +[:arrow_up_small:](#) + +
+ +## [cutscene_spawn_obj](#cutscene_spawn_obj) + +### Description +Spawns an object as part of a cutscene, such as props or interactive elements. Returns the spawned object's reference for further manipulation + +### Lua Example +`local integerValue = cutscene_spawn_obj(obj, frame)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | `integer` | +| frame | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cutscene_spawn_obj(u32 obj, s16 frame);` + +[:arrow_up_small:](#) + +
+ +## [set_fov_shake](#set_fov_shake) + +### Description +Applies a field-of-view shake effect to simulate zoom or focus disruptions. Shake parameters, such as amplitude and decay, control the intensity + +### Lua Example +`set_fov_shake(amplitude, decay, shakeSpeed)` + +### Parameters +| Field | Type | +| ----- | ---- | +| amplitude | `integer` | +| decay | `integer` | +| shakeSpeed | `integer` | + +### Returns +- None + +### C Prototype +`void set_fov_shake(s16 amplitude, s16 decay, s16 shakeSpeed);` + +[:arrow_up_small:](#) + +
+ +## [set_fov_function](#set_fov_function) + +### Description +Assigns a custom function for dynamic field-of-view adjustments. This allows precise control over the camera's zoom behavior during gameplay + +### Lua Example +`set_fov_function(func)` + +### Parameters +| Field | Type | +| ----- | ---- | +| func | `integer` | + +### Returns +- None + +### C Prototype +`void set_fov_function(u8 func);` + +[:arrow_up_small:](#) + +
+ +## [cutscene_set_fov_shake_preset](#cutscene_set_fov_shake_preset) + +### Description +Applies a preset field-of-view shake effect during a cutscene. This creates dynamic visual effects, such as zoom or focus disruptions + +### Lua Example +`cutscene_set_fov_shake_preset(preset)` + +### Parameters +| Field | Type | +| ----- | ---- | +| preset | `integer` | + +### Returns +- None + +### C Prototype +`void cutscene_set_fov_shake_preset(u8 preset);` + +[:arrow_up_small:](#) + +
+ +## [set_fov_shake_from_point_preset](#set_fov_shake_from_point_preset) + +### Description +Applies a preset field-of-view shake effect relative to a specific point. The intensity diminishes as the distance from the point increases + +### Lua Example +`set_fov_shake_from_point_preset(preset, posX, posY, posZ)` + +### Parameters +| Field | Type | +| ----- | ---- | +| preset | `integer` | +| posX | `number` | +| posY | `number` | +| posZ | `number` | + +### Returns +- None + +### C Prototype +`void set_fov_shake_from_point_preset(u8 preset, f32 posX, f32 posY, f32 posZ);` + +[:arrow_up_small:](#) + +
+ +## [obj_rotate_towards_point](#obj_rotate_towards_point) + +### Description +Rotates an object toward a specific point in 3D space. Gradually updates the object's pitch and yaw angles to face the target + +### Lua Example +`obj_rotate_towards_point(o, point, pitchOff, yawOff, pitchDiv, yawDiv)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| point | [Vec3f](structs.md#Vec3f) | +| pitchOff | `integer` | +| yawOff | `integer` | +| pitchDiv | `integer` | +| yawDiv | `integer` | + +### Returns +- None + +### C Prototype +`void obj_rotate_towards_point(struct Object *o, Vec3f point, s16 pitchOff, s16 yawOff, s16 pitchDiv, s16 yawDiv);` + +[:arrow_up_small:](#) + +
+ +## [set_camera_mode_fixed](#set_camera_mode_fixed) + +### Description +Activates a fixed camera mode and aligns the camera to specific X, Y, Z coordinates. This is useful for predefined static views in specific areas + +### Lua Example +`local integerValue = set_camera_mode_fixed(c, x, y, z)` + +### Parameters +| Field | Type | +| ----- | ---- | +| c | [Camera](structs.md#Camera) | +| x | `integer` | +| y | `integer` | +| z | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 set_camera_mode_fixed(struct Camera* c, s16 x, s16 y, s16 z);` + +[:arrow_up_small:](#) + +
+ +## [snap_to_45_degrees](#snap_to_45_degrees) + +### Description +Takes in an SM64 angle unit and returns the nearest 45 degree angle, also in SM64 angle units. Useful when needing to align angles (camera, yaw, etc.) + +### Lua Example +`local integerValue = snap_to_45_degrees(angle)` + +### Parameters +| Field | Type | +| ----- | ---- | +| angle | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 snap_to_45_degrees(s16 angle);` + +[:arrow_up_small:](#) + +
+ +## [camera_set_use_course_specific_settings](#camera_set_use_course_specific_settings) + +### Description +Toggles whether the camera uses course-specific settings. This is useful for enabling or disabling custom behaviors in specific courses or areas + +### Lua Example +`camera_set_use_course_specific_settings(enable)` + +### Parameters +| Field | Type | +| ----- | ---- | +| enable | `integer` | + +### Returns +- None + +### C Prototype +`void camera_set_use_course_specific_settings(u8 enable);` + +[:arrow_up_small:](#) + +
+ +## [center_rom_hack_camera](#center_rom_hack_camera) + +### Description +Centers the ROM hack camera. This function is designed for non-standard level layouts and modded game environments + +### Lua Example +`center_rom_hack_camera()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void center_rom_hack_camera(void);` + +[:arrow_up_small:](#) + +
+ --- # functions from characters.h @@ -2456,53 +2456,6 @@ Moves the camera to a specified warp destination. This function handles transiti
-## [get_character_anim](#get_character_anim) - -### Description -Gets the animation ID to use for a specific character and animation combination. The ID is based on `characterAnim` and the character currently controlled by Mario (`m`). Useful for determining which animation to play for actions like walking, jumping, or idle states - -### Lua Example -`local integerValue = get_character_anim(m, characterAnim)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| characterAnim | [enum CharacterAnimID](constants.md#enum-CharacterAnimID) | - -### Returns -- `integer` - -### C Prototype -`s32 get_character_anim(struct MarioState* m, enum CharacterAnimID characterAnim);` - -[:arrow_up_small:](#) - -
- -## [get_character_anim_offset](#get_character_anim_offset) - -### Description -Calculates the animation offset for Mario's current animation. The offset is determined by the type of animation being played (e.g., hand, feet, or torso movement). Useful for smoothly syncing Mario's model height or positional adjustments during animations - -### Lua Example -`local numberValue = get_character_anim_offset(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `number` - -### C Prototype -`f32 get_character_anim_offset(struct MarioState* m);` - -[:arrow_up_small:](#) - -
- ## [play_character_sound](#play_character_sound) ### Description @@ -2527,6 +2480,31 @@ Plays a character-specific sound based on the given `characterSound` value. The
+## [play_character_sound_offset](#play_character_sound_offset) + +### Description +Plays a character-specific sound with an additional `offset`, allowing variations or delays in the sound effect. Uses Mario's current state (`m`). Useful for adding dynamic sound effects or syncing sounds to specific animations or events + +### Lua Example +`play_character_sound_offset(m, characterSound, offset)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| characterSound | [enum CharacterSound](constants.md#enum-CharacterSound) | +| offset | `integer` | + +### Returns +- None + +### C Prototype +`void play_character_sound_offset(struct MarioState* m, enum CharacterSound characterSound, u32 offset);` + +[:arrow_up_small:](#) + +
+ ## [play_character_sound_if_no_flag](#play_character_sound_if_no_flag) ### Description @@ -2552,26 +2530,48 @@ Plays a character-specific sound only if certain flags are not set. This ensures
-## [play_character_sound_offset](#play_character_sound_offset) +## [get_character_anim_offset](#get_character_anim_offset) ### Description -Plays a character-specific sound with an additional `offset`, allowing variations or delays in the sound effect. Uses Mario's current state (`m`). Useful for adding dynamic sound effects or syncing sounds to specific animations or events +Calculates the animation offset for Mario's current animation. The offset is determined by the type of animation being played (e.g., hand, feet, or torso movement). Useful for smoothly syncing Mario's model height or positional adjustments during animations ### Lua Example -`play_character_sound_offset(m, characterSound, offset)` +`local numberValue = get_character_anim_offset(m)` ### Parameters | Field | Type | | ----- | ---- | | m | [MarioState](structs.md#MarioState) | -| characterSound | [enum CharacterSound](constants.md#enum-CharacterSound) | -| offset | `integer` | ### Returns -- None +- `number` ### C Prototype -`void play_character_sound_offset(struct MarioState* m, enum CharacterSound characterSound, u32 offset);` +`f32 get_character_anim_offset(struct MarioState* m);` + +[:arrow_up_small:](#) + +
+ +## [get_character_anim](#get_character_anim) + +### Description +Gets the animation ID to use for a specific character and animation combination. The ID is based on `characterAnim` and the character currently controlled by Mario (`m`). Useful for determining which animation to play for actions like walking, jumping, or idle states + +### Lua Example +`local integerValue = get_character_anim(m, characterAnim)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| characterAnim | [enum CharacterAnimID](constants.md#enum-CharacterAnimID) | + +### Returns +- `integer` + +### C Prototype +`s32 get_character_anim(struct MarioState* m, enum CharacterAnimID characterAnim);` [:arrow_up_small:](#) @@ -2662,22 +2662,45 @@ Toggles the visibility of the DJUI console
-## [djui_hud_get_color](#djui_hud_get_color) +## [djui_hud_get_resolution](#djui_hud_get_resolution) ### Description -Gets the current DJUI HUD color +Gets the current DJUI HUD resolution ### Lua Example -`local DjuiColorValue = djui_hud_get_color()` +`local integerValue = djui_hud_get_resolution()` ### Parameters - None ### Returns -[DjuiColor](structs.md#DjuiColor) +- `integer` ### C Prototype -`struct DjuiColor* djui_hud_get_color(void);` +`u8 djui_hud_get_resolution(void);` + +[:arrow_up_small:](#) + +
+ +## [djui_hud_set_resolution](#djui_hud_set_resolution) + +### Description +Sets the current DJUI HUD resolution + +### Lua Example +`djui_hud_set_resolution(resolutionType)` + +### Parameters +| Field | Type | +| ----- | ---- | +| resolutionType | [enum HudUtilsResolution](constants.md#enum-HudUtilsResolution) | + +### Returns +- None + +### C Prototype +`void djui_hud_set_resolution(enum HudUtilsResolution resolutionType);` [:arrow_up_small:](#) @@ -2704,6 +2727,29 @@ Gets the current DJUI HUD texture filter
+## [djui_hud_set_filter](#djui_hud_set_filter) + +### Description +Sets the current DJUI HUD texture filter + +### Lua Example +`djui_hud_set_filter(filterType)` + +### Parameters +| Field | Type | +| ----- | ---- | +| filterType | [enum HudUtilsFilter](constants.md#enum-HudUtilsFilter) | + +### Returns +- None + +### C Prototype +`void djui_hud_set_filter(enum HudUtilsFilter filterType);` + +[:arrow_up_small:](#) + +
+ ## [djui_hud_get_font](#djui_hud_get_font) ### Description @@ -2725,22 +2771,208 @@ Gets the current DJUI HUD font
-## [djui_hud_get_fov_coeff](#djui_hud_get_fov_coeff) +## [djui_hud_set_font](#djui_hud_set_font) ### Description -Gets the camera FOV coefficient +Sets the current DJUI HUD font ### Lua Example -`local numberValue = djui_hud_get_fov_coeff()` +`djui_hud_set_font(fontType)` + +### Parameters +| Field | Type | +| ----- | ---- | +| fontType | `integer` | + +### Returns +- None + +### C Prototype +`void djui_hud_set_font(s8 fontType);` + +[:arrow_up_small:](#) + +
+ +## [djui_hud_get_color](#djui_hud_get_color) + +### Description +Gets the current DJUI HUD color + +### Lua Example +`local DjuiColorValue = djui_hud_get_color()` ### Parameters - None ### Returns -- `number` +[DjuiColor](structs.md#DjuiColor) ### C Prototype -`f32 djui_hud_get_fov_coeff();` +`struct DjuiColor* djui_hud_get_color(void);` + +[:arrow_up_small:](#) + +
+ +## [djui_hud_set_color](#djui_hud_set_color) + +### Description +Sets the current DJUI HUD color + +### Lua Example +`djui_hud_set_color(r, g, b, a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| r | `integer` | +| g | `integer` | +| b | `integer` | +| a | `integer` | + +### Returns +- None + +### C Prototype +`void djui_hud_set_color(u8 r, u8 g, u8 b, u8 a);` + +[:arrow_up_small:](#) + +
+ +## [djui_hud_reset_color](#djui_hud_reset_color) + +### Description +Resets the current DJUI HUD color + +### Lua Example +`djui_hud_reset_color()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void djui_hud_reset_color(void);` + +[:arrow_up_small:](#) + +
+ +## [djui_hud_get_rotation](#djui_hud_get_rotation) + +### Description +Gets the current DJUI HUD rotation + +### Lua Example +`local HudUtilsRotationValue = djui_hud_get_rotation()` + +### Parameters +- None + +### Returns +[HudUtilsRotation](structs.md#HudUtilsRotation) + +### C Prototype +`struct HudUtilsRotation* djui_hud_get_rotation(void);` + +[:arrow_up_small:](#) + +
+ +## [djui_hud_set_rotation](#djui_hud_set_rotation) + +### Description +Sets the current DJUI HUD rotation + +### Lua Example +`djui_hud_set_rotation(rotation, pivotX, pivotY)` + +### Parameters +| Field | Type | +| ----- | ---- | +| rotation | `integer` | +| pivotX | `number` | +| pivotY | `number` | + +### Returns +- None + +### C Prototype +`void djui_hud_set_rotation(s16 rotation, f32 pivotX, f32 pivotY);` + +[:arrow_up_small:](#) + +
+ +## [djui_hud_set_rotation_interpolated](#djui_hud_set_rotation_interpolated) + +### Description +Sets the current DJUI HUD rotation interpolated + +### Lua Example +`djui_hud_set_rotation_interpolated(prevRotation, prevPivotX, prevPivotY, rotation, pivotX, pivotY)` + +### Parameters +| Field | Type | +| ----- | ---- | +| prevRotation | `integer` | +| prevPivotX | `number` | +| prevPivotY | `number` | +| rotation | `integer` | +| pivotX | `number` | +| pivotY | `number` | + +### Returns +- None + +### C Prototype +`void djui_hud_set_rotation_interpolated(s32 prevRotation, f32 prevPivotX, f32 prevPivotY, s32 rotation, f32 pivotX, f32 pivotY);` + +[:arrow_up_small:](#) + +
+ +## [djui_hud_get_screen_width](#djui_hud_get_screen_width) + +### Description +Gets the screen width in the current DJUI HUD resolution + +### Lua Example +`local integerValue = djui_hud_get_screen_width()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u32 djui_hud_get_screen_width(void);` + +[:arrow_up_small:](#) + +
+ +## [djui_hud_get_screen_height](#djui_hud_get_screen_height) + +### Description +Gets the screen height in the current DJUI HUD resolution + +### Lua Example +`local integerValue = djui_hud_get_screen_height()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u32 djui_hud_get_screen_height(void);` [:arrow_up_small:](#) @@ -2830,13 +3062,36 @@ Returns the y coordinate of the mouse relative to the screen
-## [djui_hud_get_resolution](#djui_hud_get_resolution) +## [djui_hud_set_mouse_locked](#djui_hud_set_mouse_locked) ### Description -Gets the current DJUI HUD resolution +Sets if the cursor is hidden and constrainted to the window ### Lua Example -`local integerValue = djui_hud_get_resolution()` +`djui_hud_set_mouse_locked(locked)` + +### Parameters +| Field | Type | +| ----- | ---- | +| locked | `boolean` | + +### Returns +- None + +### C Prototype +`void djui_hud_set_mouse_locked(bool locked);` + +[:arrow_up_small:](#) + +
+ +## [djui_hud_get_mouse_buttons_down](#djui_hud_get_mouse_buttons_down) + +### Description +Returns the flags of the mouse buttons held down + +### Lua Example +`local integerValue = djui_hud_get_mouse_buttons_down()` ### Parameters - None @@ -2845,40 +3100,19 @@ Gets the current DJUI HUD resolution - `integer` ### C Prototype -`u8 djui_hud_get_resolution(void);` +`u8 djui_hud_get_mouse_buttons_down(void);` [:arrow_up_small:](#)
-## [djui_hud_get_rotation](#djui_hud_get_rotation) +## [djui_hud_get_mouse_buttons_pressed](#djui_hud_get_mouse_buttons_pressed) ### Description -Gets the current DJUI HUD rotation +Returns the flags of the mouse buttons clicked ### Lua Example -`local HudUtilsRotationValue = djui_hud_get_rotation()` - -### Parameters -- None - -### Returns -[HudUtilsRotation](structs.md#HudUtilsRotation) - -### C Prototype -`struct HudUtilsRotation* djui_hud_get_rotation(void);` - -[:arrow_up_small:](#) - -
- -## [djui_hud_get_screen_height](#djui_hud_get_screen_height) - -### Description -Gets the screen height in the current DJUI HUD resolution - -### Lua Example -`local integerValue = djui_hud_get_screen_height()` +`local integerValue = djui_hud_get_mouse_buttons_pressed()` ### Parameters - None @@ -2887,19 +3121,19 @@ Gets the screen height in the current DJUI HUD resolution - `integer` ### C Prototype -`u32 djui_hud_get_screen_height(void);` +`u8 djui_hud_get_mouse_buttons_pressed(void);` [:arrow_up_small:](#)
-## [djui_hud_get_screen_width](#djui_hud_get_screen_width) +## [djui_hud_get_mouse_buttons_released](#djui_hud_get_mouse_buttons_released) ### Description -Gets the screen width in the current DJUI HUD resolution +Returns the flags of the mouse buttons released ### Lua Example -`local integerValue = djui_hud_get_screen_width()` +`local integerValue = djui_hud_get_mouse_buttons_released()` ### Parameters - None @@ -2908,28 +3142,49 @@ Gets the screen width in the current DJUI HUD resolution - `integer` ### C Prototype -`u32 djui_hud_get_screen_width(void);` +`u8 djui_hud_get_mouse_buttons_released(void);` [:arrow_up_small:](#)
-## [djui_hud_is_pause_menu_created](#djui_hud_is_pause_menu_created) +## [djui_hud_get_mouse_scroll_x](#djui_hud_get_mouse_scroll_x) ### Description -Checks if the DJUI pause menu is created +Returns the amount scrolled horizontally (-left/right+) ### Lua Example -`local booleanValue = djui_hud_is_pause_menu_created()` +`local numberValue = djui_hud_get_mouse_scroll_x()` ### Parameters - None ### Returns -- `boolean` +- `number` ### C Prototype -`bool djui_hud_is_pause_menu_created(void);` +`f32 djui_hud_get_mouse_scroll_x(void);` + +[:arrow_up_small:](#) + +
+ +## [djui_hud_get_mouse_scroll_y](#djui_hud_get_mouse_scroll_y) + +### Description +Returns the amount scrolled vertically (-down/up+) + +### Lua Example +`local numberValue = djui_hud_get_mouse_scroll_y()` + +### Parameters +- None + +### Returns +- `number` + +### C Prototype +`f32 djui_hud_get_mouse_scroll_y(void);` [:arrow_up_small:](#) @@ -3069,193 +3324,43 @@ Renders an interpolated DJUI HUD rect onto the screen
-## [djui_hud_reset_color](#djui_hud_reset_color) +## [get_current_fov](#get_current_fov) ### Description -Resets the current DJUI HUD color +Gets the current camera FOV ### Lua Example -`djui_hud_reset_color()` +`local numberValue = get_current_fov()` ### Parameters - None ### Returns -- None +- `number` ### C Prototype -`void djui_hud_reset_color(void);` +`f32 get_current_fov();` [:arrow_up_small:](#)
-## [djui_hud_set_color](#djui_hud_set_color) +## [djui_hud_get_fov_coeff](#djui_hud_get_fov_coeff) ### Description -Sets the current DJUI HUD color +Gets the camera FOV coefficient ### Lua Example -`djui_hud_set_color(r, g, b, a)` +`local numberValue = djui_hud_get_fov_coeff()` ### Parameters -| Field | Type | -| ----- | ---- | -| r | `integer` | -| g | `integer` | -| b | `integer` | -| a | `integer` | - -### Returns - None -### C Prototype -`void djui_hud_set_color(u8 r, u8 g, u8 b, u8 a);` - -[:arrow_up_small:](#) - -
- -## [djui_hud_set_filter](#djui_hud_set_filter) - -### Description -Sets the current DJUI HUD texture filter - -### Lua Example -`djui_hud_set_filter(filterType)` - -### Parameters -| Field | Type | -| ----- | ---- | -| filterType | [enum HudUtilsFilter](constants.md#enum-HudUtilsFilter) | - ### Returns -- None +- `number` ### C Prototype -`void djui_hud_set_filter(enum HudUtilsFilter filterType);` - -[:arrow_up_small:](#) - -
- -## [djui_hud_set_font](#djui_hud_set_font) - -### Description -Sets the current DJUI HUD font - -### Lua Example -`djui_hud_set_font(fontType)` - -### Parameters -| Field | Type | -| ----- | ---- | -| fontType | `integer` | - -### Returns -- None - -### C Prototype -`void djui_hud_set_font(s8 fontType);` - -[:arrow_up_small:](#) - -
- -## [djui_hud_set_mouse_locked](#djui_hud_set_mouse_locked) - -### Description -Sets if the cursor is hidden and constrainted to the window - -### Lua Example -`djui_hud_set_mouse_locked(locked)` - -### Parameters -| Field | Type | -| ----- | ---- | -| locked | `boolean` | - -### Returns -- None - -### C Prototype -`void djui_hud_set_mouse_locked(bool locked);` - -[:arrow_up_small:](#) - -
- -## [djui_hud_set_resolution](#djui_hud_set_resolution) - -### Description -Sets the current DJUI HUD resolution - -### Lua Example -`djui_hud_set_resolution(resolutionType)` - -### Parameters -| Field | Type | -| ----- | ---- | -| resolutionType | [enum HudUtilsResolution](constants.md#enum-HudUtilsResolution) | - -### Returns -- None - -### C Prototype -`void djui_hud_set_resolution(enum HudUtilsResolution resolutionType);` - -[:arrow_up_small:](#) - -
- -## [djui_hud_set_rotation](#djui_hud_set_rotation) - -### Description -Sets the current DJUI HUD rotation - -### Lua Example -`djui_hud_set_rotation(rotation, pivotX, pivotY)` - -### Parameters -| Field | Type | -| ----- | ---- | -| rotation | `integer` | -| pivotX | `number` | -| pivotY | `number` | - -### Returns -- None - -### C Prototype -`void djui_hud_set_rotation(s16 rotation, f32 pivotX, f32 pivotY);` - -[:arrow_up_small:](#) - -
- -## [djui_hud_set_rotation_interpolated](#djui_hud_set_rotation_interpolated) - -### Description -Sets the current DJUI HUD rotation interpolated - -### Lua Example -`djui_hud_set_rotation_interpolated(prevRotation, prevPivotX, prevPivotY, rotation, pivotX, pivotY)` - -### Parameters -| Field | Type | -| ----- | ---- | -| prevRotation | `integer` | -| prevPivotX | `number` | -| prevPivotY | `number` | -| rotation | `integer` | -| pivotX | `number` | -| pivotY | `number` | - -### Returns -- None - -### C Prototype -`void djui_hud_set_rotation_interpolated(s32 prevRotation, f32 prevPivotX, f32 prevPivotY, s32 rotation, f32 pivotX, f32 pivotY);` +`f32 djui_hud_get_fov_coeff();` [:arrow_up_small:](#) @@ -3285,6 +3390,27 @@ Converts a world position to screen position
+## [djui_hud_is_pause_menu_created](#djui_hud_is_pause_menu_created) + +### Description +Checks if the DJUI pause menu is created + +### Lua Example +`local booleanValue = djui_hud_is_pause_menu_created()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool djui_hud_is_pause_menu_created(void);` + +[:arrow_up_small:](#) + +
+ ## [djui_open_pause_menu](#djui_open_pause_menu) ### Description @@ -3306,27 +3432,6 @@ Opens the DJUI pause menu
-## [get_current_fov](#get_current_fov) - -### Description -Gets the current camera FOV - -### Lua Example -`local numberValue = get_current_fov()` - -### Parameters -- None - -### Returns -- `number` - -### C Prototype -`f32 get_current_fov();` - -[:arrow_up_small:](#) - -
- --- # functions from djui_language.h @@ -3422,383 +3527,6 @@ Creates a popup that says `message` and has `lines`
-## [drop_queued_background_music](#drop_queued_background_music) - -### Description -Drops any queued background music - -### Lua Example -`drop_queued_background_music()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void drop_queued_background_music(void);` - -[:arrow_up_small:](#) - -
- -## [fade_volume_scale](#fade_volume_scale) - -### Description -Fades the volume of `player` to `targetScale` (0-127) over `fadeDuration` - -### Lua Example -`fade_volume_scale(player, targetScale, fadeDuration)` - -### Parameters -| Field | Type | -| ----- | ---- | -| player | `integer` | -| targetScale | `integer` | -| fadeDuration | `integer` | - -### Returns -- None - -### C Prototype -`void fade_volume_scale(u8 player, u8 targetScale, u16 fadeDuration);` - -[:arrow_up_small:](#) - -
- -## [fadeout_background_music](#fadeout_background_music) - -### Description -Fades out background music `seqId` over `fadeOut` - -### Lua Example -`fadeout_background_music(seqId, fadeOut)` - -### Parameters -| Field | Type | -| ----- | ---- | -| seqId | `integer` | -| fadeOut | `integer` | - -### Returns -- None - -### C Prototype -`void fadeout_background_music(u16 seqId, u16 fadeOut);` - -[:arrow_up_small:](#) - -
- -## [get_current_background_music](#get_current_background_music) - -### Description -Gets the current background music - -### Lua Example -`local integerValue = get_current_background_music()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u16 get_current_background_music(void);` - -[:arrow_up_small:](#) - -
- -## [get_current_background_music_default_volume](#get_current_background_music_default_volume) - -### Description -Gets the current background music's default volume - -### Lua Example -`local integerValue = get_current_background_music_default_volume()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u8 get_current_background_music_default_volume(void);` - -[:arrow_up_small:](#) - -
- -## [get_current_background_music_max_target_volume](#get_current_background_music_max_target_volume) - -### Description -Gets the current max target volume - -### Lua Example -`local integerValue = get_current_background_music_max_target_volume()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u8 get_current_background_music_max_target_volume(void);` - -[:arrow_up_small:](#) - -
- -## [get_current_background_music_target_volume](#get_current_background_music_target_volume) - -### Description -Gets the current target volume - -### Lua Example -`local integerValue = get_current_background_music_target_volume()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u8 get_current_background_music_target_volume(void);` - -[:arrow_up_small:](#) - -
- -## [get_sound_pan](#get_sound_pan) - -### Lua Example -`local numberValue = get_sound_pan(x, z)` - -### Parameters -| Field | Type | -| ----- | ---- | -| x | `number` | -| z | `number` | - -### Returns -- `number` - -### C Prototype -`f32 get_sound_pan(f32 x, f32 z);` - -[:arrow_up_small:](#) - -
- -## [is_current_background_music_volume_lowered](#is_current_background_music_volume_lowered) - -### Description -Checks if the current background music is lowered - -### Lua Example -`local integerValue = is_current_background_music_volume_lowered()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u8 is_current_background_music_volume_lowered(void);` - -[:arrow_up_small:](#) - -
- -## [play_course_clear](#play_course_clear) - -### Description -Plays the star collect fanfare (this function's name was mixed up with the other) - -### Lua Example -`play_course_clear()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_course_clear(void);` - -[:arrow_up_small:](#) - -
- -## [play_dialog_sound](#play_dialog_sound) - -### Description -Plays a dialog sound corresponding to `dialogID` - -### Lua Example -`play_dialog_sound(dialogID)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dialogID | `integer` | - -### Returns -- None - -### C Prototype -`void play_dialog_sound(u8 dialogID);` - -[:arrow_up_small:](#) - -
- -## [play_music](#play_music) - -### Description -Plays fading in music (`seqArgs`) on `player` over `fadeTimer` - -### Lua Example -`play_music(player, seqArgs, fadeTimer)` - -### Parameters -| Field | Type | -| ----- | ---- | -| player | `integer` | -| seqArgs | `integer` | -| fadeTimer | `integer` | - -### Returns -- None - -### C Prototype -`void play_music(u8 player, u16 seqArgs, u16 fadeTimer);` - -[:arrow_up_small:](#) - -
- -## [play_peachs_jingle](#play_peachs_jingle) - -### Description -Plays Peach's letter jingle - -### Lua Example -`play_peachs_jingle()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_peachs_jingle(void);` - -[:arrow_up_small:](#) - -
- -## [play_power_star_jingle](#play_power_star_jingle) - -### Description -Plays the power star jingle, set `keepBackgroundMusic` to 0 to mute background music - -### Lua Example -`play_power_star_jingle(keepBackgroundMusic)` - -### Parameters -| Field | Type | -| ----- | ---- | -| keepBackgroundMusic | `integer` | - -### Returns -- None - -### C Prototype -`void play_power_star_jingle(u8 keepBackgroundMusic);` - -[:arrow_up_small:](#) - -
- -## [play_puzzle_jingle](#play_puzzle_jingle) - -### Description -Plays the puzzle jingle - -### Lua Example -`play_puzzle_jingle()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_puzzle_jingle(void);` - -[:arrow_up_small:](#) - -
- -## [play_race_fanfare](#play_race_fanfare) - -### Description -Plays the race fanfare when a race is started - -### Lua Example -`play_race_fanfare()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_race_fanfare(void);` - -[:arrow_up_small:](#) - -
- -## [play_secondary_music](#play_secondary_music) - -### Description -Plays fading in secondary music `seqId` at `volume` over `fadeTimer` and sets the current background music's volume to `bgMusicVolume` - -### Lua Example -`play_secondary_music(seqId, bgMusicVolume, volume, fadeTimer)` - -### Parameters -| Field | Type | -| ----- | ---- | -| seqId | `integer` | -| bgMusicVolume | `integer` | -| volume | `integer` | -| fadeTimer | `integer` | - -### Returns -- None - -### C Prototype -`void play_secondary_music(u8 seqId, u8 bgMusicVolume, u8 volume, u16 fadeTimer);` - -[:arrow_up_small:](#) - -
- ## [play_sound](#play_sound) ### Description @@ -3848,48 +3576,6 @@ Plays a sound (`soundBits`) with `freqScale` at `pos` (usually `gGlobalSoundSour
-## [play_star_fanfare](#play_star_fanfare) - -### Description -Plays the course clear fanfare (this function's name was mixed up with the other) - -### Lua Example -`play_star_fanfare()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_star_fanfare(void);` - -[:arrow_up_small:](#) - -
- -## [play_toads_jingle](#play_toads_jingle) - -### Description -Plays Toad's jingle - -### Lua Example -`play_toads_jingle()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_toads_jingle(void);` - -[:arrow_up_small:](#) - -
- ## [seq_player_fade_out](#seq_player_fade_out) ### Description @@ -3914,6 +3600,31 @@ Fades out `player` with `fadeDuration`
+## [fade_volume_scale](#fade_volume_scale) + +### Description +Fades the volume of `player` to `targetScale` (0-127) over `fadeDuration` + +### Lua Example +`fade_volume_scale(player, targetScale, fadeDuration)` + +### Parameters +| Field | Type | +| ----- | ---- | +| player | `integer` | +| targetScale | `integer` | +| fadeDuration | `integer` | + +### Returns +- None + +### C Prototype +`void fade_volume_scale(u8 player, u8 targetScale, u16 fadeDuration);` + +[:arrow_up_small:](#) + +
+ ## [seq_player_lower_volume](#seq_player_lower_volume) ### Description @@ -3963,29 +3674,6 @@ Unfades the volume of `player` over `fadeDuration`
-## [set_audio_fadeout](#set_audio_fadeout) - -### Description -Sets the `fadeOutTime` of audio - -### Lua Example -`set_audio_fadeout(fadeOutTime)` - -### Parameters -| Field | Type | -| ----- | ---- | -| fadeOutTime | `integer` | - -### Returns -- None - -### C Prototype -`void set_audio_fadeout(u16 fadeOutTime);` - -[:arrow_up_small:](#) - -
- ## [set_audio_muted](#set_audio_muted) ### Description @@ -4009,185 +3697,6 @@ Sets the muted status of all sequence players
-## [set_sound_moving_speed](#set_sound_moving_speed) - -### Description -Sets the `speed` of moving `bank` - -### Lua Example -`set_sound_moving_speed(bank, speed)` - -### Parameters -| Field | Type | -| ----- | ---- | -| bank | `integer` | -| speed | `integer` | - -### Returns -- None - -### C Prototype -`void set_sound_moving_speed(u8 bank, u8 speed);` - -[:arrow_up_small:](#) - -
- -## [sound_banks_disable](#sound_banks_disable) - -### Description -Enables `bankMask` soundbanks in `player` - -### Lua Example -`sound_banks_disable(player, bankMask)` - -### Parameters -| Field | Type | -| ----- | ---- | -| player | `integer` | -| bankMask | `integer` | - -### Returns -- None - -### C Prototype -`void sound_banks_disable(u8 player, u16 bankMask);` - -[:arrow_up_small:](#) - -
- -## [sound_banks_enable](#sound_banks_enable) - -### Description -Disables `bankMask` soundbanks in `player` - -### Lua Example -`sound_banks_enable(player, bankMask)` - -### Parameters -| Field | Type | -| ----- | ---- | -| player | `integer` | -| bankMask | `integer` | - -### Returns -- None - -### C Prototype -`void sound_banks_enable(u8 player, u16 bankMask);` - -[:arrow_up_small:](#) - -
- -## [sound_get_level_intensity](#sound_get_level_intensity) - -### Lua Example -`local numberValue = sound_get_level_intensity(distance)` - -### Parameters -| Field | Type | -| ----- | ---- | -| distance | `number` | - -### Returns -- `number` - -### C Prototype -`f32 sound_get_level_intensity(f32 distance);` - -[:arrow_up_small:](#) - -
- -## [sound_reset_background_music_default_volume](#sound_reset_background_music_default_volume) - -### Lua Example -`sound_reset_background_music_default_volume(seqId)` - -### Parameters -| Field | Type | -| ----- | ---- | -| seqId | `integer` | - -### Returns -- None - -### C Prototype -`void sound_reset_background_music_default_volume(u8 seqId);` - -[:arrow_up_small:](#) - -
- -## [sound_set_background_music_default_volume](#sound_set_background_music_default_volume) - -### Lua Example -`sound_set_background_music_default_volume(seqId, volume)` - -### Parameters -| Field | Type | -| ----- | ---- | -| seqId | `integer` | -| volume | `integer` | - -### Returns -- None - -### C Prototype -`void sound_set_background_music_default_volume(u8 seqId, u8 volume);` - -[:arrow_up_small:](#) - -
- -## [stop_background_music](#stop_background_music) - -### Description -Stops background music `seqId` - -### Lua Example -`stop_background_music(seqId)` - -### Parameters -| Field | Type | -| ----- | ---- | -| seqId | `integer` | - -### Returns -- None - -### C Prototype -`void stop_background_music(u16 seqId);` - -[:arrow_up_small:](#) - -
- -## [stop_secondary_music](#stop_secondary_music) - -### Description -Fades out secondary music over `fadeTimer` - -### Lua Example -`stop_secondary_music(fadeTimer)` - -### Parameters -| Field | Type | -| ----- | ---- | -| fadeTimer | `integer` | - -### Returns -- None - -### C Prototype -`void stop_secondary_music(u16 fadeTimer);` - -[:arrow_up_small:](#) - -
- ## [stop_sound](#stop_sound) ### Description @@ -4256,6 +3765,602 @@ Stops sounds in sound banks moving, env, and air
+## [sound_banks_disable](#sound_banks_disable) + +### Description +Enables `bankMask` soundbanks in `player` + +### Lua Example +`sound_banks_disable(player, bankMask)` + +### Parameters +| Field | Type | +| ----- | ---- | +| player | `integer` | +| bankMask | `integer` | + +### Returns +- None + +### C Prototype +`void sound_banks_disable(u8 player, u16 bankMask);` + +[:arrow_up_small:](#) + +
+ +## [sound_banks_enable](#sound_banks_enable) + +### Description +Disables `bankMask` soundbanks in `player` + +### Lua Example +`sound_banks_enable(player, bankMask)` + +### Parameters +| Field | Type | +| ----- | ---- | +| player | `integer` | +| bankMask | `integer` | + +### Returns +- None + +### C Prototype +`void sound_banks_enable(u8 player, u16 bankMask);` + +[:arrow_up_small:](#) + +
+ +## [set_sound_moving_speed](#set_sound_moving_speed) + +### Description +Sets the `speed` of moving `bank` + +### Lua Example +`set_sound_moving_speed(bank, speed)` + +### Parameters +| Field | Type | +| ----- | ---- | +| bank | `integer` | +| speed | `integer` | + +### Returns +- None + +### C Prototype +`void set_sound_moving_speed(u8 bank, u8 speed);` + +[:arrow_up_small:](#) + +
+ +## [play_dialog_sound](#play_dialog_sound) + +### Description +Plays a dialog sound corresponding to `dialogID` + +### Lua Example +`play_dialog_sound(dialogID)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dialogID | `integer` | + +### Returns +- None + +### C Prototype +`void play_dialog_sound(u8 dialogID);` + +[:arrow_up_small:](#) + +
+ +## [play_music](#play_music) + +### Description +Plays fading in music (`seqArgs`) on `player` over `fadeTimer` + +### Lua Example +`play_music(player, seqArgs, fadeTimer)` + +### Parameters +| Field | Type | +| ----- | ---- | +| player | `integer` | +| seqArgs | `integer` | +| fadeTimer | `integer` | + +### Returns +- None + +### C Prototype +`void play_music(u8 player, u16 seqArgs, u16 fadeTimer);` + +[:arrow_up_small:](#) + +
+ +## [stop_background_music](#stop_background_music) + +### Description +Stops background music `seqId` + +### Lua Example +`stop_background_music(seqId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| seqId | `integer` | + +### Returns +- None + +### C Prototype +`void stop_background_music(u16 seqId);` + +[:arrow_up_small:](#) + +
+ +## [fadeout_background_music](#fadeout_background_music) + +### Description +Fades out background music `seqId` over `fadeOut` + +### Lua Example +`fadeout_background_music(seqId, fadeOut)` + +### Parameters +| Field | Type | +| ----- | ---- | +| seqId | `integer` | +| fadeOut | `integer` | + +### Returns +- None + +### C Prototype +`void fadeout_background_music(u16 seqId, u16 fadeOut);` + +[:arrow_up_small:](#) + +
+ +## [drop_queued_background_music](#drop_queued_background_music) + +### Description +Drops any queued background music + +### Lua Example +`drop_queued_background_music()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void drop_queued_background_music(void);` + +[:arrow_up_small:](#) + +
+ +## [get_current_background_music](#get_current_background_music) + +### Description +Gets the current background music + +### Lua Example +`local integerValue = get_current_background_music()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u16 get_current_background_music(void);` + +[:arrow_up_small:](#) + +
+ +## [get_current_background_music_default_volume](#get_current_background_music_default_volume) + +### Description +Gets the current background music's default volume + +### Lua Example +`local integerValue = get_current_background_music_default_volume()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u8 get_current_background_music_default_volume(void);` + +[:arrow_up_small:](#) + +
+ +## [get_current_background_music_target_volume](#get_current_background_music_target_volume) + +### Description +Gets the current target volume + +### Lua Example +`local integerValue = get_current_background_music_target_volume()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u8 get_current_background_music_target_volume(void);` + +[:arrow_up_small:](#) + +
+ +## [get_current_background_music_max_target_volume](#get_current_background_music_max_target_volume) + +### Description +Gets the current max target volume + +### Lua Example +`local integerValue = get_current_background_music_max_target_volume()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u8 get_current_background_music_max_target_volume(void);` + +[:arrow_up_small:](#) + +
+ +## [is_current_background_music_volume_lowered](#is_current_background_music_volume_lowered) + +### Description +Checks if the current background music is lowered + +### Lua Example +`local integerValue = is_current_background_music_volume_lowered()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u8 is_current_background_music_volume_lowered(void);` + +[:arrow_up_small:](#) + +
+ +## [play_secondary_music](#play_secondary_music) + +### Description +Plays fading in secondary music `seqId` at `volume` over `fadeTimer` and sets the current background music's volume to `bgMusicVolume` + +### Lua Example +`play_secondary_music(seqId, bgMusicVolume, volume, fadeTimer)` + +### Parameters +| Field | Type | +| ----- | ---- | +| seqId | `integer` | +| bgMusicVolume | `integer` | +| volume | `integer` | +| fadeTimer | `integer` | + +### Returns +- None + +### C Prototype +`void play_secondary_music(u8 seqId, u8 bgMusicVolume, u8 volume, u16 fadeTimer);` + +[:arrow_up_small:](#) + +
+ +## [stop_secondary_music](#stop_secondary_music) + +### Description +Fades out secondary music over `fadeTimer` + +### Lua Example +`stop_secondary_music(fadeTimer)` + +### Parameters +| Field | Type | +| ----- | ---- | +| fadeTimer | `integer` | + +### Returns +- None + +### C Prototype +`void stop_secondary_music(u16 fadeTimer);` + +[:arrow_up_small:](#) + +
+ +## [set_audio_fadeout](#set_audio_fadeout) + +### Description +Sets the `fadeOutTime` of audio + +### Lua Example +`set_audio_fadeout(fadeOutTime)` + +### Parameters +| Field | Type | +| ----- | ---- | +| fadeOutTime | `integer` | + +### Returns +- None + +### C Prototype +`void set_audio_fadeout(u16 fadeOutTime);` + +[:arrow_up_small:](#) + +
+ +## [play_course_clear](#play_course_clear) + +### Description +Plays the star collect fanfare (this function's name was mixed up with the other) + +### Lua Example +`play_course_clear()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void play_course_clear(void);` + +[:arrow_up_small:](#) + +
+ +## [play_peachs_jingle](#play_peachs_jingle) + +### Description +Plays Peach's letter jingle + +### Lua Example +`play_peachs_jingle()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void play_peachs_jingle(void);` + +[:arrow_up_small:](#) + +
+ +## [play_puzzle_jingle](#play_puzzle_jingle) + +### Description +Plays the puzzle jingle + +### Lua Example +`play_puzzle_jingle()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void play_puzzle_jingle(void);` + +[:arrow_up_small:](#) + +
+ +## [play_star_fanfare](#play_star_fanfare) + +### Description +Plays the course clear fanfare (this function's name was mixed up with the other) + +### Lua Example +`play_star_fanfare()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void play_star_fanfare(void);` + +[:arrow_up_small:](#) + +
+ +## [play_power_star_jingle](#play_power_star_jingle) + +### Description +Plays the power star jingle, set `keepBackgroundMusic` to 0 to mute background music + +### Lua Example +`play_power_star_jingle(keepBackgroundMusic)` + +### Parameters +| Field | Type | +| ----- | ---- | +| keepBackgroundMusic | `integer` | + +### Returns +- None + +### C Prototype +`void play_power_star_jingle(u8 keepBackgroundMusic);` + +[:arrow_up_small:](#) + +
+ +## [play_race_fanfare](#play_race_fanfare) + +### Description +Plays the race fanfare when a race is started + +### Lua Example +`play_race_fanfare()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void play_race_fanfare(void);` + +[:arrow_up_small:](#) + +
+ +## [play_toads_jingle](#play_toads_jingle) + +### Description +Plays Toad's jingle + +### Lua Example +`play_toads_jingle()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void play_toads_jingle(void);` + +[:arrow_up_small:](#) + +
+ +## [sound_reset_background_music_default_volume](#sound_reset_background_music_default_volume) + +### Lua Example +`sound_reset_background_music_default_volume(seqId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| seqId | `integer` | + +### Returns +- None + +### C Prototype +`void sound_reset_background_music_default_volume(u8 seqId);` + +[:arrow_up_small:](#) + +
+ +## [sound_set_background_music_default_volume](#sound_set_background_music_default_volume) + +### Lua Example +`sound_set_background_music_default_volume(seqId, volume)` + +### Parameters +| Field | Type | +| ----- | ---- | +| seqId | `integer` | +| volume | `integer` | + +### Returns +- None + +### C Prototype +`void sound_set_background_music_default_volume(u8 seqId, u8 volume);` + +[:arrow_up_small:](#) + +
+ +## [get_sound_pan](#get_sound_pan) + +### Lua Example +`local numberValue = get_sound_pan(x, z)` + +### Parameters +| Field | Type | +| ----- | ---- | +| x | `number` | +| z | `number` | + +### Returns +- `number` + +### C Prototype +`f32 get_sound_pan(f32 x, f32 z);` + +[:arrow_up_small:](#) + +
+ +## [sound_get_level_intensity](#sound_get_level_intensity) + +### Lua Example +`local numberValue = sound_get_level_intensity(distance)` + +### Parameters +| Field | Type | +| ----- | ---- | +| distance | `number` | + +### Returns +- `number` + +### C Prototype +`f32 sound_get_level_intensity(f32 distance);` + +[:arrow_up_small:](#) + +
+ --- # functions from first_person_cam.h @@ -4285,27 +4390,6 @@ Checks common cancels for first person
-## [first_person_reset](#first_person_reset) - -### Description -Resets first person - -### Lua Example -`first_person_reset()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void first_person_reset(void);` - -[:arrow_up_small:](#) - -
- ## [get_first_person_enabled](#get_first_person_enabled) ### Description @@ -4350,6 +4434,27 @@ Sets if first person is enabled
+## [first_person_reset](#first_person_reset) + +### Description +Resets first person + +### Lua Example +`first_person_reset()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void first_person_reset(void);` + +[:arrow_up_small:](#) + +
+ --- # functions from ingame_menu.h @@ -4376,26 +4481,6 @@ Sets if first person is enabled
-## [create_dialog_box_with_response](#create_dialog_box_with_response) - -### Lua Example -`create_dialog_box_with_response(dialog)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dialog | `integer` | - -### Returns -- None - -### C Prototype -`void create_dialog_box_with_response(s16 dialog);` - -[:arrow_up_small:](#) - -
- ## [create_dialog_box_with_var](#create_dialog_box_with_var) ### Lua Example @@ -4437,37 +4522,21 @@ Sets if first person is enabled
-## [reset_dialog_override_color](#reset_dialog_override_color) +## [create_dialog_box_with_response](#create_dialog_box_with_response) ### Lua Example -`reset_dialog_override_color()` +`create_dialog_box_with_response(dialog)` ### Parameters -- None +| Field | Type | +| ----- | ---- | +| dialog | `integer` | ### Returns - None ### C Prototype -`void reset_dialog_override_color();` - -[:arrow_up_small:](#) - -
- -## [reset_dialog_override_pos](#reset_dialog_override_pos) - -### Lua Example -`reset_dialog_override_pos()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void reset_dialog_override_pos();` +`void create_dialog_box_with_response(s16 dialog);` [:arrow_up_small:](#) @@ -4491,74 +4560,6 @@ Sets if first person is enabled
-## [set_dialog_box_state](#set_dialog_box_state) - -### Lua Example -`set_dialog_box_state(state)` - -### Parameters -| Field | Type | -| ----- | ---- | -| state | `integer` | - -### Returns -- None - -### C Prototype -`void set_dialog_box_state(u8 state);` - -[:arrow_up_small:](#) - -
- -## [set_dialog_override_color](#set_dialog_override_color) - -### Lua Example -`set_dialog_override_color(bgR, bgG, bgB, bgA, textR, textG, textB, textA)` - -### Parameters -| Field | Type | -| ----- | ---- | -| bgR | `integer` | -| bgG | `integer` | -| bgB | `integer` | -| bgA | `integer` | -| textR | `integer` | -| textG | `integer` | -| textB | `integer` | -| textA | `integer` | - -### Returns -- None - -### C Prototype -`void set_dialog_override_color(u8 bgR, u8 bgG, u8 bgB, u8 bgA, u8 textR, u8 textG, u8 textB, u8 textA);` - -[:arrow_up_small:](#) - -
- -## [set_dialog_override_pos](#set_dialog_override_pos) - -### Lua Example -`set_dialog_override_pos(x, y)` - -### Parameters -| Field | Type | -| ----- | ---- | -| x | `integer` | -| y | `integer` | - -### Returns -- None - -### C Prototype -`void set_dialog_override_pos(s16 x, s16 y);` - -[:arrow_up_small:](#) - -
- ## [set_menu_mode](#set_menu_mode) ### Lua Example @@ -4599,280 +4600,116 @@ Sets if first person is enabled
+## [set_dialog_override_pos](#set_dialog_override_pos) + +### Lua Example +`set_dialog_override_pos(x, y)` + +### Parameters +| Field | Type | +| ----- | ---- | +| x | `integer` | +| y | `integer` | + +### Returns +- None + +### C Prototype +`void set_dialog_override_pos(s16 x, s16 y);` + +[:arrow_up_small:](#) + +
+ +## [reset_dialog_override_pos](#reset_dialog_override_pos) + +### Lua Example +`reset_dialog_override_pos()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void reset_dialog_override_pos();` + +[:arrow_up_small:](#) + +
+ +## [set_dialog_override_color](#set_dialog_override_color) + +### Lua Example +`set_dialog_override_color(bgR, bgG, bgB, bgA, textR, textG, textB, textA)` + +### Parameters +| Field | Type | +| ----- | ---- | +| bgR | `integer` | +| bgG | `integer` | +| bgB | `integer` | +| bgA | `integer` | +| textR | `integer` | +| textG | `integer` | +| textB | `integer` | +| textA | `integer` | + +### Returns +- None + +### C Prototype +`void set_dialog_override_color(u8 bgR, u8 bgG, u8 bgB, u8 bgA, u8 textR, u8 textG, u8 textB, u8 textA);` + +[:arrow_up_small:](#) + +
+ +## [reset_dialog_override_color](#reset_dialog_override_color) + +### Lua Example +`reset_dialog_override_color()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void reset_dialog_override_color();` + +[:arrow_up_small:](#) + +
+ +## [set_dialog_box_state](#set_dialog_box_state) + +### Lua Example +`set_dialog_box_state(state)` + +### Parameters +| Field | Type | +| ----- | ---- | +| state | `integer` | + +### Returns +- None + +### C Prototype +`void set_dialog_box_state(u8 state);` + +[:arrow_up_small:](#) + +
+ --- # functions from interaction.h
-## [determine_interaction](#determine_interaction) - -### Description -Determines how Mario interacts with a given object based on his current action, position, and other state variables. Calculates the appropriate interaction type (e.g., punch, kick, ground pound) that should result from Mario's contact with the specified object (`o`). Useful for handling different types of player-object collisions, attacks, and object behaviors - -### Lua Example -`local integerValue = determine_interaction(m, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 determine_interaction(struct MarioState *m, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [does_mario_have_normal_cap_on_head](#does_mario_have_normal_cap_on_head) - -### Description -Checks if Mario is currently wearing his normal cap on his head. Returns true if Mario's flag state matches that of having the normal cap equipped on his head, otherwise false. Useful for determining Mario's cap status - -### Lua Example -`local integerValue = does_mario_have_normal_cap_on_head(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`u32 does_mario_have_normal_cap_on_head(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [get_door_save_file_flag](#get_door_save_file_flag) - -### Description -Retrieves the save file flag associated with a door, based on the number of stars required to open it. Used to check if the player has unlocked certain star doors or progressed far enough to access new areas - -### Lua Example -`local integerValue = get_door_save_file_flag(door)` - -### Parameters -| Field | Type | -| ----- | ---- | -| door | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 get_door_save_file_flag(struct Object *door);` - -[:arrow_up_small:](#) - -
- -## [get_mario_cap_flag](#get_mario_cap_flag) - -### Description -Determines the type of cap an object represents. Depending on the object's behavior, it returns a cap type (normal, metal, wing, vanish). Useful for handling the logic of picking up, wearing, or losing different kinds of caps - -### Lua Example -`local integerValue = get_mario_cap_flag(capObject)` - -### Parameters -| Field | Type | -| ----- | ---- | -| capObject | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 get_mario_cap_flag(struct Object *capObject);` - -[:arrow_up_small:](#) - -
- -## [interact_bbh_entrance](#interact_bbh_entrance) - -### Description -Handles Mario's interaction with the Boo's Big Haunt (BBH) entrance object. When Mario tries to enter the BBH area, this function determines the resulting action (e.g., a jump or spin entrance) - -### Lua Example -`local integerValue = interact_bbh_entrance(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_bbh_entrance(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_bounce_top](#interact_bounce_top) - -### Description -Handles interactions where Mario bounces off the top of an object (e.g., Goombas, Koopas). Checks if Mario attacks the object from above and applies the appropriate knockback, sound effects, and object state changes. Useful for enemy defeat mechanics and platform bouncing - -### Lua Example -`local integerValue = interact_bounce_top(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_bounce_top(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_breakable](#interact_breakable) - -### Description -Handles interactions with breakable objects (e.g., breakable boxes or bob-ombs). If Mario hits the object with a valid attack (like a punch or kick), the object is destroyed or changes state. Useful for managing collectible items hidden in breakable objects and level progression through destructible blocks or walls - -### Lua Example -`local integerValue = interact_breakable(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_breakable(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_bully](#interact_bully) - -### Description -Handles interaction with Bully enemies. Determines if Mario attacks the Bully or gets knocked back. Updates Mario's velocity and state accordingly, and can defeat the Bully if attacked successfully. Useful for enemy encounters that involve pushing and shoving mechanics rather than just stomping like the bullies - -### Lua Example -`local integerValue = interact_bully(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_bully(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_cannon_base](#interact_cannon_base) - -### Description -Handles interaction when Mario touches a cannon base. If the cannon is ready, Mario enters the cannon, triggering a special action and camera behavior. Useful for transitioning to cannon-aiming mode and enabling cannon travel within levels - -### Lua Example -`local integerValue = interact_cannon_base(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_cannon_base(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_cap](#interact_cap) - -### Description -Handles interaction when Mario picks up a cap object. This includes normal caps, wing caps, vanish caps, and metal caps. Updates Mario's state (e.g., cap timers, sound effects) and may initiate putting on the cap animation. Useful for managing cap statuses - -### Lua Example -`local integerValue = interact_cap(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_cap(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_clam_or_bubba](#interact_clam_or_bubba) - -### Description -Handles interactions with objects like Clams or Bubbas, which can damage Mario or, in Bubba's case, eat Mario. If Bubba eats Mario, it triggers a unique "caught" action. Otherwise, it deals damage and knockback if hit by a Clam - -### Lua Example -`local integerValue = interact_clam_or_bubba(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_clam_or_bubba(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- ## [interact_coin](#interact_coin) ### Description @@ -4898,13 +4735,13 @@ Handles Mario's interaction with coins. Collecting a coin increases Mario's coin
-## [interact_damage](#interact_damage) +## [interact_water_ring](#interact_water_ring) ### Description -Handles damaging interactions from various objects (e.g., enemies, hazards). If Mario takes damage, it applies knockback and reduces health. Useful for enemy attacks, environmental hazards, and managing damage related behaviors +Handles interactions with water rings that heal Mario. Passing through water rings increases his health counter. Useful for underwater stages ### Lua Example -`local integerValue = interact_damage(m, interactType, o)` +`local integerValue = interact_water_ring(m, interactType, o)` ### Parameters | Field | Type | @@ -4917,332 +4754,7 @@ Handles damaging interactions from various objects (e.g., enemies, hazards). If - `integer` ### C Prototype -`u32 interact_damage(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_door](#interact_door) - -### Description -Handles interaction when Mario touches a door. If Mario meets the star requirement or has the key, he can unlock/open the door. Otherwise, it may display dialog indicating the requirement. Useful for controlling access to locked areas and providing progression gating in the game - -### Lua Example -`local integerValue = interact_door(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_door(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_flame](#interact_flame) - -### Description -Handles interaction with flame objects. If Mario touches a flame and is not invulnerable or protected by certain caps, he takes damage and may be set on fire, causing a burning jump. Useful for simulating fire damage and hazards in levels - -### Lua Example -`local integerValue = interact_flame(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_flame(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_grabbable](#interact_grabbable) - -### Description -Handles interaction with grabbable objects (e.g., crates, small enemies, or Bowser). Checks if Mario can pick up the object and initiates the grab action if possible. Useful for course mechanics, throwing items, and Bowser - -### Lua Example -`local integerValue = interact_grabbable(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_grabbable(struct MarioState *m, u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_hit_from_below](#interact_hit_from_below) - -### Description -Handles interactions where Mario hits an object from below (e.g., hitting a block from underneath). Determines if Mario damages/destroys the object, or if it damages Mario. Useful for handling upward attacks, hitting coin blocks, or interacting with certain NPCs from below - -### Lua Example -`local integerValue = interact_hit_from_below(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_hit_from_below(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_hoot](#interact_hoot) - -### Description -Handles interaction with Hoot, the owl. If Mario can grab onto Hoot, this sets Mario onto a riding action, allowing him to fly around the level. Useful for special traversal mechanics and shortcuts within a course - -### Lua Example -`local integerValue = interact_hoot(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_hoot(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_igloo_barrier](#interact_igloo_barrier) - -### Description -Handles interaction with the igloo barrier found in Snowman's Land. If Mario runs into the barrier, this function pushes him away and prevents passage without the vanish cap. Useful for enforcing require-caps to access certain areas - -### Lua Example -`local integerValue = interact_igloo_barrier(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_igloo_barrier(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_koopa_shell](#interact_koopa_shell) - -### Description -Handles interaction when Mario touches a Koopa Shell. If conditions are met, Mario can hop onto the shell and start riding it, changing his movement mechanics. Useful for implementing Koopa Shell behavior - -### Lua Example -`local integerValue = interact_koopa_shell(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_koopa_shell(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_mr_blizzard](#interact_mr_blizzard) - -### Description -Handles interaction with Mr. Blizzard (the snowman enemy) or similar objects. If Mario is attacked or collides with Mr. Blizzard, it applies damage and knockback if not protected or attacking - -### Lua Example -`local integerValue = interact_mr_blizzard(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_mr_blizzard(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_player](#interact_player) - -### Description -Handles interaction with another player (in multiplayer scenarios). Checks if Mario and another player collide and resolves any special behavior like bouncing on top. Useful for multiplayer interactions, such as PvP or cooperative gameplay mechanics - -### Lua Example -`local integerValue = interact_player(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_player(struct MarioState* m, UNUSED u32 interactType, struct Object* o);` - -[:arrow_up_small:](#) - -
- -## [interact_pole](#interact_pole) - -### Description -Handles interaction with poles (e.g., climbing poles). If Mario runs into a vertical pole, he can grab it and start climbing. Useful for platforming mechanics - -### Lua Example -`local integerValue = interact_pole(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_pole(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_shock](#interact_shock) - -### Description -Handles interaction with shocking objects. If Mario touches an electrified enemy or hazard, he takes damage and may be stunned or shocked. Useful for electric-themed enemies and obstacles - -### Lua Example -`local integerValue = interact_shock(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_shock(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_snufit_bullet](#interact_snufit_bullet) - -### Description -Handles interaction with Snufit bullets (projectiles fired by certain enemies). If Mario is not protected, he takes damage. Otherwise, the bullet can be destroyed - -### Lua Example -`local integerValue = interact_snufit_bullet(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_snufit_bullet(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_spiny_walking](#interact_spiny_walking) - -### Description -Handles interaction with Spiny-walking enemies. If Mario attacks it (e.g., by punching), the enemy is hurt. If he fails to attack properly (say bouncing on top), Mario takes damage and knockback. Useful for enemies that cannot be stomped from above and require direct attacks - -### Lua Example -`local integerValue = interact_spiny_walking(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_spiny_walking(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` +`u32 interact_water_ring(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` [:arrow_up_small:](#) @@ -5273,13 +4785,13 @@ Handles interaction with Stars or Keys. If Mario collects a star or key, it trig
-## [interact_strong_wind](#interact_strong_wind) +## [interact_bbh_entrance](#interact_bbh_entrance) ### Description -Handles interaction with strong wind gusts. These gusts push Mario back, often knocking him off platforms or sending him flying backwards. Useful for environmental wind hazards +Handles Mario's interaction with the Boo's Big Haunt (BBH) entrance object. When Mario tries to enter the BBH area, this function determines the resulting action (e.g., a jump or spin entrance) ### Lua Example -`local integerValue = interact_strong_wind(m, interactType, o)` +`local integerValue = interact_bbh_entrance(m, interactType, o)` ### Parameters | Field | Type | @@ -5292,57 +4804,7 @@ Handles interaction with strong wind gusts. These gusts push Mario back, often k - `integer` ### C Prototype -`u32 interact_strong_wind(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_text](#interact_text) - -### Description -Handles interaction with signs, NPCs, and other text-bearing objects. If Mario presses the interact button facing them, he enters a dialog reading state. Useful for managing hints, story elements, or gameplay instructions through in-game dialogue - -### Lua Example -`local integerValue = interact_text(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_text(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [interact_tornado](#interact_tornado) - -### Description -Handles interaction with tornados. If Mario touches a tornado, he enters a spinning twirl action, losing control temporarily. Useful for desert levels or areas where environmental hazards lift Mario into the air - -### Lua Example -`local integerValue = interact_tornado(m, interactType, o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| interactType | `integer` | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`u32 interact_tornado(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` +`u32 interact_bbh_entrance(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` [:arrow_up_small:](#) @@ -5398,13 +4860,13 @@ Handles interaction with warp doors that lead to other areas or require keys. If
-## [interact_water_ring](#interact_water_ring) +## [interact_door](#interact_door) ### Description -Handles interactions with water rings that heal Mario. Passing through water rings increases his health counter. Useful for underwater stages +Handles interaction when Mario touches a door. If Mario meets the star requirement or has the key, he can unlock/open the door. Otherwise, it may display dialog indicating the requirement. Useful for controlling access to locked areas and providing progression gating in the game ### Lua Example -`local integerValue = interact_water_ring(m, interactType, o)` +`local integerValue = interact_door(m, interactType, o)` ### Parameters | Field | Type | @@ -5417,7 +4879,107 @@ Handles interactions with water rings that heal Mario. Passing through water rin - `integer` ### C Prototype -`u32 interact_water_ring(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` +`u32 interact_door(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_cannon_base](#interact_cannon_base) + +### Description +Handles interaction when Mario touches a cannon base. If the cannon is ready, Mario enters the cannon, triggering a special action and camera behavior. Useful for transitioning to cannon-aiming mode and enabling cannon travel within levels + +### Lua Example +`local integerValue = interact_cannon_base(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_cannon_base(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_player](#interact_player) + +### Description +Handles interaction with another player (in multiplayer scenarios). Checks if Mario and another player collide and resolves any special behavior like bouncing on top. Useful for multiplayer interactions, such as PvP or cooperative gameplay mechanics + +### Lua Example +`local integerValue = interact_player(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_player(struct MarioState* m, UNUSED u32 interactType, struct Object* o);` + +[:arrow_up_small:](#) + +
+ +## [interact_igloo_barrier](#interact_igloo_barrier) + +### Description +Handles interaction with the igloo barrier found in Snowman's Land. If Mario runs into the barrier, this function pushes him away and prevents passage without the vanish cap. Useful for enforcing require-caps to access certain areas + +### Lua Example +`local integerValue = interact_igloo_barrier(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_igloo_barrier(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_tornado](#interact_tornado) + +### Description +Handles interaction with tornados. If Mario touches a tornado, he enters a spinning twirl action, losing control temporarily. Useful for desert levels or areas where environmental hazards lift Mario into the air + +### Lua Example +`local integerValue = interact_tornado(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_tornado(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` [:arrow_up_small:](#) @@ -5448,142 +5010,451 @@ Handles interaction with whirlpools. If Mario gets caught in a whirlpool, he's p
-## [mario_blow_off_cap](#mario_blow_off_cap) +## [interact_strong_wind](#interact_strong_wind) ### Description -Makes Mario blow off his normal cap at a given speed. Removes the normal cap from Mario's head and spawns it as a collectible object in the game world. Useful for simulating events where Mario loses his cap due to enemy attacks or environmental forces +Handles interaction with strong wind gusts. These gusts push Mario back, often knocking him off platforms or sending him flying backwards. Useful for environmental wind hazards ### Lua Example -`mario_blow_off_cap(m, capSpeed)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| capSpeed | `number` | - -### Returns -- None - -### C Prototype -`void mario_blow_off_cap(struct MarioState *m, f32 capSpeed);` - -[:arrow_up_small:](#) - -
- -## [mario_check_object_grab](#mario_check_object_grab) - -### Description -Checks if Mario can grab the currently encountered object (usually triggered when Mario punches or dives). If conditions are met, initiates the grabbing process. Useful for picking up objects, throwing enemies, or grabbing special items - -### Lua Example -`local integerValue = mario_check_object_grab(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`u32 mario_check_object_grab(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [mario_drop_held_object](#mario_drop_held_object) - -### Description -Causes Mario to drop the object he is currently holding. Sets the held object's state accordingly and places it in front of Mario. Useful for releasing carried objects, such as throwing Bob-ombs or setting down crates - -### Lua Example -`mario_drop_held_object(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void mario_drop_held_object(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [mario_get_collided_object](#mario_get_collided_object) - -### Description -Returns a collided object that matches a given interaction type from Mario's current collision data. Useful for determining which object Mario has come into contact with - -### Lua Example -`local ObjectValue = mario_get_collided_object(m, interactType)` +`local integerValue = interact_strong_wind(m, interactType, o)` ### Parameters | Field | Type | | ----- | ---- | | m | [MarioState](structs.md#MarioState) | | interactType | `integer` | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *mario_get_collided_object(struct MarioState *m, u32 interactType);` - -[:arrow_up_small:](#) - -
- -## [mario_grab_used_object](#mario_grab_used_object) - -### Description -Grabs the object currently referenced by Mario's `usedObj` if it's not already being held. Changes the object's state to indicate it is now held by Mario. Useful for handling the moment Mario successfully picks up an object - -### Lua Example -`mario_grab_used_object(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void mario_grab_used_object(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [mario_lose_cap_to_enemy](#mario_lose_cap_to_enemy) - -### Description -Makes Mario lose his normal cap to an enemy, such as Klepto or Ukiki. Updates flags so that the cap is no longer on Mario's head. Returns true if Mario was wearing his normal cap, otherwise false. Useful for scenarios where enemies steal Mario's cap - -### Lua Example -`local integerValue = mario_lose_cap_to_enemy(m, arg)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| arg | `integer` | +| o | [Object](structs.md#Object) | ### Returns - `integer` ### C Prototype -`u32 mario_lose_cap_to_enemy(struct MarioState* m, u32 arg);` +`u32 interact_strong_wind(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_flame](#interact_flame) + +### Description +Handles interaction with flame objects. If Mario touches a flame and is not invulnerable or protected by certain caps, he takes damage and may be set on fire, causing a burning jump. Useful for simulating fire damage and hazards in levels + +### Lua Example +`local integerValue = interact_flame(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_flame(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_snufit_bullet](#interact_snufit_bullet) + +### Description +Handles interaction with Snufit bullets (projectiles fired by certain enemies). If Mario is not protected, he takes damage. Otherwise, the bullet can be destroyed + +### Lua Example +`local integerValue = interact_snufit_bullet(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_snufit_bullet(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_clam_or_bubba](#interact_clam_or_bubba) + +### Description +Handles interactions with objects like Clams or Bubbas, which can damage Mario or, in Bubba's case, eat Mario. If Bubba eats Mario, it triggers a unique "caught" action. Otherwise, it deals damage and knockback if hit by a Clam + +### Lua Example +`local integerValue = interact_clam_or_bubba(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_clam_or_bubba(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_bully](#interact_bully) + +### Description +Handles interaction with Bully enemies. Determines if Mario attacks the Bully or gets knocked back. Updates Mario's velocity and state accordingly, and can defeat the Bully if attacked successfully. Useful for enemy encounters that involve pushing and shoving mechanics rather than just stomping like the bullies + +### Lua Example +`local integerValue = interact_bully(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_bully(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_shock](#interact_shock) + +### Description +Handles interaction with shocking objects. If Mario touches an electrified enemy or hazard, he takes damage and may be stunned or shocked. Useful for electric-themed enemies and obstacles + +### Lua Example +`local integerValue = interact_shock(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_shock(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_mr_blizzard](#interact_mr_blizzard) + +### Description +Handles interaction with Mr. Blizzard (the snowman enemy) or similar objects. If Mario is attacked or collides with Mr. Blizzard, it applies damage and knockback if not protected or attacking + +### Lua Example +`local integerValue = interact_mr_blizzard(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_mr_blizzard(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_hit_from_below](#interact_hit_from_below) + +### Description +Handles interactions where Mario hits an object from below (e.g., hitting a block from underneath). Determines if Mario damages/destroys the object, or if it damages Mario. Useful for handling upward attacks, hitting coin blocks, or interacting with certain NPCs from below + +### Lua Example +`local integerValue = interact_hit_from_below(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_hit_from_below(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_bounce_top](#interact_bounce_top) + +### Description +Handles interactions where Mario bounces off the top of an object (e.g., Goombas, Koopas). Checks if Mario attacks the object from above and applies the appropriate knockback, sound effects, and object state changes. Useful for enemy defeat mechanics and platform bouncing + +### Lua Example +`local integerValue = interact_bounce_top(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_bounce_top(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_spiny_walking](#interact_spiny_walking) + +### Description +Handles interaction with Spiny-walking enemies. If Mario attacks it (e.g., by punching), the enemy is hurt. If he fails to attack properly (say bouncing on top), Mario takes damage and knockback. Useful for enemies that cannot be stomped from above and require direct attacks + +### Lua Example +`local integerValue = interact_spiny_walking(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_spiny_walking(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_damage](#interact_damage) + +### Description +Handles damaging interactions from various objects (e.g., enemies, hazards). If Mario takes damage, it applies knockback and reduces health. Useful for enemy attacks, environmental hazards, and managing damage related behaviors + +### Lua Example +`local integerValue = interact_damage(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_damage(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_breakable](#interact_breakable) + +### Description +Handles interactions with breakable objects (e.g., breakable boxes or bob-ombs). If Mario hits the object with a valid attack (like a punch or kick), the object is destroyed or changes state. Useful for managing collectible items hidden in breakable objects and level progression through destructible blocks or walls + +### Lua Example +`local integerValue = interact_breakable(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_breakable(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_koopa_shell](#interact_koopa_shell) + +### Description +Handles interaction when Mario touches a Koopa Shell. If conditions are met, Mario can hop onto the shell and start riding it, changing his movement mechanics. Useful for implementing Koopa Shell behavior + +### Lua Example +`local integerValue = interact_koopa_shell(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_koopa_shell(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_pole](#interact_pole) + +### Description +Handles interaction with poles (e.g., climbing poles). If Mario runs into a vertical pole, he can grab it and start climbing. Useful for platforming mechanics + +### Lua Example +`local integerValue = interact_pole(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_pole(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_hoot](#interact_hoot) + +### Description +Handles interaction with Hoot, the owl. If Mario can grab onto Hoot, this sets Mario onto a riding action, allowing him to fly around the level. Useful for special traversal mechanics and shortcuts within a course + +### Lua Example +`local integerValue = interact_hoot(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_hoot(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_cap](#interact_cap) + +### Description +Handles interaction when Mario picks up a cap object. This includes normal caps, wing caps, vanish caps, and metal caps. Updates Mario's state (e.g., cap timers, sound effects) and may initiate putting on the cap animation. Useful for managing cap statuses + +### Lua Example +`local integerValue = interact_cap(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_cap(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_grabbable](#interact_grabbable) + +### Description +Handles interaction with grabbable objects (e.g., crates, small enemies, or Bowser). Checks if Mario can pick up the object and initiates the grab action if possible. Useful for course mechanics, throwing items, and Bowser + +### Lua Example +`local integerValue = interact_grabbable(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_grabbable(struct MarioState *m, u32 interactType, struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [interact_text](#interact_text) + +### Description +Handles interaction with signs, NPCs, and other text-bearing objects. If Mario presses the interact button facing them, he enters a dialog reading state. Useful for managing hints, story elements, or gameplay instructions through in-game dialogue + +### Lua Example +`local integerValue = interact_text(m, interactType, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 interact_text(struct MarioState *m, UNUSED u32 interactType, struct Object *o);` [:arrow_up_small:](#) @@ -5613,13 +5484,13 @@ Calculates the angle between Mario and a specified object. Used for determining
-## [mario_retrieve_cap](#mario_retrieve_cap) +## [mario_stop_riding_object](#mario_stop_riding_object) ### Description -Retrieves Mario's normal cap if it was previously lost. Removes the cap from Mario's hand state and places it on his head. Useful when Mario recovers his normal cap from enemies, finds it in a level, or if it were to disappear +Stops Mario from riding any currently ridden object (e.g., a Koopa shell or Hoot), updating the object's interaction status and Mario's state. Useful for cleanly dismounting ridden objects ### Lua Example -`mario_retrieve_cap(m)` +`mario_stop_riding_object(m)` ### Parameters | Field | Type | @@ -5630,7 +5501,76 @@ Retrieves Mario's normal cap if it was previously lost. Removes the cap from Mar - None ### C Prototype -`void mario_retrieve_cap(struct MarioState* m);` +`void mario_stop_riding_object(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [mario_grab_used_object](#mario_grab_used_object) + +### Description +Grabs the object currently referenced by Mario's `usedObj` if it's not already being held. Changes the object's state to indicate it is now held by Mario. Useful for handling the moment Mario successfully picks up an object + +### Lua Example +`mario_grab_used_object(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void mario_grab_used_object(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [mario_drop_held_object](#mario_drop_held_object) + +### Description +Causes Mario to drop the object he is currently holding. Sets the held object's state accordingly and places it in front of Mario. Useful for releasing carried objects, such as throwing Bob-ombs or setting down crates + +### Lua Example +`mario_drop_held_object(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void mario_drop_held_object(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [mario_throw_held_object](#mario_throw_held_object) + +### Description +Throws the object Mario is currently holding. The object is placed in front of Mario and given a forward velocity. Useful for attacking enemies with thrown objects, solving puzzles by throwing crates, or interacting with environment items + +### Lua Example +`mario_throw_held_object(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void mario_throw_held_object(struct MarioState *m);` [:arrow_up_small:](#) @@ -5659,13 +5599,13 @@ Causes Mario to stop riding any object (like a shell or Hoot) and also drop any
-## [mario_stop_riding_object](#mario_stop_riding_object) +## [does_mario_have_normal_cap_on_head](#does_mario_have_normal_cap_on_head) ### Description -Stops Mario from riding any currently ridden object (e.g., a Koopa shell or Hoot), updating the object's interaction status and Mario's state. Useful for cleanly dismounting ridden objects +Checks if Mario is currently wearing his normal cap on his head. Returns true if Mario's flag state matches that of having the normal cap equipped on his head, otherwise false. Useful for determining Mario's cap status ### Lua Example -`mario_stop_riding_object(m)` +`local integerValue = does_mario_have_normal_cap_on_head(m)` ### Parameters | Field | Type | @@ -5673,22 +5613,70 @@ Stops Mario from riding any currently ridden object (e.g., a Koopa shell or Hoot | m | [MarioState](structs.md#MarioState) | ### Returns -- None +- `integer` ### C Prototype -`void mario_stop_riding_object(struct MarioState *m);` +`u32 does_mario_have_normal_cap_on_head(struct MarioState *m);` [:arrow_up_small:](#)
-## [mario_throw_held_object](#mario_throw_held_object) +## [mario_blow_off_cap](#mario_blow_off_cap) ### Description -Throws the object Mario is currently holding. The object is placed in front of Mario and given a forward velocity. Useful for attacking enemies with thrown objects, solving puzzles by throwing crates, or interacting with environment items +Makes Mario blow off his normal cap at a given speed. Removes the normal cap from Mario's head and spawns it as a collectible object in the game world. Useful for simulating events where Mario loses his cap due to enemy attacks or environmental forces ### Lua Example -`mario_throw_held_object(m)` +`mario_blow_off_cap(m, capSpeed)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| capSpeed | `number` | + +### Returns +- None + +### C Prototype +`void mario_blow_off_cap(struct MarioState *m, f32 capSpeed);` + +[:arrow_up_small:](#) + +
+ +## [mario_lose_cap_to_enemy](#mario_lose_cap_to_enemy) + +### Description +Makes Mario lose his normal cap to an enemy, such as Klepto or Ukiki. Updates flags so that the cap is no longer on Mario's head. Returns true if Mario was wearing his normal cap, otherwise false. Useful for scenarios where enemies steal Mario's cap + +### Lua Example +`local integerValue = mario_lose_cap_to_enemy(m, arg)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| arg | `integer` | + +### Returns +- `integer` + +### C Prototype +`u32 mario_lose_cap_to_enemy(struct MarioState* m, u32 arg);` + +[:arrow_up_small:](#) + +
+ +## [mario_retrieve_cap](#mario_retrieve_cap) + +### Description +Retrieves Mario's normal cap if it was previously lost. Removes the cap from Mario's hand state and places it on his head. Useful when Mario recovers his normal cap from enemies, finds it in a level, or if it were to disappear + +### Lua Example +`mario_retrieve_cap(m)` ### Parameters | Field | Type | @@ -5699,7 +5687,77 @@ Throws the object Mario is currently holding. The object is placed in front of M - None ### C Prototype -`void mario_throw_held_object(struct MarioState *m);` +`void mario_retrieve_cap(struct MarioState* m);` + +[:arrow_up_small:](#) + +
+ +## [mario_get_collided_object](#mario_get_collided_object) + +### Description +Returns a collided object that matches a given interaction type from Mario's current collision data. Useful for determining which object Mario has come into contact with + +### Lua Example +`local ObjectValue = mario_get_collided_object(m, interactType)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| interactType | `integer` | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *mario_get_collided_object(struct MarioState *m, u32 interactType);` + +[:arrow_up_small:](#) + +
+ +## [mario_check_object_grab](#mario_check_object_grab) + +### Description +Checks if Mario can grab the currently encountered object (usually triggered when Mario punches or dives). If conditions are met, initiates the grabbing process. Useful for picking up objects, throwing enemies, or grabbing special items + +### Lua Example +`local integerValue = mario_check_object_grab(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`u32 mario_check_object_grab(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [get_door_save_file_flag](#get_door_save_file_flag) + +### Description +Retrieves the save file flag associated with a door, based on the number of stars required to open it. Used to check if the player has unlocked certain star doors or progressed far enough to access new areas + +### Lua Example +`local integerValue = get_door_save_file_flag(door)` + +### Parameters +| Field | Type | +| ----- | ---- | +| door | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 get_door_save_file_flag(struct Object *door);` [:arrow_up_small:](#) @@ -5777,12 +5835,80 @@ Handles the logic of Mario taking damage and being knocked back by a damaging ob
+## [get_mario_cap_flag](#get_mario_cap_flag) + +### Description +Determines the type of cap an object represents. Depending on the object's behavior, it returns a cap type (normal, metal, wing, vanish). Useful for handling the logic of picking up, wearing, or losing different kinds of caps + +### Lua Example +`local integerValue = get_mario_cap_flag(capObject)` + +### Parameters +| Field | Type | +| ----- | ---- | +| capObject | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 get_mario_cap_flag(struct Object *capObject);` + +[:arrow_up_small:](#) + +
+ +## [determine_interaction](#determine_interaction) + +### Description +Determines how Mario interacts with a given object based on his current action, position, and other state variables. Calculates the appropriate interaction type (e.g., punch, kick, ground pound) that should result from Mario's contact with the specified object (`o`). Useful for handling different types of player-object collisions, attacks, and object behaviors + +### Lua Example +`local integerValue = determine_interaction(m, o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`u32 determine_interaction(struct MarioState *m, struct Object *o);` + +[:arrow_up_small:](#) + +
+ --- # functions from lag_compensation.h
+## [lag_compensation_store](#lag_compensation_store) + +### Description +Stores the local Mario's current state in lag compensation history + +### Lua Example +`lag_compensation_store()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void lag_compensation_store(void);` + +[:arrow_up_small:](#) + +
+ ## [lag_compensation_get_local_state](#lag_compensation_get_local_state) ### Description @@ -5806,27 +5932,6 @@ Gets the local Mario's state stored in lag compensation history
-## [lag_compensation_get_local_state_index](#lag_compensation_get_local_state_index) - -### Description -Gets the local Mario's state index - -### Lua Example -`local integerValue = lag_compensation_get_local_state_index()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u32 lag_compensation_get_local_state_index(void);` - -[:arrow_up_small:](#) - -
- ## [lag_compensation_get_local_state_ready](#lag_compensation_get_local_state_ready) ### Description @@ -5848,22 +5953,22 @@ Checks if lag compensation history is ready
-## [lag_compensation_store](#lag_compensation_store) +## [lag_compensation_get_local_state_index](#lag_compensation_get_local_state_index) ### Description -Stores the local Mario's current state in lag compensation history +Gets the local Mario's state index ### Lua Example -`lag_compensation_store()` +`local integerValue = lag_compensation_get_local_state_index()` ### Parameters - None ### Returns -- None +- `integer` ### C Prototype -`void lag_compensation_store(void);` +`u32 lag_compensation_get_local_state_index(void);` [:arrow_up_small:](#) @@ -5875,31 +5980,6 @@ Stores the local Mario's current state in lag compensation history
-## [get_level_name](#get_level_name) - -### Description -Returns the name of the level corresponding to `courseNum`, `levelNum` and `areaIndex` as a decapitalized ASCII (human readable) string - -### Lua Example -`local stringValue = get_level_name(courseNum, levelNum, areaIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | -| levelNum | `integer` | -| areaIndex | `integer` | - -### Returns -- `string` - -### C Prototype -`const char *get_level_name(s16 courseNum, s16 levelNum, s16 areaIndex);` - -[:arrow_up_small:](#) - -
- ## [get_level_name_ascii](#get_level_name_ascii) ### Description @@ -5949,25 +6029,26 @@ Returns the name of the level corresponding to `courseNum`, `levelNum` and `area
-## [get_star_name](#get_star_name) +## [get_level_name](#get_level_name) ### Description -Returns the name of the star corresponding to `courseNum` and `starNum` as a decapitalized ASCII (human readable) string +Returns the name of the level corresponding to `courseNum`, `levelNum` and `areaIndex` as a decapitalized ASCII (human readable) string ### Lua Example -`local stringValue = get_star_name(courseNum, starNum)` +`local stringValue = get_level_name(courseNum, levelNum, areaIndex)` ### Parameters | Field | Type | | ----- | ---- | | courseNum | `integer` | -| starNum | `integer` | +| levelNum | `integer` | +| areaIndex | `integer` | ### Returns - `string` ### C Prototype -`const char *get_star_name(s16 courseNum, s16 starNum);` +`const char *get_level_name(s16 courseNum, s16 levelNum, s16 areaIndex);` [:arrow_up_small:](#) @@ -6020,6 +6101,30 @@ Returns the name of the star corresponding to `courseNum` and `starNum` as an AS
+## [get_star_name](#get_star_name) + +### Description +Returns the name of the star corresponding to `courseNum` and `starNum` as a decapitalized ASCII (human readable) string + +### Lua Example +`local stringValue = get_star_name(courseNum, starNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | +| starNum | `integer` | + +### Returns +- `string` + +### C Prototype +`const char *get_star_name(s16 courseNum, s16 starNum);` + +[:arrow_up_small:](#) + +
+ --- # functions from level_script.h @@ -6060,6 +6165,27 @@ Creates a warp node in the current level and area with id `id` that goes to the
+## [level_control_timer_running](#level_control_timer_running) + +### Description +Returns if the level timer is running + +### Lua Example +`local integerValue = level_control_timer_running()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u8 level_control_timer_running(void);` + +[:arrow_up_small:](#) + +
+ ## [fade_into_special_warp](#fade_into_special_warp) ### Description @@ -6151,27 +6277,6 @@ Initiates a painting warp of `paintingIndex`
-## [level_control_timer_running](#level_control_timer_running) - -### Description -Returns if the level timer is running - -### Lua Example -`local integerValue = level_control_timer_running()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u8 level_control_timer_running(void);` - -[:arrow_up_small:](#) - -
- ## [level_trigger_warp](#level_trigger_warp) ### Description @@ -6196,6 +6301,29 @@ Triggers a warp (WARP_OP_*) for the level. Pass in `gMarioStates[0]` for `m`
+## [warp_special](#warp_special) + +### Description +Special warps to arg (`SPECIAL_WARP_*`) + +### Lua Example +`warp_special(arg)` + +### Parameters +| Field | Type | +| ----- | ---- | +| arg | `integer` | + +### Returns +- None + +### C Prototype +`void warp_special(s32 arg);` + +[:arrow_up_small:](#) + +
+ ## [lvl_set_current_level](#lvl_set_current_level) ### Description @@ -6220,65 +6348,12 @@ Sets the level number and handles the act select screen
-## [warp_special](#warp_special) - -### Description -Special warps to arg (`SPECIAL_WARP_*`) - -### Lua Example -`warp_special(arg)` - -### Parameters -| Field | Type | -| ----- | ---- | -| arg | `integer` | - -### Returns -- None - -### C Prototype -`void warp_special(s32 arg);` - -[:arrow_up_small:](#) - -
- --- # functions from lighting_engine.h
-## [le_add_light](#le_add_light) - -### Description -Adds a lighting engine point light at `x`, `y`, `z` with color `r`, `g`, `b` and `radius` with `intensity` - -### Lua Example -`local integerValue = le_add_light(x, y, z, r, g, b, radius, intensity)` - -### Parameters -| Field | Type | -| ----- | ---- | -| x | `number` | -| y | `number` | -| z | `number` | -| r | `integer` | -| g | `integer` | -| b | `integer` | -| radius | `number` | -| intensity | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 le_add_light(f32 x, f32 y, f32 z, u8 r, u8 g, u8 b, f32 radius, f32 intensity);` - -[:arrow_up_small:](#) - -
- ## [le_calculate_lighting_color](#le_calculate_lighting_color) ### Description @@ -6328,22 +6403,31 @@ Calculates the lighting direction from a position and outputs the result in `out
-## [le_get_light_count](#le_get_light_count) +## [le_add_light](#le_add_light) ### Description -Gets the total number of lights currently loaded in the lighting engine +Adds a lighting engine point light at `x`, `y`, `z` with color `r`, `g`, `b` and `radius` with `intensity` ### Lua Example -`local integerValue = le_get_light_count()` +`local integerValue = le_add_light(x, y, z, r, g, b, radius, intensity)` ### Parameters -- None +| Field | Type | +| ----- | ---- | +| x | `number` | +| y | `number` | +| z | `number` | +| r | `integer` | +| g | `integer` | +| b | `integer` | +| radius | `number` | +| intensity | `number` | ### Returns - `integer` ### C Prototype -`s32 le_get_light_count(void);` +`s32 le_add_light(f32 x, f32 y, f32 z, u8 r, u8 g, u8 b, f32 radius, f32 intensity);` [:arrow_up_small:](#) @@ -6372,6 +6456,27 @@ Removes a lighting engine point light corresponding to `id`
+## [le_get_light_count](#le_get_light_count) + +### Description +Gets the total number of lights currently loaded in the lighting engine + +### Lua Example +`local integerValue = le_get_light_count()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 le_get_light_count(void);` + +[:arrow_up_small:](#) + +
+ ## [le_set_ambient_color](#le_set_ambient_color) ### Description @@ -6397,56 +6502,6 @@ Sets the lighting engine ambient color
-## [le_set_light_color](#le_set_light_color) - -### Description -Sets a lighting engine point light's color to `r`, `g`, `b` - -### Lua Example -`le_set_light_color(id, r, g, b)` - -### Parameters -| Field | Type | -| ----- | ---- | -| id | `integer` | -| r | `integer` | -| g | `integer` | -| b | `integer` | - -### Returns -- None - -### C Prototype -`void le_set_light_color(s32 id, u8 r, u8 g, u8 b);` - -[:arrow_up_small:](#) - -
- -## [le_set_light_intensity](#le_set_light_intensity) - -### Description -Sets a lighting engine point light's `intensity` - -### Lua Example -`le_set_light_intensity(id, intensity)` - -### Parameters -| Field | Type | -| ----- | ---- | -| id | `integer` | -| intensity | `number` | - -### Returns -- None - -### C Prototype -`void le_set_light_intensity(s32 id, f32 intensity);` - -[:arrow_up_small:](#) - -
- ## [le_set_light_pos](#le_set_light_pos) ### Description @@ -6473,6 +6528,32 @@ Sets a lighting engine point light's position to `x`, `y`, `z`
+## [le_set_light_color](#le_set_light_color) + +### Description +Sets a lighting engine point light's color to `r`, `g`, `b` + +### Lua Example +`le_set_light_color(id, r, g, b)` + +### Parameters +| Field | Type | +| ----- | ---- | +| id | `integer` | +| r | `integer` | +| g | `integer` | +| b | `integer` | + +### Returns +- None + +### C Prototype +`void le_set_light_color(s32 id, u8 r, u8 g, u8 b);` + +[:arrow_up_small:](#) + +
+ ## [le_set_light_radius](#le_set_light_radius) ### Description @@ -6495,6 +6576,30 @@ Sets a lighting engine point light's `radius` [:arrow_up_small:](#) +
+ +## [le_set_light_intensity](#le_set_light_intensity) + +### Description +Sets a lighting engine point light's `intensity` + +### Lua Example +`le_set_light_intensity(id, intensity)` + +### Parameters +| Field | Type | +| ----- | ---- | +| id | `integer` | +| intensity | `number` | + +### Returns +- None + +### C Prototype +`void le_set_light_intensity(s32 id, f32 intensity);` + +[:arrow_up_small:](#) +
--- diff --git a/docs/lua/functions-4.md b/docs/lua/functions-4.md index db52c20f1..728c150ae 100644 --- a/docs/lua/functions-4.md +++ b/docs/lua/functions-4.md @@ -11,269 +11,6 @@
-## [adjust_sound_for_speed](#adjust_sound_for_speed) - -### Description -Adjusts the pitch/volume of Mario's movement-based sounds according to his forward velocity (`m.forwardVel`). Useful for adding dynamic audio feedback based on Mario's running or walking speed - -### Lua Example -`adjust_sound_for_speed(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void adjust_sound_for_speed(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [check_common_action_exits](#check_common_action_exits) - -### Description -Checks for inputs that cause common action transitions (jump, freefall, walking, sliding). Useful for quickly exiting certain stationary actions when Mario begins moving or leaves the floor - -### Lua Example -`local integerValue = check_common_action_exits(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 check_common_action_exits(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [check_common_hold_action_exits](#check_common_hold_action_exits) - -### Description -Checks for inputs that cause common hold-action transitions (hold jump, hold freefall, hold walking, hold sliding) - -### Lua Example -`local integerValue = check_common_hold_action_exits(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 check_common_hold_action_exits(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [drop_and_set_mario_action](#drop_and_set_mario_action) - -### Description -Drops any currently held object and sets Mario to a new action. This function is typically used when Mario transitions to states where he cannot hold objects - -### Lua Example -`local integerValue = drop_and_set_mario_action(m, action, actionArg)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| action | `integer` | -| actionArg | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 drop_and_set_mario_action(struct MarioState *m, u32 action, u32 actionArg);` - -[:arrow_up_small:](#) - -
- -## [execute_mario_action](#execute_mario_action) - -### Description -Main driver for Mario's behavior. Executes the current action group (stationary, moving, airborne, etc.) in a loop until no further action changes are necessary - -### Lua Example -`local integerValue = execute_mario_action(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`s32 execute_mario_action(UNUSED struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [find_floor_height_relative_polar](#find_floor_height_relative_polar) - -### Description -Finds the floor height relative to Mario's current position given a polar displacement (`angleFromMario`, `distFromMario`). Useful for determining height differentials ahead or behind Mario, e.g. for slope checks or collision logic - -### Lua Example -`local numberValue = find_floor_height_relative_polar(m, angleFromMario, distFromMario)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| angleFromMario | `integer` | -| distFromMario | `number` | - -### Returns -- `number` - -### C Prototype -`f32 find_floor_height_relative_polar(struct MarioState *m, s16 angleFromMario, f32 distFromMario);` - -[:arrow_up_small:](#) - -
- -## [find_floor_slope](#find_floor_slope) - -### Description -Returns a slope angle based on comparing the floor heights slightly in front and behind Mario. It essentially calculates how steep the ground is in a specific yaw direction. Useful for slope-based calculations such as setting walking or sliding behaviors - -### Lua Example -`local integerValue = find_floor_slope(m, yawOffset)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| yawOffset | `integer` | - -### Returns -- `integer` - -### C Prototype -`s16 find_floor_slope(struct MarioState *m, s16 yawOffset);` - -[:arrow_up_small:](#) - -
- -## [find_mario_anim_flags_and_translation](#find_mario_anim_flags_and_translation) - -### Description -Retrieves the current animation flags and calculates the translation for Mario's animation, rotating it into the global coordinate system based on `yaw`. Useful for determining positional offsets from animations (e.g., stepping forward in a walk animation) and applying them to Mario's position - -### Lua Example -`local integerValue = find_mario_anim_flags_and_translation(o, yaw, translation)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| yaw | `integer` | -| translation | [Vec3s](structs.md#Vec3s) | - -### Returns -- `integer` - -### C Prototype -`s16 find_mario_anim_flags_and_translation(struct Object *o, s32 yaw, Vec3s translation);` - -[:arrow_up_small:](#) - -
- -## [force_idle_state](#force_idle_state) - -### Description -Forces Mario into an idle state, either `ACT_IDLE` or `ACT_WATER_IDLE` depending on whether he is submerged. Useful for quickly resetting Mario's state to an idle pose under special conditions (e.g., cutscene triggers) - -### Lua Example -`local integerValue = force_idle_state(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 force_idle_state(struct MarioState* m);` - -[:arrow_up_small:](#) - -
- -## [hurt_and_set_mario_action](#hurt_and_set_mario_action) - -### Description -Increments Mario's `hurtCounter` and immediately sets a new action. Often used when Mario takes damage and transitions into a knockback or stunned action. - -### Lua Example -`local integerValue = hurt_and_set_mario_action(m, action, actionArg, hurtCounter)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| action | `integer` | -| actionArg | `integer` | -| hurtCounter | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 hurt_and_set_mario_action(struct MarioState *m, u32 action, u32 actionArg, s16 hurtCounter);` - -[:arrow_up_small:](#) - -
- -## [init_single_mario](#init_single_mario) - -### Description -Initializes the fields of a single `MarioState` structure when the player spawns or respawns. Sets starting position, velocity, action, and various internal flags - -### Lua Example -`init_single_mario(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void init_single_mario(struct MarioState* m);` - -[:arrow_up_small:](#) - -
- ## [is_anim_at_end](#is_anim_at_end) ### Description @@ -320,6 +57,128 @@ Checks if Mario's current animation has passed the second-to-last valid frame (i
+## [set_mario_animation](#set_mario_animation) + +### Description +Sets Mario's current animation to `targetAnimID` at a default acceleration (no speed change) + +### Lua Example +`local integerValue = set_mario_animation(m, targetAnimID)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| targetAnimID | `integer` | + +### Returns +- `integer` + +### C Prototype +`s16 set_mario_animation(struct MarioState *m, s32 targetAnimID);` + +[:arrow_up_small:](#) + +
+ +## [set_mario_anim_with_accel](#set_mario_anim_with_accel) + +### Description +Sets Mario's current animation to `targetAnimID` with a custom `accel` value to speed up or slow down the animation. Useful for controlling animation timing, e.g., slow-motion or fast-forward effects + +### Lua Example +`local integerValue = set_mario_anim_with_accel(m, targetAnimID, accel)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| targetAnimID | `integer` | +| accel | `integer` | + +### Returns +- `integer` + +### C Prototype +`s16 set_mario_anim_with_accel(struct MarioState *m, s32 targetAnimID, s32 accel);` + +[:arrow_up_small:](#) + +
+ +## [set_character_animation](#set_character_animation) + +### Description +Sets the character-specific animation at its default rate (no acceleration) + +### Lua Example +`local integerValue = set_character_animation(m, targetAnimID)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| targetAnimID | [enum CharacterAnimID](constants.md#enum-CharacterAnimID) | + +### Returns +- `integer` + +### C Prototype +`s16 set_character_animation(struct MarioState *m, enum CharacterAnimID targetAnimID);` + +[:arrow_up_small:](#) + +
+ +## [set_character_anim_with_accel](#set_character_anim_with_accel) + +### Description +Sets a character-specific animation where the animation speed is adjusted by `accel`. Useful for varying animation speeds based on context or dynamic conditions (e.g., slow-motion) + +### Lua Example +`local integerValue = set_character_anim_with_accel(m, targetAnimID, accel)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| targetAnimID | [enum CharacterAnimID](constants.md#enum-CharacterAnimID) | +| accel | `integer` | + +### Returns +- `integer` + +### C Prototype +`s16 set_character_anim_with_accel(struct MarioState *m, enum CharacterAnimID targetAnimID, s32 accel);` + +[:arrow_up_small:](#) + +
+ +## [set_anim_to_frame](#set_anim_to_frame) + +### Description +Sets the current animation frame to a specific `animFrame` + +### Lua Example +`set_anim_to_frame(m, animFrame)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| animFrame | `integer` | + +### Returns +- None + +### C Prototype +`void set_anim_to_frame(struct MarioState *m, s16 animFrame);` + +[:arrow_up_small:](#) + +
+ ## [is_anim_past_frame](#is_anim_past_frame) ### Description @@ -344,6 +203,342 @@ Checks if Mario's current animation is past a specified `animFrame`. Useful for
+## [find_mario_anim_flags_and_translation](#find_mario_anim_flags_and_translation) + +### Description +Retrieves the current animation flags and calculates the translation for Mario's animation, rotating it into the global coordinate system based on `yaw`. Useful for determining positional offsets from animations (e.g., stepping forward in a walk animation) and applying them to Mario's position + +### Lua Example +`local integerValue = find_mario_anim_flags_and_translation(o, yaw, translation)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| yaw | `integer` | +| translation | [Vec3s](structs.md#Vec3s) | + +### Returns +- `integer` + +### C Prototype +`s16 find_mario_anim_flags_and_translation(struct Object *o, s32 yaw, Vec3s translation);` + +[:arrow_up_small:](#) + +
+ +## [update_mario_pos_for_anim](#update_mario_pos_for_anim) + +### Description +Applies the translation from Mario's current animation to his world position. Considers animation flags (horizontal/vertical translation) + +### Lua Example +`update_mario_pos_for_anim(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void update_mario_pos_for_anim(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [return_mario_anim_y_translation](#return_mario_anim_y_translation) + +### Description +Determines the vertical translation from Mario's animation (how much the animation moves Mario up or down). Returns the y-component of the animation's translation. Useful for adjusting Mario's vertical position based on an ongoing animation (e.g., a bounce or jump) + +### Lua Example +`local integerValue = return_mario_anim_y_translation(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s16 return_mario_anim_y_translation(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [play_sound_if_no_flag](#play_sound_if_no_flag) + +### Description +Plays a sound if Mario does not currently have a specific flag set. Once played, the flag is set to prevent immediate repeats + +### Lua Example +`play_sound_if_no_flag(m, soundBits, flags)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| soundBits | `integer` | +| flags | `integer` | + +### Returns +- None + +### C Prototype +`void play_sound_if_no_flag(struct MarioState *m, u32 soundBits, u32 flags);` + +[:arrow_up_small:](#) + +
+ +## [play_mario_jump_sound](#play_mario_jump_sound) + +### Description +Plays Mario’s jump sound if it hasn't been played yet since the last action change. This helps avoid overlapping jump voice lines on repeated jumps + +### Lua Example +`play_mario_jump_sound(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void play_mario_jump_sound(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [adjust_sound_for_speed](#adjust_sound_for_speed) + +### Description +Adjusts the pitch/volume of Mario's movement-based sounds according to his forward velocity (`m.forwardVel`). Useful for adding dynamic audio feedback based on Mario's running or walking speed + +### Lua Example +`adjust_sound_for_speed(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void adjust_sound_for_speed(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [play_sound_and_spawn_particles](#play_sound_and_spawn_particles) + +### Description +Plays the specified sound effect and spawns surface-appropriate particles (e.g., water splash, snow, sand). Checks if Mario is metal to adjust audio accordingly + +### Lua Example +`play_sound_and_spawn_particles(m, soundBits, waveParticleType)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| soundBits | `integer` | +| waveParticleType | `integer` | + +### Returns +- None + +### C Prototype +`void play_sound_and_spawn_particles(struct MarioState *m, u32 soundBits, u32 waveParticleType);` + +[:arrow_up_small:](#) + +
+ +## [play_mario_action_sound](#play_mario_action_sound) + +### Description +Plays an action sound once per action, optionally spawning wave or dust particles depending on the surface. This sets the `MARIO_ACTION_SOUND_PLAYED` flag to prevent repeats + +### Lua Example +`play_mario_action_sound(m, soundBits, waveParticleType)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| soundBits | `integer` | +| waveParticleType | `integer` | + +### Returns +- None + +### C Prototype +`void play_mario_action_sound(struct MarioState *m, u32 soundBits, u32 waveParticleType);` + +[:arrow_up_small:](#) + +
+ +## [play_mario_landing_sound](#play_mario_landing_sound) + +### Description +Plays a normal landing sound (or metal landing sound if Mario is metal) and spawns appropriate particle effects (water splash, dust, etc.) + +### Lua Example +`play_mario_landing_sound(m, soundBits)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| soundBits | `integer` | + +### Returns +- None + +### C Prototype +`void play_mario_landing_sound(struct MarioState *m, u32 soundBits);` + +[:arrow_up_small:](#) + +
+ +## [play_mario_landing_sound_once](#play_mario_landing_sound_once) + +### Description +A variant of `play_mario_landing_sound` that ensures the sound is only played once per action. Uses `play_mario_action_sound` internally + +### Lua Example +`play_mario_landing_sound_once(m, soundBits)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| soundBits | `integer` | + +### Returns +- None + +### C Prototype +`void play_mario_landing_sound_once(struct MarioState *m, u32 soundBits);` + +[:arrow_up_small:](#) + +
+ +## [play_mario_heavy_landing_sound](#play_mario_heavy_landing_sound) + +### Description +Plays a heavier, more forceful landing sound, possibly for ground pounds or large impacts. Takes into account whether Mario has a metal cap equipped. Useful for making big impact landings stand out aurally + +### Lua Example +`play_mario_heavy_landing_sound(m, soundBits)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| soundBits | `integer` | + +### Returns +- None + +### C Prototype +`void play_mario_heavy_landing_sound(struct MarioState *m, u32 soundBits);` + +[:arrow_up_small:](#) + +
+ +## [play_mario_heavy_landing_sound_once](#play_mario_heavy_landing_sound_once) + +### Description +A variant of `play_mario_heavy_landing_sound` that ensures the sound is only played once per action (using `play_mario_action_sound` internally). Useful for consistent heavy landing effects without repetition + +### Lua Example +`play_mario_heavy_landing_sound_once(m, soundBits)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| soundBits | `integer` | + +### Returns +- None + +### C Prototype +`void play_mario_heavy_landing_sound_once(struct MarioState *m, u32 soundBits);` + +[:arrow_up_small:](#) + +
+ +## [play_mario_sound](#play_mario_sound) + +### Description +Plays a given action sound (like a jump or landing) and also a Mario voice line if certain conditions are met. It manages flags to avoid repeated sounds + +### Lua Example +`play_mario_sound(m, primarySoundBits, scondarySoundBits)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| primarySoundBits | `integer` | +| scondarySoundBits | `integer` | + +### Returns +- None + +### C Prototype +`void play_mario_sound(struct MarioState *m, s32 primarySoundBits, s32 scondarySoundBits);` + +[:arrow_up_small:](#) + +
+ +## [mario_is_crouching](#mario_is_crouching) + +### Description +Returns true if Mario is in any of the crouching or crawling states, checking his current action + +### Lua Example +`local booleanValue = mario_is_crouching(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `boolean` + +### C Prototype +`bool mario_is_crouching(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ ## [mario_can_bubble](#mario_can_bubble) ### Description @@ -367,6 +562,150 @@ Checks whether Mario can become bubbled under certain game conditions (multiplay
+## [mario_set_bubbled](#mario_set_bubbled) + +### Description +Transitions Mario into a bubbled state (if available in multiplayer), decrementing lives and preventing normal movement + +### Lua Example +`mario_set_bubbled(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void mario_set_bubbled(struct MarioState* m);` + +[:arrow_up_small:](#) + +
+ +## [mario_set_forward_vel](#mario_set_forward_vel) + +### Description +Sets Mario's forward velocity (`m.forwardVel`) and updates `slideVelX/Z` and `m.vel` accordingly, based on `m.faceAngle.y`. Useful for controlling Mario's speed and direction in various actions (jumping, walking, sliding, etc.) + +### Lua Example +`mario_set_forward_vel(m, speed)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| speed | `number` | + +### Returns +- None + +### C Prototype +`void mario_set_forward_vel(struct MarioState *m, f32 speed);` + +[:arrow_up_small:](#) + +
+ +## [mario_get_floor_class](#mario_get_floor_class) + +### Description +Retrieves the slipperiness class of Mario's current floor, ranging from not slippery to very slippery. Considers terrain types and special surfaces. Useful for controlling friction, movement speed adjustments, and whether Mario slips or walks + +### Lua Example +`local integerValue = mario_get_floor_class(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 mario_get_floor_class(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [mario_get_terrain_sound_addend](#mario_get_terrain_sound_addend) + +### Description +Computes a value added to terrain sounds, depending on the floor’s type (sand, snow, water, etc.) and slipperiness. This returns a sound 'addend' used with sound effects. Useful for playing context-specific footstep or movement sounds + +### Lua Example +`local integerValue = mario_get_terrain_sound_addend(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`u32 mario_get_terrain_sound_addend(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [resolve_and_return_wall_collisions](#resolve_and_return_wall_collisions) + +### Description +Checks for and resolves wall collisions at a given position `pos`, returning the last wall encountered. Primarily used to prevent Mario from going through walls. Useful for collision detection when updating Mario’s movement or adjusting his position + +### Lua Example +`local SurfaceValue = resolve_and_return_wall_collisions(pos, offset, radius)` + +### Parameters +| Field | Type | +| ----- | ---- | +| pos | [Vec3f](structs.md#Vec3f) | +| offset | `number` | +| radius | `number` | + +### Returns +[Surface](structs.md#Surface) + +### C Prototype +`struct Surface *resolve_and_return_wall_collisions(Vec3f pos, f32 offset, f32 radius);` + +[:arrow_up_small:](#) + +
+ +## [resolve_and_return_wall_collisions_data](#resolve_and_return_wall_collisions_data) + +### Description +Similar to `resolve_and_return_wall_collisions` but also returns detailed collision data (`WallCollisionData`). This can handle multiple walls and store them for further checks + +### Lua Example +`resolve_and_return_wall_collisions_data(pos, offset, radius, collisionData)` + +### Parameters +| Field | Type | +| ----- | ---- | +| pos | [Vec3f](structs.md#Vec3f) | +| offset | `number` | +| radius | `number` | +| collisionData | [WallCollisionData](structs.md#WallCollisionData) | + +### Returns +- None + +### C Prototype +`void resolve_and_return_wall_collisions_data(Vec3f pos, f32 offset, f32 radius, struct WallCollisionData* collisionData);` + +[:arrow_up_small:](#) + +
+ ## [mario_facing_downhill](#mario_facing_downhill) ### Description @@ -460,507 +799,146 @@ Checks whether Mario's floor is steep enough to cause special behavior, such as
-## [mario_get_floor_class](#mario_get_floor_class) +## [find_floor_height_relative_polar](#find_floor_height_relative_polar) ### Description -Retrieves the slipperiness class of Mario's current floor, ranging from not slippery to very slippery. Considers terrain types and special surfaces. Useful for controlling friction, movement speed adjustments, and whether Mario slips or walks +Finds the floor height relative to Mario's current position given a polar displacement (`angleFromMario`, `distFromMario`). Useful for determining height differentials ahead or behind Mario, e.g. for slope checks or collision logic ### Lua Example -`local integerValue = mario_get_floor_class(m)` +`local numberValue = find_floor_height_relative_polar(m, angleFromMario, distFromMario)` ### Parameters | Field | Type | | ----- | ---- | | m | [MarioState](structs.md#MarioState) | +| angleFromMario | `integer` | +| distFromMario | `number` | + +### Returns +- `number` + +### C Prototype +`f32 find_floor_height_relative_polar(struct MarioState *m, s16 angleFromMario, f32 distFromMario);` + +[:arrow_up_small:](#) + +
+ +## [find_floor_slope](#find_floor_slope) + +### Description +Returns a slope angle based on comparing the floor heights slightly in front and behind Mario. It essentially calculates how steep the ground is in a specific yaw direction. Useful for slope-based calculations such as setting walking or sliding behaviors + +### Lua Example +`local integerValue = find_floor_slope(m, yawOffset)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| yawOffset | `integer` | ### Returns - `integer` ### C Prototype -`s32 mario_get_floor_class(struct MarioState *m);` +`s16 find_floor_slope(struct MarioState *m, s16 yawOffset);` [:arrow_up_small:](#)
-## [mario_get_terrain_sound_addend](#mario_get_terrain_sound_addend) +## [update_mario_sound_and_camera](#update_mario_sound_and_camera) ### Description -Computes a value added to terrain sounds, depending on the floor’s type (sand, snow, water, etc.) and slipperiness. This returns a sound 'addend' used with sound effects. Useful for playing context-specific footstep or movement sounds +Updates the background noise and camera modes based on Mario's action. Especially relevant for actions like first-person view or sleeping. Useful for synchronizing camera behavior and ambient sounds with Mario's state changes ### Lua Example -`local integerValue = mario_get_terrain_sound_addend(m)` +`update_mario_sound_and_camera(m)` ### Parameters | Field | Type | | ----- | ---- | | m | [MarioState](structs.md#MarioState) | +### Returns +- None + +### C Prototype +`void update_mario_sound_and_camera(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [set_steep_jump_action](#set_steep_jump_action) + +### Description +Transitions Mario into ACT_STEEP_JUMP if the floor is too steep, adjusting his forward velocity and orientation accordingly. Useful for forcing special jump states on surfaces exceeding normal slope limits + +### Lua Example +`set_steep_jump_action(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void set_steep_jump_action(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [set_mario_y_vel_based_on_fspeed](#set_mario_y_vel_based_on_fspeed) + +### Description +Adjusts Mario's vertical velocity (`m.vel.y`) based on his forward speed. This function also accounts for conditions like quicksand to halve velocity + +### Lua Example +`set_mario_y_vel_based_on_fspeed(m, initialVelY, multiplier)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| initialVelY | `number` | +| multiplier | `number` | + +### Returns +- None + +### C Prototype +`void set_mario_y_vel_based_on_fspeed(struct MarioState *m, f32 initialVelY, f32 multiplier);` + +[:arrow_up_small:](#) + +
+ +## [set_mario_action](#set_mario_action) + +### Description +Sets Mario's action to the specified `action` and `actionArg`, routing through group-specific transition functions (e.g., airborne actions). Resets sound flags and updates internal timers + +### Lua Example +`local integerValue = set_mario_action(m, action, actionArg)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| action | `integer` | +| actionArg | `integer` | + ### Returns - `integer` ### C Prototype -`u32 mario_get_terrain_sound_addend(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [mario_is_crouching](#mario_is_crouching) - -### Description -Returns true if Mario is in any of the crouching or crawling states, checking his current action - -### Lua Example -`local booleanValue = mario_is_crouching(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `boolean` - -### C Prototype -`bool mario_is_crouching(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [mario_set_bubbled](#mario_set_bubbled) - -### Description -Transitions Mario into a bubbled state (if available in multiplayer), decrementing lives and preventing normal movement - -### Lua Example -`mario_set_bubbled(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void mario_set_bubbled(struct MarioState* m);` - -[:arrow_up_small:](#) - -
- -## [mario_set_forward_vel](#mario_set_forward_vel) - -### Description -Sets Mario's forward velocity (`m.forwardVel`) and updates `slideVelX/Z` and `m.vel` accordingly, based on `m.faceAngle.y`. Useful for controlling Mario's speed and direction in various actions (jumping, walking, sliding, etc.) - -### Lua Example -`mario_set_forward_vel(m, speed)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| speed | `number` | - -### Returns -- None - -### C Prototype -`void mario_set_forward_vel(struct MarioState *m, f32 speed);` - -[:arrow_up_small:](#) - -
- -## [mario_update_wall](#mario_update_wall) - -### Description -Updates Mario's wall information based on wall collisions (`WallCollisionData`). Chooses the most relevant wall depending on the level’s collision fix settings - -### Lua Example -`mario_update_wall(m, wcd)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| wcd | [WallCollisionData](structs.md#WallCollisionData) | - -### Returns -- None - -### C Prototype -`void mario_update_wall(struct MarioState* m, struct WallCollisionData* wcd);` - -[:arrow_up_small:](#) - -
- -## [play_mario_action_sound](#play_mario_action_sound) - -### Description -Plays an action sound once per action, optionally spawning wave or dust particles depending on the surface. This sets the `MARIO_ACTION_SOUND_PLAYED` flag to prevent repeats - -### Lua Example -`play_mario_action_sound(m, soundBits, waveParticleType)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| soundBits | `integer` | -| waveParticleType | `integer` | - -### Returns -- None - -### C Prototype -`void play_mario_action_sound(struct MarioState *m, u32 soundBits, u32 waveParticleType);` - -[:arrow_up_small:](#) - -
- -## [play_mario_heavy_landing_sound](#play_mario_heavy_landing_sound) - -### Description -Plays a heavier, more forceful landing sound, possibly for ground pounds or large impacts. Takes into account whether Mario has a metal cap equipped. Useful for making big impact landings stand out aurally - -### Lua Example -`play_mario_heavy_landing_sound(m, soundBits)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| soundBits | `integer` | - -### Returns -- None - -### C Prototype -`void play_mario_heavy_landing_sound(struct MarioState *m, u32 soundBits);` - -[:arrow_up_small:](#) - -
- -## [play_mario_heavy_landing_sound_once](#play_mario_heavy_landing_sound_once) - -### Description -A variant of `play_mario_heavy_landing_sound` that ensures the sound is only played once per action (using `play_mario_action_sound` internally). Useful for consistent heavy landing effects without repetition - -### Lua Example -`play_mario_heavy_landing_sound_once(m, soundBits)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| soundBits | `integer` | - -### Returns -- None - -### C Prototype -`void play_mario_heavy_landing_sound_once(struct MarioState *m, u32 soundBits);` - -[:arrow_up_small:](#) - -
- -## [play_mario_jump_sound](#play_mario_jump_sound) - -### Description -Plays Mario’s jump sound if it hasn't been played yet since the last action change. This helps avoid overlapping jump voice lines on repeated jumps - -### Lua Example -`play_mario_jump_sound(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void play_mario_jump_sound(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [play_mario_landing_sound](#play_mario_landing_sound) - -### Description -Plays a normal landing sound (or metal landing sound if Mario is metal) and spawns appropriate particle effects (water splash, dust, etc.) - -### Lua Example -`play_mario_landing_sound(m, soundBits)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| soundBits | `integer` | - -### Returns -- None - -### C Prototype -`void play_mario_landing_sound(struct MarioState *m, u32 soundBits);` - -[:arrow_up_small:](#) - -
- -## [play_mario_landing_sound_once](#play_mario_landing_sound_once) - -### Description -A variant of `play_mario_landing_sound` that ensures the sound is only played once per action. Uses `play_mario_action_sound` internally - -### Lua Example -`play_mario_landing_sound_once(m, soundBits)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| soundBits | `integer` | - -### Returns -- None - -### C Prototype -`void play_mario_landing_sound_once(struct MarioState *m, u32 soundBits);` - -[:arrow_up_small:](#) - -
- -## [play_mario_sound](#play_mario_sound) - -### Description -Plays a given action sound (like a jump or landing) and also a Mario voice line if certain conditions are met. It manages flags to avoid repeated sounds - -### Lua Example -`play_mario_sound(m, primarySoundBits, scondarySoundBits)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| primarySoundBits | `integer` | -| scondarySoundBits | `integer` | - -### Returns -- None - -### C Prototype -`void play_mario_sound(struct MarioState *m, s32 primarySoundBits, s32 scondarySoundBits);` - -[:arrow_up_small:](#) - -
- -## [play_sound_and_spawn_particles](#play_sound_and_spawn_particles) - -### Description -Plays the specified sound effect and spawns surface-appropriate particles (e.g., water splash, snow, sand). Checks if Mario is metal to adjust audio accordingly - -### Lua Example -`play_sound_and_spawn_particles(m, soundBits, waveParticleType)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| soundBits | `integer` | -| waveParticleType | `integer` | - -### Returns -- None - -### C Prototype -`void play_sound_and_spawn_particles(struct MarioState *m, u32 soundBits, u32 waveParticleType);` - -[:arrow_up_small:](#) - -
- -## [play_sound_if_no_flag](#play_sound_if_no_flag) - -### Description -Plays a sound if Mario does not currently have a specific flag set. Once played, the flag is set to prevent immediate repeats - -### Lua Example -`play_sound_if_no_flag(m, soundBits, flags)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| soundBits | `integer` | -| flags | `integer` | - -### Returns -- None - -### C Prototype -`void play_sound_if_no_flag(struct MarioState *m, u32 soundBits, u32 flags);` - -[:arrow_up_small:](#) - -
- -## [resolve_and_return_wall_collisions](#resolve_and_return_wall_collisions) - -### Description -Checks for and resolves wall collisions at a given position `pos`, returning the last wall encountered. Primarily used to prevent Mario from going through walls. Useful for collision detection when updating Mario’s movement or adjusting his position - -### Lua Example -`local SurfaceValue = resolve_and_return_wall_collisions(pos, offset, radius)` - -### Parameters -| Field | Type | -| ----- | ---- | -| pos | [Vec3f](structs.md#Vec3f) | -| offset | `number` | -| radius | `number` | - -### Returns -[Surface](structs.md#Surface) - -### C Prototype -`struct Surface *resolve_and_return_wall_collisions(Vec3f pos, f32 offset, f32 radius);` - -[:arrow_up_small:](#) - -
- -## [resolve_and_return_wall_collisions_data](#resolve_and_return_wall_collisions_data) - -### Description -Similar to `resolve_and_return_wall_collisions` but also returns detailed collision data (`WallCollisionData`). This can handle multiple walls and store them for further checks - -### Lua Example -`resolve_and_return_wall_collisions_data(pos, offset, radius, collisionData)` - -### Parameters -| Field | Type | -| ----- | ---- | -| pos | [Vec3f](structs.md#Vec3f) | -| offset | `number` | -| radius | `number` | -| collisionData | [WallCollisionData](structs.md#WallCollisionData) | - -### Returns -- None - -### C Prototype -`void resolve_and_return_wall_collisions_data(Vec3f pos, f32 offset, f32 radius, struct WallCollisionData* collisionData);` - -[:arrow_up_small:](#) - -
- -## [return_mario_anim_y_translation](#return_mario_anim_y_translation) - -### Description -Determines the vertical translation from Mario's animation (how much the animation moves Mario up or down). Returns the y-component of the animation's translation. Useful for adjusting Mario's vertical position based on an ongoing animation (e.g., a bounce or jump) - -### Lua Example -`local integerValue = return_mario_anim_y_translation(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s16 return_mario_anim_y_translation(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [set_anim_to_frame](#set_anim_to_frame) - -### Description -Sets the current animation frame to a specific `animFrame` - -### Lua Example -`set_anim_to_frame(m, animFrame)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| animFrame | `integer` | - -### Returns -- None - -### C Prototype -`void set_anim_to_frame(struct MarioState *m, s16 animFrame);` - -[:arrow_up_small:](#) - -
- -## [set_character_anim_with_accel](#set_character_anim_with_accel) - -### Description -Sets a character-specific animation where the animation speed is adjusted by `accel`. Useful for varying animation speeds based on context or dynamic conditions (e.g., slow-motion) - -### Lua Example -`local integerValue = set_character_anim_with_accel(m, targetAnimID, accel)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| targetAnimID | [enum CharacterAnimID](constants.md#enum-CharacterAnimID) | -| accel | `integer` | - -### Returns -- `integer` - -### C Prototype -`s16 set_character_anim_with_accel(struct MarioState *m, enum CharacterAnimID targetAnimID, s32 accel);` - -[:arrow_up_small:](#) - -
- -## [set_character_animation](#set_character_animation) - -### Description -Sets the character-specific animation at its default rate (no acceleration) - -### Lua Example -`local integerValue = set_character_animation(m, targetAnimID)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| targetAnimID | [enum CharacterAnimID](constants.md#enum-CharacterAnimID) | - -### Returns -- `integer` - -### C Prototype -`s16 set_character_animation(struct MarioState *m, enum CharacterAnimID targetAnimID);` +`u32 set_mario_action(struct MarioState *m, u32 action, u32 actionArg);` [:arrow_up_small:](#) @@ -1014,13 +992,13 @@ Sets Mario to a jumping action (regular, double, triple, or steep jump) if condi
-## [set_mario_action](#set_mario_action) +## [drop_and_set_mario_action](#drop_and_set_mario_action) ### Description -Sets Mario's action to the specified `action` and `actionArg`, routing through group-specific transition functions (e.g., airborne actions). Resets sound flags and updates internal timers +Drops any currently held object and sets Mario to a new action. This function is typically used when Mario transitions to states where he cannot hold objects ### Lua Example -`local integerValue = set_mario_action(m, action, actionArg)` +`local integerValue = drop_and_set_mario_action(m, action, actionArg)` ### Parameters | Field | Type | @@ -1033,56 +1011,194 @@ Sets Mario's action to the specified `action` and `actionArg`, routing through g - `integer` ### C Prototype -`u32 set_mario_action(struct MarioState *m, u32 action, u32 actionArg);` +`s32 drop_and_set_mario_action(struct MarioState *m, u32 action, u32 actionArg);` [:arrow_up_small:](#)
-## [set_mario_anim_with_accel](#set_mario_anim_with_accel) +## [hurt_and_set_mario_action](#hurt_and_set_mario_action) ### Description -Sets Mario's current animation to `targetAnimID` with a custom `accel` value to speed up or slow down the animation. Useful for controlling animation timing, e.g., slow-motion or fast-forward effects +Increments Mario's `hurtCounter` and immediately sets a new action. Often used when Mario takes damage and transitions into a knockback or stunned action. ### Lua Example -`local integerValue = set_mario_anim_with_accel(m, targetAnimID, accel)` +`local integerValue = hurt_and_set_mario_action(m, action, actionArg, hurtCounter)` ### Parameters | Field | Type | | ----- | ---- | | m | [MarioState](structs.md#MarioState) | -| targetAnimID | `integer` | -| accel | `integer` | +| action | `integer` | +| actionArg | `integer` | +| hurtCounter | `integer` | ### Returns - `integer` ### C Prototype -`s16 set_mario_anim_with_accel(struct MarioState *m, s32 targetAnimID, s32 accel);` +`s32 hurt_and_set_mario_action(struct MarioState *m, u32 action, u32 actionArg, s16 hurtCounter);` [:arrow_up_small:](#)
-## [set_mario_animation](#set_mario_animation) +## [check_common_action_exits](#check_common_action_exits) ### Description -Sets Mario's current animation to `targetAnimID` at a default acceleration (no speed change) +Checks for inputs that cause common action transitions (jump, freefall, walking, sliding). Useful for quickly exiting certain stationary actions when Mario begins moving or leaves the floor ### Lua Example -`local integerValue = set_mario_animation(m, targetAnimID)` +`local integerValue = check_common_action_exits(m)` ### Parameters | Field | Type | | ----- | ---- | | m | [MarioState](structs.md#MarioState) | -| targetAnimID | `integer` | ### Returns - `integer` ### C Prototype -`s16 set_mario_animation(struct MarioState *m, s32 targetAnimID);` +`s32 check_common_action_exits(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [check_common_hold_action_exits](#check_common_hold_action_exits) + +### Description +Checks for inputs that cause common hold-action transitions (hold jump, hold freefall, hold walking, hold sliding) + +### Lua Example +`local integerValue = check_common_hold_action_exits(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 check_common_hold_action_exits(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [transition_submerged_to_walking](#transition_submerged_to_walking) + +### Description +Transitions Mario from being underwater to a walking state. Resets camera to the default mode and can handle object-holding states. Useful for restoring standard ground movement when emerging from water + +### Lua Example +`local integerValue = transition_submerged_to_walking(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 transition_submerged_to_walking(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [set_water_plunge_action](#set_water_plunge_action) + +### Description +Transitions Mario into a "water plunge" action, used when he enters water from above. Adjusts position, velocity, and camera mode + +### Lua Example +`local integerValue = set_water_plunge_action(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 set_water_plunge_action(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [execute_mario_action](#execute_mario_action) + +### Description +Main driver for Mario's behavior. Executes the current action group (stationary, moving, airborne, etc.) in a loop until no further action changes are necessary + +### Lua Example +`local integerValue = execute_mario_action(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`s32 execute_mario_action(UNUSED struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [force_idle_state](#force_idle_state) + +### Description +Forces Mario into an idle state, either `ACT_IDLE` or `ACT_WATER_IDLE` depending on whether he is submerged. Useful for quickly resetting Mario's state to an idle pose under special conditions (e.g., cutscene triggers) + +### Lua Example +`local integerValue = force_idle_state(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 force_idle_state(struct MarioState* m);` + +[:arrow_up_small:](#) + +
+ +## [init_single_mario](#init_single_mario) + +### Description +Initializes the fields of a single `MarioState` structure when the player spawns or respawns. Sets starting position, velocity, action, and various internal flags + +### Lua Example +`init_single_mario(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void init_single_mario(struct MarioState* m);` [:arrow_up_small:](#) @@ -1113,141 +1229,25 @@ Sets Mario's particle flags to spawn various visual effects (dust, water splashe
-## [set_mario_y_vel_based_on_fspeed](#set_mario_y_vel_based_on_fspeed) +## [mario_update_wall](#mario_update_wall) ### Description -Adjusts Mario's vertical velocity (`m.vel.y`) based on his forward speed. This function also accounts for conditions like quicksand to halve velocity +Updates Mario's wall information based on wall collisions (`WallCollisionData`). Chooses the most relevant wall depending on the level’s collision fix settings ### Lua Example -`set_mario_y_vel_based_on_fspeed(m, initialVelY, multiplier)` +`mario_update_wall(m, wcd)` ### Parameters | Field | Type | | ----- | ---- | | m | [MarioState](structs.md#MarioState) | -| initialVelY | `number` | -| multiplier | `number` | +| wcd | [WallCollisionData](structs.md#WallCollisionData) | ### Returns - None ### C Prototype -`void set_mario_y_vel_based_on_fspeed(struct MarioState *m, f32 initialVelY, f32 multiplier);` - -[:arrow_up_small:](#) - -
- -## [set_steep_jump_action](#set_steep_jump_action) - -### Description -Transitions Mario into ACT_STEEP_JUMP if the floor is too steep, adjusting his forward velocity and orientation accordingly. Useful for forcing special jump states on surfaces exceeding normal slope limits - -### Lua Example -`set_steep_jump_action(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void set_steep_jump_action(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [set_water_plunge_action](#set_water_plunge_action) - -### Description -Transitions Mario into a "water plunge" action, used when he enters water from above. Adjusts position, velocity, and camera mode - -### Lua Example -`local integerValue = set_water_plunge_action(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 set_water_plunge_action(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [transition_submerged_to_walking](#transition_submerged_to_walking) - -### Description -Transitions Mario from being underwater to a walking state. Resets camera to the default mode and can handle object-holding states. Useful for restoring standard ground movement when emerging from water - -### Lua Example -`local integerValue = transition_submerged_to_walking(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 transition_submerged_to_walking(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [update_mario_pos_for_anim](#update_mario_pos_for_anim) - -### Description -Applies the translation from Mario's current animation to his world position. Considers animation flags (horizontal/vertical translation) - -### Lua Example -`update_mario_pos_for_anim(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void update_mario_pos_for_anim(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [update_mario_sound_and_camera](#update_mario_sound_and_camera) - -### Description -Updates the background noise and camera modes based on Mario's action. Especially relevant for actions like first-person view or sleeping. Useful for synchronizing camera behavior and ambient sounds with Mario's state changes - -### Lua Example -`update_mario_sound_and_camera(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void update_mario_sound_and_camera(struct MarioState *m);` +`void mario_update_wall(struct MarioState* m, struct WallCollisionData* wcd);` [:arrow_up_small:](#) @@ -1259,13 +1259,85 @@ Updates the background noise and camera modes based on Mario's action. Especiall
-## [check_common_airborne_cancels](#check_common_airborne_cancels) +## [play_flip_sounds](#play_flip_sounds) ### Description -Checks for and handles common conditions that would cancel Mario's current air action. This includes transitioning to a water plunge if below the water level, becoming squished if appropriate, or switching to vertical wind action if on certain wind surfaces. Also resets `m.quicksandDepth` +Plays a spinning sound at specific animation frames for flips (usually side flips or certain jump flips). If the current animation frame matches any of the specified frames, it triggers `SOUND_ACTION_SPIN` ### Lua Example -`local integerValue = check_common_airborne_cancels(m)` +`play_flip_sounds(m, frame1, frame2, frame3)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| frame1 | `integer` | +| frame2 | `integer` | +| frame3 | `integer` | + +### Returns +- None + +### C Prototype +`void play_flip_sounds(struct MarioState *m, s16 frame1, s16 frame2, s16 frame3);` + +[:arrow_up_small:](#) + +
+ +## [play_far_fall_sound](#play_far_fall_sound) + +### Description +Plays a unique sound when Mario has fallen a significant distance without being invulnerable, twirling, or flying. If the fall exceeds a threshold, triggers a "long fall" exclamation. Also sets a flag to prevent repeated triggering + +### Lua Example +`play_far_fall_sound(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void play_far_fall_sound(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [play_knockback_sound](#play_knockback_sound) + +### Description +Plays a knockback sound effect if Mario is hit or knocked back with significant velocity. The specific sound differs depending on whether Mario's forward velocity is high enough to be considered a strong knockback + +### Lua Example +`play_knockback_sound(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void play_knockback_sound(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [lava_boost_on_wall](#lava_boost_on_wall) + +### Description +Allows Mario to 'lava boost' off a lava wall, reorienting him to face away from the wall and adjusting forward velocity. Increases Mario's hurt counter if he's not metal, plays a burning sound, and transitions his action to `ACT_LAVA_BOOST`. Useful for handling collisions with lava walls, giving Mario a strong upward/forward boost at the cost of health + +### Lua Example +`local integerValue = lava_boost_on_wall(m)` ### Parameters | Field | Type | @@ -1276,7 +1348,7 @@ Checks for and handles common conditions that would cancel Mario's current air a - `integer` ### C Prototype -`s32 check_common_airborne_cancels(struct MarioState *m);` +`s32 lava_boost_on_wall(struct MarioState *m);` [:arrow_up_small:](#) @@ -1306,6 +1378,52 @@ Evaluates whether Mario should take fall damage based on the height difference b
+## [check_kick_or_dive_in_air](#check_kick_or_dive_in_air) + +### Description +Checks if Mario should perform a kick or a dive while in mid-air, depending on his current forward velocity. Pressing the B button in the air can trigger a jump kick (at lower speeds) or a dive (at higher speeds) + +### Lua Example +`local integerValue = check_kick_or_dive_in_air(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 check_kick_or_dive_in_air(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [should_get_stuck_in_ground](#should_get_stuck_in_ground) + +### Description +Determines whether Mario should become stuck in the ground after landing, specifically for soft terrain such as snow or sand, provided certain conditions are met (height of the fall, normal of the floor, etc.). Returns true if Mario should be stuck, false otherwise + +### Lua Example +`local integerValue = should_get_stuck_in_ground(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 should_get_stuck_in_ground(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ ## [check_fall_damage_or_get_stuck](#check_fall_damage_or_get_stuck) ### Description @@ -1353,13 +1471,13 @@ Checks for the presence of a horizontal wind surface under Mario. If found, appl
-## [check_kick_or_dive_in_air](#check_kick_or_dive_in_air) +## [update_air_with_turn](#update_air_with_turn) ### Description -Checks if Mario should perform a kick or a dive while in mid-air, depending on his current forward velocity. Pressing the B button in the air can trigger a jump kick (at lower speeds) or a dive (at higher speeds) +Updates Mario's air movement while allowing him to turn. Checks horizontal wind and applies a moderate amount of drag, approaches the forward velocity toward zero if no input is pressed, and modifies forward velocity/angle based on stick input ### Lua Example -`local integerValue = check_kick_or_dive_in_air(m)` +`update_air_with_turn(m)` ### Parameters | Field | Type | @@ -1367,22 +1485,22 @@ Checks if Mario should perform a kick or a dive while in mid-air, depending on h | m | [MarioState](structs.md#MarioState) | ### Returns -- `integer` +- None ### C Prototype -`s32 check_kick_or_dive_in_air(struct MarioState *m);` +`void update_air_with_turn(struct MarioState *m);` [:arrow_up_small:](#)
-## [check_wall_kick](#check_wall_kick) +## [update_air_without_turn](#update_air_without_turn) ### Description -Checks if Mario should wall kick after performing an air hit against a wall. If the input conditions (e.g., pressing A) and the `wallKickTimer` allow, Mario transitions to `ACT_WALL_KICK_AIR` +Updates Mario's air movement without directly turning his facing angle to match his intended yaw. Instead, Mario can move sideways relative to his current facing direction. Also checks horizontal wind and applies drag ### Lua Example -`local integerValue = check_wall_kick(m)` +`update_air_without_turn(m)` ### Parameters | Field | Type | @@ -1390,10 +1508,102 @@ Checks if Mario should wall kick after performing an air hit against a wall. If | m | [MarioState](structs.md#MarioState) | ### Returns -- `integer` +- None ### C Prototype -`s32 check_wall_kick(struct MarioState *m);` +`void update_air_without_turn(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [update_lava_boost_or_twirling](#update_lava_boost_or_twirling) + +### Description +Updates Mario's movement when in actions like lava boost or twirling in mid-air. Applies player input to adjust forward velocity and facing angle, but in a more restricted manner compared to standard jump movement. Used by `ACT_LAVA_BOOST` and `ACT_TWIRLING` + +### Lua Example +`update_lava_boost_or_twirling(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void update_lava_boost_or_twirling(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [update_flying_yaw](#update_flying_yaw) + +### Description +Calculates and applies a change in Mario's yaw while flying, based on horizontal stick input. Approaches a target yaw velocity and sets Mario's roll angle to simulate banking turns. This results in a more natural, curved flight path + +### Lua Example +`update_flying_yaw(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void update_flying_yaw(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [update_flying_pitch](#update_flying_pitch) + +### Description +Calculates and applies a change in Mario's pitch while flying, based on vertical stick input. Approaches a target pitch velocity and clamps the final pitch angle to a certain range, simulating a smooth flight control + +### Lua Example +`update_flying_pitch(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void update_flying_pitch(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [update_flying](#update_flying) + +### Description +Handles the complete flying logic for Mario (usually with the wing cap). Continuously updates pitch and yaw based on controller input, applies drag, and adjusts forward velocity. Also updates Mario's model angles for flight animations + +### Lua Example +`update_flying(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void update_flying(struct MarioState *m);` [:arrow_up_small:](#) @@ -1452,13 +1662,13 @@ A shared step update used for airborne knockback states (both forward and backwa
-## [lava_boost_on_wall](#lava_boost_on_wall) +## [check_wall_kick](#check_wall_kick) ### Description -Allows Mario to 'lava boost' off a lava wall, reorienting him to face away from the wall and adjusting forward velocity. Increases Mario's hurt counter if he's not metal, plays a burning sound, and transitions his action to `ACT_LAVA_BOOST`. Useful for handling collisions with lava walls, giving Mario a strong upward/forward boost at the cost of health +Checks if Mario should wall kick after performing an air hit against a wall. If the input conditions (e.g., pressing A) and the `wallKickTimer` allow, Mario transitions to `ACT_WALL_KICK_AIR` ### Lua Example -`local integerValue = lava_boost_on_wall(m)` +`local integerValue = check_wall_kick(m)` ### Parameters | Field | Type | @@ -1469,7 +1679,30 @@ Allows Mario to 'lava boost' off a lava wall, reorienting him to face away from - `integer` ### C Prototype -`s32 lava_boost_on_wall(struct MarioState *m);` +`s32 check_wall_kick(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [check_common_airborne_cancels](#check_common_airborne_cancels) + +### Description +Checks for and handles common conditions that would cancel Mario's current air action. This includes transitioning to a water plunge if below the water level, becoming squished if appropriate, or switching to vertical wind action if on certain wind surfaces. Also resets `m.quicksandDepth` + +### Lua Example +`local integerValue = check_common_airborne_cancels(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 check_common_airborne_cancels(struct MarioState *m);` [:arrow_up_small:](#) @@ -1498,239 +1731,6 @@ Executes Mario's current airborne action by first checking common airborne cance
-## [play_far_fall_sound](#play_far_fall_sound) - -### Description -Plays a unique sound when Mario has fallen a significant distance without being invulnerable, twirling, or flying. If the fall exceeds a threshold, triggers a "long fall" exclamation. Also sets a flag to prevent repeated triggering - -### Lua Example -`play_far_fall_sound(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void play_far_fall_sound(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [play_flip_sounds](#play_flip_sounds) - -### Description -Plays a spinning sound at specific animation frames for flips (usually side flips or certain jump flips). If the current animation frame matches any of the specified frames, it triggers `SOUND_ACTION_SPIN` - -### Lua Example -`play_flip_sounds(m, frame1, frame2, frame3)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| frame1 | `integer` | -| frame2 | `integer` | -| frame3 | `integer` | - -### Returns -- None - -### C Prototype -`void play_flip_sounds(struct MarioState *m, s16 frame1, s16 frame2, s16 frame3);` - -[:arrow_up_small:](#) - -
- -## [play_knockback_sound](#play_knockback_sound) - -### Description -Plays a knockback sound effect if Mario is hit or knocked back with significant velocity. The specific sound differs depending on whether Mario's forward velocity is high enough to be considered a strong knockback - -### Lua Example -`play_knockback_sound(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void play_knockback_sound(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [should_get_stuck_in_ground](#should_get_stuck_in_ground) - -### Description -Determines whether Mario should become stuck in the ground after landing, specifically for soft terrain such as snow or sand, provided certain conditions are met (height of the fall, normal of the floor, etc.). Returns true if Mario should be stuck, false otherwise - -### Lua Example -`local integerValue = should_get_stuck_in_ground(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 should_get_stuck_in_ground(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [update_air_with_turn](#update_air_with_turn) - -### Description -Updates Mario's air movement while allowing him to turn. Checks horizontal wind and applies a moderate amount of drag, approaches the forward velocity toward zero if no input is pressed, and modifies forward velocity/angle based on stick input - -### Lua Example -`update_air_with_turn(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void update_air_with_turn(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [update_air_without_turn](#update_air_without_turn) - -### Description -Updates Mario's air movement without directly turning his facing angle to match his intended yaw. Instead, Mario can move sideways relative to his current facing direction. Also checks horizontal wind and applies drag - -### Lua Example -`update_air_without_turn(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void update_air_without_turn(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [update_flying](#update_flying) - -### Description -Handles the complete flying logic for Mario (usually with the wing cap). Continuously updates pitch and yaw based on controller input, applies drag, and adjusts forward velocity. Also updates Mario's model angles for flight animations - -### Lua Example -`update_flying(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void update_flying(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [update_flying_pitch](#update_flying_pitch) - -### Description -Calculates and applies a change in Mario's pitch while flying, based on vertical stick input. Approaches a target pitch velocity and clamps the final pitch angle to a certain range, simulating a smooth flight control - -### Lua Example -`update_flying_pitch(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void update_flying_pitch(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [update_flying_yaw](#update_flying_yaw) - -### Description -Calculates and applies a change in Mario's yaw while flying, based on horizontal stick input. Approaches a target yaw velocity and sets Mario's roll angle to simulate banking turns. This results in a more natural, curved flight path - -### Lua Example -`update_flying_yaw(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void update_flying_yaw(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [update_lava_boost_or_twirling](#update_lava_boost_or_twirling) - -### Description -Updates Mario's movement when in actions like lava boost or twirling in mid-air. Applies player input to adjust forward velocity and facing angle, but in a more restricted manner compared to standard jump movement. Used by `ACT_LAVA_BOOST` and `ACT_TWIRLING` - -### Lua Example -`update_lava_boost_or_twirling(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void update_lava_boost_or_twirling(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- --- # functions from mario_actions_automatic.c @@ -1760,122 +1760,6 @@ Spawns leaf particles when Mario climbs a tree, if he is sufficiently high above
-## [check_common_automatic_cancels](#check_common_automatic_cancels) - -### Description -Checks if Mario should cancel his current automatic action, primarily by detecting if he falls into deep water. If so, transitions him to the water-plunge state - -### Lua Example -`local integerValue = check_common_automatic_cancels(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 check_common_automatic_cancels(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [climb_up_ledge](#climb_up_ledge) - -### Description -Moves Mario onto the top of a ledge once he finishes climbing it. This shifts Mario forward slightly on the ledge and updates his animation accordingly - -### Lua Example -`climb_up_ledge(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void climb_up_ledge(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [let_go_of_ledge](#let_go_of_ledge) - -### Description -Handles Mario letting go of a ledge by adjusting his position and setting his velocity to make him fall away from the ledge. The action then transitions to a 'soft bonk' state - -### Lua Example -`local integerValue = let_go_of_ledge(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 let_go_of_ledge(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [mario_execute_automatic_action](#mario_execute_automatic_action) - -### Description -Executes Mario's current automatic action (e.g., climbing a pole, hanging, ledge-grabbing) by calling the corresponding function. It also checks for common cancellations, like falling into water. Returns true if the action was canceled and a new action was set, or false otherwise - -### Lua Example -`local integerValue = mario_execute_automatic_action(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 mario_execute_automatic_action(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [perform_hanging_step](#perform_hanging_step) - -### Description -Performs a single step of movement while Mario is hanging from a ceiling. It handles wall collisions and checks the floor and ceiling to determine if Mario remains hanging, leaves the ceiling, or hits it - -### Lua Example -`local integerValue = perform_hanging_step(m, nextPos)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| nextPos | [Vec3f](structs.md#Vec3f) | - -### Returns -- `integer` - -### C Prototype -`s32 perform_hanging_step(struct MarioState *m, Vec3f nextPos);` - -[:arrow_up_small:](#) - -
- ## [play_climbing_sounds](#play_climbing_sounds) ### Description @@ -1924,6 +1808,30 @@ Sets Mario's position and alignment while he is on a climbable pole or tree. Thi
+## [perform_hanging_step](#perform_hanging_step) + +### Description +Performs a single step of movement while Mario is hanging from a ceiling. It handles wall collisions and checks the floor and ceiling to determine if Mario remains hanging, leaves the ceiling, or hits it + +### Lua Example +`local integerValue = perform_hanging_step(m, nextPos)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| nextPos | [Vec3f](structs.md#Vec3f) | + +### Returns +- `integer` + +### C Prototype +`s32 perform_hanging_step(struct MarioState *m, Vec3f nextPos);` + +[:arrow_up_small:](#) + +
+ ## [update_hang_moving](#update_hang_moving) ### Description @@ -1970,26 +1878,47 @@ Keeps Mario stationary while he is hanging from a ceiling. This function zeroes
-## [update_ledge_climb](#update_ledge_climb) +## [let_go_of_ledge](#let_go_of_ledge) ### Description -Updates Mario's climb onto a ledge by setting the chosen climbing animation and transitioning to the specified end action (e.g., standing idle) once the animation finishes. If the end action is `ACT_IDLE`, Mario is placed on top of the ledge +Handles Mario letting go of a ledge by adjusting his position and setting his velocity to make him fall away from the ledge. The action then transitions to a 'soft bonk' state ### Lua Example -`update_ledge_climb(m, animation, endAction)` +`local integerValue = let_go_of_ledge(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 let_go_of_ledge(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [climb_up_ledge](#climb_up_ledge) + +### Description +Moves Mario onto the top of a ledge once he finishes climbing it. This shifts Mario forward slightly on the ledge and updates his animation accordingly + +### Lua Example +`climb_up_ledge(m)` ### Parameters | Field | Type | | ----- | ---- | | m | [MarioState](structs.md#MarioState) | -| animation | `integer` | -| endAction | `integer` | ### Returns - None ### C Prototype -`void update_ledge_climb(struct MarioState *m, s32 animation, u32 endAction);` +`void climb_up_ledge(struct MarioState *m);` [:arrow_up_small:](#) @@ -2018,12 +1947,106 @@ Gradually adjusts the camera position to track Mario as he climbs a ledge. This
+## [update_ledge_climb](#update_ledge_climb) + +### Description +Updates Mario's climb onto a ledge by setting the chosen climbing animation and transitioning to the specified end action (e.g., standing idle) once the animation finishes. If the end action is `ACT_IDLE`, Mario is placed on top of the ledge + +### Lua Example +`update_ledge_climb(m, animation, endAction)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| animation | `integer` | +| endAction | `integer` | + +### Returns +- None + +### C Prototype +`void update_ledge_climb(struct MarioState *m, s32 animation, u32 endAction);` + +[:arrow_up_small:](#) + +
+ +## [check_common_automatic_cancels](#check_common_automatic_cancels) + +### Description +Checks if Mario should cancel his current automatic action, primarily by detecting if he falls into deep water. If so, transitions him to the water-plunge state + +### Lua Example +`local integerValue = check_common_automatic_cancels(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 check_common_automatic_cancels(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [mario_execute_automatic_action](#mario_execute_automatic_action) + +### Description +Executes Mario's current automatic action (e.g., climbing a pole, hanging, ledge-grabbing) by calling the corresponding function. It also checks for common cancellations, like falling into water. Returns true if the action was canceled and a new action was set, or false otherwise + +### Lua Example +`local integerValue = mario_execute_automatic_action(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 mario_execute_automatic_action(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ --- # functions from mario_actions_cutscene.c
+## [get_credits_str_width](#get_credits_str_width) + +### Description +Calculates the pixel width of a given credits string. Each space is counted as 4 pixels, and any other character as 7 pixels. Stops counting at the null terminator + +### Lua Example +`local integerValue = get_credits_str_width(str)` + +### Parameters +| Field | Type | +| ----- | ---- | +| str | `Pointer` <`integer`> | + +### Returns +- `integer` + +### C Prototype +`s32 get_credits_str_width(char *str);` + +[:arrow_up_small:](#) + +
+ ## [bhv_end_peach_loop](#bhv_end_peach_loop) ### Description @@ -2066,150 +2089,6 @@ Handles Toad's final cutscene animation. Chooses which animation index to use ba
-## [common_death_handler](#common_death_handler) - -### Description -Handles shared logic for Mario's various death states. Plays the specified death animation (`animation`), checks for a specific frame (`frameToDeathWarp`) to trigger a warp or bubble state if allowed, and sets Mario's eye state to 'dead' - -### Lua Example -`local integerValue = common_death_handler(m, animation, frameToDeathWarp)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| animation | `integer` | -| frameToDeathWarp | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 common_death_handler(struct MarioState *m, s32 animation, s32 frameToDeathWarp);` - -[:arrow_up_small:](#) - -
- -## [cutscene_put_cap_on](#cutscene_put_cap_on) - -### Description -Transitions Mario's state from having the cap in his hand to wearing it on his head. Clears the `MARIO_CAP_IN_HAND` flag, sets the `MARIO_CAP_ON_HEAD` flag, and plays the 'put cap on' sound - -### Lua Example -`cutscene_put_cap_on(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void cutscene_put_cap_on(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [cutscene_take_cap_off](#cutscene_take_cap_off) - -### Description -Transitions Mario's state from wearing the cap on his head to holding it in his hand. Clears the `MARIO_CAP_ON_HEAD` flag, sets the `MARIO_CAP_IN_HAND` flag, and plays the 'take cap off' sound - -### Lua Example -`cutscene_take_cap_off(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void cutscene_take_cap_off(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [general_star_dance_handler](#general_star_dance_handler) - -### Description -Manages the star collection dance sequence for Mario, both on land and in water. Plays music, spawns the celebration star, increments the star count, and triggers level exits or dialogs at the correct times - -### Lua Example -`general_star_dance_handler(m, isInWater)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| isInWater | `integer` | - -### Returns -- None - -### C Prototype -`void general_star_dance_handler(struct MarioState *m, s32 isInWater);` - -[:arrow_up_small:](#) - -
- -## [generate_yellow_sparkles](#generate_yellow_sparkles) - -### Description -Spawns yellow sparkles in a circular pattern around a specified point (`x`, `y`, `z`) within a given `radius`. Frequently seen during end cutscenes when objects like stars or Peach appear - -### Lua Example -`generate_yellow_sparkles(x, y, z, radius)` - -### Parameters -| Field | Type | -| ----- | ---- | -| x | `integer` | -| y | `integer` | -| z | `integer` | -| radius | `number` | - -### Returns -- None - -### C Prototype -`void generate_yellow_sparkles(s16 x, s16 y, s16 z, f32 radius);` - -[:arrow_up_small:](#) - -
- -## [get_credits_str_width](#get_credits_str_width) - -### Description -Calculates the pixel width of a given credits string. Each space is counted as 4 pixels, and any other character as 7 pixels. Stops counting at the null terminator - -### Lua Example -`local integerValue = get_credits_str_width(str)` - -### Parameters -| Field | Type | -| ----- | ---- | -| str | `Pointer` <`integer`> | - -### Returns -- `integer` - -### C Prototype -`s32 get_credits_str_width(char *str);` - -[:arrow_up_small:](#) - -
- ## [get_star_collection_dialog](#get_star_collection_dialog) ### Description @@ -2256,39 +2135,36 @@ Handles interactions with the save menu after collecting a star/key. Checks the
-## [launch_mario_until_land](#launch_mario_until_land) +## [cutscene_take_cap_off](#cutscene_take_cap_off) ### Description -Launches Mario forward with a given velocity (`forwardVel`) and sets his animation. Continues moving him through the air until he lands, then changes Mario's action to `endAction` +Transitions Mario's state from wearing the cap on his head to holding it in his hand. Clears the `MARIO_CAP_ON_HEAD` flag, sets the `MARIO_CAP_IN_HAND` flag, and plays the 'take cap off' sound ### Lua Example -`local integerValue = launch_mario_until_land(m, endAction, animation, forwardVel)` +`cutscene_take_cap_off(m)` ### Parameters | Field | Type | | ----- | ---- | | m | [MarioState](structs.md#MarioState) | -| endAction | `integer` | -| animation | `integer` | -| forwardVel | `number` | ### Returns -- `integer` +- None ### C Prototype -`s32 launch_mario_until_land(struct MarioState *m, s32 endAction, s32 animation, f32 forwardVel);` +`void cutscene_take_cap_off(struct MarioState *m);` [:arrow_up_small:](#)
-## [mario_execute_cutscene_action](#mario_execute_cutscene_action) +## [cutscene_put_cap_on](#cutscene_put_cap_on) ### Description -Executes Mario's current cutscene action based on his `action` field. Includes various story-related sequences like entering doors, collecting stars, and final boss cutscenes. Delegates to the appropriate function for each cutscene action +Transitions Mario's state from having the cap in his hand to wearing it on his head. Clears the `MARIO_CAP_IN_HAND` flag, sets the `MARIO_CAP_ON_HEAD` flag, and plays the 'put cap on' sound ### Lua Example -`local integerValue = mario_execute_cutscene_action(m)` +`cutscene_put_cap_on(m)` ### Parameters | Field | Type | @@ -2296,10 +2172,10 @@ Executes Mario's current cutscene action based on his `action` field. Includes v | m | [MarioState](structs.md#MarioState) | ### Returns -- `integer` +- None ### C Prototype -`s32 mario_execute_cutscene_action(struct MarioState *m);` +`void cutscene_put_cap_on(struct MarioState *m);` [:arrow_up_small:](#) @@ -2352,6 +2228,81 @@ Checks if the dialog from a specified `object` should start or continue for this
+## [general_star_dance_handler](#general_star_dance_handler) + +### Description +Manages the star collection dance sequence for Mario, both on land and in water. Plays music, spawns the celebration star, increments the star count, and triggers level exits or dialogs at the correct times + +### Lua Example +`general_star_dance_handler(m, isInWater)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| isInWater | `integer` | + +### Returns +- None + +### C Prototype +`void general_star_dance_handler(struct MarioState *m, s32 isInWater);` + +[:arrow_up_small:](#) + +
+ +## [common_death_handler](#common_death_handler) + +### Description +Handles shared logic for Mario's various death states. Plays the specified death animation (`animation`), checks for a specific frame (`frameToDeathWarp`) to trigger a warp or bubble state if allowed, and sets Mario's eye state to 'dead' + +### Lua Example +`local integerValue = common_death_handler(m, animation, frameToDeathWarp)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| animation | `integer` | +| frameToDeathWarp | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 common_death_handler(struct MarioState *m, s32 animation, s32 frameToDeathWarp);` + +[:arrow_up_small:](#) + +
+ +## [launch_mario_until_land](#launch_mario_until_land) + +### Description +Launches Mario forward with a given velocity (`forwardVel`) and sets his animation. Continues moving him through the air until he lands, then changes Mario's action to `endAction` + +### Lua Example +`local integerValue = launch_mario_until_land(m, endAction, animation, forwardVel)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| endAction | `integer` | +| animation | `integer` | +| forwardVel | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 launch_mario_until_land(struct MarioState *m, s32 endAction, s32 animation, f32 forwardVel);` + +[:arrow_up_small:](#) + +
+ ## [stuck_in_ground_handler](#stuck_in_ground_handler) ### Lua Example @@ -2377,12 +2328,109 @@ Checks if the dialog from a specified `object` should start or continue for this
+## [generate_yellow_sparkles](#generate_yellow_sparkles) + +### Description +Spawns yellow sparkles in a circular pattern around a specified point (`x`, `y`, `z`) within a given `radius`. Frequently seen during end cutscenes when objects like stars or Peach appear + +### Lua Example +`generate_yellow_sparkles(x, y, z, radius)` + +### Parameters +| Field | Type | +| ----- | ---- | +| x | `integer` | +| y | `integer` | +| z | `integer` | +| radius | `number` | + +### Returns +- None + +### C Prototype +`void generate_yellow_sparkles(s16 x, s16 y, s16 z, f32 radius);` + +[:arrow_up_small:](#) + +
+ +## [mario_execute_cutscene_action](#mario_execute_cutscene_action) + +### Description +Executes Mario's current cutscene action based on his `action` field. Includes various story-related sequences like entering doors, collecting stars, and final boss cutscenes. Delegates to the appropriate function for each cutscene action + +### Lua Example +`local integerValue = mario_execute_cutscene_action(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 mario_execute_cutscene_action(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ --- # functions from mario_actions_moving.c
+## [tilt_body_running](#tilt_body_running) + +### Description +Tilts Mario's body according to his running speed and slope angle. Calculates a pitch offset used while running to simulate leaning forward at higher speeds or on slopes + +### Lua Example +`local integerValue = tilt_body_running(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s16 tilt_body_running(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [play_step_sound](#play_step_sound) + +### Description +Checks the current animation frame against two specified frames to trigger footstep sounds. Also chooses specific sounds if Mario is wearing Metal Cap or is in quicksand + +### Lua Example +`play_step_sound(m, frame1, frame2)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| frame1 | `integer` | +| frame2 | `integer` | + +### Returns +- None + +### C Prototype +`void play_step_sound(struct MarioState *m, s16 frame1, s16 frame2);` + +[:arrow_up_small:](#) + +
+ ## [align_with_floor](#align_with_floor) ### Description @@ -2406,192 +2454,6 @@ Aligns Mario's position and model transformation matrix to match the floor's ang
-## [analog_stick_held_back](#analog_stick_held_back) - -### Description -Checks if the analog stick is held significantly behind Mario's current facing angle. Returns true if the stick is far enough in the opposite direction, indicating Mario wants to move backward - -### Lua Example -`local integerValue = analog_stick_held_back(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 analog_stick_held_back(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [anim_and_audio_for_heavy_walk](#anim_and_audio_for_heavy_walk) - -### Description -Plays the appropriate animation and footstep sounds for walking while carrying a heavy object. Sets the character animation speed based on Mario's intended movement speed - -### Lua Example -`anim_and_audio_for_heavy_walk(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void anim_and_audio_for_heavy_walk(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [anim_and_audio_for_hold_walk](#anim_and_audio_for_hold_walk) - -### Description -Plays the appropriate animation and footstep sounds for walking while carrying a lighter object (like a small box). Adjusts the animation speed dynamically based on Mario's velocity - -### Lua Example -`anim_and_audio_for_hold_walk(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void anim_and_audio_for_hold_walk(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [anim_and_audio_for_walk](#anim_and_audio_for_walk) - -### Description -Handles the animation and audio (footstep sounds) for normal walking or running. The specific animation used (tiptoe, walk, or run) depends on Mario's current speed - -### Lua Example -`anim_and_audio_for_walk(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void anim_and_audio_for_walk(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [apply_landing_accel](#apply_landing_accel) - -### Description -Applies friction-like deceleration if the floor is flat, or slope-based acceleration if the floor is sloped. Capped in such a way that Mario eventually stops or stabilizes on flatter ground - -### Lua Example -`local integerValue = apply_landing_accel(m, frictionFactor)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| frictionFactor | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 apply_landing_accel(struct MarioState *m, f32 frictionFactor);` - -[:arrow_up_small:](#) - -
- -## [apply_slope_accel](#apply_slope_accel) - -### Description -Applies acceleration or deceleration based on the slope of the floor. On downward slopes, Mario gains speed, while on upward slopes, Mario loses speed - -### Lua Example -`apply_slope_accel(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void apply_slope_accel(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [apply_slope_decel](#apply_slope_decel) - -### Description -Approaches Mario's forward velocity toward zero at a rate dependent on the floor's slipperiness. This function can completely stop Mario if the slope is gentle enough or if friction is high - -### Lua Example -`local integerValue = apply_slope_decel(m, decelCoef)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| decelCoef | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 apply_slope_decel(struct MarioState *m, f32 decelCoef);` - -[:arrow_up_small:](#) - -
- -## [begin_braking_action](#begin_braking_action) - -### Description -Begins a braking action if Mario's forward velocity is high enough or transitions to a decelerating action otherwise. Also handles the scenario where Mario is up against a wall, transitioning to a standing state - -### Lua Example -`local integerValue = begin_braking_action(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 begin_braking_action(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- ## [begin_walking_action](#begin_walking_action) ### Description @@ -2618,13 +2480,229 @@ Sets Mario's facing yaw to his intended yaw, applies a specified forward velocit
-## [check_common_moving_cancels](#check_common_moving_cancels) +## [check_ledge_climb_down](#check_ledge_climb_down) ### Description -Performs common checks when Mario is in a moving state, transitions to water plunge if underwater, handles squished or shockwave bounce scenarios, and checks for death conditions +Checks if Mario is near an edge while moving slowly and the floor below that edge is significantly lower. If the conditions are met, transitions Mario into a ledge-climb-down action and positions him accordingly on the edge ### Lua Example -`local integerValue = check_common_moving_cancels(m)` +`check_ledge_climb_down(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void check_ledge_climb_down(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [slide_bonk](#slide_bonk) + +### Description +Handles the scenario where Mario slides into a wall. If Mario is moving fast, reflects his velocity and transitions to a fast knockback, Otherwise, stops his forward velocity and sets a slower knockback + +### Lua Example +`slide_bonk(m, fastAction, slowAction)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| fastAction | `integer` | +| slowAction | `integer` | + +### Returns +- None + +### C Prototype +`void slide_bonk(struct MarioState *m, u32 fastAction, u32 slowAction);` + +[:arrow_up_small:](#) + +
+ +## [set_triple_jump_action](#set_triple_jump_action) + +### Description +Determines the proper triple jump action based on Mario's forward velocity and the Wing Cap flag: Normal triple jump, flying triple jump, or just a single jump if not enough speed + +### Lua Example +`local integerValue = set_triple_jump_action(m, action, actionArg)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| action | `integer` | +| actionArg | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 set_triple_jump_action(struct MarioState *m, UNUSED u32 action, UNUSED u32 actionArg);` + +[:arrow_up_small:](#) + +
+ +## [update_sliding_angle](#update_sliding_angle) + +### Description +Adjusts Mario's slide velocity and facing angle when on a slope. Calculates slope direction and steepness, then modifies velocity accordingly (speed up downhill, slow uphill). Handles facing-direction changes and maximum speed limits + +### Lua Example +`update_sliding_angle(m, accel, lossFactor)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| accel | `number` | +| lossFactor | `number` | + +### Returns +- None + +### C Prototype +`void update_sliding_angle(struct MarioState *m, f32 accel, f32 lossFactor);` + +[:arrow_up_small:](#) + +
+ +## [update_sliding](#update_sliding) + +### Description +Updates Mario's sliding state each frame, applying additional friction or acceleration based on the surface's slipperiness. Also checks if speed has slowed below a threshold to end the slide. Returns `true` if sliding has stopped + +### Lua Example +`local integerValue = update_sliding(m, stopSpeed)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| stopSpeed | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 update_sliding(struct MarioState *m, f32 stopSpeed);` + +[:arrow_up_small:](#) + +
+ +## [apply_slope_accel](#apply_slope_accel) + +### Description +Applies acceleration or deceleration based on the slope of the floor. On downward slopes, Mario gains speed, while on upward slopes, Mario loses speed + +### Lua Example +`apply_slope_accel(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void apply_slope_accel(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [apply_landing_accel](#apply_landing_accel) + +### Description +Applies friction-like deceleration if the floor is flat, or slope-based acceleration if the floor is sloped. Capped in such a way that Mario eventually stops or stabilizes on flatter ground + +### Lua Example +`local integerValue = apply_landing_accel(m, frictionFactor)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| frictionFactor | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 apply_landing_accel(struct MarioState *m, f32 frictionFactor);` + +[:arrow_up_small:](#) + +
+ +## [update_shell_speed](#update_shell_speed) + +### Description +Controls Mario's speed when riding a Koopa Shell on the ground. + +### Lua Example +`update_shell_speed(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void update_shell_speed(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [apply_slope_decel](#apply_slope_decel) + +### Description +Approaches Mario's forward velocity toward zero at a rate dependent on the floor's slipperiness. This function can completely stop Mario if the slope is gentle enough or if friction is high + +### Lua Example +`local integerValue = apply_slope_decel(m, decelCoef)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| decelCoef | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 apply_slope_decel(struct MarioState *m, f32 decelCoef);` + +[:arrow_up_small:](#) + +
+ +## [update_decelerating_speed](#update_decelerating_speed) + +### Description +Gradually reduces Mario's forward speed to zero over time on level ground, unless otherwise influenced by slope or friction. Returns true if Mario's speed reaches zero, meaning he has stopped + +### Lua Example +`local integerValue = update_decelerating_speed(m)` ### Parameters | Field | Type | @@ -2635,7 +2713,76 @@ Performs common checks when Mario is in a moving state, transitions to water plu - `integer` ### C Prototype -`s32 check_common_moving_cancels(struct MarioState *m);` +`s32 update_decelerating_speed(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [update_walking_speed](#update_walking_speed) + +### Description +Updates Mario's walking speed based on player input and floor conditions (e.g., a slow floor or quicksand). Caps speed at a certain value and may reduce it slightly on steep slopes + +### Lua Example +`update_walking_speed(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void update_walking_speed(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [should_begin_sliding](#should_begin_sliding) + +### Description +Checks if Mario should begin sliding, based on player input (facing downhill, pressing the analog stick backward, or on a slide terrain), and current floor steepness. Returns true if conditions to slide are met. + +### Lua Example +`local integerValue = should_begin_sliding(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 should_begin_sliding(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [analog_stick_held_back](#analog_stick_held_back) + +### Description +Checks if the analog stick is held significantly behind Mario's current facing angle. Returns true if the stick is far enough in the opposite direction, indicating Mario wants to move backward + +### Lua Example +`local integerValue = analog_stick_held_back(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 analog_stick_held_back(struct MarioState *m);` [:arrow_up_small:](#) @@ -2664,13 +2811,36 @@ Checks if the B button was pressed to either initiate a dive (if moving fast eno
-## [check_ledge_climb_down](#check_ledge_climb_down) +## [begin_braking_action](#begin_braking_action) ### Description -Checks if Mario is near an edge while moving slowly and the floor below that edge is significantly lower. If the conditions are met, transitions Mario into a ledge-climb-down action and positions him accordingly on the edge +Begins a braking action if Mario's forward velocity is high enough or transitions to a decelerating action otherwise. Also handles the scenario where Mario is up against a wall, transitioning to a standing state ### Lua Example -`check_ledge_climb_down(m)` +`local integerValue = begin_braking_action(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 begin_braking_action(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [anim_and_audio_for_walk](#anim_and_audio_for_walk) + +### Description +Handles the animation and audio (footstep sounds) for normal walking or running. The specific animation used (tiptoe, walk, or run) depends on Mario's current speed + +### Lua Example +`anim_and_audio_for_walk(m)` ### Parameters | Field | Type | @@ -2681,7 +2851,224 @@ Checks if Mario is near an edge while moving slowly and the floor below that edg - None ### C Prototype -`void check_ledge_climb_down(struct MarioState *m);` +`void anim_and_audio_for_walk(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [anim_and_audio_for_hold_walk](#anim_and_audio_for_hold_walk) + +### Description +Plays the appropriate animation and footstep sounds for walking while carrying a lighter object (like a small box). Adjusts the animation speed dynamically based on Mario's velocity + +### Lua Example +`anim_and_audio_for_hold_walk(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void anim_and_audio_for_hold_walk(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [anim_and_audio_for_heavy_walk](#anim_and_audio_for_heavy_walk) + +### Description +Plays the appropriate animation and footstep sounds for walking while carrying a heavy object. Sets the character animation speed based on Mario's intended movement speed + +### Lua Example +`anim_and_audio_for_heavy_walk(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void anim_and_audio_for_heavy_walk(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [push_or_sidle_wall](#push_or_sidle_wall) + +### Description +When Mario hits a wall during movement, decides whether he's pushing against the wall or sidling along it. Plays pushing animations and sounds if he's head-on, sidles along the wall if he's more angled + +### Lua Example +`push_or_sidle_wall(m, startPos)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| startPos | [Vec3f](structs.md#Vec3f) | + +### Returns +- None + +### C Prototype +`void push_or_sidle_wall(struct MarioState *m, Vec3f startPos);` + +[:arrow_up_small:](#) + +
+ +## [tilt_body_walking](#tilt_body_walking) + +### Description +Applies a left/right tilt to Mario's torso (and some pitch if running fast) while walking or running. The tilt is based on his change in yaw and current speed, giving a leaning appearance when turning + +### Lua Example +`tilt_body_walking(m, startYaw)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| startYaw | `integer` | + +### Returns +- None + +### C Prototype +`void tilt_body_walking(struct MarioState *m, s16 startYaw);` + +[:arrow_up_small:](#) + +
+ +## [tilt_body_ground_shell](#tilt_body_ground_shell) + +### Description +Tilts Mario's torso and head while riding a shell on the ground to reflect turning. Similar to other tilt functions but tuned for shell-riding speeds and angles + +### Lua Example +`tilt_body_ground_shell(m, startYaw)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| startYaw | `integer` | + +### Returns +- None + +### C Prototype +`void tilt_body_ground_shell(struct MarioState *m, s16 startYaw);` + +[:arrow_up_small:](#) + +
+ +## [tilt_body_butt_slide](#tilt_body_butt_slide) + +### Description +Tilts Mario's torso while butt sliding based on analog input direction and magnitude. Gives the appearance that Mario is balancing or leaning into a turn + +### Lua Example +`tilt_body_butt_slide(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void tilt_body_butt_slide(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [common_slide_action](#common_slide_action) + +### Description +Applies shared logic for sliding-related actions while playing sliding sounds, managing ground steps (falling off edges, hitting walls), updates animation + +### Lua Example +`common_slide_action(m, endAction, airAction, animation)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| endAction | `integer` | +| airAction | `integer` | +| animation | `integer` | + +### Returns +- None + +### C Prototype +`void common_slide_action(struct MarioState *m, u32 endAction, u32 airAction, s32 animation);` + +[:arrow_up_small:](#) + +
+ +## [common_slide_action_with_jump](#common_slide_action_with_jump) + +### Lua Example +`local integerValue = common_slide_action_with_jump(m, stopAction, jumpAction, airAction, animation)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| stopAction | `integer` | +| jumpAction | `integer` | +| airAction | `integer` | +| animation | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 common_slide_action_with_jump(struct MarioState *m, u32 stopAction, u32 jumpAction, u32 airAction, s32 animation);` + +[:arrow_up_small:](#) + +
+ +## [stomach_slide_action](#stomach_slide_action) + +### Description +Updates Mario's sliding state where he is on his stomach. Similar to other slide actions but has a chance to roll out if A or B is pressed. Uses `common_slide_action` for the core movement logic + +### Lua Example +`local integerValue = stomach_slide_action(m, stopAction, airAction, animation)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| stopAction | `integer` | +| airAction | `integer` | +| animation | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 stomach_slide_action(struct MarioState *m, u32 stopAction, u32 airAction, s32 animation);` [:arrow_up_small:](#) @@ -2739,51 +3126,48 @@ Applies movement upon landing from a jump or fall. Adjusts velocity based on slo
-## [common_slide_action](#common_slide_action) - -### Description -Applies shared logic for sliding-related actions while playing sliding sounds, managing ground steps (falling off edges, hitting walls), updates animation +## [quicksand_jump_land_action](#quicksand_jump_land_action) ### Lua Example -`common_slide_action(m, endAction, airAction, animation)` +`local integerValue = quicksand_jump_land_action(m, animation1, animation2, endAction, airAction)` ### Parameters | Field | Type | | ----- | ---- | | m | [MarioState](structs.md#MarioState) | +| animation1 | `integer` | +| animation2 | `integer` | | endAction | `integer` | | airAction | `integer` | -| animation | `integer` | - -### Returns -- None - -### C Prototype -`void common_slide_action(struct MarioState *m, u32 endAction, u32 airAction, s32 animation);` - -[:arrow_up_small:](#) - -
- -## [common_slide_action_with_jump](#common_slide_action_with_jump) - -### Lua Example -`local integerValue = common_slide_action_with_jump(m, stopAction, jumpAction, airAction, animation)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| stopAction | `integer` | -| jumpAction | `integer` | -| airAction | `integer` | -| animation | `integer` | ### Returns - `integer` ### C Prototype -`s32 common_slide_action_with_jump(struct MarioState *m, u32 stopAction, u32 jumpAction, u32 airAction, s32 animation);` +`s32 quicksand_jump_land_action(struct MarioState *m, s32 animation1, s32 animation2, u32 endAction, u32 airAction);` + +[:arrow_up_small:](#) + +
+ +## [check_common_moving_cancels](#check_common_moving_cancels) + +### Description +Performs common checks when Mario is in a moving state, transitions to water plunge if underwater, handles squished or shockwave bounce scenarios, and checks for death conditions + +### Lua Example +`local integerValue = check_common_moving_cancels(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 check_common_moving_cancels(struct MarioState *m);` [:arrow_up_small:](#) @@ -2812,390 +3196,6 @@ Executes Mario's current moving actions by: checking common cancellations (e.g.,
-## [play_step_sound](#play_step_sound) - -### Description -Checks the current animation frame against two specified frames to trigger footstep sounds. Also chooses specific sounds if Mario is wearing Metal Cap or is in quicksand - -### Lua Example -`play_step_sound(m, frame1, frame2)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| frame1 | `integer` | -| frame2 | `integer` | - -### Returns -- None - -### C Prototype -`void play_step_sound(struct MarioState *m, s16 frame1, s16 frame2);` - -[:arrow_up_small:](#) - -
- -## [push_or_sidle_wall](#push_or_sidle_wall) - -### Description -When Mario hits a wall during movement, decides whether he's pushing against the wall or sidling along it. Plays pushing animations and sounds if he's head-on, sidles along the wall if he's more angled - -### Lua Example -`push_or_sidle_wall(m, startPos)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| startPos | [Vec3f](structs.md#Vec3f) | - -### Returns -- None - -### C Prototype -`void push_or_sidle_wall(struct MarioState *m, Vec3f startPos);` - -[:arrow_up_small:](#) - -
- -## [quicksand_jump_land_action](#quicksand_jump_land_action) - -### Lua Example -`local integerValue = quicksand_jump_land_action(m, animation1, animation2, endAction, airAction)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| animation1 | `integer` | -| animation2 | `integer` | -| endAction | `integer` | -| airAction | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 quicksand_jump_land_action(struct MarioState *m, s32 animation1, s32 animation2, u32 endAction, u32 airAction);` - -[:arrow_up_small:](#) - -
- -## [set_triple_jump_action](#set_triple_jump_action) - -### Description -Determines the proper triple jump action based on Mario's forward velocity and the Wing Cap flag: Normal triple jump, flying triple jump, or just a single jump if not enough speed - -### Lua Example -`local integerValue = set_triple_jump_action(m, action, actionArg)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| action | `integer` | -| actionArg | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 set_triple_jump_action(struct MarioState *m, UNUSED u32 action, UNUSED u32 actionArg);` - -[:arrow_up_small:](#) - -
- -## [should_begin_sliding](#should_begin_sliding) - -### Description -Checks if Mario should begin sliding, based on player input (facing downhill, pressing the analog stick backward, or on a slide terrain), and current floor steepness. Returns true if conditions to slide are met. - -### Lua Example -`local integerValue = should_begin_sliding(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 should_begin_sliding(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [slide_bonk](#slide_bonk) - -### Description -Handles the scenario where Mario slides into a wall. If Mario is moving fast, reflects his velocity and transitions to a fast knockback, Otherwise, stops his forward velocity and sets a slower knockback - -### Lua Example -`slide_bonk(m, fastAction, slowAction)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| fastAction | `integer` | -| slowAction | `integer` | - -### Returns -- None - -### C Prototype -`void slide_bonk(struct MarioState *m, u32 fastAction, u32 slowAction);` - -[:arrow_up_small:](#) - -
- -## [stomach_slide_action](#stomach_slide_action) - -### Description -Updates Mario's sliding state where he is on his stomach. Similar to other slide actions but has a chance to roll out if A or B is pressed. Uses `common_slide_action` for the core movement logic - -### Lua Example -`local integerValue = stomach_slide_action(m, stopAction, airAction, animation)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| stopAction | `integer` | -| airAction | `integer` | -| animation | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 stomach_slide_action(struct MarioState *m, u32 stopAction, u32 airAction, s32 animation);` - -[:arrow_up_small:](#) - -
- -## [tilt_body_butt_slide](#tilt_body_butt_slide) - -### Description -Tilts Mario's torso while butt sliding based on analog input direction and magnitude. Gives the appearance that Mario is balancing or leaning into a turn - -### Lua Example -`tilt_body_butt_slide(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void tilt_body_butt_slide(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [tilt_body_ground_shell](#tilt_body_ground_shell) - -### Description -Tilts Mario's torso and head while riding a shell on the ground to reflect turning. Similar to other tilt functions but tuned for shell-riding speeds and angles - -### Lua Example -`tilt_body_ground_shell(m, startYaw)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| startYaw | `integer` | - -### Returns -- None - -### C Prototype -`void tilt_body_ground_shell(struct MarioState *m, s16 startYaw);` - -[:arrow_up_small:](#) - -
- -## [tilt_body_running](#tilt_body_running) - -### Description -Tilts Mario's body according to his running speed and slope angle. Calculates a pitch offset used while running to simulate leaning forward at higher speeds or on slopes - -### Lua Example -`local integerValue = tilt_body_running(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s16 tilt_body_running(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [tilt_body_walking](#tilt_body_walking) - -### Description -Applies a left/right tilt to Mario's torso (and some pitch if running fast) while walking or running. The tilt is based on his change in yaw and current speed, giving a leaning appearance when turning - -### Lua Example -`tilt_body_walking(m, startYaw)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| startYaw | `integer` | - -### Returns -- None - -### C Prototype -`void tilt_body_walking(struct MarioState *m, s16 startYaw);` - -[:arrow_up_small:](#) - -
- -## [update_decelerating_speed](#update_decelerating_speed) - -### Description -Gradually reduces Mario's forward speed to zero over time on level ground, unless otherwise influenced by slope or friction. Returns true if Mario's speed reaches zero, meaning he has stopped - -### Lua Example -`local integerValue = update_decelerating_speed(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 update_decelerating_speed(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [update_shell_speed](#update_shell_speed) - -### Description -Controls Mario's speed when riding a Koopa Shell on the ground. - -### Lua Example -`update_shell_speed(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void update_shell_speed(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [update_sliding](#update_sliding) - -### Description -Updates Mario's sliding state each frame, applying additional friction or acceleration based on the surface's slipperiness. Also checks if speed has slowed below a threshold to end the slide. Returns `true` if sliding has stopped - -### Lua Example -`local integerValue = update_sliding(m, stopSpeed)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| stopSpeed | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 update_sliding(struct MarioState *m, f32 stopSpeed);` - -[:arrow_up_small:](#) - -
- -## [update_sliding_angle](#update_sliding_angle) - -### Description -Adjusts Mario's slide velocity and facing angle when on a slope. Calculates slope direction and steepness, then modifies velocity accordingly (speed up downhill, slow uphill). Handles facing-direction changes and maximum speed limits - -### Lua Example -`update_sliding_angle(m, accel, lossFactor)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| accel | `number` | -| lossFactor | `number` | - -### Returns -- None - -### C Prototype -`void update_sliding_angle(struct MarioState *m, f32 accel, f32 lossFactor);` - -[:arrow_up_small:](#) - -
- -## [update_walking_speed](#update_walking_speed) - -### Description -Updates Mario's walking speed based on player input and floor conditions (e.g., a slow floor or quicksand). Caps speed at a certain value and may reduce it slightly on steep slopes - -### Lua Example -`update_walking_speed(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void update_walking_speed(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- --- # functions from mario_actions_object.c @@ -3224,6 +3224,26 @@ Updates Mario's walking speed based on player input and floor conditions (e.g.,
+## [mario_update_punch_sequence](#mario_update_punch_sequence) + +### Lua Example +`local integerValue = mario_update_punch_sequence(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 mario_update_punch_sequence(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ ## [check_common_object_cancels](#check_common_object_cancels) ### Lua Example @@ -3264,52 +3284,12 @@ Updates Mario's walking speed based on player input and floor conditions (e.g.,
-## [mario_update_punch_sequence](#mario_update_punch_sequence) - -### Lua Example -`local integerValue = mario_update_punch_sequence(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 mario_update_punch_sequence(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- --- # functions from mario_actions_stationary.c
-## [check_common_hold_idle_cancels](#check_common_hold_idle_cancels) - -### Lua Example -`local integerValue = check_common_hold_idle_cancels(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 check_common_hold_idle_cancels(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- ## [check_common_idle_cancels](#check_common_idle_cancels) ### Lua Example @@ -3330,31 +3310,10 @@ Updates Mario's walking speed based on player input and floor conditions (e.g.,
-## [check_common_landing_cancels](#check_common_landing_cancels) +## [check_common_hold_idle_cancels](#check_common_hold_idle_cancels) ### Lua Example -`local integerValue = check_common_landing_cancels(m, action)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| action | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 check_common_landing_cancels(struct MarioState *m, u32 action);` - -[:arrow_up_small:](#) - -
- -## [check_common_stationary_cancels](#check_common_stationary_cancels) - -### Lua Example -`local integerValue = check_common_stationary_cancels(m)` +`local integerValue = check_common_hold_idle_cancels(m)` ### Parameters | Field | Type | @@ -3365,49 +3324,7 @@ Updates Mario's walking speed based on player input and floor conditions (e.g., - `integer` ### C Prototype -`s32 check_common_stationary_cancels(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [landing_step](#landing_step) - -### Lua Example -`local integerValue = landing_step(m, arg1, action)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| arg1 | `integer` | -| action | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 landing_step(struct MarioState *m, s32 arg1, u32 action);` - -[:arrow_up_small:](#) - -
- -## [mario_execute_stationary_action](#mario_execute_stationary_action) - -### Lua Example -`local integerValue = mario_execute_stationary_action(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 mario_execute_stationary_action(struct MarioState *m);` +`s32 check_common_hold_idle_cancels(struct MarioState *m);` [:arrow_up_small:](#) @@ -3458,12 +3375,137 @@ Updates Mario's walking speed based on player input and floor conditions (e.g.,
+## [landing_step](#landing_step) + +### Lua Example +`local integerValue = landing_step(m, arg1, action)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| arg1 | `integer` | +| action | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 landing_step(struct MarioState *m, s32 arg1, u32 action);` + +[:arrow_up_small:](#) + +
+ +## [check_common_landing_cancels](#check_common_landing_cancels) + +### Lua Example +`local integerValue = check_common_landing_cancels(m, action)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| action | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 check_common_landing_cancels(struct MarioState *m, u32 action);` + +[:arrow_up_small:](#) + +
+ +## [check_common_stationary_cancels](#check_common_stationary_cancels) + +### Lua Example +`local integerValue = check_common_stationary_cancels(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 check_common_stationary_cancels(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [mario_execute_stationary_action](#mario_execute_stationary_action) + +### Lua Example +`local integerValue = mario_execute_stationary_action(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 mario_execute_stationary_action(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ --- # functions from mario_actions_submerged.c
+## [set_swimming_at_surface_particles](#set_swimming_at_surface_particles) + +### Lua Example +`set_swimming_at_surface_particles(m, particleFlag)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| particleFlag | `integer` | + +### Returns +- None + +### C Prototype +`void set_swimming_at_surface_particles(struct MarioState *m, u32 particleFlag);` + +[:arrow_up_small:](#) + +
+ +## [perform_water_full_step](#perform_water_full_step) + +### Lua Example +`local integerValue = perform_water_full_step(m, nextPos)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| nextPos | [Vec3f](structs.md#Vec3f) | + +### Returns +- `integer` + +### C Prototype +`u32 perform_water_full_step(struct MarioState *m, Vec3f nextPos);` + +[:arrow_up_small:](#) + +
+ ## [apply_water_current](#apply_water_current) ### Lua Example @@ -3485,6 +3527,26 @@ Updates Mario's walking speed based on player input and floor conditions (e.g.,
+## [perform_water_step](#perform_water_step) + +### Lua Example +`local integerValue = perform_water_step(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`u32 perform_water_step(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ ## [float_surface_gfx](#float_surface_gfx) ### Lua Example @@ -3525,68 +3587,6 @@ Updates Mario's walking speed based on player input and floor conditions (e.g.,
-## [perform_water_full_step](#perform_water_full_step) - -### Lua Example -`local integerValue = perform_water_full_step(m, nextPos)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| nextPos | [Vec3f](structs.md#Vec3f) | - -### Returns -- `integer` - -### C Prototype -`u32 perform_water_full_step(struct MarioState *m, Vec3f nextPos);` - -[:arrow_up_small:](#) - -
- -## [perform_water_step](#perform_water_step) - -### Lua Example -`local integerValue = perform_water_step(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`u32 perform_water_step(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [set_swimming_at_surface_particles](#set_swimming_at_surface_particles) - -### Lua Example -`set_swimming_at_surface_particles(m, particleFlag)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| particleFlag | `integer` | - -### Returns -- None - -### C Prototype -`void set_swimming_at_surface_particles(struct MarioState *m, u32 particleFlag);` - -[:arrow_up_small:](#) - -
- --- # functions from mario_misc.h @@ -3677,27 +3677,6 @@ Behavior loop function for Star Door unlock object
-## [geo_get_body_state](#geo_get_body_state) - -### Description -When used in a geo function, retrieve the MarioBodyState associated to the current processed object - -### Lua Example -`local MarioBodyStateValue = geo_get_body_state()` - -### Parameters -- None - -### Returns -[MarioBodyState](structs.md#MarioBodyState) - -### C Prototype -`struct MarioBodyState *geo_get_body_state(void);` - -[:arrow_up_small:](#) - -
- ## [geo_get_mario_state](#geo_get_mario_state) ### Description @@ -3719,6 +3698,27 @@ When used in a geo function, retrieve the MarioState associated to the current p
+## [geo_get_body_state](#geo_get_body_state) + +### Description +When used in a geo function, retrieve the MarioBodyState associated to the current processed object + +### Lua Example +`local MarioBodyStateValue = geo_get_body_state()` + +### Parameters +- None + +### Returns +[MarioBodyState](structs.md#MarioBodyState) + +### C Prototype +`struct MarioBodyState *geo_get_body_state(void);` + +[:arrow_up_small:](#) + +
+ --- # functions from mario_step.h @@ -3746,6 +3746,30 @@ Always returns zero. May have been originally used for beta trampolines
+## [mario_bonk_reflection](#mario_bonk_reflection) + +### Description +Reflects Mario off a wall if he is colliding with one and flips forward velocity if `negateSpeed` is TRUE + +### Lua Example +`mario_bonk_reflection(m, negateSpeed)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| negateSpeed | `integer` | + +### Returns +- None + +### C Prototype +`void mario_bonk_reflection(struct MarioState *m, u8 negateSpeed);` + +[:arrow_up_small:](#) + +
+ ## [init_bully_collision_data](#init_bully_collision_data) ### Lua Example @@ -3772,25 +3796,25 @@ Always returns zero. May have been originally used for beta trampolines
-## [mario_bonk_reflection](#mario_bonk_reflection) +## [mario_update_quicksand](#mario_update_quicksand) ### Description -Reflects Mario off a wall if he is colliding with one and flips forward velocity if `negateSpeed` is TRUE +Updates Mario's state in quicksand, sinks him at `sinkingSpeed` if he's in non instant quicksand ### Lua Example -`mario_bonk_reflection(m, negateSpeed)` +`local integerValue = mario_update_quicksand(m, sinkingSpeed)` ### Parameters | Field | Type | | ----- | ---- | | m | [MarioState](structs.md#MarioState) | -| negateSpeed | `integer` | +| sinkingSpeed | `number` | ### Returns -- None +- `integer` ### C Prototype -`void mario_bonk_reflection(struct MarioState *m, u8 negateSpeed);` +`u32 mario_update_quicksand(struct MarioState *m, f32 sinkingSpeed);` [:arrow_up_small:](#) @@ -3844,30 +3868,6 @@ Pushes Mario in the direction of the quicksand based on the floor surface
-## [mario_update_quicksand](#mario_update_quicksand) - -### Description -Updates Mario's state in quicksand, sinks him at `sinkingSpeed` if he's in non instant quicksand - -### Lua Example -`local integerValue = mario_update_quicksand(m, sinkingSpeed)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| sinkingSpeed | `number` | - -### Returns -- `integer` - -### C Prototype -`u32 mario_update_quicksand(struct MarioState *m, f32 sinkingSpeed);` - -[:arrow_up_small:](#) - -
- ## [mario_update_windy_ground](#mario_update_windy_ground) ### Description @@ -3891,6 +3891,75 @@ Pushes Mario in the direction of the wind based on the floor surface
+## [stop_and_set_height_to_floor](#stop_and_set_height_to_floor) + +### Description +Sets all of Mario's velocity variables to 0 and sets his Y position to the floor height + +### Lua Example +`stop_and_set_height_to_floor(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void stop_and_set_height_to_floor(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [stationary_ground_step](#stationary_ground_step) + +### Description +Performs a full Mario stationary physics step (4 substeps) and returns an `GROUND_STEP_*` result + +### Lua Example +`local integerValue = stationary_ground_step(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 stationary_ground_step(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ +## [perform_ground_step](#perform_ground_step) + +### Description +Performs a full Mario ground physics step (4 substeps) and returns an `GROUND_STEP_*` result + +### Lua Example +`local integerValue = perform_ground_step(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`s32 perform_ground_step(struct MarioState *m);` + +[:arrow_up_small:](#) + +
+ ## [perform_air_step](#perform_air_step) ### Description @@ -3915,29 +3984,6 @@ Performs a full Mario air physics step (4 substeps) and returns an `AIR_STEP_*`
-## [perform_ground_step](#perform_ground_step) - -### Description -Performs a full Mario ground physics step (4 substeps) and returns an `GROUND_STEP_*` result - -### Lua Example -`local integerValue = perform_ground_step(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 perform_ground_step(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- ## [set_vel_from_pitch_and_yaw](#set_vel_from_pitch_and_yaw) ### Description @@ -3961,177 +4007,30 @@ Sets Mario's velocity to his forward velocity multiplied by the cosine and sine
-## [stationary_ground_step](#stationary_ground_step) - -### Description -Performs a full Mario stationary physics step (4 substeps) and returns an `GROUND_STEP_*` result - -### Lua Example -`local integerValue = stationary_ground_step(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 stationary_ground_step(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- -## [stop_and_set_height_to_floor](#stop_and_set_height_to_floor) - -### Description -Sets all of Mario's velocity variables to 0 and sets his Y position to the floor height - -### Lua Example -`stop_and_set_height_to_floor(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void stop_and_set_height_to_floor(struct MarioState *m);` - -[:arrow_up_small:](#) - -
- --- # functions from math_util.h
-## [anim_spline_init](#anim_spline_init) +## [sins](#sins) ### Description -Initializes a spline-based animation for the `MarioState` structure `m` using the provided array of 3D signed-integer vectors `keyFrames`. This sets up the animation so that it can be advanced by polling +Calculates the sine of the given angle, where the angle is specified as a signed 16-bit integer representing a fixed-point "SM64 angle". This function returns a floating-point result corresponding to sin(angle) ### Lua Example -`anim_spline_init(m, keyFrames)` +`local numberValue = sins(sm64Angle)` ### Parameters | Field | Type | | ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| keyFrames | `Pointer` <`Vec4s`> | - -### Returns -- None - -### C Prototype -`void anim_spline_init(struct MarioState* m, Vec4s *keyFrames);` - -[:arrow_up_small:](#) - -
- -## [anim_spline_poll](#anim_spline_poll) - -### Description -Advances the spline-based animation associated with `m` and stores the current interpolated position in `result`. It returns the animation's status, allowing the caller to determine if the animation is ongoing or has completed - -### Lua Example -`local integerValue = anim_spline_poll(m, result)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| result | [Vec3f](structs.md#Vec3f) | - -### Returns -- `integer` - -### C Prototype -`s32 anim_spline_poll(struct MarioState* m, Vec3f result);` - -[:arrow_up_small:](#) - -
- -## [approach_f32](#approach_f32) - -### Description -Similar to `approach_s32`, but operates on floating-point numbers. It moves `current` toward `target` by increasing it by `inc` if below target, or decreasing it by `dec` if above target, creating a smooth interpolation - -### Lua Example -`local numberValue = approach_f32(current, target, inc, dec)` - -### Parameters -| Field | Type | -| ----- | ---- | -| current | `number` | -| target | `number` | -| inc | `number` | -| dec | `number` | +| sm64Angle | `integer` | ### Returns - `number` ### C Prototype -`f32 approach_f32(f32 current, f32 target, f32 inc, f32 dec);` - -[:arrow_up_small:](#) - -
- -## [approach_s32](#approach_s32) - -### Description -Gradually moves an integer `current` value toward a `target` value, increasing it by `inc` if it is too low, or decreasing it by `dec` if it is too high. This is often used for smooth transitions or animations - -### Lua Example -`local integerValue = approach_s32(current, target, inc, dec)` - -### Parameters -| Field | Type | -| ----- | ---- | -| current | `integer` | -| target | `integer` | -| inc | `integer` | -| dec | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 approach_s32(s32 current, s32 target, s32 inc, s32 dec);` - -[:arrow_up_small:](#) - -
- -## [atan2s](#atan2s) - -### Description -Computes the arctangent of y/x and returns the angle as a signed 16-bit integer, typically representing a direction in the SM64 fixed-point angle format. This can be used to find an angle between x and y coordinates - -### Lua Example -`local integerValue = atan2s(y, x)` - -### Parameters -| Field | Type | -| ----- | ---- | -| y | `number` | -| x | `number` | - -### Returns -- `integer` - -### C Prototype -`s16 atan2s(f32 y, f32 x);` +`f32 sins(s16 sm64Angle);` [:arrow_up_small:](#) @@ -4160,6 +4059,301 @@ Calculates the cosine of the given angle, where the angle is specified as a sign
+## [vec3f_copy](#vec3f_copy) + +### Description +Copies the contents of a 3D floating-point vector (`src`) into another 3D floating-point vector (`dest`). After this operation, `dest` will have the same x, y, and z values as `src` + +### Lua Example +`local voidValue = vec3f_copy(dest, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3f](structs.md#Vec3f) | +| src | [Vec3f](structs.md#Vec3f) | + +### Returns +- `void *` + +### C Prototype +`void *vec3f_copy(Vec3f dest, Vec3f src);` + +[:arrow_up_small:](#) + +
+ +## [vec3f_set](#vec3f_set) + +### Description +Sets the values of the 3D floating-point vector `dest` to the given x, y, and z values. After this function, `dest` will have values (x, y, z) + +### Lua Example +`local voidValue = vec3f_set(dest, x, y, z)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3f](structs.md#Vec3f) | +| x | `number` | +| y | `number` | +| z | `number` | + +### Returns +- `void *` + +### C Prototype +`void *vec3f_set(Vec3f dest, f32 x, f32 y, f32 z);` + +[:arrow_up_small:](#) + +
+ +## [vec3f_add](#vec3f_add) + +### Description +Adds the components of the 3D floating-point vector `a` to `dest`. After this operation, `dest.x` will be `dest.x + a.x`, and similarly for the y and z components + +### Lua Example +`local voidValue = vec3f_add(dest, a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3f](structs.md#Vec3f) | +| a | [Vec3f](structs.md#Vec3f) | + +### Returns +- `void *` + +### C Prototype +`void *vec3f_add(Vec3f dest, Vec3f a);` + +[:arrow_up_small:](#) + +
+ +## [vec3f_sum](#vec3f_sum) + +### Description +Adds the corresponding components of two 3D floating-point vectors `a` and `b`, and stores the result in `dest`. For example, `dest.x = a.x + b.x`, `dest.y = a.y + b.y`, and `dest.z = a.z + b.z` + +### Lua Example +`local voidValue = vec3f_sum(dest, a, b)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3f](structs.md#Vec3f) | +| a | [Vec3f](structs.md#Vec3f) | +| b | [Vec3f](structs.md#Vec3f) | + +### Returns +- `void *` + +### C Prototype +`void *vec3f_sum(Vec3f dest, Vec3f a, Vec3f b);` + +[:arrow_up_small:](#) + +
+ +## [vec3f_dif](#vec3f_dif) + +### Description +Subtracts the components of the 3D floating-point vector `b` from the components of `a` and stores the result in `dest`. For example, `dest.x = a.x - b.x` This results in a vector that represents the difference between `a` and `b`. + +### Lua Example +`local voidValue = vec3f_dif(dest, a, b)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3f](structs.md#Vec3f) | +| a | [Vec3f](structs.md#Vec3f) | +| b | [Vec3f](structs.md#Vec3f) | + +### Returns +- `void *` + +### C Prototype +`void *vec3f_dif(Vec3f dest, Vec3f a, Vec3f b);` + +[:arrow_up_small:](#) + +
+ +## [vec3f_mul](#vec3f_mul) + +### Description +Multiplies each component of the 3D floating-point vector `dest` by the scalar value `a`. For instance, `dest.x = dest.x * a`, and similarly for y and z. This scales the vector `dest` by `a` + +### Lua Example +`local voidValue = vec3f_mul(dest, a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3f](structs.md#Vec3f) | +| a | `number` | + +### Returns +- `void *` + +### C Prototype +`void *vec3f_mul(Vec3f dest, f32 a);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_copy](#vec3s_copy) + +### Description +Copies the components of one 3D signed-integer vector (`src`) to another (`dest`). After this function, `dest` will have the same x, y, and z integer values as `src` + +### Lua Example +`local voidValue = vec3s_copy(dest, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3s](structs.md#Vec3s) | +| src | [Vec3s](structs.md#Vec3s) | + +### Returns +- `void *` + +### C Prototype +`void *vec3s_copy(Vec3s dest, Vec3s src);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_set](#vec3s_set) + +### Description +Sets the 3D signed-integer vector `dest` to the specified integer values (x, y, z), so that `dest` becomes (x, y, z). + +### Lua Example +`local voidValue = vec3s_set(dest, x, y, z)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3s](structs.md#Vec3s) | +| x | `integer` | +| y | `integer` | +| z | `integer` | + +### Returns +- `void *` + +### C Prototype +`void *vec3s_set(Vec3s dest, s16 x, s16 y, s16 z);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_add](#vec3s_add) + +### Description +Adds the components of a 3D signed-integer vector `a` to the corresponding components of `dest`. After this operation, each component of `dest` is increased by the corresponding component in `a` + +### Lua Example +`local voidValue = vec3s_add(dest, a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3s](structs.md#Vec3s) | +| a | [Vec3s](structs.md#Vec3s) | + +### Returns +- `void *` + +### C Prototype +`void *vec3s_add(Vec3s dest, Vec3s a);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_sum](#vec3s_sum) + +### Description +Adds the components of two 3D signed-integer vectors `a` and `b` together and stores the resulting vector in `dest`. For example, `dest.x = a.x + b.x`, and similarly for y and z + +### Lua Example +`local voidValue = vec3s_sum(dest, a, b)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3s](structs.md#Vec3s) | +| a | [Vec3s](structs.md#Vec3s) | +| b | [Vec3s](structs.md#Vec3s) | + +### Returns +- `void *` + +### C Prototype +`void *vec3s_sum(Vec3s dest, Vec3s a, Vec3s b);` + +[:arrow_up_small:](#) + +
+ +## [vec3s_to_vec3f](#vec3s_to_vec3f) + +### Description +Converts a 3D signed-integer vector `a` (vec3s) into a 3D floating-point vector and stores it in `dest`. After this operation, `dest` will contain the floating-point equivalents of `a`'s integer components + +### Lua Example +`local voidValue = vec3s_to_vec3f(dest, a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3f](structs.md#Vec3f) | +| a | [Vec3s](structs.md#Vec3s) | + +### Returns +- `void *` + +### C Prototype +`void *vec3s_to_vec3f(Vec3f dest, Vec3s a);` + +[:arrow_up_small:](#) + +
+ +## [vec3f_to_vec3s](#vec3f_to_vec3s) + +### Description +Converts a 3D floating-point vector `a` (Vec3f) into a 3D signed-integer vector and stores it in `dest`. After this operation, `dest` will contain the integer versions of `a`'s floating-point components + +### Lua Example +`local voidValue = vec3f_to_vec3s(dest, a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3s](structs.md#Vec3s) | +| a | [Vec3f](structs.md#Vec3f) | + +### Returns +- `void *` + +### C Prototype +`void *vec3f_to_vec3s(Vec3s dest, Vec3f a);` + +[:arrow_up_small:](#) + +
+ ## [find_vector_perpendicular_to_plane](#find_vector_perpendicular_to_plane) ### Description @@ -4186,26 +4380,346 @@ Determines a vector that is perpendicular (normal) to the plane defined by three
-## [get_pos_from_transform_mtx](#get_pos_from_transform_mtx) +## [vec3f_cross](#vec3f_cross) ### Description -Extracts the position (translation component) from the transformation matrix `objMtx` relative to the coordinate system defined by `camMtx` and stores that 3D position in `dest`. This can be used to get the object's coordinates in camera space +Computes the cross product of two 3D floating-point vectors `a` and `b`. The cross product is a vector perpendicular to both `a` and `b`. The result is stored in `dest` ### Lua Example -`get_pos_from_transform_mtx(dest, objMtx, camMtx)` +`local voidValue = vec3f_cross(dest, a, b)` ### Parameters | Field | Type | | ----- | ---- | | dest | [Vec3f](structs.md#Vec3f) | -| objMtx | `Mat4` | -| camMtx | `Mat4` | +| a | [Vec3f](structs.md#Vec3f) | +| b | [Vec3f](structs.md#Vec3f) | + +### Returns +- `void *` + +### C Prototype +`void *vec3f_cross(Vec3f dest, Vec3f a, Vec3f b);` + +[:arrow_up_small:](#) + +
+ +## [vec3f_normalize](#vec3f_normalize) + +### Description +Normalizes the 3D floating-point vector `dest` so that its length (magnitude) becomes 1, while retaining its direction. This effectively scales `dest` so that it lies on the unit sphere + +### Lua Example +`local voidValue = vec3f_normalize(dest)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3f](structs.md#Vec3f) | + +### Returns +- `void *` + +### C Prototype +`void *vec3f_normalize(Vec3f dest);` + +[:arrow_up_small:](#) + +
+ +## [vec3f_length](#vec3f_length) + +### Description +Calculates the length (magnitude) of the 3D floating-point vector `a`. The length is defined as sqrt(x² + y² + z²) for the vector components (x, y, z) + +### Lua Example +`local numberValue = vec3f_length(a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a | [Vec3f](structs.md#Vec3f) | + +### Returns +- `number` + +### C Prototype +`f32 vec3f_length(Vec3f a);` + +[:arrow_up_small:](#) + +
+ +## [vec3f_dot](#vec3f_dot) + +### Description +Computes the dot product of the two 3D floating-point vectors `a` and `b`. The dot product is a scalar value defined by (a.x * b.x + a.y * b.y + a.z * b.z), representing how aligned the two vectors are + +### Lua Example +`local numberValue = vec3f_dot(a, b)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a | [Vec3f](structs.md#Vec3f) | +| b | [Vec3f](structs.md#Vec3f) | + +### Returns +- `number` + +### C Prototype +`f32 vec3f_dot(Vec3f a, Vec3f b);` + +[:arrow_up_small:](#) + +
+ +## [vec3f_combine](#vec3f_combine) + +### Description +Takes two 3D floating-point vectors `vecA` and `vecB`, multiplies them by `sclA` and `sclB` respectively, and then adds the scaled vectors together. The final combined vector is stored in `dest` + +### Lua Example +`vec3f_combine(dest, vecA, vecB, sclA, sclB)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | [Vec3f](structs.md#Vec3f) | +| vecA | [Vec3f](structs.md#Vec3f) | +| vecB | [Vec3f](structs.md#Vec3f) | +| sclA | `number` | +| sclB | `number` | ### Returns - None ### C Prototype -`void get_pos_from_transform_mtx(Vec3f dest, Mat4 objMtx, Mat4 camMtx);` +`void vec3f_combine(Vec3f dest, Vec3f vecA, Vec3f vecB, f32 sclA, f32 sclB);` + +[:arrow_up_small:](#) + +
+ +## [vec3f_rotate_zxy](#vec3f_rotate_zxy) + +### Description +Rotates the 3D floating-point vector `v` by the angles specified in the 3D signed-integer vector `rotate`, applying the rotations in the order Z, then X, then Y. The rotated vector replaces `v` + +### Lua Example +`local voidValue = vec3f_rotate_zxy(v, rotate)` + +### Parameters +| Field | Type | +| ----- | ---- | +| v | [Vec3f](structs.md#Vec3f) | +| rotate | [Vec3s](structs.md#Vec3s) | + +### Returns +- `void *` + +### C Prototype +`void *vec3f_rotate_zxy(Vec3f v, Vec3s rotate);` + +[:arrow_up_small:](#) + +
+ +## [mtxf_copy](#mtxf_copy) + +### Description +Copies the 4x4 floating-point matrix `src` into `dest`. After this operation, `dest` contains the same matrix values as `src` + +### Lua Example +`mtxf_copy(dest, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | `Mat4` | +| src | `Mat4` | + +### Returns +- None + +### C Prototype +`void mtxf_copy(Mat4 dest, Mat4 src);` + +[:arrow_up_small:](#) + +
+ +## [mtxf_identity](#mtxf_identity) + +### Description +Sets the 4x4 floating-point matrix `mtx` to the identity matrix. The identity matrix leaves points unchanged when they are transformed by it which is useful for matrix math + +### Lua Example +`mtxf_identity(mtx)` + +### Parameters +| Field | Type | +| ----- | ---- | +| mtx | `Mat4` | + +### Returns +- None + +### C Prototype +`void mtxf_identity(Mat4 mtx);` + +[:arrow_up_small:](#) + +
+ +## [mtxf_translate](#mtxf_translate) + +### Description +Applies a translation to the 4x4 floating-point matrix `dest` by adding the coordinates in the 3D floating-point vector `b`. This shifts any transformed point by `b` + +### Lua Example +`mtxf_translate(dest, b)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | `Mat4` | +| b | [Vec3f](structs.md#Vec3f) | + +### Returns +- None + +### C Prototype +`void mtxf_translate(Mat4 dest, Vec3f b);` + +[:arrow_up_small:](#) + +
+ +## [mtxf_lookat](#mtxf_lookat) + +### Description +Adjusts the 4x4 floating-point matrix `mtx` so that it represents a viewing transformation looking from the point `from` toward the point `to`, with a given roll angle. This creates a view matrix oriented toward `to` + +### Lua Example +`mtxf_lookat(mtx, from, to, roll)` + +### Parameters +| Field | Type | +| ----- | ---- | +| mtx | `Mat4` | +| from | [Vec3f](structs.md#Vec3f) | +| to | [Vec3f](structs.md#Vec3f) | +| roll | `integer` | + +### Returns +- None + +### C Prototype +`void mtxf_lookat(Mat4 mtx, Vec3f from, Vec3f to, s16 roll);` + +[:arrow_up_small:](#) + +
+ +## [mtxf_rotate_zxy_and_translate](#mtxf_rotate_zxy_and_translate) + +### Description +Rotates `dest` according to the angles in `rotate` using ZXY order, and then translates it by the 3D floating-point vector `translate`. This effectively positions and orients `dest` in 3D space + +### Lua Example +`mtxf_rotate_zxy_and_translate(dest, translate, rotate)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | `Mat4` | +| translate | [Vec3f](structs.md#Vec3f) | +| rotate | [Vec3s](structs.md#Vec3s) | + +### Returns +- None + +### C Prototype +`void mtxf_rotate_zxy_and_translate(Mat4 dest, Vec3f translate, Vec3s rotate);` + +[:arrow_up_small:](#) + +
+ +## [mtxf_rotate_xyz_and_translate](#mtxf_rotate_xyz_and_translate) + +### Description +Rotates `dest` using angles in XYZ order, and then translates it by the 3D floating-point vector `b` and applies the rotations described by `c`. This sets up `dest` with a specific orientation and position in space + +### Lua Example +`mtxf_rotate_xyz_and_translate(dest, b, c)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | `Mat4` | +| b | [Vec3f](structs.md#Vec3f) | +| c | [Vec3s](structs.md#Vec3s) | + +### Returns +- None + +### C Prototype +`void mtxf_rotate_xyz_and_translate(Mat4 dest, Vec3f b, Vec3s c);` + +[:arrow_up_small:](#) + +
+ +## [mtxf_billboard](#mtxf_billboard) + +### Description +Transforms a 4x4 floating-point matrix `mtx` into a "billboard" oriented toward the camera or a given direction. The billboard is placed at `position` and rotated by `angle`. This is useful for objects that should always face the viewer + +### Lua Example +`mtxf_billboard(dest, mtx, position, angle)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | `Mat4` | +| mtx | `Mat4` | +| position | [Vec3f](structs.md#Vec3f) | +| angle | `integer` | + +### Returns +- None + +### C Prototype +`void mtxf_billboard(Mat4 dest, Mat4 mtx, Vec3f position, s16 angle);` + +[:arrow_up_small:](#) + +
+ +## [mtxf_cylboard](#mtxf_cylboard) + +### Description +Creates a "cylindrical billboard" transformation from the 4x4 matrix `mtx` placed at `position` with a given `angle`. Unlike a full billboard, this might allow rotation around one axis while still facing the viewer on others + +### Lua Example +`mtxf_cylboard(dest, mtx, position, angle)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dest | `Mat4` | +| mtx | `Mat4` | +| position | [Vec3f](structs.md#Vec3f) | +| angle | `integer` | + +### Returns +- None + +### C Prototype +`void mtxf_cylboard(Mat4 dest, Mat4 mtx, Vec3f position, s16 angle);` [:arrow_up_small:](#) @@ -4263,155 +4777,6 @@ Aligns `mtx` to fit onto a terrain triangle at `pos`, applying a given `yaw` and
-## [mtxf_billboard](#mtxf_billboard) - -### Description -Transforms a 4x4 floating-point matrix `mtx` into a "billboard" oriented toward the camera or a given direction. The billboard is placed at `position` and rotated by `angle`. This is useful for objects that should always face the viewer - -### Lua Example -`mtxf_billboard(dest, mtx, position, angle)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | `Mat4` | -| mtx | `Mat4` | -| position | [Vec3f](structs.md#Vec3f) | -| angle | `integer` | - -### Returns -- None - -### C Prototype -`void mtxf_billboard(Mat4 dest, Mat4 mtx, Vec3f position, s16 angle);` - -[:arrow_up_small:](#) - -
- -## [mtxf_copy](#mtxf_copy) - -### Description -Copies the 4x4 floating-point matrix `src` into `dest`. After this operation, `dest` contains the same matrix values as `src` - -### Lua Example -`mtxf_copy(dest, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | `Mat4` | -| src | `Mat4` | - -### Returns -- None - -### C Prototype -`void mtxf_copy(Mat4 dest, Mat4 src);` - -[:arrow_up_small:](#) - -
- -## [mtxf_cylboard](#mtxf_cylboard) - -### Description -Creates a "cylindrical billboard" transformation from the 4x4 matrix `mtx` placed at `position` with a given `angle`. Unlike a full billboard, this might allow rotation around one axis while still facing the viewer on others - -### Lua Example -`mtxf_cylboard(dest, mtx, position, angle)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | `Mat4` | -| mtx | `Mat4` | -| position | [Vec3f](structs.md#Vec3f) | -| angle | `integer` | - -### Returns -- None - -### C Prototype -`void mtxf_cylboard(Mat4 dest, Mat4 mtx, Vec3f position, s16 angle);` - -[:arrow_up_small:](#) - -
- -## [mtxf_identity](#mtxf_identity) - -### Description -Sets the 4x4 floating-point matrix `mtx` to the identity matrix. The identity matrix leaves points unchanged when they are transformed by it which is useful for matrix math - -### Lua Example -`mtxf_identity(mtx)` - -### Parameters -| Field | Type | -| ----- | ---- | -| mtx | `Mat4` | - -### Returns -- None - -### C Prototype -`void mtxf_identity(Mat4 mtx);` - -[:arrow_up_small:](#) - -
- -## [mtxf_inverse](#mtxf_inverse) - -### Description -Inverts the 4x4 floating-point matrix `src` and stores the inverse in `dest`. Applying the inverse transformation undoes whatever `src` did, returning points back to their original coordinate space - -### Lua Example -`mtxf_inverse(dest, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | `Mat4` | -| src | `Mat4` | - -### Returns -- None - -### C Prototype -`void mtxf_inverse(Mat4 dest, Mat4 src);` - -[:arrow_up_small:](#) - -
- -## [mtxf_lookat](#mtxf_lookat) - -### Description -Adjusts the 4x4 floating-point matrix `mtx` so that it represents a viewing transformation looking from the point `from` toward the point `to`, with a given roll angle. This creates a view matrix oriented toward `to` - -### Lua Example -`mtxf_lookat(mtx, from, to, roll)` - -### Parameters -| Field | Type | -| ----- | ---- | -| mtx | `Mat4` | -| from | [Vec3f](structs.md#Vec3f) | -| to | [Vec3f](structs.md#Vec3f) | -| roll | `integer` | - -### Returns -- None - -### C Prototype -`void mtxf_lookat(Mat4 mtx, Vec3f from, Vec3f to, s16 roll);` - -[:arrow_up_small:](#) - -
- ## [mtxf_mul](#mtxf_mul) ### Description @@ -4437,80 +4802,6 @@ Multiplies two 4x4 floating-point matrices `a` and `b` (in that order), storing
-## [mtxf_mul_vec3s](#mtxf_mul_vec3s) - -### Description -Multiplies the 4x4 floating-point matrix `mtx` by a 3D signed-integer vector `b`, potentially interpreting `b` as angles or translations depending on usage, and modifies `mtx` accordingly - -### Lua Example -`mtxf_mul_vec3s(mtx, b)` - -### Parameters -| Field | Type | -| ----- | ---- | -| mtx | `Mat4` | -| b | [Vec3s](structs.md#Vec3s) | - -### Returns -- None - -### C Prototype -`void mtxf_mul_vec3s(Mat4 mtx, Vec3s b);` - -[:arrow_up_small:](#) - -
- -## [mtxf_rotate_xyz_and_translate](#mtxf_rotate_xyz_and_translate) - -### Description -Rotates `dest` using angles in XYZ order, and then translates it by the 3D floating-point vector `b` and applies the rotations described by `c`. This sets up `dest` with a specific orientation and position in space - -### Lua Example -`mtxf_rotate_xyz_and_translate(dest, b, c)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | `Mat4` | -| b | [Vec3f](structs.md#Vec3f) | -| c | [Vec3s](structs.md#Vec3s) | - -### Returns -- None - -### C Prototype -`void mtxf_rotate_xyz_and_translate(Mat4 dest, Vec3f b, Vec3s c);` - -[:arrow_up_small:](#) - -
- -## [mtxf_rotate_zxy_and_translate](#mtxf_rotate_zxy_and_translate) - -### Description -Rotates `dest` according to the angles in `rotate` using ZXY order, and then translates it by the 3D floating-point vector `translate`. This effectively positions and orients `dest` in 3D space - -### Lua Example -`mtxf_rotate_zxy_and_translate(dest, translate, rotate)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | `Mat4` | -| translate | [Vec3f](structs.md#Vec3f) | -| rotate | [Vec3s](structs.md#Vec3s) | - -### Returns -- None - -### C Prototype -`void mtxf_rotate_zxy_and_translate(Mat4 dest, Vec3f translate, Vec3s rotate);` - -[:arrow_up_small:](#) - -
- ## [mtxf_scale_vec3f](#mtxf_scale_vec3f) ### Description @@ -4536,271 +4827,74 @@ Scales the 4x4 floating-point matrix `mtx` by the scaling factors found in the 3
-## [mtxf_translate](#mtxf_translate) +## [mtxf_mul_vec3s](#mtxf_mul_vec3s) ### Description -Applies a translation to the 4x4 floating-point matrix `dest` by adding the coordinates in the 3D floating-point vector `b`. This shifts any transformed point by `b` +Multiplies the 4x4 floating-point matrix `mtx` by a 3D signed-integer vector `b`, potentially interpreting `b` as angles or translations depending on usage, and modifies `mtx` accordingly ### Lua Example -`mtxf_translate(dest, b)` +`mtxf_mul_vec3s(mtx, b)` + +### Parameters +| Field | Type | +| ----- | ---- | +| mtx | `Mat4` | +| b | [Vec3s](structs.md#Vec3s) | + +### Returns +- None + +### C Prototype +`void mtxf_mul_vec3s(Mat4 mtx, Vec3s b);` + +[:arrow_up_small:](#) + +
+ +## [mtxf_inverse](#mtxf_inverse) + +### Description +Inverts the 4x4 floating-point matrix `src` and stores the inverse in `dest`. Applying the inverse transformation undoes whatever `src` did, returning points back to their original coordinate space + +### Lua Example +`mtxf_inverse(dest, src)` ### Parameters | Field | Type | | ----- | ---- | | dest | `Mat4` | -| b | [Vec3f](structs.md#Vec3f) | +| src | `Mat4` | ### Returns - None ### C Prototype -`void mtxf_translate(Mat4 dest, Vec3f b);` +`void mtxf_inverse(Mat4 dest, Mat4 src);` [:arrow_up_small:](#)
-## [not_zero](#not_zero) +## [get_pos_from_transform_mtx](#get_pos_from_transform_mtx) ### Description -Checks if `value` is zero. If not, it returns `value`. If it is zero, it returns the `replacement` value. This function ensures that a zero value can be substituted with a fallback value if needed +Extracts the position (translation component) from the transformation matrix `objMtx` relative to the coordinate system defined by `camMtx` and stores that 3D position in `dest`. This can be used to get the object's coordinates in camera space ### Lua Example -`local numberValue = not_zero(value, replacement)` +`get_pos_from_transform_mtx(dest, objMtx, camMtx)` ### Parameters | Field | Type | | ----- | ---- | -| value | `number` | -| replacement | `number` | - -### Returns -- `number` - -### C Prototype -`f32 not_zero(f32 value, f32 replacement);` - -[:arrow_up_small:](#) - -
- -## [sins](#sins) - -### Description -Calculates the sine of the given angle, where the angle is specified as a signed 16-bit integer representing a fixed-point "SM64 angle". This function returns a floating-point result corresponding to sin(angle) - -### Lua Example -`local numberValue = sins(sm64Angle)` - -### Parameters -| Field | Type | -| ----- | ---- | -| sm64Angle | `integer` | - -### Returns -- `number` - -### C Prototype -`f32 sins(s16 sm64Angle);` - -[:arrow_up_small:](#) - -
- -## [spline_get_weights](#spline_get_weights) - -### Description -Computes spline interpolation weights for a given parameter `t` and stores these weights in `result`. This is used in spline-based animations to find intermediate positions between keyframes - -### Lua Example -`spline_get_weights(m, result, t, c)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| result | `Vec4f` | -| t | `number` | -| c | `integer` | +| dest | [Vec3f](structs.md#Vec3f) | +| objMtx | `Mat4` | +| camMtx | `Mat4` | ### Returns - None ### C Prototype -`void spline_get_weights(struct MarioState* m, Vec4f result, f32 t, UNUSED s32 c);` - -[:arrow_up_small:](#) - -
- -## [vec3f_add](#vec3f_add) - -### Description -Adds the components of the 3D floating-point vector `a` to `dest`. After this operation, `dest.x` will be `dest.x + a.x`, and similarly for the y and z components - -### Lua Example -`local voidValue = vec3f_add(dest, a)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3f](structs.md#Vec3f) | -| a | [Vec3f](structs.md#Vec3f) | - -### Returns -- `void *` - -### C Prototype -`void *vec3f_add(Vec3f dest, Vec3f a);` - -[:arrow_up_small:](#) - -
- -## [vec3f_combine](#vec3f_combine) - -### Description -Takes two 3D floating-point vectors `vecA` and `vecB`, multiplies them by `sclA` and `sclB` respectively, and then adds the scaled vectors together. The final combined vector is stored in `dest` - -### Lua Example -`vec3f_combine(dest, vecA, vecB, sclA, sclB)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3f](structs.md#Vec3f) | -| vecA | [Vec3f](structs.md#Vec3f) | -| vecB | [Vec3f](structs.md#Vec3f) | -| sclA | `number` | -| sclB | `number` | - -### Returns -- None - -### C Prototype -`void vec3f_combine(Vec3f dest, Vec3f vecA, Vec3f vecB, f32 sclA, f32 sclB);` - -[:arrow_up_small:](#) - -
- -## [vec3f_copy](#vec3f_copy) - -### Description -Copies the contents of a 3D floating-point vector (`src`) into another 3D floating-point vector (`dest`). After this operation, `dest` will have the same x, y, and z values as `src` - -### Lua Example -`local voidValue = vec3f_copy(dest, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3f](structs.md#Vec3f) | -| src | [Vec3f](structs.md#Vec3f) | - -### Returns -- `void *` - -### C Prototype -`void *vec3f_copy(Vec3f dest, Vec3f src);` - -[:arrow_up_small:](#) - -
- -## [vec3f_cross](#vec3f_cross) - -### Description -Computes the cross product of two 3D floating-point vectors `a` and `b`. The cross product is a vector perpendicular to both `a` and `b`. The result is stored in `dest` - -### Lua Example -`local voidValue = vec3f_cross(dest, a, b)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3f](structs.md#Vec3f) | -| a | [Vec3f](structs.md#Vec3f) | -| b | [Vec3f](structs.md#Vec3f) | - -### Returns -- `void *` - -### C Prototype -`void *vec3f_cross(Vec3f dest, Vec3f a, Vec3f b);` - -[:arrow_up_small:](#) - -
- -## [vec3f_dif](#vec3f_dif) - -### Description -Subtracts the components of the 3D floating-point vector `b` from the components of `a` and stores the result in `dest`. For example, `dest.x = a.x - b.x` This results in a vector that represents the difference between `a` and `b`. - -### Lua Example -`local voidValue = vec3f_dif(dest, a, b)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3f](structs.md#Vec3f) | -| a | [Vec3f](structs.md#Vec3f) | -| b | [Vec3f](structs.md#Vec3f) | - -### Returns -- `void *` - -### C Prototype -`void *vec3f_dif(Vec3f dest, Vec3f a, Vec3f b);` - -[:arrow_up_small:](#) - -
- -## [vec3f_dist](#vec3f_dist) - -### Description -Calculates the distance between two 3D floating-point points `v1` and `v2`. The distance is the length of the vector `v2 - v1`, i.e., sqrt((v2.x - v1.x)² + (v2.y - v1.y)² + (v2.z - v1.z)²) - -### Lua Example -`local numberValue = vec3f_dist(v1, v2)` - -### Parameters -| Field | Type | -| ----- | ---- | -| v1 | [Vec3f](structs.md#Vec3f) | -| v2 | [Vec3f](structs.md#Vec3f) | - -### Returns -- `number` - -### C Prototype -`f32 vec3f_dist(Vec3f v1, Vec3f v2);` - -[:arrow_up_small:](#) - -
- -## [vec3f_dot](#vec3f_dot) - -### Description -Computes the dot product of the two 3D floating-point vectors `a` and `b`. The dot product is a scalar value defined by (a.x * b.x + a.y * b.y + a.z * b.z), representing how aligned the two vectors are - -### Lua Example -`local numberValue = vec3f_dot(a, b)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a | [Vec3f](structs.md#Vec3f) | -| b | [Vec3f](structs.md#Vec3f) | - -### Returns -- `number` - -### C Prototype -`f32 vec3f_dot(Vec3f a, Vec3f b);` +`void get_pos_from_transform_mtx(Vec3f dest, Mat4 objMtx, Mat4 camMtx);` [:arrow_up_small:](#) @@ -4833,71 +4927,199 @@ Calculates the distance between two points in 3D space (`from` and `to`), as wel
-## [vec3f_length](#vec3f_length) - -### Description -Calculates the length (magnitude) of the 3D floating-point vector `a`. The length is defined as sqrt(x² + y² + z²) for the vector components (x, y, z) +## [vec3f_set_dist_and_angle](#vec3f_set_dist_and_angle) ### Lua Example -`local numberValue = vec3f_length(a)` +`vec3f_set_dist_and_angle(from, to, dist, pitch, yaw)` ### Parameters | Field | Type | | ----- | ---- | -| a | [Vec3f](structs.md#Vec3f) | +| from | [Vec3f](structs.md#Vec3f) | +| to | [Vec3f](structs.md#Vec3f) | +| dist | `number` | +| pitch | `integer` | +| yaw | `integer` | + +### Returns +- None + +### C Prototype +`void vec3f_set_dist_and_angle(Vec3f from, Vec3f to, f32 dist, s16 pitch, s16 yaw);` + +[:arrow_up_small:](#) + +
+ +## [approach_s32](#approach_s32) + +### Description +Gradually moves an integer `current` value toward a `target` value, increasing it by `inc` if it is too low, or decreasing it by `dec` if it is too high. This is often used for smooth transitions or animations + +### Lua Example +`local integerValue = approach_s32(current, target, inc, dec)` + +### Parameters +| Field | Type | +| ----- | ---- | +| current | `integer` | +| target | `integer` | +| inc | `integer` | +| dec | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 approach_s32(s32 current, s32 target, s32 inc, s32 dec);` + +[:arrow_up_small:](#) + +
+ +## [approach_f32](#approach_f32) + +### Description +Similar to `approach_s32`, but operates on floating-point numbers. It moves `current` toward `target` by increasing it by `inc` if below target, or decreasing it by `dec` if above target, creating a smooth interpolation + +### Lua Example +`local numberValue = approach_f32(current, target, inc, dec)` + +### Parameters +| Field | Type | +| ----- | ---- | +| current | `number` | +| target | `number` | +| inc | `number` | +| dec | `number` | ### Returns - `number` ### C Prototype -`f32 vec3f_length(Vec3f a);` +`f32 approach_f32(f32 current, f32 target, f32 inc, f32 dec);` [:arrow_up_small:](#)
-## [vec3f_mul](#vec3f_mul) +## [atan2s](#atan2s) ### Description -Multiplies each component of the 3D floating-point vector `dest` by the scalar value `a`. For instance, `dest.x = dest.x * a`, and similarly for y and z. This scales the vector `dest` by `a` +Computes the arctangent of y/x and returns the angle as a signed 16-bit integer, typically representing a direction in the SM64 fixed-point angle format. This can be used to find an angle between x and y coordinates ### Lua Example -`local voidValue = vec3f_mul(dest, a)` +`local integerValue = atan2s(y, x)` ### Parameters | Field | Type | | ----- | ---- | -| dest | [Vec3f](structs.md#Vec3f) | -| a | `number` | +| y | `number` | +| x | `number` | ### Returns -- `void *` +- `integer` ### C Prototype -`void *vec3f_mul(Vec3f dest, f32 a);` +`s16 atan2s(f32 y, f32 x);` [:arrow_up_small:](#)
-## [vec3f_normalize](#vec3f_normalize) +## [spline_get_weights](#spline_get_weights) ### Description -Normalizes the 3D floating-point vector `dest` so that its length (magnitude) becomes 1, while retaining its direction. This effectively scales `dest` so that it lies on the unit sphere +Computes spline interpolation weights for a given parameter `t` and stores these weights in `result`. This is used in spline-based animations to find intermediate positions between keyframes ### Lua Example -`local voidValue = vec3f_normalize(dest)` +`spline_get_weights(m, result, t, c)` ### Parameters | Field | Type | | ----- | ---- | -| dest | [Vec3f](structs.md#Vec3f) | +| m | [MarioState](structs.md#MarioState) | +| result | `Vec4f` | +| t | `number` | +| c | `integer` | ### Returns -- `void *` +- None ### C Prototype -`void *vec3f_normalize(Vec3f dest);` +`void spline_get_weights(struct MarioState* m, Vec4f result, f32 t, UNUSED s32 c);` + +[:arrow_up_small:](#) + +
+ +## [anim_spline_init](#anim_spline_init) + +### Description +Initializes a spline-based animation for the `MarioState` structure `m` using the provided array of 3D signed-integer vectors `keyFrames`. This sets up the animation so that it can be advanced by polling + +### Lua Example +`anim_spline_init(m, keyFrames)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| keyFrames | `Pointer` <`Vec4s`> | + +### Returns +- None + +### C Prototype +`void anim_spline_init(struct MarioState* m, Vec4s *keyFrames);` + +[:arrow_up_small:](#) + +
+ +## [anim_spline_poll](#anim_spline_poll) + +### Description +Advances the spline-based animation associated with `m` and stores the current interpolated position in `result`. It returns the animation's status, allowing the caller to determine if the animation is ongoing or has completed + +### Lua Example +`local integerValue = anim_spline_poll(m, result)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| result | [Vec3f](structs.md#Vec3f) | + +### Returns +- `integer` + +### C Prototype +`s32 anim_spline_poll(struct MarioState* m, Vec3f result);` + +[:arrow_up_small:](#) + +
+ +## [not_zero](#not_zero) + +### Description +Checks if `value` is zero. If not, it returns `value`. If it is zero, it returns the `replacement` value. This function ensures that a zero value can be substituted with a fallback value if needed + +### Lua Example +`local numberValue = not_zero(value, replacement)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `number` | +| replacement | `number` | + +### Returns +- `number` + +### C Prototype +`f32 not_zero(f32 value, f32 replacement);` [:arrow_up_small:](#) @@ -4928,247 +5150,25 @@ Projects the 3D floating-point vector `vec` onto another 3D floating-point vecto
-## [vec3f_rotate_zxy](#vec3f_rotate_zxy) +## [vec3f_dist](#vec3f_dist) ### Description -Rotates the 3D floating-point vector `v` by the angles specified in the 3D signed-integer vector `rotate`, applying the rotations in the order Z, then X, then Y. The rotated vector replaces `v` +Calculates the distance between two 3D floating-point points `v1` and `v2`. The distance is the length of the vector `v2 - v1`, i.e., sqrt((v2.x - v1.x)² + (v2.y - v1.y)² + (v2.z - v1.z)²) ### Lua Example -`local voidValue = vec3f_rotate_zxy(v, rotate)` +`local numberValue = vec3f_dist(v1, v2)` ### Parameters | Field | Type | | ----- | ---- | -| v | [Vec3f](structs.md#Vec3f) | -| rotate | [Vec3s](structs.md#Vec3s) | +| v1 | [Vec3f](structs.md#Vec3f) | +| v2 | [Vec3f](structs.md#Vec3f) | ### Returns -- `void *` +- `number` ### C Prototype -`void *vec3f_rotate_zxy(Vec3f v, Vec3s rotate);` - -[:arrow_up_small:](#) - -
- -## [vec3f_set](#vec3f_set) - -### Description -Sets the values of the 3D floating-point vector `dest` to the given x, y, and z values. After this function, `dest` will have values (x, y, z) - -### Lua Example -`local voidValue = vec3f_set(dest, x, y, z)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3f](structs.md#Vec3f) | -| x | `number` | -| y | `number` | -| z | `number` | - -### Returns -- `void *` - -### C Prototype -`void *vec3f_set(Vec3f dest, f32 x, f32 y, f32 z);` - -[:arrow_up_small:](#) - -
- -## [vec3f_set_dist_and_angle](#vec3f_set_dist_and_angle) - -### Lua Example -`vec3f_set_dist_and_angle(from, to, dist, pitch, yaw)` - -### Parameters -| Field | Type | -| ----- | ---- | -| from | [Vec3f](structs.md#Vec3f) | -| to | [Vec3f](structs.md#Vec3f) | -| dist | `number` | -| pitch | `integer` | -| yaw | `integer` | - -### Returns -- None - -### C Prototype -`void vec3f_set_dist_and_angle(Vec3f from, Vec3f to, f32 dist, s16 pitch, s16 yaw);` - -[:arrow_up_small:](#) - -
- -## [vec3f_sum](#vec3f_sum) - -### Description -Adds the corresponding components of two 3D floating-point vectors `a` and `b`, and stores the result in `dest`. For example, `dest.x = a.x + b.x`, `dest.y = a.y + b.y`, and `dest.z = a.z + b.z` - -### Lua Example -`local voidValue = vec3f_sum(dest, a, b)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3f](structs.md#Vec3f) | -| a | [Vec3f](structs.md#Vec3f) | -| b | [Vec3f](structs.md#Vec3f) | - -### Returns -- `void *` - -### C Prototype -`void *vec3f_sum(Vec3f dest, Vec3f a, Vec3f b);` - -[:arrow_up_small:](#) - -
- -## [vec3f_to_vec3s](#vec3f_to_vec3s) - -### Description -Converts a 3D floating-point vector `a` (Vec3f) into a 3D signed-integer vector and stores it in `dest`. After this operation, `dest` will contain the integer versions of `a`'s floating-point components - -### Lua Example -`local voidValue = vec3f_to_vec3s(dest, a)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3s](structs.md#Vec3s) | -| a | [Vec3f](structs.md#Vec3f) | - -### Returns -- `void *` - -### C Prototype -`void *vec3f_to_vec3s(Vec3s dest, Vec3f a);` - -[:arrow_up_small:](#) - -
- -## [vec3s_add](#vec3s_add) - -### Description -Adds the components of a 3D signed-integer vector `a` to the corresponding components of `dest`. After this operation, each component of `dest` is increased by the corresponding component in `a` - -### Lua Example -`local voidValue = vec3s_add(dest, a)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3s](structs.md#Vec3s) | -| a | [Vec3s](structs.md#Vec3s) | - -### Returns -- `void *` - -### C Prototype -`void *vec3s_add(Vec3s dest, Vec3s a);` - -[:arrow_up_small:](#) - -
- -## [vec3s_copy](#vec3s_copy) - -### Description -Copies the components of one 3D signed-integer vector (`src`) to another (`dest`). After this function, `dest` will have the same x, y, and z integer values as `src` - -### Lua Example -`local voidValue = vec3s_copy(dest, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3s](structs.md#Vec3s) | -| src | [Vec3s](structs.md#Vec3s) | - -### Returns -- `void *` - -### C Prototype -`void *vec3s_copy(Vec3s dest, Vec3s src);` - -[:arrow_up_small:](#) - -
- -## [vec3s_set](#vec3s_set) - -### Description -Sets the 3D signed-integer vector `dest` to the specified integer values (x, y, z), so that `dest` becomes (x, y, z). - -### Lua Example -`local voidValue = vec3s_set(dest, x, y, z)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3s](structs.md#Vec3s) | -| x | `integer` | -| y | `integer` | -| z | `integer` | - -### Returns -- `void *` - -### C Prototype -`void *vec3s_set(Vec3s dest, s16 x, s16 y, s16 z);` - -[:arrow_up_small:](#) - -
- -## [vec3s_sum](#vec3s_sum) - -### Description -Adds the components of two 3D signed-integer vectors `a` and `b` together and stores the resulting vector in `dest`. For example, `dest.x = a.x + b.x`, and similarly for y and z - -### Lua Example -`local voidValue = vec3s_sum(dest, a, b)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3s](structs.md#Vec3s) | -| a | [Vec3s](structs.md#Vec3s) | -| b | [Vec3s](structs.md#Vec3s) | - -### Returns -- `void *` - -### C Prototype -`void *vec3s_sum(Vec3s dest, Vec3s a, Vec3s b);` - -[:arrow_up_small:](#) - -
- -## [vec3s_to_vec3f](#vec3s_to_vec3f) - -### Description -Converts a 3D signed-integer vector `a` (vec3s) into a 3D floating-point vector and stores it in `dest`. After this operation, `dest` will contain the floating-point equivalents of `a`'s integer components - -### Lua Example -`local voidValue = vec3s_to_vec3f(dest, a)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dest | [Vec3f](structs.md#Vec3f) | -| a | [Vec3s](structs.md#Vec3s) | - -### Returns -- `void *` - -### C Prototype -`void *vec3s_to_vec3f(Vec3f dest, Vec3s a);` +`f32 vec3f_dist(Vec3f v1, Vec3f v2);` [:arrow_up_small:](#) @@ -5180,6 +5180,52 @@ Converts a 3D signed-integer vector `a` (vec3s) into a 3D floating-point vector
+## [smooth_step](#smooth_step) + +### Description +Smoothly steps between `edge0` and `edge1` with `x` as delta + +### Lua Example +`local numberValue = smooth_step(edge0, edge1, x)` + +### Parameters +| Field | Type | +| ----- | ---- | +| edge0 | `number` | +| edge1 | `number` | +| x | `number` | + +### Returns +- `number` + +### C Prototype +`float smooth_step(float edge0, float edge1, float x);` + +[:arrow_up_small:](#) + +
+ +## [update_all_mario_stars](#update_all_mario_stars) + +### Description +Updates every Mario state's star count with the save file total star count + +### Lua Example +`update_all_mario_stars()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void update_all_mario_stars(void);` + +[:arrow_up_small:](#) + +
+ ## [clock_elapsed](#clock_elapsed) ### Description @@ -5369,194 +5415,12 @@ Linearly interpolates `res` between `a` and `b` with `delta`
-## [smooth_step](#smooth_step) - -### Description -Smoothly steps between `edge0` and `edge1` with `x` as delta - -### Lua Example -`local numberValue = smooth_step(edge0, edge1, x)` - -### Parameters -| Field | Type | -| ----- | ---- | -| edge0 | `number` | -| edge1 | `number` | -| x | `number` | - -### Returns -- `number` - -### C Prototype -`float smooth_step(float edge0, float edge1, float x);` - -[:arrow_up_small:](#) - -
- -## [update_all_mario_stars](#update_all_mario_stars) - -### Description -Updates every Mario state's star count with the save file total star count - -### Lua Example -`update_all_mario_stars()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void update_all_mario_stars(void);` - -[:arrow_up_small:](#) - -
- --- # functions from mod_storage.h
-## [mod_storage_clear](#mod_storage_clear) - -### Description -Clears the mod's data from mod storage - -### Lua Example -`local booleanValue = mod_storage_clear()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool mod_storage_clear(void);` - -[:arrow_up_small:](#) - -
- -## [mod_storage_exists](#mod_storage_exists) - -### Description -Checks if a `key` is in mod storage - -### Lua Example -`local booleanValue = mod_storage_exists(key)` - -### Parameters -| Field | Type | -| ----- | ---- | -| key | `string` | - -### Returns -- `boolean` - -### C Prototype -`bool mod_storage_exists(const char* key);` - -[:arrow_up_small:](#) - -
- -## [mod_storage_load](#mod_storage_load) - -### Description -Loads a string `value` from a `key` in mod storage - -### Lua Example -`local stringValue = mod_storage_load(key)` - -### Parameters -| Field | Type | -| ----- | ---- | -| key | `string` | - -### Returns -- `string` - -### C Prototype -`const char *mod_storage_load(const char* key);` - -[:arrow_up_small:](#) - -
- -## [mod_storage_load_bool](#mod_storage_load_bool) - -### Description -Loads a bool `value` from a `key` in mod storage - -### Lua Example -`local booleanValue = mod_storage_load_bool(key)` - -### Parameters -| Field | Type | -| ----- | ---- | -| key | `string` | - -### Returns -- `boolean` - -### C Prototype -`bool mod_storage_load_bool(const char* key);` - -[:arrow_up_small:](#) - -
- -## [mod_storage_load_number](#mod_storage_load_number) - -### Description -Loads a float `value` from a `key` in mod storage - -### Lua Example -`local numberValue = mod_storage_load_number(key)` - -### Parameters -| Field | Type | -| ----- | ---- | -| key | `string` | - -### Returns -- `number` - -### C Prototype -`f32 mod_storage_load_number(const char* key);` - -[:arrow_up_small:](#) - -
- -## [mod_storage_remove](#mod_storage_remove) - -### Description -Removes a `key` from mod storage - -### Lua Example -`local booleanValue = mod_storage_remove(key)` - -### Parameters -| Field | Type | -| ----- | ---- | -| key | `string` | - -### Returns -- `boolean` - -### C Prototype -`bool mod_storage_remove(const char* key);` - -[:arrow_up_small:](#) - -
- ## [mod_storage_save](#mod_storage_save) ### Description @@ -5581,30 +5445,6 @@ Saves a `key` corresponding to a string `value` to mod storage
-## [mod_storage_save_bool](#mod_storage_save_bool) - -### Description -Saves a `key` corresponding to a bool `value` to mod storage - -### Lua Example -`local booleanValue = mod_storage_save_bool(key, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| key | `string` | -| value | `boolean` | - -### Returns -- `boolean` - -### C Prototype -`bool mod_storage_save_bool(const char* key, bool value);` - -[:arrow_up_small:](#) - -
- ## [mod_storage_save_number](#mod_storage_save_number) ### Description @@ -5629,75 +5469,172 @@ Saves a `key` corresponding to a float `value` to mod storage
---- -# functions from network_player.h +## [mod_storage_save_bool](#mod_storage_save_bool) -
- - -## [get_network_player_from_area](#get_network_player_from_area) +### Description +Saves a `key` corresponding to a bool `value` to mod storage ### Lua Example -`local NetworkPlayerValue = get_network_player_from_area(courseNum, actNum, levelNum, areaIndex)` +`local booleanValue = mod_storage_save_bool(key, value)` ### Parameters | Field | Type | | ----- | ---- | -| courseNum | `integer` | -| actNum | `integer` | -| levelNum | `integer` | -| areaIndex | `integer` | +| key | `string` | +| value | `boolean` | ### Returns -[NetworkPlayer](structs.md#NetworkPlayer) +- `boolean` ### C Prototype -`struct NetworkPlayer* get_network_player_from_area(s16 courseNum, s16 actNum, s16 levelNum, s16 areaIndex);` +`bool mod_storage_save_bool(const char* key, bool value);` [:arrow_up_small:](#)
-## [get_network_player_from_level](#get_network_player_from_level) +## [mod_storage_load](#mod_storage_load) + +### Description +Loads a string `value` from a `key` in mod storage ### Lua Example -`local NetworkPlayerValue = get_network_player_from_level(courseNum, actNum, levelNum)` +`local stringValue = mod_storage_load(key)` ### Parameters | Field | Type | | ----- | ---- | -| courseNum | `integer` | -| actNum | `integer` | -| levelNum | `integer` | +| key | `string` | ### Returns -[NetworkPlayer](structs.md#NetworkPlayer) +- `string` ### C Prototype -`struct NetworkPlayer* get_network_player_from_level(s16 courseNum, s16 actNum, s16 levelNum);` +`const char *mod_storage_load(const char* key);` [:arrow_up_small:](#)
-## [get_network_player_smallest_global](#get_network_player_smallest_global) +## [mod_storage_load_number](#mod_storage_load_number) + +### Description +Loads a float `value` from a `key` in mod storage ### Lua Example -`local NetworkPlayerValue = get_network_player_smallest_global()` +`local numberValue = mod_storage_load_number(key)` + +### Parameters +| Field | Type | +| ----- | ---- | +| key | `string` | + +### Returns +- `number` + +### C Prototype +`f32 mod_storage_load_number(const char* key);` + +[:arrow_up_small:](#) + +
+ +## [mod_storage_load_bool](#mod_storage_load_bool) + +### Description +Loads a bool `value` from a `key` in mod storage + +### Lua Example +`local booleanValue = mod_storage_load_bool(key)` + +### Parameters +| Field | Type | +| ----- | ---- | +| key | `string` | + +### Returns +- `boolean` + +### C Prototype +`bool mod_storage_load_bool(const char* key);` + +[:arrow_up_small:](#) + +
+ +## [mod_storage_exists](#mod_storage_exists) + +### Description +Checks if a `key` is in mod storage + +### Lua Example +`local booleanValue = mod_storage_exists(key)` + +### Parameters +| Field | Type | +| ----- | ---- | +| key | `string` | + +### Returns +- `boolean` + +### C Prototype +`bool mod_storage_exists(const char* key);` + +[:arrow_up_small:](#) + +
+ +## [mod_storage_remove](#mod_storage_remove) + +### Description +Removes a `key` from mod storage + +### Lua Example +`local booleanValue = mod_storage_remove(key)` + +### Parameters +| Field | Type | +| ----- | ---- | +| key | `string` | + +### Returns +- `boolean` + +### C Prototype +`bool mod_storage_remove(const char* key);` + +[:arrow_up_small:](#) + +
+ +## [mod_storage_clear](#mod_storage_clear) + +### Description +Clears the mod's data from mod storage + +### Lua Example +`local booleanValue = mod_storage_clear()` ### Parameters - None ### Returns -[NetworkPlayer](structs.md#NetworkPlayer) +- `boolean` ### C Prototype -`struct NetworkPlayer* get_network_player_smallest_global(void);` +`bool mod_storage_clear(void);` [:arrow_up_small:](#)
+--- +# functions from network_player.h + +
+ + ## [network_player_connected_count](#network_player_connected_count) ### Lua Example @@ -5716,66 +5653,6 @@ Saves a `key` corresponding to a float `value` to mod storage
-## [network_player_from_global_index](#network_player_from_global_index) - -### Lua Example -`local NetworkPlayerValue = network_player_from_global_index(globalIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| globalIndex | `integer` | - -### Returns -[NetworkPlayer](structs.md#NetworkPlayer) - -### C Prototype -`struct NetworkPlayer* network_player_from_global_index(u8 globalIndex);` - -[:arrow_up_small:](#) - -
- -## [network_player_is_override_palette_same](#network_player_is_override_palette_same) - -### Lua Example -`local booleanValue = network_player_is_override_palette_same(np)` - -### Parameters -| Field | Type | -| ----- | ---- | -| np | [NetworkPlayer](structs.md#NetworkPlayer) | - -### Returns -- `boolean` - -### C Prototype -`bool network_player_is_override_palette_same(struct NetworkPlayer *np);` - -[:arrow_up_small:](#) - -
- -## [network_player_reset_override_palette](#network_player_reset_override_palette) - -### Lua Example -`network_player_reset_override_palette(np)` - -### Parameters -| Field | Type | -| ----- | ---- | -| np | [NetworkPlayer](structs.md#NetworkPlayer) | - -### Returns -- None - -### C Prototype -`void network_player_reset_override_palette(struct NetworkPlayer *np);` - -[:arrow_up_small:](#) - -
- ## [network_player_set_description](#network_player_set_description) ### Lua Example @@ -5822,6 +5699,89 @@ Saves a `key` corresponding to a float `value` to mod storage
+## [network_player_from_global_index](#network_player_from_global_index) + +### Lua Example +`local NetworkPlayerValue = network_player_from_global_index(globalIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| globalIndex | `integer` | + +### Returns +[NetworkPlayer](structs.md#NetworkPlayer) + +### C Prototype +`struct NetworkPlayer* network_player_from_global_index(u8 globalIndex);` + +[:arrow_up_small:](#) + +
+ +## [get_network_player_from_level](#get_network_player_from_level) + +### Lua Example +`local NetworkPlayerValue = get_network_player_from_level(courseNum, actNum, levelNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | +| actNum | `integer` | +| levelNum | `integer` | + +### Returns +[NetworkPlayer](structs.md#NetworkPlayer) + +### C Prototype +`struct NetworkPlayer* get_network_player_from_level(s16 courseNum, s16 actNum, s16 levelNum);` + +[:arrow_up_small:](#) + +
+ +## [get_network_player_from_area](#get_network_player_from_area) + +### Lua Example +`local NetworkPlayerValue = get_network_player_from_area(courseNum, actNum, levelNum, areaIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | +| actNum | `integer` | +| levelNum | `integer` | +| areaIndex | `integer` | + +### Returns +[NetworkPlayer](structs.md#NetworkPlayer) + +### C Prototype +`struct NetworkPlayer* get_network_player_from_area(s16 courseNum, s16 actNum, s16 levelNum, s16 areaIndex);` + +[:arrow_up_small:](#) + +
+ +## [get_network_player_smallest_global](#get_network_player_smallest_global) + +### Lua Example +`local NetworkPlayerValue = get_network_player_smallest_global()` + +### Parameters +- None + +### Returns +[NetworkPlayer](structs.md#NetworkPlayer) + +### C Prototype +`struct NetworkPlayer* get_network_player_smallest_global(void);` + +[:arrow_up_small:](#) + +
+ ## [network_player_set_override_palette_color](#network_player_set_override_palette_color) ### Lua Example @@ -5844,12 +5804,163 @@ Saves a `key` corresponding to a float `value` to mod storage
+## [network_player_reset_override_palette](#network_player_reset_override_palette) + +### Lua Example +`network_player_reset_override_palette(np)` + +### Parameters +| Field | Type | +| ----- | ---- | +| np | [NetworkPlayer](structs.md#NetworkPlayer) | + +### Returns +- None + +### C Prototype +`void network_player_reset_override_palette(struct NetworkPlayer *np);` + +[:arrow_up_small:](#) + +
+ +## [network_player_is_override_palette_same](#network_player_is_override_palette_same) + +### Lua Example +`local booleanValue = network_player_is_override_palette_same(np)` + +### Parameters +| Field | Type | +| ----- | ---- | +| np | [NetworkPlayer](structs.md#NetworkPlayer) | + +### Returns +- `boolean` + +### C Prototype +`bool network_player_is_override_palette_same(struct NetworkPlayer *np);` + +[:arrow_up_small:](#) + +
+ --- # functions from network_utils.h
+## [network_global_index_from_local](#network_global_index_from_local) + +### Description +Gets a player's global index from their local index + +### Lua Example +`local integerValue = network_global_index_from_local(localIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| localIndex | `integer` | + +### Returns +- `integer` + +### C Prototype +`u8 network_global_index_from_local(u8 localIndex);` + +[:arrow_up_small:](#) + +
+ +## [network_local_index_from_global](#network_local_index_from_global) + +### Description +Gets a player's local index from their global index + +### Lua Example +`local integerValue = network_local_index_from_global(globalIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| globalIndex | `integer` | + +### Returns +- `integer` + +### C Prototype +`u8 network_local_index_from_global(u8 globalIndex);` + +[:arrow_up_small:](#) + +
+ +## [network_is_server](#network_is_server) + +### Description +Checks if you are hosting the current lobby, this value doesn't change + +### Lua Example +`local booleanValue = network_is_server()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool network_is_server(void);` + +[:arrow_up_small:](#) + +
+ +## [network_is_moderator](#network_is_moderator) + +### Description +Checks if you are a moderator in the current lobby + +### Lua Example +`local booleanValue = network_is_moderator()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool network_is_moderator(void);` + +[:arrow_up_small:](#) + +
+ +## [network_get_player_text_color_string](#network_get_player_text_color_string) + +### Description +Gets the DJUI hex color code string for the player corresponding to `localIndex`'s cap color + +### Lua Example +`local stringValue = network_get_player_text_color_string(localIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| localIndex | `integer` | + +### Returns +- `string` + +### C Prototype +`const char* network_get_player_text_color_string(u8 localIndex);` + +[:arrow_up_small:](#) + +
+ ## [network_check_singleplayer_pause](#network_check_singleplayer_pause) ### Description @@ -5894,123 +6005,30 @@ Gets a Discord ID corresponding to the network player with `localIndex`
-## [network_get_player_text_color_string](#network_get_player_text_color_string) - -### Description -Gets the DJUI hex color code string for the player corresponding to `localIndex`'s cap color - -### Lua Example -`local stringValue = network_get_player_text_color_string(localIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| localIndex | `integer` | - -### Returns -- `string` - -### C Prototype -`const char* network_get_player_text_color_string(u8 localIndex);` - -[:arrow_up_small:](#) - -
- -## [network_global_index_from_local](#network_global_index_from_local) - -### Description -Gets a player's global index from their local index - -### Lua Example -`local integerValue = network_global_index_from_local(localIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| localIndex | `integer` | - -### Returns -- `integer` - -### C Prototype -`u8 network_global_index_from_local(u8 localIndex);` - -[:arrow_up_small:](#) - -
- -## [network_is_moderator](#network_is_moderator) - -### Description -Checks if you are a moderator in the current lobby - -### Lua Example -`local booleanValue = network_is_moderator()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool network_is_moderator(void);` - -[:arrow_up_small:](#) - -
- -## [network_is_server](#network_is_server) - -### Description -Checks if you are hosting the current lobby, this value doesn't change - -### Lua Example -`local booleanValue = network_is_server()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool network_is_server(void);` - -[:arrow_up_small:](#) - -
- -## [network_local_index_from_global](#network_local_index_from_global) - -### Description -Gets a player's local index from their global index - -### Lua Example -`local integerValue = network_local_index_from_global(globalIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| globalIndex | `integer` | - -### Returns -- `integer` - -### C Prototype -`u8 network_local_index_from_global(u8 globalIndex);` - -[:arrow_up_small:](#) - -
- --- # functions from obj_behaviors.c
+## [set_yoshi_as_not_dead](#set_yoshi_as_not_dead) + +### Lua Example +`set_yoshi_as_not_dead()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void set_yoshi_as_not_dead(void);` + +[:arrow_up_small:](#) + +
+ ## [absf_2](#absf_2) ### Lua Example @@ -6031,6 +6049,123 @@ Gets a player's local index from their global index
+## [turn_obj_away_from_surface](#turn_obj_away_from_surface) + +### Lua Example +`turn_obj_away_from_surface(velX, velZ, nX, nY, nZ, objYawX, objYawZ)` + +### Parameters +| Field | Type | +| ----- | ---- | +| velX | `number` | +| velZ | `number` | +| nX | `number` | +| nY | `number` | +| nZ | `number` | +| objYawX | `Pointer` <`number`> | +| objYawZ | `Pointer` <`number`> | + +### Returns +- None + +### C Prototype +`void turn_obj_away_from_surface(f32 velX, f32 velZ, f32 nX, UNUSED f32 nY, f32 nZ, f32 *objYawX, f32 *objYawZ);` + +[:arrow_up_small:](#) + +
+ +## [obj_find_wall](#obj_find_wall) + +### Lua Example +`local integerValue = obj_find_wall(objNewX, objY, objNewZ, objVelX, objVelZ)` + +### Parameters +| Field | Type | +| ----- | ---- | +| objNewX | `number` | +| objY | `number` | +| objNewZ | `number` | +| objVelX | `number` | +| objVelZ | `number` | + +### Returns +- `integer` + +### C Prototype +`s8 obj_find_wall(f32 objNewX, f32 objY, f32 objNewZ, f32 objVelX, f32 objVelZ);` + +[:arrow_up_small:](#) + +
+ +## [turn_obj_away_from_steep_floor](#turn_obj_away_from_steep_floor) + +### Lua Example +`local integerValue = turn_obj_away_from_steep_floor(objFloor, floorY, objVelX, objVelZ)` + +### Parameters +| Field | Type | +| ----- | ---- | +| objFloor | [Surface](structs.md#Surface) | +| floorY | `number` | +| objVelX | `number` | +| objVelZ | `number` | + +### Returns +- `integer` + +### C Prototype +`s8 turn_obj_away_from_steep_floor(struct Surface *objFloor, f32 floorY, f32 objVelX, f32 objVelZ);` + +[:arrow_up_small:](#) + +
+ +## [obj_orient_graph](#obj_orient_graph) + +### Lua Example +`obj_orient_graph(obj, normalX, normalY, normalZ)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| normalX | `number` | +| normalY | `number` | +| normalZ | `number` | + +### Returns +- None + +### C Prototype +`void obj_orient_graph(struct Object *obj, f32 normalX, f32 normalY, f32 normalZ);` + +[:arrow_up_small:](#) + +
+ +## [calc_obj_friction](#calc_obj_friction) + +### Lua Example +`calc_obj_friction(objFriction, floor_nY)` + +### Parameters +| Field | Type | +| ----- | ---- | +| objFriction | `Pointer` <`number`> | +| floor_nY | `number` | + +### Returns +- None + +### C Prototype +`void calc_obj_friction(f32 *objFriction, f32 floor_nY);` + +[:arrow_up_small:](#) + +
+ ## [calc_new_obj_vel_and_pos_y](#calc_new_obj_vel_and_pos_y) ### Lua Example @@ -6078,42 +6213,300 @@ Gets a player's local index from their global index
-## [calc_obj_friction](#calc_obj_friction) +## [obj_update_pos_vel_xz](#obj_update_pos_vel_xz) ### Lua Example -`calc_obj_friction(objFriction, floor_nY)` +`obj_update_pos_vel_xz()` ### Parameters -| Field | Type | -| ----- | ---- | -| objFriction | `Pointer` <`number`> | -| floor_nY | `number` | +- None ### Returns - None ### C Prototype -`void calc_obj_friction(f32 *objFriction, f32 floor_nY);` +`void obj_update_pos_vel_xz(void);` [:arrow_up_small:](#)
-## [current_mario_room_check](#current_mario_room_check) +## [obj_splash](#obj_splash) ### Lua Example -`local integerValue = current_mario_room_check(room)` +`obj_splash(waterY, objY)` ### Parameters | Field | Type | | ----- | ---- | -| room | `integer` | +| waterY | `integer` | +| objY | `integer` | + +### Returns +- None + +### C Prototype +`void obj_splash(s32 waterY, s32 objY);` + +[:arrow_up_small:](#) + +
+ +## [object_step](#object_step) + +### Lua Example +`local integerValue = object_step()` + +### Parameters +- None ### Returns - `integer` ### C Prototype -`s8 current_mario_room_check(s16 room);` +`s16 object_step(void);` + +[:arrow_up_small:](#) + +
+ +## [object_step_without_floor_orient](#object_step_without_floor_orient) + +### Lua Example +`local integerValue = object_step_without_floor_orient()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s16 object_step_without_floor_orient(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_move_xyz_using_fvel_and_yaw](#obj_move_xyz_using_fvel_and_yaw) + +### Lua Example +`obj_move_xyz_using_fvel_and_yaw(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_move_xyz_using_fvel_and_yaw(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [is_point_within_radius_of_mario](#is_point_within_radius_of_mario) + +### Lua Example +`local integerValue = is_point_within_radius_of_mario(x, y, z, dist)` + +### Parameters +| Field | Type | +| ----- | ---- | +| x | `number` | +| y | `number` | +| z | `number` | +| dist | `integer` | + +### Returns +- `integer` + +### C Prototype +`s8 is_point_within_radius_of_mario(f32 x, f32 y, f32 z, s32 dist);` + +[:arrow_up_small:](#) + +
+ +## [is_point_within_radius_of_any_player](#is_point_within_radius_of_any_player) + +### Lua Example +`local integerValue = is_point_within_radius_of_any_player(x, y, z, dist)` + +### Parameters +| Field | Type | +| ----- | ---- | +| x | `number` | +| y | `number` | +| z | `number` | +| dist | `integer` | + +### Returns +- `integer` + +### C Prototype +`s8 is_point_within_radius_of_any_player(f32 x, f32 y, f32 z, s32 dist);` + +[:arrow_up_small:](#) + +
+ +## [is_player_active](#is_player_active) + +### Lua Example +`local integerValue = is_player_active(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`u8 is_player_active(struct MarioState* m);` + +[:arrow_up_small:](#) + +
+ +## [is_other_player_active](#is_other_player_active) + +### Lua Example +`local integerValue = is_other_player_active()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u8 is_other_player_active(void);` + +[:arrow_up_small:](#) + +
+ +## [is_player_in_local_area](#is_player_in_local_area) + +### Lua Example +`local integerValue = is_player_in_local_area(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- `integer` + +### C Prototype +`u8 is_player_in_local_area(struct MarioState* m);` + +[:arrow_up_small:](#) + +
+ +## [nearest_mario_state_to_object](#nearest_mario_state_to_object) + +### Lua Example +`local MarioStateValue = nearest_mario_state_to_object(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +[MarioState](structs.md#MarioState) + +### C Prototype +`struct MarioState* nearest_mario_state_to_object(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [nearest_possible_mario_state_to_object](#nearest_possible_mario_state_to_object) + +### Lua Example +`local MarioStateValue = nearest_possible_mario_state_to_object(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +[MarioState](structs.md#MarioState) + +### C Prototype +`struct MarioState* nearest_possible_mario_state_to_object(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [nearest_player_to_object](#nearest_player_to_object) + +### Lua Example +`local ObjectValue = nearest_player_to_object(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object* nearest_player_to_object(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [nearest_interacting_mario_state_to_object](#nearest_interacting_mario_state_to_object) + +### Lua Example +`local MarioStateValue = nearest_interacting_mario_state_to_object(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +[MarioState](structs.md#MarioState) + +### C Prototype +`struct MarioState *nearest_interacting_mario_state_to_object(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [nearest_interacting_player_to_object](#nearest_interacting_player_to_object) + +### Lua Example +`local ObjectValue = nearest_interacting_player_to_object(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *nearest_interacting_player_to_object(struct Object *obj);` [:arrow_up_small:](#) @@ -6161,64 +6554,6 @@ Gets a player's local index from their global index
-## [is_other_player_active](#is_other_player_active) - -### Lua Example -`local integerValue = is_other_player_active()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u8 is_other_player_active(void);` - -[:arrow_up_small:](#) - -
- -## [is_player_active](#is_player_active) - -### Lua Example -`local integerValue = is_player_active(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`u8 is_player_active(struct MarioState* m);` - -[:arrow_up_small:](#) - -
- -## [is_player_in_local_area](#is_player_in_local_area) - -### Lua Example -`local integerValue = is_player_in_local_area(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`u8 is_player_in_local_area(struct MarioState* m);` - -[:arrow_up_small:](#) - -
- ## [is_point_close_to_object](#is_point_close_to_object) ### Lua Example @@ -6243,344 +6578,22 @@ Gets a player's local index from their global index
-## [is_point_within_radius_of_any_player](#is_point_within_radius_of_any_player) +## [set_object_visibility](#set_object_visibility) ### Lua Example -`local integerValue = is_point_within_radius_of_any_player(x, y, z, dist)` +`set_object_visibility(obj, dist)` ### Parameters | Field | Type | | ----- | ---- | -| x | `number` | -| y | `number` | -| z | `number` | +| obj | [Object](structs.md#Object) | | dist | `integer` | -### Returns -- `integer` - -### C Prototype -`s8 is_point_within_radius_of_any_player(f32 x, f32 y, f32 z, s32 dist);` - -[:arrow_up_small:](#) - -
- -## [is_point_within_radius_of_mario](#is_point_within_radius_of_mario) - -### Lua Example -`local integerValue = is_point_within_radius_of_mario(x, y, z, dist)` - -### Parameters -| Field | Type | -| ----- | ---- | -| x | `number` | -| y | `number` | -| z | `number` | -| dist | `integer` | - -### Returns -- `integer` - -### C Prototype -`s8 is_point_within_radius_of_mario(f32 x, f32 y, f32 z, s32 dist);` - -[:arrow_up_small:](#) - -
- -## [nearest_interacting_mario_state_to_object](#nearest_interacting_mario_state_to_object) - -### Lua Example -`local MarioStateValue = nearest_interacting_mario_state_to_object(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -[MarioState](structs.md#MarioState) - -### C Prototype -`struct MarioState *nearest_interacting_mario_state_to_object(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [nearest_interacting_player_to_object](#nearest_interacting_player_to_object) - -### Lua Example -`local ObjectValue = nearest_interacting_player_to_object(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *nearest_interacting_player_to_object(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [nearest_mario_state_to_object](#nearest_mario_state_to_object) - -### Lua Example -`local MarioStateValue = nearest_mario_state_to_object(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -[MarioState](structs.md#MarioState) - -### C Prototype -`struct MarioState* nearest_mario_state_to_object(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [nearest_player_to_object](#nearest_player_to_object) - -### Lua Example -`local ObjectValue = nearest_player_to_object(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object* nearest_player_to_object(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [nearest_possible_mario_state_to_object](#nearest_possible_mario_state_to_object) - -### Lua Example -`local MarioStateValue = nearest_possible_mario_state_to_object(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -[MarioState](structs.md#MarioState) - -### C Prototype -`struct MarioState* nearest_possible_mario_state_to_object(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_check_floor_death](#obj_check_floor_death) - -### Lua Example -`obj_check_floor_death(collisionFlags, floor)` - -### Parameters -| Field | Type | -| ----- | ---- | -| collisionFlags | `integer` | -| floor | [Surface](structs.md#Surface) | - ### Returns - None ### C Prototype -`void obj_check_floor_death(s16 collisionFlags, struct Surface *floor);` - -[:arrow_up_small:](#) - -
- -## [obj_check_if_facing_toward_angle](#obj_check_if_facing_toward_angle) - -### Lua Example -`local integerValue = obj_check_if_facing_toward_angle(base, goal, range)` - -### Parameters -| Field | Type | -| ----- | ---- | -| base | `integer` | -| goal | `integer` | -| range | `integer` | - -### Returns -- `integer` - -### C Prototype -`s8 obj_check_if_facing_toward_angle(u32 base, u32 goal, s16 range);` - -[:arrow_up_small:](#) - -
- -## [obj_find_wall](#obj_find_wall) - -### Lua Example -`local integerValue = obj_find_wall(objNewX, objY, objNewZ, objVelX, objVelZ)` - -### Parameters -| Field | Type | -| ----- | ---- | -| objNewX | `number` | -| objY | `number` | -| objNewZ | `number` | -| objVelX | `number` | -| objVelZ | `number` | - -### Returns -- `integer` - -### C Prototype -`s8 obj_find_wall(f32 objNewX, f32 objY, f32 objNewZ, f32 objVelX, f32 objVelZ);` - -[:arrow_up_small:](#) - -
- -## [obj_find_wall_displacement](#obj_find_wall_displacement) - -### Lua Example -`local integerValue = obj_find_wall_displacement(dist, x, y, z, radius)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dist | [Vec3f](structs.md#Vec3f) | -| x | `number` | -| y | `number` | -| z | `number` | -| radius | `number` | - -### Returns -- `integer` - -### C Prototype -`s8 obj_find_wall_displacement(Vec3f dist, f32 x, f32 y, f32 z, f32 radius);` - -[:arrow_up_small:](#) - -
- -## [obj_flicker_and_disappear](#obj_flicker_and_disappear) - -### Lua Example -`local integerValue = obj_flicker_and_disappear(obj, lifeSpan)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| lifeSpan | `integer` | - -### Returns -- `integer` - -### C Prototype -`s8 obj_flicker_and_disappear(struct Object *obj, s16 lifeSpan);` - -[:arrow_up_small:](#) - -
- -## [obj_lava_death](#obj_lava_death) - -### Lua Example -`local integerValue = obj_lava_death()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s8 obj_lava_death(void);` - -[:arrow_up_small:](#) - -
- -## [obj_move_xyz_using_fvel_and_yaw](#obj_move_xyz_using_fvel_and_yaw) - -### Lua Example -`obj_move_xyz_using_fvel_and_yaw(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_move_xyz_using_fvel_and_yaw(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_orient_graph](#obj_orient_graph) - -### Lua Example -`obj_orient_graph(obj, normalX, normalY, normalZ)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| normalX | `number` | -| normalY | `number` | -| normalZ | `number` | - -### Returns -- None - -### C Prototype -`void obj_orient_graph(struct Object *obj, f32 normalX, f32 normalY, f32 normalZ);` - -[:arrow_up_small:](#) - -
- -## [obj_return_and_displace_home](#obj_return_and_displace_home) - -### Lua Example -`obj_return_and_displace_home(obj, homeX, homeY, homeZ, baseDisp)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| homeX | `number` | -| homeY | `number` | -| homeZ | `number` | -| baseDisp | `integer` | - -### Returns -- None - -### C Prototype -`void obj_return_and_displace_home(struct Object *obj, f32 homeX, UNUSED f32 homeY, f32 homeZ, s32 baseDisp);` +`void set_object_visibility(struct Object *obj, s32 dist);` [:arrow_up_small:](#) @@ -6610,6 +6623,76 @@ Gets a player's local index from their global index
+## [obj_return_and_displace_home](#obj_return_and_displace_home) + +### Lua Example +`obj_return_and_displace_home(obj, homeX, homeY, homeZ, baseDisp)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| homeX | `number` | +| homeY | `number` | +| homeZ | `number` | +| baseDisp | `integer` | + +### Returns +- None + +### C Prototype +`void obj_return_and_displace_home(struct Object *obj, f32 homeX, UNUSED f32 homeY, f32 homeZ, s32 baseDisp);` + +[:arrow_up_small:](#) + +
+ +## [obj_check_if_facing_toward_angle](#obj_check_if_facing_toward_angle) + +### Lua Example +`local integerValue = obj_check_if_facing_toward_angle(base, goal, range)` + +### Parameters +| Field | Type | +| ----- | ---- | +| base | `integer` | +| goal | `integer` | +| range | `integer` | + +### Returns +- `integer` + +### C Prototype +`s8 obj_check_if_facing_toward_angle(u32 base, u32 goal, s16 range);` + +[:arrow_up_small:](#) + +
+ +## [obj_find_wall_displacement](#obj_find_wall_displacement) + +### Lua Example +`local integerValue = obj_find_wall_displacement(dist, x, y, z, radius)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dist | [Vec3f](structs.md#Vec3f) | +| x | `number` | +| y | `number` | +| z | `number` | +| radius | `number` | + +### Returns +- `integer` + +### C Prototype +`s8 obj_find_wall_displacement(Vec3f dist, f32 x, f32 y, f32 z, f32 radius);` + +[:arrow_up_small:](#) + +
+ ## [obj_spawn_yellow_coins](#obj_spawn_yellow_coins) ### Lua Example @@ -6631,115 +6714,81 @@ Gets a player's local index from their global index
-## [obj_splash](#obj_splash) +## [obj_flicker_and_disappear](#obj_flicker_and_disappear) ### Lua Example -`obj_splash(waterY, objY)` - -### Parameters -| Field | Type | -| ----- | ---- | -| waterY | `integer` | -| objY | `integer` | - -### Returns -- None - -### C Prototype -`void obj_splash(s32 waterY, s32 objY);` - -[:arrow_up_small:](#) - -
- -## [obj_update_pos_vel_xz](#obj_update_pos_vel_xz) - -### Lua Example -`obj_update_pos_vel_xz()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void obj_update_pos_vel_xz(void);` - -[:arrow_up_small:](#) - -
- -## [object_step](#object_step) - -### Lua Example -`local integerValue = object_step()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s16 object_step(void);` - -[:arrow_up_small:](#) - -
- -## [object_step_without_floor_orient](#object_step_without_floor_orient) - -### Lua Example -`local integerValue = object_step_without_floor_orient()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s16 object_step_without_floor_orient(void);` - -[:arrow_up_small:](#) - -
- -## [set_object_visibility](#set_object_visibility) - -### Lua Example -`set_object_visibility(obj, dist)` +`local integerValue = obj_flicker_and_disappear(obj, lifeSpan)` ### Parameters | Field | Type | | ----- | ---- | | obj | [Object](structs.md#Object) | -| dist | `integer` | +| lifeSpan | `integer` | ### Returns -- None +- `integer` ### C Prototype -`void set_object_visibility(struct Object *obj, s32 dist);` +`s8 obj_flicker_and_disappear(struct Object *obj, s16 lifeSpan);` [:arrow_up_small:](#)
-## [set_yoshi_as_not_dead](#set_yoshi_as_not_dead) +## [current_mario_room_check](#current_mario_room_check) ### Lua Example -`set_yoshi_as_not_dead()` +`local integerValue = current_mario_room_check(room)` ### Parameters -- None +| Field | Type | +| ----- | ---- | +| room | `integer` | + +### Returns +- `integer` + +### C Prototype +`s8 current_mario_room_check(s16 room);` + +[:arrow_up_small:](#) + +
+ +## [obj_check_floor_death](#obj_check_floor_death) + +### Lua Example +`obj_check_floor_death(collisionFlags, floor)` + +### Parameters +| Field | Type | +| ----- | ---- | +| collisionFlags | `integer` | +| floor | [Surface](structs.md#Surface) | ### Returns - None ### C Prototype -`void set_yoshi_as_not_dead(void);` +`void obj_check_floor_death(s16 collisionFlags, struct Surface *floor);` + +[:arrow_up_small:](#) + +
+ +## [obj_lava_death](#obj_lava_death) + +### Lua Example +`local integerValue = obj_lava_death()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s8 obj_lava_death(void);` [:arrow_up_small:](#) @@ -6766,55 +6815,6 @@ Gets a player's local index from their global index [:arrow_up_small:](#) -
- -## [turn_obj_away_from_steep_floor](#turn_obj_away_from_steep_floor) - -### Lua Example -`local integerValue = turn_obj_away_from_steep_floor(objFloor, floorY, objVelX, objVelZ)` - -### Parameters -| Field | Type | -| ----- | ---- | -| objFloor | [Surface](structs.md#Surface) | -| floorY | `number` | -| objVelX | `number` | -| objVelZ | `number` | - -### Returns -- `integer` - -### C Prototype -`s8 turn_obj_away_from_steep_floor(struct Surface *objFloor, f32 floorY, f32 objVelX, f32 objVelZ);` - -[:arrow_up_small:](#) - -
- -## [turn_obj_away_from_surface](#turn_obj_away_from_surface) - -### Lua Example -`turn_obj_away_from_surface(velX, velZ, nX, nY, nZ, objYawX, objYawZ)` - -### Parameters -| Field | Type | -| ----- | ---- | -| velX | `number` | -| velZ | `number` | -| nX | `number` | -| nY | `number` | -| nZ | `number` | -| objYawX | `Pointer` <`number`> | -| objYawZ | `Pointer` <`number`> | - -### Returns -- None - -### C Prototype -`void turn_obj_away_from_surface(f32 velX, f32 velZ, f32 nX, UNUSED f32 nY, f32 nZ, f32 *objYawX, f32 *objYawZ);` - -[:arrow_up_small:](#) -
--- diff --git a/docs/lua/functions-5.md b/docs/lua/functions-5.md index 16ca8588e..7d8a958ab 100644 --- a/docs/lua/functions-5.md +++ b/docs/lua/functions-5.md @@ -11,23 +11,204 @@
-## [approach_f32_ptr](#approach_f32_ptr) +## [obj_is_rendering_enabled](#obj_is_rendering_enabled) ### Lua Example -`local integerValue = approach_f32_ptr(px, target, delta)` +`local integerValue = obj_is_rendering_enabled()` ### Parameters -| Field | Type | -| ----- | ---- | -| px | `Pointer` <`number`> | -| target | `number` | -| delta | `number` | +- None ### Returns - `integer` ### C Prototype -`s32 approach_f32_ptr(f32 *px, f32 target, f32 delta);` +`s32 obj_is_rendering_enabled(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_pitch_from_vel](#obj_get_pitch_from_vel) + +### Lua Example +`local integerValue = obj_get_pitch_from_vel()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s16 obj_get_pitch_from_vel(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_dist_from_home](#obj_set_dist_from_home) + +### Lua Example +`obj_set_dist_from_home(distFromHome)` + +### Parameters +| Field | Type | +| ----- | ---- | +| distFromHome | `number` | + +### Returns +- None + +### C Prototype +`void obj_set_dist_from_home(f32 distFromHome);` + +[:arrow_up_small:](#) + +
+ +## [obj_is_near_to_and_facing_mario](#obj_is_near_to_and_facing_mario) + +### Lua Example +`local integerValue = obj_is_near_to_and_facing_mario(m, maxDist, maxAngleDiff)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| maxDist | `number` | +| maxAngleDiff | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 obj_is_near_to_and_facing_mario(struct MarioState* m, f32 maxDist, s16 maxAngleDiff);` + +[:arrow_up_small:](#) + +
+ +## [platform_on_track_update_pos_or_spawn_ball](#platform_on_track_update_pos_or_spawn_ball) + +### Lua Example +`platform_on_track_update_pos_or_spawn_ball(ballIndex, x, y, z)` + +### Parameters +| Field | Type | +| ----- | ---- | +| ballIndex | `integer` | +| x | `number` | +| y | `number` | +| z | `number` | + +### Returns +- None + +### C Prototype +`void platform_on_track_update_pos_or_spawn_ball(s32 ballIndex, f32 x, f32 y, f32 z);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_spin_all_dimensions](#cur_obj_spin_all_dimensions) + +### Lua Example +`cur_obj_spin_all_dimensions(arg0, arg1)` + +### Parameters +| Field | Type | +| ----- | ---- | +| arg0 | `number` | +| arg1 | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_spin_all_dimensions(f32 arg0, f32 arg1);` + +[:arrow_up_small:](#) + +
+ +## [obj_rotate_yaw_and_bounce_off_walls](#obj_rotate_yaw_and_bounce_off_walls) + +### Lua Example +`obj_rotate_yaw_and_bounce_off_walls(targetYaw, turnAmount)` + +### Parameters +| Field | Type | +| ----- | ---- | +| targetYaw | `integer` | +| turnAmount | `integer` | + +### Returns +- None + +### C Prototype +`void obj_rotate_yaw_and_bounce_off_walls(s16 targetYaw, s16 turnAmount);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_pitch_to_home](#obj_get_pitch_to_home) + +### Lua Example +`local integerValue = obj_get_pitch_to_home(latDistToHome)` + +### Parameters +| Field | Type | +| ----- | ---- | +| latDistToHome | `number` | + +### Returns +- `integer` + +### C Prototype +`s16 obj_get_pitch_to_home(f32 latDistToHome);` + +[:arrow_up_small:](#) + +
+ +## [obj_compute_vel_from_move_pitch](#obj_compute_vel_from_move_pitch) + +### Lua Example +`obj_compute_vel_from_move_pitch(speed)` + +### Parameters +| Field | Type | +| ----- | ---- | +| speed | `number` | + +### Returns +- None + +### C Prototype +`void obj_compute_vel_from_move_pitch(f32 speed);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_init_anim_extend](#cur_obj_init_anim_extend) + +### Lua Example +`cur_obj_init_anim_extend(arg0)` + +### Parameters +| Field | Type | +| ----- | ---- | +| arg0 | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_init_anim_extend(s32 arg0);` [:arrow_up_small:](#) @@ -74,10 +255,10 @@
-## [cur_obj_init_anim_extend](#cur_obj_init_anim_extend) +## [cur_obj_set_anim_if_at_end](#cur_obj_set_anim_if_at_end) ### Lua Example -`cur_obj_init_anim_extend(arg0)` +`local integerValue = cur_obj_set_anim_if_at_end(arg0)` ### Parameters | Field | Type | @@ -85,10 +266,10 @@ | arg0 | `integer` | ### Returns -- None +- `integer` ### C Prototype -`void cur_obj_init_anim_extend(s32 arg0);` +`s32 cur_obj_set_anim_if_at_end(s32 arg0);` [:arrow_up_small:](#) @@ -116,242 +297,45 @@
-## [cur_obj_set_anim_if_at_end](#cur_obj_set_anim_if_at_end) +## [obj_turn_pitch_toward_mario](#obj_turn_pitch_toward_mario) ### Lua Example -`local integerValue = cur_obj_set_anim_if_at_end(arg0)` +`local integerValue = obj_turn_pitch_toward_mario(m, targetOffsetY, turnAmount)` ### Parameters | Field | Type | | ----- | ---- | -| arg0 | `integer` | +| m | [MarioState](structs.md#MarioState) | +| targetOffsetY | `number` | +| turnAmount | `integer` | ### Returns - `integer` ### C Prototype -`s32 cur_obj_set_anim_if_at_end(s32 arg0);` +`s16 obj_turn_pitch_toward_mario(struct MarioState* m, f32 targetOffsetY, s16 turnAmount);` [:arrow_up_small:](#)
-## [cur_obj_spin_all_dimensions](#cur_obj_spin_all_dimensions) +## [approach_f32_ptr](#approach_f32_ptr) ### Lua Example -`cur_obj_spin_all_dimensions(arg0, arg1)` +`local integerValue = approach_f32_ptr(px, target, delta)` ### Parameters | Field | Type | | ----- | ---- | -| arg0 | `number` | -| arg1 | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_spin_all_dimensions(f32 arg0, f32 arg1);` - -[:arrow_up_small:](#) - -
- -## [obj_act_knockback](#obj_act_knockback) - -### Lua Example -`obj_act_knockback(baseScale)` - -### Parameters -| Field | Type | -| ----- | ---- | -| baseScale | `number` | - -### Returns -- None - -### C Prototype -`void obj_act_knockback(UNUSED f32 baseScale);` - -[:arrow_up_small:](#) - -
- -## [obj_act_squished](#obj_act_squished) - -### Lua Example -`obj_act_squished(baseScale)` - -### Parameters -| Field | Type | -| ----- | ---- | -| baseScale | `number` | - -### Returns -- None - -### C Prototype -`void obj_act_squished(f32 baseScale);` - -[:arrow_up_small:](#) - -
- -## [obj_bounce_off_walls_edges_objects](#obj_bounce_off_walls_edges_objects) - -### Lua Example -`local integerValue = obj_bounce_off_walls_edges_objects(targetYaw)` - -### Parameters -| Field | Type | -| ----- | ---- | -| targetYaw | `Pointer` <`integer`> | +| px | `Pointer` <`number`> | +| target | `number` | +| delta | `number` | ### Returns - `integer` ### C Prototype -`s32 obj_bounce_off_walls_edges_objects(s32 *targetYaw);` - -[:arrow_up_small:](#) - -
- -## [obj_check_attacks](#obj_check_attacks) - -### Lua Example -`local integerValue = obj_check_attacks(hitbox, attackedMarioAction)` - -### Parameters -| Field | Type | -| ----- | ---- | -| hitbox | [ObjectHitbox](structs.md#ObjectHitbox) | -| attackedMarioAction | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 obj_check_attacks(struct ObjectHitbox *hitbox, s32 attackedMarioAction);` - -[:arrow_up_small:](#) - -
- -## [obj_compute_vel_from_move_pitch](#obj_compute_vel_from_move_pitch) - -### Lua Example -`obj_compute_vel_from_move_pitch(speed)` - -### Parameters -| Field | Type | -| ----- | ---- | -| speed | `number` | - -### Returns -- None - -### C Prototype -`void obj_compute_vel_from_move_pitch(f32 speed);` - -[:arrow_up_small:](#) - -
- -## [obj_die_if_above_lava_and_health_non_positive](#obj_die_if_above_lava_and_health_non_positive) - -### Lua Example -`local integerValue = obj_die_if_above_lava_and_health_non_positive()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 obj_die_if_above_lava_and_health_non_positive(void);` - -[:arrow_up_small:](#) - -
- -## [obj_die_if_health_non_positive](#obj_die_if_health_non_positive) - -### Lua Example -`obj_die_if_health_non_positive()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void obj_die_if_health_non_positive(void);` - -[:arrow_up_small:](#) - -
- -## [obj_face_pitch_approach](#obj_face_pitch_approach) - -### Lua Example -`local integerValue = obj_face_pitch_approach(targetPitch, deltaPitch)` - -### Parameters -| Field | Type | -| ----- | ---- | -| targetPitch | `integer` | -| deltaPitch | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 obj_face_pitch_approach(s16 targetPitch, s16 deltaPitch);` - -[:arrow_up_small:](#) - -
- -## [obj_face_roll_approach](#obj_face_roll_approach) - -### Lua Example -`local integerValue = obj_face_roll_approach(targetRoll, deltaRoll)` - -### Parameters -| Field | Type | -| ----- | ---- | -| targetRoll | `integer` | -| deltaRoll | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 obj_face_roll_approach(s16 targetRoll, s16 deltaRoll);` - -[:arrow_up_small:](#) - -
- -## [obj_face_yaw_approach](#obj_face_yaw_approach) - -### Lua Example -`local integerValue = obj_face_yaw_approach(targetYaw, deltaYaw)` - -### Parameters -| Field | Type | -| ----- | ---- | -| targetYaw | `integer` | -| deltaYaw | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 obj_face_yaw_approach(s16 targetYaw, s16 deltaYaw);` +`s32 approach_f32_ptr(f32 *px, f32 target, f32 delta);` [:arrow_up_small:](#) @@ -378,143 +362,22 @@
-## [obj_get_pitch_from_vel](#obj_get_pitch_from_vel) +## [obj_y_vel_approach](#obj_y_vel_approach) ### Lua Example -`local integerValue = obj_get_pitch_from_vel()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s16 obj_get_pitch_from_vel(void);` - -[:arrow_up_small:](#) - -
- -## [obj_get_pitch_to_home](#obj_get_pitch_to_home) - -### Lua Example -`local integerValue = obj_get_pitch_to_home(latDistToHome)` +`local integerValue = obj_y_vel_approach(target, delta)` ### Parameters | Field | Type | | ----- | ---- | -| latDistToHome | `number` | +| target | `number` | +| delta | `number` | ### Returns - `integer` ### C Prototype -`s16 obj_get_pitch_to_home(f32 latDistToHome);` - -[:arrow_up_small:](#) - -
- -## [obj_grow_then_shrink](#obj_grow_then_shrink) - -### Lua Example -`local integerValue = obj_grow_then_shrink(scaleVel, shootFireScale, endScale)` - -### Parameters -| Field | Type | -| ----- | ---- | -| scaleVel | `Pointer` <`number`> | -| shootFireScale | `number` | -| endScale | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 obj_grow_then_shrink(f32 *scaleVel, f32 shootFireScale, f32 endScale);` - -[:arrow_up_small:](#) - -
- -## [obj_handle_attacks](#obj_handle_attacks) - -### Lua Example -`local integerValue = obj_handle_attacks(hitbox, attackedMarioAction, attackHandlers)` - -### Parameters -| Field | Type | -| ----- | ---- | -| hitbox | [ObjectHitbox](structs.md#ObjectHitbox) | -| attackedMarioAction | `integer` | -| attackHandlers | `Pointer` <`integer`> | - -### Returns -- `integer` - -### C Prototype -`s32 obj_handle_attacks(struct ObjectHitbox *hitbox, s32 attackedMarioAction, u8 *attackHandlers);` - -[:arrow_up_small:](#) - -
- -## [obj_is_near_to_and_facing_mario](#obj_is_near_to_and_facing_mario) - -### Lua Example -`local integerValue = obj_is_near_to_and_facing_mario(m, maxDist, maxAngleDiff)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| maxDist | `number` | -| maxAngleDiff | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 obj_is_near_to_and_facing_mario(struct MarioState* m, f32 maxDist, s16 maxAngleDiff);` - -[:arrow_up_small:](#) - -
- -## [obj_is_rendering_enabled](#obj_is_rendering_enabled) - -### Lua Example -`local integerValue = obj_is_rendering_enabled()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 obj_is_rendering_enabled(void);` - -[:arrow_up_small:](#) - -
- -## [obj_move_for_one_second](#obj_move_for_one_second) - -### Lua Example -`local integerValue = obj_move_for_one_second(endAction)` - -### Parameters -| Field | Type | -| ----- | ---- | -| endAction | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 obj_move_for_one_second(s32 endAction);` +`s32 obj_y_vel_approach(f32 target, f32 delta);` [:arrow_up_small:](#) @@ -541,163 +404,64 @@
-## [obj_random_fixed_turn](#obj_random_fixed_turn) +## [obj_face_pitch_approach](#obj_face_pitch_approach) ### Lua Example -`local integerValue = obj_random_fixed_turn(delta)` +`local integerValue = obj_face_pitch_approach(targetPitch, deltaPitch)` ### Parameters | Field | Type | | ----- | ---- | -| delta | `integer` | +| targetPitch | `integer` | +| deltaPitch | `integer` | ### Returns - `integer` ### C Prototype -`s16 obj_random_fixed_turn(s16 delta);` +`s32 obj_face_pitch_approach(s16 targetPitch, s16 deltaPitch);` [:arrow_up_small:](#)
-## [obj_resolve_collisions_and_turn](#obj_resolve_collisions_and_turn) +## [obj_face_yaw_approach](#obj_face_yaw_approach) ### Lua Example -`local integerValue = obj_resolve_collisions_and_turn(targetYaw, turnSpeed)` +`local integerValue = obj_face_yaw_approach(targetYaw, deltaYaw)` ### Parameters | Field | Type | | ----- | ---- | | targetYaw | `integer` | -| turnSpeed | `integer` | +| deltaYaw | `integer` | ### Returns - `integer` ### C Prototype -`s32 obj_resolve_collisions_and_turn(s16 targetYaw, s16 turnSpeed);` +`s32 obj_face_yaw_approach(s16 targetYaw, s16 deltaYaw);` [:arrow_up_small:](#)
-## [obj_resolve_object_collisions](#obj_resolve_object_collisions) +## [obj_face_roll_approach](#obj_face_roll_approach) ### Lua Example -`local integerValue = obj_resolve_object_collisions(targetYaw)` +`local integerValue = obj_face_roll_approach(targetRoll, deltaRoll)` ### Parameters | Field | Type | | ----- | ---- | -| targetYaw | `Pointer` <`integer`> | +| targetRoll | `integer` | +| deltaRoll | `integer` | ### Returns - `integer` ### C Prototype -`s32 obj_resolve_object_collisions(s32 *targetYaw);` - -[:arrow_up_small:](#) - -
- -## [obj_roll_to_match_yaw_turn](#obj_roll_to_match_yaw_turn) - -### Lua Example -`obj_roll_to_match_yaw_turn(targetYaw, maxRoll, rollSpeed)` - -### Parameters -| Field | Type | -| ----- | ---- | -| targetYaw | `integer` | -| maxRoll | `integer` | -| rollSpeed | `integer` | - -### Returns -- None - -### C Prototype -`void obj_roll_to_match_yaw_turn(s16 targetYaw, s16 maxRoll, s16 rollSpeed);` - -[:arrow_up_small:](#) - -
- -## [obj_rotate_yaw_and_bounce_off_walls](#obj_rotate_yaw_and_bounce_off_walls) - -### Lua Example -`obj_rotate_yaw_and_bounce_off_walls(targetYaw, turnAmount)` - -### Parameters -| Field | Type | -| ----- | ---- | -| targetYaw | `integer` | -| turnAmount | `integer` | - -### Returns -- None - -### C Prototype -`void obj_rotate_yaw_and_bounce_off_walls(s16 targetYaw, s16 turnAmount);` - -[:arrow_up_small:](#) - -
- -## [obj_set_dist_from_home](#obj_set_dist_from_home) - -### Lua Example -`obj_set_dist_from_home(distFromHome)` - -### Parameters -| Field | Type | -| ----- | ---- | -| distFromHome | `number` | - -### Returns -- None - -### C Prototype -`void obj_set_dist_from_home(f32 distFromHome);` - -[:arrow_up_small:](#) - -
- -## [obj_set_knockback_action](#obj_set_knockback_action) - -### Lua Example -`obj_set_knockback_action(attackType)` - -### Parameters -| Field | Type | -| ----- | ---- | -| attackType | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_knockback_action(s32 attackType);` - -[:arrow_up_small:](#) - -
- -## [obj_set_squished_action](#obj_set_squished_action) - -### Lua Example -`obj_set_squished_action()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void obj_set_squished_action(void);` +`s32 obj_face_roll_approach(s16 targetRoll, s16 deltaRoll);` [:arrow_up_small:](#) @@ -729,180 +493,23 @@
-## [obj_spit_fire](#obj_spit_fire) +## [obj_roll_to_match_yaw_turn](#obj_roll_to_match_yaw_turn) ### Lua Example -`local ObjectValue = obj_spit_fire(relativePosX, relativePosY, relativePosZ, scale, model, startSpeed, endSpeed, movePitch)` +`obj_roll_to_match_yaw_turn(targetYaw, maxRoll, rollSpeed)` ### Parameters | Field | Type | | ----- | ---- | -| relativePosX | `integer` | -| relativePosY | `integer` | -| relativePosZ | `integer` | -| scale | `number` | -| model | `integer` | -| startSpeed | `number` | -| endSpeed | `number` | -| movePitch | `integer` | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object* obj_spit_fire(s16 relativePosX, s16 relativePosY, s16 relativePosZ, f32 scale, s32 model, f32 startSpeed, f32 endSpeed, s16 movePitch);` - -[:arrow_up_small:](#) - -
- -## [obj_turn_pitch_toward_mario](#obj_turn_pitch_toward_mario) - -### Lua Example -`local integerValue = obj_turn_pitch_toward_mario(m, targetOffsetY, turnAmount)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| targetOffsetY | `number` | -| turnAmount | `integer` | - -### Returns -- `integer` - -### C Prototype -`s16 obj_turn_pitch_toward_mario(struct MarioState* m, f32 targetOffsetY, s16 turnAmount);` - -[:arrow_up_small:](#) - -
- -## [obj_unused_die](#obj_unused_die) - -### Lua Example -`obj_unused_die()` - -### Parameters -- None +| targetYaw | `integer` | +| maxRoll | `integer` | +| rollSpeed | `integer` | ### Returns - None ### C Prototype -`void obj_unused_die(void);` - -[:arrow_up_small:](#) - -
- -## [obj_update_blinking](#obj_update_blinking) - -### Lua Example -`obj_update_blinking(blinkTimer, baseCycleLength, cycleLengthRange, blinkLength)` - -### Parameters -| Field | Type | -| ----- | ---- | -| blinkTimer | `Pointer` <`integer`> | -| baseCycleLength | `integer` | -| cycleLengthRange | `integer` | -| blinkLength | `integer` | - -### Returns -- None - -### C Prototype -`void obj_update_blinking(s32 *blinkTimer, s16 baseCycleLength, s16 cycleLengthRange, s16 blinkLength);` - -[:arrow_up_small:](#) - -
- -## [obj_update_standard_actions](#obj_update_standard_actions) - -### Lua Example -`local integerValue = obj_update_standard_actions(scale)` - -### Parameters -| Field | Type | -| ----- | ---- | -| scale | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 obj_update_standard_actions(f32 scale);` - -[:arrow_up_small:](#) - -
- -## [obj_y_vel_approach](#obj_y_vel_approach) - -### Lua Example -`local integerValue = obj_y_vel_approach(target, delta)` - -### Parameters -| Field | Type | -| ----- | ---- | -| target | `number` | -| delta | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 obj_y_vel_approach(f32 target, f32 delta);` - -[:arrow_up_small:](#) - -
- -## [oscillate_toward](#oscillate_toward) - -### Lua Example -`local integerValue = oscillate_toward(value, vel, target, velCloseToZero, accel, slowdown)` - -### Parameters -| Field | Type | -| ----- | ---- | -| value | `Pointer` <`integer`> | -| vel | `Pointer` <`number`> | -| target | `integer` | -| velCloseToZero | `number` | -| accel | `number` | -| slowdown | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 oscillate_toward(s32 *value, f32 *vel, s32 target, f32 velCloseToZero, f32 accel, f32 slowdown);` - -[:arrow_up_small:](#) - -
- -## [platform_on_track_update_pos_or_spawn_ball](#platform_on_track_update_pos_or_spawn_ball) - -### Lua Example -`platform_on_track_update_pos_or_spawn_ball(ballIndex, x, y, z)` - -### Parameters -| Field | Type | -| ----- | ---- | -| ballIndex | `integer` | -| x | `number` | -| y | `number` | -| z | `number` | - -### Returns -- None - -### C Prototype -`void platform_on_track_update_pos_or_spawn_ball(s32 ballIndex, f32 x, f32 y, f32 z);` +`void obj_roll_to_match_yaw_turn(s16 targetYaw, s16 maxRoll, s16 rollSpeed);` [:arrow_up_small:](#) @@ -951,6 +558,372 @@
+## [obj_random_fixed_turn](#obj_random_fixed_turn) + +### Lua Example +`local integerValue = obj_random_fixed_turn(delta)` + +### Parameters +| Field | Type | +| ----- | ---- | +| delta | `integer` | + +### Returns +- `integer` + +### C Prototype +`s16 obj_random_fixed_turn(s16 delta);` + +[:arrow_up_small:](#) + +
+ +## [obj_grow_then_shrink](#obj_grow_then_shrink) + +### Lua Example +`local integerValue = obj_grow_then_shrink(scaleVel, shootFireScale, endScale)` + +### Parameters +| Field | Type | +| ----- | ---- | +| scaleVel | `Pointer` <`number`> | +| shootFireScale | `number` | +| endScale | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 obj_grow_then_shrink(f32 *scaleVel, f32 shootFireScale, f32 endScale);` + +[:arrow_up_small:](#) + +
+ +## [oscillate_toward](#oscillate_toward) + +### Lua Example +`local integerValue = oscillate_toward(value, vel, target, velCloseToZero, accel, slowdown)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `Pointer` <`integer`> | +| vel | `Pointer` <`number`> | +| target | `integer` | +| velCloseToZero | `number` | +| accel | `number` | +| slowdown | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 oscillate_toward(s32 *value, f32 *vel, s32 target, f32 velCloseToZero, f32 accel, f32 slowdown);` + +[:arrow_up_small:](#) + +
+ +## [obj_update_blinking](#obj_update_blinking) + +### Lua Example +`obj_update_blinking(blinkTimer, baseCycleLength, cycleLengthRange, blinkLength)` + +### Parameters +| Field | Type | +| ----- | ---- | +| blinkTimer | `Pointer` <`integer`> | +| baseCycleLength | `integer` | +| cycleLengthRange | `integer` | +| blinkLength | `integer` | + +### Returns +- None + +### C Prototype +`void obj_update_blinking(s32 *blinkTimer, s16 baseCycleLength, s16 cycleLengthRange, s16 blinkLength);` + +[:arrow_up_small:](#) + +
+ +## [obj_resolve_object_collisions](#obj_resolve_object_collisions) + +### Lua Example +`local integerValue = obj_resolve_object_collisions(targetYaw)` + +### Parameters +| Field | Type | +| ----- | ---- | +| targetYaw | `Pointer` <`integer`> | + +### Returns +- `integer` + +### C Prototype +`s32 obj_resolve_object_collisions(s32 *targetYaw);` + +[:arrow_up_small:](#) + +
+ +## [obj_bounce_off_walls_edges_objects](#obj_bounce_off_walls_edges_objects) + +### Lua Example +`local integerValue = obj_bounce_off_walls_edges_objects(targetYaw)` + +### Parameters +| Field | Type | +| ----- | ---- | +| targetYaw | `Pointer` <`integer`> | + +### Returns +- `integer` + +### C Prototype +`s32 obj_bounce_off_walls_edges_objects(s32 *targetYaw);` + +[:arrow_up_small:](#) + +
+ +## [obj_resolve_collisions_and_turn](#obj_resolve_collisions_and_turn) + +### Lua Example +`local integerValue = obj_resolve_collisions_and_turn(targetYaw, turnSpeed)` + +### Parameters +| Field | Type | +| ----- | ---- | +| targetYaw | `integer` | +| turnSpeed | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 obj_resolve_collisions_and_turn(s16 targetYaw, s16 turnSpeed);` + +[:arrow_up_small:](#) + +
+ +## [obj_die_if_health_non_positive](#obj_die_if_health_non_positive) + +### Lua Example +`obj_die_if_health_non_positive()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void obj_die_if_health_non_positive(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_unused_die](#obj_unused_die) + +### Lua Example +`obj_unused_die()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void obj_unused_die(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_knockback_action](#obj_set_knockback_action) + +### Lua Example +`obj_set_knockback_action(attackType)` + +### Parameters +| Field | Type | +| ----- | ---- | +| attackType | `integer` | + +### Returns +- None + +### C Prototype +`void obj_set_knockback_action(s32 attackType);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_squished_action](#obj_set_squished_action) + +### Lua Example +`obj_set_squished_action()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void obj_set_squished_action(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_die_if_above_lava_and_health_non_positive](#obj_die_if_above_lava_and_health_non_positive) + +### Lua Example +`local integerValue = obj_die_if_above_lava_and_health_non_positive()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 obj_die_if_above_lava_and_health_non_positive(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_handle_attacks](#obj_handle_attacks) + +### Lua Example +`local integerValue = obj_handle_attacks(hitbox, attackedMarioAction, attackHandlers)` + +### Parameters +| Field | Type | +| ----- | ---- | +| hitbox | [ObjectHitbox](structs.md#ObjectHitbox) | +| attackedMarioAction | `integer` | +| attackHandlers | `Pointer` <`integer`> | + +### Returns +- `integer` + +### C Prototype +`s32 obj_handle_attacks(struct ObjectHitbox *hitbox, s32 attackedMarioAction, u8 *attackHandlers);` + +[:arrow_up_small:](#) + +
+ +## [obj_act_knockback](#obj_act_knockback) + +### Lua Example +`obj_act_knockback(baseScale)` + +### Parameters +| Field | Type | +| ----- | ---- | +| baseScale | `number` | + +### Returns +- None + +### C Prototype +`void obj_act_knockback(UNUSED f32 baseScale);` + +[:arrow_up_small:](#) + +
+ +## [obj_act_squished](#obj_act_squished) + +### Lua Example +`obj_act_squished(baseScale)` + +### Parameters +| Field | Type | +| ----- | ---- | +| baseScale | `number` | + +### Returns +- None + +### C Prototype +`void obj_act_squished(f32 baseScale);` + +[:arrow_up_small:](#) + +
+ +## [obj_update_standard_actions](#obj_update_standard_actions) + +### Lua Example +`local integerValue = obj_update_standard_actions(scale)` + +### Parameters +| Field | Type | +| ----- | ---- | +| scale | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 obj_update_standard_actions(f32 scale);` + +[:arrow_up_small:](#) + +
+ +## [obj_check_attacks](#obj_check_attacks) + +### Lua Example +`local integerValue = obj_check_attacks(hitbox, attackedMarioAction)` + +### Parameters +| Field | Type | +| ----- | ---- | +| hitbox | [ObjectHitbox](structs.md#ObjectHitbox) | +| attackedMarioAction | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 obj_check_attacks(struct ObjectHitbox *hitbox, s32 attackedMarioAction);` + +[:arrow_up_small:](#) + +
+ +## [obj_move_for_one_second](#obj_move_for_one_second) + +### Lua Example +`local integerValue = obj_move_for_one_second(endAction)` + +### Parameters +| Field | Type | +| ----- | ---- | +| endAction | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 obj_move_for_one_second(s32 endAction);` + +[:arrow_up_small:](#) + +
+ ## [treat_far_home_as_mario](#treat_far_home_as_mario) ### Lua Example @@ -973,49 +946,247 @@
+## [obj_spit_fire](#obj_spit_fire) + +### Lua Example +`local ObjectValue = obj_spit_fire(relativePosX, relativePosY, relativePosZ, scale, model, startSpeed, endSpeed, movePitch)` + +### Parameters +| Field | Type | +| ----- | ---- | +| relativePosX | `integer` | +| relativePosY | `integer` | +| relativePosZ | `integer` | +| scale | `number` | +| model | `integer` | +| startSpeed | `number` | +| endSpeed | `number` | +| movePitch | `integer` | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object* obj_spit_fire(s16 relativePosX, s16 relativePosY, s16 relativePosZ, f32 scale, s32 model, f32 startSpeed, f32 endSpeed, s16 movePitch);` + +[:arrow_up_small:](#) + +
+ --- # functions from object_helpers.c
-## [abs_angle_diff](#abs_angle_diff) +## [clear_move_flag](#clear_move_flag) ### Lua Example -`local integerValue = abs_angle_diff(x0, x1)` +`local integerValue = clear_move_flag(bitSet, flag)` ### Parameters | Field | Type | | ----- | ---- | -| x0 | `integer` | -| x1 | `integer` | +| bitSet | `Pointer` <`integer`> | +| flag | `integer` | ### Returns - `integer` ### C Prototype -`s16 abs_angle_diff(s16 x0, s16 x1);` +`s32 clear_move_flag(u32 *bitSet, s32 flag);` [:arrow_up_small:](#)
-## [apply_drag_to_value](#apply_drag_to_value) +## [set_room_override](#set_room_override) ### Lua Example -`apply_drag_to_value(value, dragStrength)` +`set_room_override(room)` ### Parameters | Field | Type | | ----- | ---- | -| value | `Pointer` <`number`> | -| dragStrength | `number` | +| room | `integer` | ### Returns - None ### C Prototype -`void apply_drag_to_value(f32 *value, f32 dragStrength);` +`void set_room_override(s16 room);` + +[:arrow_up_small:](#) + +
+ +## [obj_update_pos_from_parent_transformation](#obj_update_pos_from_parent_transformation) + +### Lua Example +`obj_update_pos_from_parent_transformation(a0, a1)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a0 | `Mat4` | +| a1 | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_update_pos_from_parent_transformation(Mat4 a0, struct Object *a1);` + +[:arrow_up_small:](#) + +
+ +## [obj_apply_scale_to_matrix](#obj_apply_scale_to_matrix) + +### Lua Example +`obj_apply_scale_to_matrix(obj, dst, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| dst | `Mat4` | +| src | `Mat4` | + +### Returns +- None + +### C Prototype +`void obj_apply_scale_to_matrix(struct Object *obj, Mat4 dst, Mat4 src);` + +[:arrow_up_small:](#) + +
+ +## [create_transformation_from_matrices](#create_transformation_from_matrices) + +### Lua Example +`create_transformation_from_matrices(a0, a1, a2)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a0 | `Mat4` | +| a1 | `Mat4` | +| a2 | `Mat4` | + +### Returns +- None + +### C Prototype +`void create_transformation_from_matrices(Mat4 a0, Mat4 a1, Mat4 a2);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_held_state](#obj_set_held_state) + +### Lua Example +`obj_set_held_state(obj, heldBehavior)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| heldBehavior | `Pointer` <`BehaviorScript`> | + +### Returns +- None + +### C Prototype +`void obj_set_held_state(struct Object *obj, const BehaviorScript *heldBehavior);` + +[:arrow_up_small:](#) + +
+ +## [lateral_dist_between_objects](#lateral_dist_between_objects) + +### Lua Example +`local numberValue = lateral_dist_between_objects(obj1, obj2)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj1 | [Object](structs.md#Object) | +| obj2 | [Object](structs.md#Object) | + +### Returns +- `number` + +### C Prototype +`f32 lateral_dist_between_objects(struct Object *obj1, struct Object *obj2);` + +[:arrow_up_small:](#) + +
+ +## [dist_between_objects](#dist_between_objects) + +### Lua Example +`local numberValue = dist_between_objects(obj1, obj2)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj1 | [Object](structs.md#Object) | +| obj2 | [Object](structs.md#Object) | + +### Returns +- `number` + +### C Prototype +`f32 dist_between_objects(struct Object *obj1, struct Object *obj2);` + +[:arrow_up_small:](#) + +
+ +## [dist_between_object_and_point](#dist_between_object_and_point) + +### Lua Example +`local numberValue = dist_between_object_and_point(obj, pointX, pointY, pointZ)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| pointX | `number` | +| pointY | `number` | +| pointZ | `number` | + +### Returns +- `number` + +### C Prototype +`f32 dist_between_object_and_point(struct Object *obj, f32 pointX, f32 pointY, f32 pointZ);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_forward_vel_approach_upward](#cur_obj_forward_vel_approach_upward) + +### Lua Example +`cur_obj_forward_vel_approach_upward(target, increment)` + +### Parameters +| Field | Type | +| ----- | ---- | +| target | `number` | +| increment | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_forward_vel_approach_upward(f32 target, f32 increment);` [:arrow_up_small:](#) @@ -1087,118 +1258,1100 @@
-## [bhv_dust_smoke_loop](#bhv_dust_smoke_loop) +## [cur_obj_rotate_yaw_toward](#cur_obj_rotate_yaw_toward) ### Lua Example -`bhv_dust_smoke_loop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_dust_smoke_loop(void);` - -[:arrow_up_small:](#) - -
- -## [bhv_init_room](#bhv_init_room) - -### Lua Example -`bhv_init_room()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void bhv_init_room(void);` - -[:arrow_up_small:](#) - -
- -## [bit_shift_left](#bit_shift_left) - -### Lua Example -`local integerValue = bit_shift_left(a0)` +`local integerValue = cur_obj_rotate_yaw_toward(target, increment)` ### Parameters | Field | Type | | ----- | ---- | -| a0 | `integer` | +| target | `integer` | +| increment | `integer` | ### Returns - `integer` ### C Prototype -`s32 bit_shift_left(s32 a0);` +`s32 cur_obj_rotate_yaw_toward(s16 target, s16 increment);` [:arrow_up_small:](#)
-## [chain_segment_init](#chain_segment_init) +## [obj_angle_to_object](#obj_angle_to_object) ### Lua Example -`chain_segment_init(segment)` +`local integerValue = obj_angle_to_object(obj1, obj2)` ### Parameters | Field | Type | | ----- | ---- | -| segment | [ChainSegment](structs.md#ChainSegment) | - -### Returns -- None - -### C Prototype -`void chain_segment_init(struct ChainSegment *segment);` - -[:arrow_up_small:](#) - -
- -## [clear_move_flag](#clear_move_flag) - -### Lua Example -`local integerValue = clear_move_flag(bitSet, flag)` - -### Parameters -| Field | Type | -| ----- | ---- | -| bitSet | `Pointer` <`integer`> | -| flag | `integer` | +| obj1 | [Object](structs.md#Object) | +| obj2 | [Object](structs.md#Object) | ### Returns - `integer` ### C Prototype -`s32 clear_move_flag(u32 *bitSet, s32 flag);` +`s16 obj_angle_to_object(struct Object *obj1, struct Object *obj2);` [:arrow_up_small:](#)
-## [clear_time_stop_flags](#clear_time_stop_flags) +## [obj_pitch_to_object](#obj_pitch_to_object) ### Lua Example -`clear_time_stop_flags(flags)` +`local integerValue = obj_pitch_to_object(obj, target)` ### Parameters | Field | Type | | ----- | ---- | -| flags | `integer` | +| obj | [Object](structs.md#Object) | +| target | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`s16 obj_pitch_to_object(struct Object* obj, struct Object* target);` + +[:arrow_up_small:](#) + +
+ +## [obj_angle_to_point](#obj_angle_to_point) + +### Lua Example +`local integerValue = obj_angle_to_point(obj, pointX, pointZ)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| pointX | `number` | +| pointZ | `number` | + +### Returns +- `integer` + +### C Prototype +`s16 obj_angle_to_point(struct Object *obj, f32 pointX, f32 pointZ);` + +[:arrow_up_small:](#) + +
+ +## [obj_turn_toward_object](#obj_turn_toward_object) + +### Lua Example +`local integerValue = obj_turn_toward_object(obj, target, angleIndex, turnAmount)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| target | [Object](structs.md#Object) | +| angleIndex | `integer` | +| turnAmount | `integer` | + +### Returns +- `integer` + +### C Prototype +`s16 obj_turn_toward_object(struct Object *obj, struct Object *target, s16 angleIndex, s16 turnAmount);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_parent_relative_pos](#obj_set_parent_relative_pos) + +### Lua Example +`obj_set_parent_relative_pos(obj, relX, relY, relZ)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| relX | `integer` | +| relY | `integer` | +| relZ | `integer` | ### Returns - None ### C Prototype -`void clear_time_stop_flags(s32 flags);` +`void obj_set_parent_relative_pos(struct Object *obj, s16 relX, s16 relY, s16 relZ);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_pos](#obj_set_pos) + +### Lua Example +`obj_set_pos(obj, x, y, z)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| x | `integer` | +| y | `integer` | +| z | `integer` | + +### Returns +- None + +### C Prototype +`void obj_set_pos(struct Object *obj, s16 x, s16 y, s16 z);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_angle](#obj_set_angle) + +### Lua Example +`obj_set_angle(obj, pitch, yaw, roll)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| pitch | `integer` | +| yaw | `integer` | +| roll | `integer` | + +### Returns +- None + +### C Prototype +`void obj_set_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_move_angle](#obj_set_move_angle) + +### Lua Example +`obj_set_move_angle(obj, pitch, yaw, roll)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| pitch | `integer` | +| yaw | `integer` | +| roll | `integer` | + +### Returns +- None + +### C Prototype +`void obj_set_move_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_face_angle](#obj_set_face_angle) + +### Lua Example +`obj_set_face_angle(obj, pitch, yaw, roll)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| pitch | `integer` | +| yaw | `integer` | +| roll | `integer` | + +### Returns +- None + +### C Prototype +`void obj_set_face_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_gfx_angle](#obj_set_gfx_angle) + +### Lua Example +`obj_set_gfx_angle(obj, pitch, yaw, roll)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| pitch | `integer` | +| yaw | `integer` | +| roll | `integer` | + +### Returns +- None + +### C Prototype +`void obj_set_gfx_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_gfx_pos](#obj_set_gfx_pos) + +### Lua Example +`obj_set_gfx_pos(obj, x, y, z)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| x | `number` | +| y | `number` | +| z | `number` | + +### Returns +- None + +### C Prototype +`void obj_set_gfx_pos(struct Object *obj, f32 x, f32 y, f32 z);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_gfx_scale](#obj_set_gfx_scale) + +### Lua Example +`obj_set_gfx_scale(obj, x, y, z)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| x | `number` | +| y | `number` | +| z | `number` | + +### Returns +- None + +### C Prototype +`void obj_set_gfx_scale(struct Object *obj, f32 x, f32 y, f32 z);` + +[:arrow_up_small:](#) + +
+ +## [spawn_water_droplet](#spawn_water_droplet) + +### Lua Example +`local ObjectValue = spawn_water_droplet(parent, params)` + +### Parameters +| Field | Type | +| ----- | ---- | +| parent | [Object](structs.md#Object) | +| params | [WaterDropletParams](structs.md#WaterDropletParams) | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *spawn_water_droplet(struct Object *parent, struct WaterDropletParams *params);` + +[:arrow_up_small:](#) + +
+ +## [obj_build_relative_transform](#obj_build_relative_transform) + +### Lua Example +`obj_build_relative_transform(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_build_relative_transform(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_using_vel](#cur_obj_move_using_vel) + +### Lua Example +`cur_obj_move_using_vel()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_move_using_vel(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_copy_graph_y_offset](#obj_copy_graph_y_offset) + +### Lua Example +`obj_copy_graph_y_offset(dst, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dst | [Object](structs.md#Object) | +| src | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_copy_graph_y_offset(struct Object *dst, struct Object *src);` + +[:arrow_up_small:](#) + +
+ +## [obj_copy_pos_and_angle](#obj_copy_pos_and_angle) + +### Lua Example +`obj_copy_pos_and_angle(dst, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dst | [Object](structs.md#Object) | +| src | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_copy_pos_and_angle(struct Object *dst, struct Object *src);` + +[:arrow_up_small:](#) + +
+ +## [obj_copy_pos](#obj_copy_pos) + +### Lua Example +`obj_copy_pos(dst, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dst | [Object](structs.md#Object) | +| src | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_copy_pos(struct Object *dst, struct Object *src);` + +[:arrow_up_small:](#) + +
+ +## [obj_copy_angle](#obj_copy_angle) + +### Lua Example +`obj_copy_angle(dst, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dst | [Object](structs.md#Object) | +| src | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_copy_angle(struct Object *dst, struct Object *src);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_gfx_pos_from_pos](#obj_set_gfx_pos_from_pos) + +### Lua Example +`obj_set_gfx_pos_from_pos(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_set_gfx_pos_from_pos(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [obj_init_animation](#obj_init_animation) + +### Lua Example +`obj_init_animation(obj, animIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| animIndex | `integer` | + +### Returns +- None + +### C Prototype +`void obj_init_animation(struct Object *obj, s32 animIndex);` + +[:arrow_up_small:](#) + +
+ +## [linear_mtxf_mul_vec3f](#linear_mtxf_mul_vec3f) + +### Lua Example +`linear_mtxf_mul_vec3f(m, dst, v)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | `Mat4` | +| dst | [Vec3f](structs.md#Vec3f) | +| v | [Vec3f](structs.md#Vec3f) | + +### Returns +- None + +### C Prototype +`void linear_mtxf_mul_vec3f(Mat4 m, Vec3f dst, Vec3f v);` + +[:arrow_up_small:](#) + +
+ +## [linear_mtxf_transpose_mul_vec3f](#linear_mtxf_transpose_mul_vec3f) + +### Lua Example +`linear_mtxf_transpose_mul_vec3f(m, dst, v)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | `Mat4` | +| dst | [Vec3f](structs.md#Vec3f) | +| v | [Vec3f](structs.md#Vec3f) | + +### Returns +- None + +### C Prototype +`void linear_mtxf_transpose_mul_vec3f(Mat4 m, Vec3f dst, Vec3f v);` + +[:arrow_up_small:](#) + +
+ +## [obj_apply_scale_to_transform](#obj_apply_scale_to_transform) + +### Lua Example +`obj_apply_scale_to_transform(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_apply_scale_to_transform(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [obj_copy_scale](#obj_copy_scale) + +### Lua Example +`obj_copy_scale(dst, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dst | [Object](structs.md#Object) | +| src | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_copy_scale(struct Object *dst, struct Object *src);` + +[:arrow_up_small:](#) + +
+ +## [obj_scale_xyz](#obj_scale_xyz) + +### Lua Example +`obj_scale_xyz(obj, xScale, yScale, zScale)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| xScale | `number` | +| yScale | `number` | +| zScale | `number` | + +### Returns +- None + +### C Prototype +`void obj_scale_xyz(struct Object *obj, f32 xScale, f32 yScale, f32 zScale);` + +[:arrow_up_small:](#) + +
+ +## [obj_scale](#obj_scale) + +### Lua Example +`obj_scale(obj, scale)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| scale | `number` | + +### Returns +- None + +### C Prototype +`void obj_scale(struct Object *obj, f32 scale);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_scale](#cur_obj_scale) + +### Lua Example +`cur_obj_scale(scale)` + +### Parameters +| Field | Type | +| ----- | ---- | +| scale | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_scale(f32 scale);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_init_animation](#cur_obj_init_animation) + +### Lua Example +`cur_obj_init_animation(animIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| animIndex | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_init_animation(s32 animIndex);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_init_animation_with_sound](#cur_obj_init_animation_with_sound) + +### Lua Example +`cur_obj_init_animation_with_sound(animIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| animIndex | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_init_animation_with_sound(s32 animIndex);` + +[:arrow_up_small:](#) + +
+ +## [obj_init_animation_with_accel_and_sound](#obj_init_animation_with_accel_and_sound) + +### Lua Example +`obj_init_animation_with_accel_and_sound(obj, animIndex, accel)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| animIndex | `integer` | +| accel | `number` | + +### Returns +- None + +### C Prototype +`void obj_init_animation_with_accel_and_sound(struct Object *obj, s32 animIndex, f32 accel);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_init_animation_with_accel_and_sound](#cur_obj_init_animation_with_accel_and_sound) + +### Lua Example +`cur_obj_init_animation_with_accel_and_sound(animIndex, accel)` + +### Parameters +| Field | Type | +| ----- | ---- | +| animIndex | `integer` | +| accel | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_init_animation_with_accel_and_sound(s32 animIndex, f32 accel);` + +[:arrow_up_small:](#) + +
+ +## [obj_init_animation_with_sound](#obj_init_animation_with_sound) + +### Lua Example +`obj_init_animation_with_sound(obj, animations, animIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| animations | [AnimationTable](structs.md#AnimationTable) | +| animIndex | `integer` | + +### Returns +- None + +### C Prototype +`void obj_init_animation_with_sound(struct Object *obj, const struct AnimationTable* animations, s32 animIndex);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_enable_rendering_and_become_tangible](#cur_obj_enable_rendering_and_become_tangible) + +### Lua Example +`cur_obj_enable_rendering_and_become_tangible(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void cur_obj_enable_rendering_and_become_tangible(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_enable_rendering](#cur_obj_enable_rendering) + +### Lua Example +`cur_obj_enable_rendering()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_enable_rendering(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_disable_rendering_and_become_intangible](#cur_obj_disable_rendering_and_become_intangible) + +### Lua Example +`cur_obj_disable_rendering_and_become_intangible(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void cur_obj_disable_rendering_and_become_intangible(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_disable_rendering](#cur_obj_disable_rendering) + +### Lua Example +`cur_obj_disable_rendering()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_disable_rendering(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_unhide](#cur_obj_unhide) + +### Lua Example +`cur_obj_unhide()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_unhide(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_hide](#cur_obj_hide) + +### Lua Example +`cur_obj_hide()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_hide(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_pos_relative](#cur_obj_set_pos_relative) + +### Lua Example +`cur_obj_set_pos_relative(other, dleft, dy, dforward)` + +### Parameters +| Field | Type | +| ----- | ---- | +| other | [Object](structs.md#Object) | +| dleft | `number` | +| dy | `number` | +| dforward | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_set_pos_relative(struct Object *other, f32 dleft, f32 dy, f32 dforward);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_pos_relative_to_parent](#cur_obj_set_pos_relative_to_parent) + +### Lua Example +`cur_obj_set_pos_relative_to_parent(dleft, dy, dforward)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dleft | `number` | +| dy | `number` | +| dforward | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_set_pos_relative_to_parent(f32 dleft, f32 dy, f32 dforward);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_enable_rendering_2](#cur_obj_enable_rendering_2) + +### Lua Example +`cur_obj_enable_rendering_2()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_enable_rendering_2(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_unused_init_on_floor](#cur_obj_unused_init_on_floor) + +### Lua Example +`cur_obj_unused_init_on_floor()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_unused_init_on_floor(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_face_angle_to_move_angle](#obj_set_face_angle_to_move_angle) + +### Lua Example +`obj_set_face_angle_to_move_angle(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_set_face_angle_to_move_angle(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [get_object_list_from_behavior](#get_object_list_from_behavior) + +### Lua Example +`local integerValue = get_object_list_from_behavior(behavior)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behavior | `Pointer` <`BehaviorScript`> | + +### Returns +- `integer` + +### C Prototype +`u32 get_object_list_from_behavior(const BehaviorScript *behavior);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_nearest_object_with_behavior](#cur_obj_nearest_object_with_behavior) + +### Lua Example +`local ObjectValue = cur_obj_nearest_object_with_behavior(behavior)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behavior | `Pointer` <`BehaviorScript`> | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *cur_obj_nearest_object_with_behavior(const BehaviorScript *behavior);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_dist_to_nearest_object_with_behavior](#cur_obj_dist_to_nearest_object_with_behavior) + +### Lua Example +`local numberValue = cur_obj_dist_to_nearest_object_with_behavior(behavior)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behavior | `Pointer` <`BehaviorScript`> | + +### Returns +- `number` + +### C Prototype +`f32 cur_obj_dist_to_nearest_object_with_behavior(const BehaviorScript *behavior);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_find_nearest_pole](#cur_obj_find_nearest_pole) + +### Lua Example +`local ObjectValue = cur_obj_find_nearest_pole()` + +### Parameters +- None + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object* cur_obj_find_nearest_pole(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_find_nearest_object_with_behavior](#cur_obj_find_nearest_object_with_behavior) + +### Lua Example +`local ObjectValue = cur_obj_find_nearest_object_with_behavior(behavior, dist)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behavior | `Pointer` <`BehaviorScript`> | +| dist | `Pointer` <`number`> | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *cur_obj_find_nearest_object_with_behavior(const BehaviorScript *behavior, f32 *dist);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_count_objects_with_behavior](#cur_obj_count_objects_with_behavior) + +### Lua Example +`local integerValue = cur_obj_count_objects_with_behavior(behavior, dist)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behavior | `Pointer` <`BehaviorScript`> | +| dist | `number` | + +### Returns +- `integer` + +### C Prototype +`u16 cur_obj_count_objects_with_behavior(const BehaviorScript* behavior, f32 dist);` + +[:arrow_up_small:](#) + +
+ +## [find_unimportant_object](#find_unimportant_object) + +### Lua Example +`local ObjectValue = find_unimportant_object()` + +### Parameters +- None + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *find_unimportant_object(void);` + +[:arrow_up_small:](#) + +
+ +## [count_unimportant_objects](#count_unimportant_objects) + +### Lua Example +`local integerValue = count_unimportant_objects()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 count_unimportant_objects(void);` [:arrow_up_small:](#) @@ -1224,142 +2377,51 @@
-## [count_unimportant_objects](#count_unimportant_objects) +## [find_object_with_behavior](#find_object_with_behavior) ### Lua Example -`local integerValue = count_unimportant_objects()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 count_unimportant_objects(void);` - -[:arrow_up_small:](#) - -
- -## [create_transformation_from_matrices](#create_transformation_from_matrices) - -### Lua Example -`create_transformation_from_matrices(a0, a1, a2)` +`local ObjectValue = find_object_with_behavior(behavior)` ### Parameters | Field | Type | | ----- | ---- | -| a0 | `Mat4` | -| a1 | `Mat4` | -| a2 | `Mat4` | +| behavior | `Pointer` <`BehaviorScript`> | ### Returns -- None +[Object](structs.md#Object) ### C Prototype -`void create_transformation_from_matrices(Mat4 a0, Mat4 a1, Mat4 a2);` +`struct Object *find_object_with_behavior(const BehaviorScript *behavior);` [:arrow_up_small:](#)
-## [cur_obj_abs_y_dist_to_home](#cur_obj_abs_y_dist_to_home) +## [cur_obj_find_nearby_held_actor](#cur_obj_find_nearby_held_actor) ### Lua Example -`local numberValue = cur_obj_abs_y_dist_to_home()` - -### Parameters -- None - -### Returns -- `number` - -### C Prototype -`f32 cur_obj_abs_y_dist_to_home(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_advance_looping_anim](#cur_obj_advance_looping_anim) - -### Lua Example -`local integerValue = cur_obj_advance_looping_anim()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_advance_looping_anim(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_align_gfx_with_floor](#cur_obj_align_gfx_with_floor) - -### Lua Example -`cur_obj_align_gfx_with_floor()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_align_gfx_with_floor(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_angle_to_home](#cur_obj_angle_to_home) - -### Lua Example -`local integerValue = cur_obj_angle_to_home()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s16 cur_obj_angle_to_home(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_apply_drag_xz](#cur_obj_apply_drag_xz) - -### Lua Example -`cur_obj_apply_drag_xz(dragStrength)` +`local ObjectValue = cur_obj_find_nearby_held_actor(behavior, maxDist)` ### Parameters | Field | Type | | ----- | ---- | -| dragStrength | `number` | +| behavior | `Pointer` <`BehaviorScript`> | +| maxDist | `number` | ### Returns -- None +[Object](structs.md#Object) ### C Prototype -`void cur_obj_apply_drag_xz(f32 dragStrength);` +`struct Object *cur_obj_find_nearby_held_actor(const BehaviorScript *behavior, f32 maxDist);` [:arrow_up_small:](#)
-## [cur_obj_become_intangible](#cur_obj_become_intangible) +## [cur_obj_reset_timer_and_subaction](#cur_obj_reset_timer_and_subaction) ### Lua Example -`cur_obj_become_intangible()` +`cur_obj_reset_timer_and_subaction()` ### Parameters - None @@ -1368,70 +2430,7 @@ - None ### C Prototype -`void cur_obj_become_intangible(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_become_tangible](#cur_obj_become_tangible) - -### Lua Example -`cur_obj_become_tangible()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_become_tangible(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_can_mario_activate_textbox](#cur_obj_can_mario_activate_textbox) - -### Lua Example -`local integerValue = cur_obj_can_mario_activate_textbox(m, radius, height, unused)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| radius | `number` | -| height | `number` | -| unused | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_can_mario_activate_textbox(struct MarioState* m, f32 radius, f32 height, UNUSED s32 unused);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_can_mario_activate_textbox_2](#cur_obj_can_mario_activate_textbox_2) - -### Lua Example -`local integerValue = cur_obj_can_mario_activate_textbox_2(m, radius, height)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| radius | `number` | -| height | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_can_mario_activate_textbox_2(struct MarioState* m, f32 radius, f32 height);` +`void cur_obj_reset_timer_and_subaction(void);` [:arrow_up_small:](#) @@ -1457,6 +2456,100 @@
+## [cur_obj_set_vel_from_mario_vel](#cur_obj_set_vel_from_mario_vel) + +### Lua Example +`cur_obj_set_vel_from_mario_vel(m, f12, f14)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| f12 | `number` | +| f14 | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_set_vel_from_mario_vel(struct MarioState* m, f32 f12, f32 f14);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_reverse_animation](#cur_obj_reverse_animation) + +### Lua Example +`cur_obj_reverse_animation()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_reverse_animation(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_extend_animation_if_at_end](#cur_obj_extend_animation_if_at_end) + +### Lua Example +`cur_obj_extend_animation_if_at_end()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_extend_animation_if_at_end(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_check_if_near_animation_end](#cur_obj_check_if_near_animation_end) + +### Lua Example +`local integerValue = cur_obj_check_if_near_animation_end()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_check_if_near_animation_end(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_check_if_at_animation_end](#cur_obj_check_if_at_animation_end) + +### Lua Example +`local integerValue = cur_obj_check_if_at_animation_end()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_check_if_at_animation_end(void);` + +[:arrow_up_small:](#) + +
+ ## [cur_obj_check_anim_frame](#cur_obj_check_anim_frame) ### Lua Example @@ -1518,461 +2611,104 @@
-## [cur_obj_check_grabbed_mario](#cur_obj_check_grabbed_mario) +## [mario_is_in_air_action](#mario_is_in_air_action) ### Lua Example -`local integerValue = cur_obj_check_grabbed_mario()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_check_grabbed_mario(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_check_if_at_animation_end](#cur_obj_check_if_at_animation_end) - -### Lua Example -`local integerValue = cur_obj_check_if_at_animation_end()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_check_if_at_animation_end(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_check_if_near_animation_end](#cur_obj_check_if_near_animation_end) - -### Lua Example -`local integerValue = cur_obj_check_if_near_animation_end()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_check_if_near_animation_end(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_check_interacted](#cur_obj_check_interacted) - -### Lua Example -`local integerValue = cur_obj_check_interacted()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_check_interacted(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_clear_interact_status_flag](#cur_obj_clear_interact_status_flag) - -### Lua Example -`local integerValue = cur_obj_clear_interact_status_flag(flag)` - -### Parameters -| Field | Type | -| ----- | ---- | -| flag | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_clear_interact_status_flag(s32 flag);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_compute_vel_xz](#cur_obj_compute_vel_xz) - -### Lua Example -`cur_obj_compute_vel_xz()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_compute_vel_xz(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_count_objects_with_behavior](#cur_obj_count_objects_with_behavior) - -### Lua Example -`local integerValue = cur_obj_count_objects_with_behavior(behavior, dist)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | -| dist | `number` | - -### Returns -- `integer` - -### C Prototype -`u16 cur_obj_count_objects_with_behavior(const BehaviorScript* behavior, f32 dist);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_detect_steep_floor](#cur_obj_detect_steep_floor) - -### Lua Example -`local integerValue = cur_obj_detect_steep_floor(steepAngleDegrees)` - -### Parameters -| Field | Type | -| ----- | ---- | -| steepAngleDegrees | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_detect_steep_floor(s16 steepAngleDegrees);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_disable](#cur_obj_disable) - -### Lua Example -`cur_obj_disable()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_disable(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_disable_rendering](#cur_obj_disable_rendering) - -### Lua Example -`cur_obj_disable_rendering()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_disable_rendering(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_disable_rendering_and_become_intangible](#cur_obj_disable_rendering_and_become_intangible) - -### Lua Example -`cur_obj_disable_rendering_and_become_intangible(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void cur_obj_disable_rendering_and_become_intangible(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_dist_to_nearest_object_with_behavior](#cur_obj_dist_to_nearest_object_with_behavior) - -### Lua Example -`local numberValue = cur_obj_dist_to_nearest_object_with_behavior(behavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | - -### Returns -- `number` - -### C Prototype -`f32 cur_obj_dist_to_nearest_object_with_behavior(const BehaviorScript *behavior);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_enable_rendering](#cur_obj_enable_rendering) - -### Lua Example -`cur_obj_enable_rendering()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_enable_rendering(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_enable_rendering_2](#cur_obj_enable_rendering_2) - -### Lua Example -`cur_obj_enable_rendering_2()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_enable_rendering_2(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_enable_rendering_and_become_tangible](#cur_obj_enable_rendering_and_become_tangible) - -### Lua Example -`cur_obj_enable_rendering_and_become_tangible(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void cur_obj_enable_rendering_and_become_tangible(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_enable_rendering_if_mario_in_room](#cur_obj_enable_rendering_if_mario_in_room) - -### Lua Example -`cur_obj_enable_rendering_if_mario_in_room()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_enable_rendering_if_mario_in_room(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_end_dialog](#cur_obj_end_dialog) - -### Lua Example -`cur_obj_end_dialog(m, dialogFlags, dialogResult)` +`local integerValue = mario_is_in_air_action(m)` ### Parameters | Field | Type | | ----- | ---- | | m | [MarioState](structs.md#MarioState) | -| dialogFlags | `integer` | -| dialogResult | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_end_dialog(struct MarioState* m, s32 dialogFlags, s32 dialogResult);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_extend_animation_if_at_end](#cur_obj_extend_animation_if_at_end) - -### Lua Example -`cur_obj_extend_animation_if_at_end()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_extend_animation_if_at_end(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_find_nearby_held_actor](#cur_obj_find_nearby_held_actor) - -### Lua Example -`local ObjectValue = cur_obj_find_nearby_held_actor(behavior, maxDist)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | -| maxDist | `number` | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *cur_obj_find_nearby_held_actor(const BehaviorScript *behavior, f32 maxDist);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_find_nearest_object_with_behavior](#cur_obj_find_nearest_object_with_behavior) - -### Lua Example -`local ObjectValue = cur_obj_find_nearest_object_with_behavior(behavior, dist)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | -| dist | `Pointer` <`number`> | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *cur_obj_find_nearest_object_with_behavior(const BehaviorScript *behavior, f32 *dist);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_find_nearest_pole](#cur_obj_find_nearest_pole) - -### Lua Example -`local ObjectValue = cur_obj_find_nearest_pole()` - -### Parameters -- None - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object* cur_obj_find_nearest_pole(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_follow_path](#cur_obj_follow_path) - -### Lua Example -`local integerValue = cur_obj_follow_path(unusedArg)` - -### Parameters -| Field | Type | -| ----- | ---- | -| unusedArg | `integer` | ### Returns - `integer` ### C Prototype -`s32 cur_obj_follow_path(UNUSED s32 unusedArg);` +`s32 mario_is_in_air_action(struct MarioState* m);` [:arrow_up_small:](#)
-## [cur_obj_forward_vel_approach_upward](#cur_obj_forward_vel_approach_upward) +## [mario_is_dive_sliding](#mario_is_dive_sliding) ### Lua Example -`cur_obj_forward_vel_approach_upward(target, increment)` +`local integerValue = mario_is_dive_sliding(m)` ### Parameters | Field | Type | | ----- | ---- | -| target | `number` | -| increment | `number` | +| m | [MarioState](structs.md#MarioState) | ### Returns -- None +- `integer` ### C Prototype -`void cur_obj_forward_vel_approach_upward(f32 target, f32 increment);` +`s32 mario_is_dive_sliding(struct MarioState* m);` [:arrow_up_small:](#)
-## [cur_obj_get_dropped](#cur_obj_get_dropped) +## [cur_obj_set_y_vel_and_animation](#cur_obj_set_y_vel_and_animation) ### Lua Example -`cur_obj_get_dropped()` +`cur_obj_set_y_vel_and_animation(sp18, sp1C)` ### Parameters -- None +| Field | Type | +| ----- | ---- | +| sp18 | `number` | +| sp1C | `integer` | ### Returns - None ### C Prototype -`void cur_obj_get_dropped(void);` +`void cur_obj_set_y_vel_and_animation(f32 sp18, s32 sp1C);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_unrender_and_reset_state](#cur_obj_unrender_and_reset_state) + +### Lua Example +`cur_obj_unrender_and_reset_state(sp18, sp1C)` + +### Parameters +| Field | Type | +| ----- | ---- | +| sp18 | `integer` | +| sp1C | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_unrender_and_reset_state(s32 sp18, s32 sp1C);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_after_thrown_or_dropped](#cur_obj_move_after_thrown_or_dropped) + +### Lua Example +`cur_obj_move_after_thrown_or_dropped(forwardVel, velY)` + +### Parameters +| Field | Type | +| ----- | ---- | +| forwardVel | `number` | +| velY | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_move_after_thrown_or_dropped(f32 forwardVel, f32 velY);` [:arrow_up_small:](#) @@ -2000,6 +2736,519 @@
+## [cur_obj_get_dropped](#cur_obj_get_dropped) + +### Lua Example +`cur_obj_get_dropped()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_get_dropped(void);` + +[:arrow_up_small:](#) + +
+ +## [mario_set_flag](#mario_set_flag) + +### Lua Example +`mario_set_flag(flag)` + +### Parameters +| Field | Type | +| ----- | ---- | +| flag | `integer` | + +### Returns +- None + +### C Prototype +`void mario_set_flag(s32 flag);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_clear_interact_status_flag](#cur_obj_clear_interact_status_flag) + +### Lua Example +`local integerValue = cur_obj_clear_interact_status_flag(flag)` + +### Parameters +| Field | Type | +| ----- | ---- | +| flag | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_clear_interact_status_flag(s32 flag);` + +[:arrow_up_small:](#) + +
+ +## [obj_mark_for_deletion](#obj_mark_for_deletion) + +### Lua Example +`obj_mark_for_deletion(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_mark_for_deletion(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_disable](#cur_obj_disable) + +### Lua Example +`cur_obj_disable()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_disable(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_become_intangible](#cur_obj_become_intangible) + +### Lua Example +`cur_obj_become_intangible()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_become_intangible(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_become_tangible](#cur_obj_become_tangible) + +### Lua Example +`cur_obj_become_tangible()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_become_tangible(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_become_tangible](#obj_become_tangible) + +### Lua Example +`obj_become_tangible(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_become_tangible(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_update_floor_height](#cur_obj_update_floor_height) + +### Lua Example +`cur_obj_update_floor_height()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_update_floor_height(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_update_floor_height_and_get_floor](#cur_obj_update_floor_height_and_get_floor) + +### Lua Example +`local SurfaceValue = cur_obj_update_floor_height_and_get_floor()` + +### Parameters +- None + +### Returns +[Surface](structs.md#Surface) + +### C Prototype +`struct Surface *cur_obj_update_floor_height_and_get_floor(void);` + +[:arrow_up_small:](#) + +
+ +## [apply_drag_to_value](#apply_drag_to_value) + +### Lua Example +`apply_drag_to_value(value, dragStrength)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `Pointer` <`number`> | +| dragStrength | `number` | + +### Returns +- None + +### C Prototype +`void apply_drag_to_value(f32 *value, f32 dragStrength);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_apply_drag_xz](#cur_obj_apply_drag_xz) + +### Lua Example +`cur_obj_apply_drag_xz(dragStrength)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dragStrength | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_apply_drag_xz(f32 dragStrength);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_xz](#cur_obj_move_xz) + +### Lua Example +`local integerValue = cur_obj_move_xz(steepSlopeNormalY, careAboutEdgesAndSteepSlopes)` + +### Parameters +| Field | Type | +| ----- | ---- | +| steepSlopeNormalY | `number` | +| careAboutEdgesAndSteepSlopes | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_move_xz(f32 steepSlopeNormalY, s32 careAboutEdgesAndSteepSlopes);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_update_underwater_flags](#cur_obj_move_update_underwater_flags) + +### Lua Example +`cur_obj_move_update_underwater_flags()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_move_update_underwater_flags(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_update_ground_air_flags](#cur_obj_move_update_ground_air_flags) + +### Lua Example +`cur_obj_move_update_ground_air_flags(gravity, bounciness)` + +### Parameters +| Field | Type | +| ----- | ---- | +| gravity | `number` | +| bounciness | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_move_update_ground_air_flags(UNUSED f32 gravity, f32 bounciness);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_y_and_get_water_level](#cur_obj_move_y_and_get_water_level) + +### Lua Example +`local numberValue = cur_obj_move_y_and_get_water_level(gravity, buoyancy)` + +### Parameters +| Field | Type | +| ----- | ---- | +| gravity | `number` | +| buoyancy | `number` | + +### Returns +- `number` + +### C Prototype +`f32 cur_obj_move_y_and_get_water_level(f32 gravity, f32 buoyancy);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_y](#cur_obj_move_y) + +### Lua Example +`cur_obj_move_y(gravity, bounciness, buoyancy)` + +### Parameters +| Field | Type | +| ----- | ---- | +| gravity | `number` | +| bounciness | `number` | +| buoyancy | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_move_y(f32 gravity, f32 bounciness, f32 buoyancy);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_unused_resolve_wall_collisions](#cur_obj_unused_resolve_wall_collisions) + +### Lua Example +`cur_obj_unused_resolve_wall_collisions(offsetY, radius)` + +### Parameters +| Field | Type | +| ----- | ---- | +| offsetY | `number` | +| radius | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_unused_resolve_wall_collisions(f32 offsetY, f32 radius);` + +[:arrow_up_small:](#) + +
+ +## [abs_angle_diff](#abs_angle_diff) + +### Lua Example +`local integerValue = abs_angle_diff(x0, x1)` + +### Parameters +| Field | Type | +| ----- | ---- | +| x0 | `integer` | +| x1 | `integer` | + +### Returns +- `integer` + +### C Prototype +`s16 abs_angle_diff(s16 x0, s16 x1);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_xz_using_fvel_and_yaw](#cur_obj_move_xz_using_fvel_and_yaw) + +### Lua Example +`cur_obj_move_xz_using_fvel_and_yaw()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_move_xz_using_fvel_and_yaw(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_y_with_terminal_vel](#cur_obj_move_y_with_terminal_vel) + +### Lua Example +`cur_obj_move_y_with_terminal_vel()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_move_y_with_terminal_vel(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_compute_vel_xz](#cur_obj_compute_vel_xz) + +### Lua Example +`cur_obj_compute_vel_xz()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_compute_vel_xz(void);` + +[:arrow_up_small:](#) + +
+ +## [increment_velocity_toward_range](#increment_velocity_toward_range) + +### Lua Example +`local numberValue = increment_velocity_toward_range(value, center, zeroThreshold, increment)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `number` | +| center | `number` | +| zeroThreshold | `number` | +| increment | `number` | + +### Returns +- `number` + +### C Prototype +`f32 increment_velocity_toward_range(f32 value, f32 center, f32 zeroThreshold, f32 increment);` + +[:arrow_up_small:](#) + +
+ +## [obj_check_if_collided_with_object](#obj_check_if_collided_with_object) + +### Lua Example +`local integerValue = obj_check_if_collided_with_object(obj1, obj2)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj1 | [Object](structs.md#Object) | +| obj2 | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`s32 obj_check_if_collided_with_object(struct Object *obj1, struct Object *obj2);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_behavior](#cur_obj_set_behavior) + +### Lua Example +`cur_obj_set_behavior(behavior)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behavior | `Pointer` <`BehaviorScript`> | + +### Returns +- None + +### C Prototype +`void cur_obj_set_behavior(const BehaviorScript *behavior);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_behavior](#obj_set_behavior) + +### Lua Example +`obj_set_behavior(obj, behavior)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| behavior | `Pointer` <`BehaviorScript`> | + +### Returns +- None + +### C Prototype +`void obj_set_behavior(struct Object *obj, const BehaviorScript *behavior);` + +[:arrow_up_small:](#) + +
+ ## [cur_obj_has_behavior](#cur_obj_has_behavior) ### Lua Example @@ -2020,30 +3269,130 @@
-## [cur_obj_has_model](#cur_obj_has_model) +## [obj_has_behavior](#obj_has_behavior) ### Lua Example -`local integerValue = cur_obj_has_model(modelID)` +`local integerValue = obj_has_behavior(obj, behavior)` ### Parameters | Field | Type | | ----- | ---- | -| modelID | `integer` | +| obj | [Object](structs.md#Object) | +| behavior | `Pointer` <`BehaviorScript`> | ### Returns - `integer` ### C Prototype -`s32 cur_obj_has_model(u16 modelID);` +`s32 obj_has_behavior(struct Object *obj, const BehaviorScript *behavior);` [:arrow_up_small:](#)
-## [cur_obj_hide](#cur_obj_hide) +## [cur_obj_lateral_dist_from_obj_to_home](#cur_obj_lateral_dist_from_obj_to_home) ### Lua Example -`cur_obj_hide()` +`local numberValue = cur_obj_lateral_dist_from_obj_to_home(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- `number` + +### C Prototype +`f32 cur_obj_lateral_dist_from_obj_to_home(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_lateral_dist_from_mario_to_home](#cur_obj_lateral_dist_from_mario_to_home) + +### Lua Example +`local numberValue = cur_obj_lateral_dist_from_mario_to_home()` + +### Parameters +- None + +### Returns +- `number` + +### C Prototype +`f32 cur_obj_lateral_dist_from_mario_to_home(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_lateral_dist_to_home](#cur_obj_lateral_dist_to_home) + +### Lua Example +`local numberValue = cur_obj_lateral_dist_to_home()` + +### Parameters +- None + +### Returns +- `number` + +### C Prototype +`f32 cur_obj_lateral_dist_to_home(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_outside_home_square](#cur_obj_outside_home_square) + +### Lua Example +`local integerValue = cur_obj_outside_home_square(halfLength)` + +### Parameters +| Field | Type | +| ----- | ---- | +| halfLength | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_outside_home_square(f32 halfLength);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_outside_home_rectangle](#cur_obj_outside_home_rectangle) + +### Lua Example +`local integerValue = cur_obj_outside_home_rectangle(minX, maxX, minZ, maxZ)` + +### Parameters +| Field | Type | +| ----- | ---- | +| minX | `number` | +| maxX | `number` | +| minZ | `number` | +| maxZ | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_outside_home_rectangle(f32 minX, f32 maxX, f32 minZ, f32 maxZ);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_pos_to_home](#cur_obj_set_pos_to_home) + +### Lua Example +`cur_obj_set_pos_to_home()` ### Parameters - None @@ -2052,7 +3401,1496 @@ - None ### C Prototype -`void cur_obj_hide(void);` +`void cur_obj_set_pos_to_home(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_pos_to_home_and_stop](#cur_obj_set_pos_to_home_and_stop) + +### Lua Example +`cur_obj_set_pos_to_home_and_stop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_set_pos_to_home_and_stop(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_shake_y](#cur_obj_shake_y) + +### Lua Example +`cur_obj_shake_y(amount)` + +### Parameters +| Field | Type | +| ----- | ---- | +| amount | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_shake_y(f32 amount);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_start_cam_event](#cur_obj_start_cam_event) + +### Lua Example +`cur_obj_start_cam_event(obj, cameraEvent)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| cameraEvent | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_start_cam_event(UNUSED struct Object *obj, s32 cameraEvent);` + +[:arrow_up_small:](#) + +
+ +## [set_mario_interact_hoot_if_in_range](#set_mario_interact_hoot_if_in_range) + +### Lua Example +`set_mario_interact_hoot_if_in_range(sp0, sp4, sp8)` + +### Parameters +| Field | Type | +| ----- | ---- | +| sp0 | `integer` | +| sp4 | `integer` | +| sp8 | `number` | + +### Returns +- None + +### C Prototype +`void set_mario_interact_hoot_if_in_range(UNUSED s32 sp0, UNUSED s32 sp4, f32 sp8);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_billboard](#obj_set_billboard) + +### Lua Example +`obj_set_billboard(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_set_billboard(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_cylboard](#obj_set_cylboard) + +### Lua Example +`obj_set_cylboard(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_set_cylboard(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_billboard_if_vanilla_cam](#cur_obj_set_billboard_if_vanilla_cam) + +### Lua Example +`cur_obj_set_billboard_if_vanilla_cam()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_set_billboard_if_vanilla_cam(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_hitbox_radius_and_height](#obj_set_hitbox_radius_and_height) + +### Lua Example +`obj_set_hitbox_radius_and_height(o, radius, height)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| radius | `number` | +| height | `number` | + +### Returns +- None + +### C Prototype +`void obj_set_hitbox_radius_and_height(struct Object *o, f32 radius, f32 height);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_hurtbox_radius_and_height](#obj_set_hurtbox_radius_and_height) + +### Lua Example +`obj_set_hurtbox_radius_and_height(o, radius, height)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| radius | `number` | +| height | `number` | + +### Returns +- None + +### C Prototype +`void obj_set_hurtbox_radius_and_height(struct Object *o, f32 radius, f32 height);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_hitbox_radius_and_height](#cur_obj_set_hitbox_radius_and_height) + +### Lua Example +`cur_obj_set_hitbox_radius_and_height(radius, height)` + +### Parameters +| Field | Type | +| ----- | ---- | +| radius | `number` | +| height | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_set_hitbox_radius_and_height(f32 radius, f32 height);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_hurtbox_radius_and_height](#cur_obj_set_hurtbox_radius_and_height) + +### Lua Example +`cur_obj_set_hurtbox_radius_and_height(radius, height)` + +### Parameters +| Field | Type | +| ----- | ---- | +| radius | `number` | +| height | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_set_hurtbox_radius_and_height(f32 radius, f32 height);` + +[:arrow_up_small:](#) + +
+ +## [obj_spawn_loot_coins](#obj_spawn_loot_coins) + +### Lua Example +`obj_spawn_loot_coins(obj, numCoins, sp30, coinBehavior, posJitter, model)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| numCoins | `integer` | +| sp30 | `number` | +| coinBehavior | `Pointer` <`BehaviorScript`> | +| posJitter | `integer` | +| model | `integer` | + +### Returns +- None + +### C Prototype +`void obj_spawn_loot_coins(struct Object *obj, s32 numCoins, f32 sp30, const BehaviorScript *coinBehavior, s16 posJitter, s16 model);` + +[:arrow_up_small:](#) + +
+ +## [obj_spawn_loot_blue_coins](#obj_spawn_loot_blue_coins) + +### Lua Example +`obj_spawn_loot_blue_coins(obj, numCoins, sp28, posJitter)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| numCoins | `integer` | +| sp28 | `number` | +| posJitter | `integer` | + +### Returns +- None + +### C Prototype +`void obj_spawn_loot_blue_coins(struct Object *obj, s32 numCoins, f32 sp28, s16 posJitter);` + +[:arrow_up_small:](#) + +
+ +## [obj_spawn_loot_yellow_coins](#obj_spawn_loot_yellow_coins) + +### Lua Example +`obj_spawn_loot_yellow_coins(obj, numCoins, sp28)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| numCoins | `integer` | +| sp28 | `number` | + +### Returns +- None + +### C Prototype +`void obj_spawn_loot_yellow_coins(struct Object *obj, s32 numCoins, f32 sp28);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_spawn_loot_coin_at_mario_pos](#cur_obj_spawn_loot_coin_at_mario_pos) + +### Lua Example +`cur_obj_spawn_loot_coin_at_mario_pos(m)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | + +### Returns +- None + +### C Prototype +`void cur_obj_spawn_loot_coin_at_mario_pos(struct MarioState* m);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_abs_y_dist_to_home](#cur_obj_abs_y_dist_to_home) + +### Lua Example +`local numberValue = cur_obj_abs_y_dist_to_home()` + +### Parameters +- None + +### Returns +- `number` + +### C Prototype +`f32 cur_obj_abs_y_dist_to_home(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_advance_looping_anim](#cur_obj_advance_looping_anim) + +### Lua Example +`local integerValue = cur_obj_advance_looping_anim()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_advance_looping_anim(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_detect_steep_floor](#cur_obj_detect_steep_floor) + +### Lua Example +`local integerValue = cur_obj_detect_steep_floor(steepAngleDegrees)` + +### Parameters +| Field | Type | +| ----- | ---- | +| steepAngleDegrees | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_detect_steep_floor(s16 steepAngleDegrees);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_resolve_wall_collisions](#cur_obj_resolve_wall_collisions) + +### Lua Example +`local integerValue = cur_obj_resolve_wall_collisions()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_resolve_wall_collisions(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_update_floor](#cur_obj_update_floor) + +### Lua Example +`cur_obj_update_floor()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_update_floor(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_update_floor_and_resolve_wall_collisions](#cur_obj_update_floor_and_resolve_wall_collisions) + +### Lua Example +`cur_obj_update_floor_and_resolve_wall_collisions(steepSlopeDegrees)` + +### Parameters +| Field | Type | +| ----- | ---- | +| steepSlopeDegrees | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_update_floor_and_resolve_wall_collisions(s16 steepSlopeDegrees);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_update_floor_and_walls](#cur_obj_update_floor_and_walls) + +### Lua Example +`cur_obj_update_floor_and_walls()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_update_floor_and_walls(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_standard](#cur_obj_move_standard) + +### Lua Example +`cur_obj_move_standard(steepSlopeAngleDegrees)` + +### Parameters +| Field | Type | +| ----- | ---- | +| steepSlopeAngleDegrees | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_move_standard(s16 steepSlopeAngleDegrees);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_within_12k_bounds](#cur_obj_within_12k_bounds) + +### Lua Example +`local integerValue = cur_obj_within_12k_bounds()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_within_12k_bounds(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_using_vel_and_gravity](#cur_obj_move_using_vel_and_gravity) + +### Lua Example +`cur_obj_move_using_vel_and_gravity()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_move_using_vel_and_gravity(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_using_fvel_and_gravity](#cur_obj_move_using_fvel_and_gravity) + +### Lua Example +`cur_obj_move_using_fvel_and_gravity()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_move_using_fvel_and_gravity(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_pos_relative](#obj_set_pos_relative) + +### Lua Example +`obj_set_pos_relative(obj, other, dleft, dy, dforward)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| other | [Object](structs.md#Object) | +| dleft | `number` | +| dy | `number` | +| dforward | `number` | + +### Returns +- None + +### C Prototype +`void obj_set_pos_relative(struct Object *obj, struct Object *other, f32 dleft, f32 dy, f32 dforward);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_angle_to_home](#cur_obj_angle_to_home) + +### Lua Example +`local integerValue = cur_obj_angle_to_home()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s16 cur_obj_angle_to_home(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_gfx_pos_at_obj_pos](#obj_set_gfx_pos_at_obj_pos) + +### Lua Example +`obj_set_gfx_pos_at_obj_pos(obj1, obj2)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj1 | [Object](structs.md#Object) | +| obj2 | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_set_gfx_pos_at_obj_pos(struct Object *obj1, struct Object *obj2);` + +[:arrow_up_small:](#) + +
+ +## [obj_translate_local](#obj_translate_local) + +### Lua Example +`obj_translate_local(obj, posIndex, localTranslateIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| posIndex | `integer` | +| localTranslateIndex | `integer` | + +### Returns +- None + +### C Prototype +`void obj_translate_local(struct Object *obj, s16 posIndex, s16 localTranslateIndex);` + +[:arrow_up_small:](#) + +
+ +## [obj_build_transform_from_pos_and_angle](#obj_build_transform_from_pos_and_angle) + +### Lua Example +`obj_build_transform_from_pos_and_angle(obj, posIndex, angleIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| posIndex | `integer` | +| angleIndex | `integer` | + +### Returns +- None + +### C Prototype +`void obj_build_transform_from_pos_and_angle(struct Object *obj, s16 posIndex, s16 angleIndex);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_throw_matrix_from_transform](#obj_set_throw_matrix_from_transform) + +### Lua Example +`obj_set_throw_matrix_from_transform(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_set_throw_matrix_from_transform(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [obj_build_transform_relative_to_parent](#obj_build_transform_relative_to_parent) + +### Lua Example +`obj_build_transform_relative_to_parent(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_build_transform_relative_to_parent(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [obj_create_transform_from_self](#obj_create_transform_from_self) + +### Lua Example +`obj_create_transform_from_self(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_create_transform_from_self(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_rotate_move_angle_using_vel](#cur_obj_rotate_move_angle_using_vel) + +### Lua Example +`cur_obj_rotate_move_angle_using_vel()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_rotate_move_angle_using_vel(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_rotate_face_angle_using_vel](#cur_obj_rotate_face_angle_using_vel) + +### Lua Example +`cur_obj_rotate_face_angle_using_vel()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_rotate_face_angle_using_vel(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_face_angle_to_move_angle](#cur_obj_set_face_angle_to_move_angle) + +### Lua Example +`cur_obj_set_face_angle_to_move_angle()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_set_face_angle_to_move_angle(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_follow_path](#cur_obj_follow_path) + +### Lua Example +`local integerValue = cur_obj_follow_path(unusedArg)` + +### Parameters +| Field | Type | +| ----- | ---- | +| unusedArg | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_follow_path(UNUSED s32 unusedArg);` + +[:arrow_up_small:](#) + +
+ +## [chain_segment_init](#chain_segment_init) + +### Lua Example +`chain_segment_init(segment)` + +### Parameters +| Field | Type | +| ----- | ---- | +| segment | [ChainSegment](structs.md#ChainSegment) | + +### Returns +- None + +### C Prototype +`void chain_segment_init(struct ChainSegment *segment);` + +[:arrow_up_small:](#) + +
+ +## [random_f32_around_zero](#random_f32_around_zero) + +### Lua Example +`local numberValue = random_f32_around_zero(diameter)` + +### Parameters +| Field | Type | +| ----- | ---- | +| diameter | `number` | + +### Returns +- `number` + +### C Prototype +`f32 random_f32_around_zero(f32 diameter);` + +[:arrow_up_small:](#) + +
+ +## [obj_scale_random](#obj_scale_random) + +### Lua Example +`obj_scale_random(obj, rangeLength, minScale)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| rangeLength | `number` | +| minScale | `number` | + +### Returns +- None + +### C Prototype +`void obj_scale_random(struct Object *obj, f32 rangeLength, f32 minScale);` + +[:arrow_up_small:](#) + +
+ +## [obj_translate_xyz_random](#obj_translate_xyz_random) + +### Lua Example +`obj_translate_xyz_random(obj, rangeLength)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| rangeLength | `number` | + +### Returns +- None + +### C Prototype +`void obj_translate_xyz_random(struct Object *obj, f32 rangeLength);` + +[:arrow_up_small:](#) + +
+ +## [obj_translate_xz_random](#obj_translate_xz_random) + +### Lua Example +`obj_translate_xz_random(obj, rangeLength)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| rangeLength | `number` | + +### Returns +- None + +### C Prototype +`void obj_translate_xz_random(struct Object *obj, f32 rangeLength);` + +[:arrow_up_small:](#) + +
+ +## [obj_build_vel_from_transform](#obj_build_vel_from_transform) + +### Lua Example +`obj_build_vel_from_transform(a0)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a0 | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_build_vel_from_transform(struct Object *a0);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_pos_via_transform](#cur_obj_set_pos_via_transform) + +### Lua Example +`cur_obj_set_pos_via_transform()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_set_pos_via_transform(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_reflect_move_angle_off_wall](#cur_obj_reflect_move_angle_off_wall) + +### Lua Example +`local integerValue = cur_obj_reflect_move_angle_off_wall()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s16 cur_obj_reflect_move_angle_off_wall(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_spawn_particles](#cur_obj_spawn_particles) + +### Lua Example +`cur_obj_spawn_particles(info)` + +### Parameters +| Field | Type | +| ----- | ---- | +| info | [SpawnParticlesInfo](structs.md#SpawnParticlesInfo) | + +### Returns +- None + +### C Prototype +`void cur_obj_spawn_particles(struct SpawnParticlesInfo *info);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_hitbox](#obj_set_hitbox) + +### Lua Example +`obj_set_hitbox(obj, hitbox)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | +| hitbox | [ObjectHitbox](structs.md#ObjectHitbox) | + +### Returns +- None + +### C Prototype +`void obj_set_hitbox(struct Object *obj, struct ObjectHitbox *hitbox);` + +[:arrow_up_small:](#) + +
+ +## [signum_positive](#signum_positive) + +### Lua Example +`local integerValue = signum_positive(x)` + +### Parameters +| Field | Type | +| ----- | ---- | +| x | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 signum_positive(s32 x);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_wait_then_blink](#cur_obj_wait_then_blink) + +### Lua Example +`local integerValue = cur_obj_wait_then_blink(timeUntilBlinking, numBlinks)` + +### Parameters +| Field | Type | +| ----- | ---- | +| timeUntilBlinking | `integer` | +| numBlinks | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_wait_then_blink(s32 timeUntilBlinking, s32 numBlinks);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_is_mario_ground_pounding_platform](#cur_obj_is_mario_ground_pounding_platform) + +### Lua Example +`local integerValue = cur_obj_is_mario_ground_pounding_platform()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_is_mario_ground_pounding_platform(void);` + +[:arrow_up_small:](#) + +
+ +## [spawn_mist_particles](#spawn_mist_particles) + +### Lua Example +`spawn_mist_particles()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void spawn_mist_particles(void);` + +[:arrow_up_small:](#) + +
+ +## [spawn_mist_particles_with_sound](#spawn_mist_particles_with_sound) + +### Lua Example +`spawn_mist_particles_with_sound(sp18)` + +### Parameters +| Field | Type | +| ----- | ---- | +| sp18 | `integer` | + +### Returns +- None + +### C Prototype +`void spawn_mist_particles_with_sound(u32 sp18);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_push_mario_away](#cur_obj_push_mario_away) + +### Lua Example +`cur_obj_push_mario_away(radius)` + +### Parameters +| Field | Type | +| ----- | ---- | +| radius | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_push_mario_away(f32 radius);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_push_mario_away_from_cylinder](#cur_obj_push_mario_away_from_cylinder) + +### Lua Example +`cur_obj_push_mario_away_from_cylinder(radius, extentY)` + +### Parameters +| Field | Type | +| ----- | ---- | +| radius | `number` | +| extentY | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_push_mario_away_from_cylinder(f32 radius, f32 extentY);` + +[:arrow_up_small:](#) + +
+ +## [bhv_dust_smoke_loop](#bhv_dust_smoke_loop) + +### Lua Example +`bhv_dust_smoke_loop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_dust_smoke_loop(void);` + +[:arrow_up_small:](#) + +
+ +## [stub_obj_helpers_3](#stub_obj_helpers_3) + +### Lua Example +`stub_obj_helpers_3(sp0, sp4)` + +### Parameters +| Field | Type | +| ----- | ---- | +| sp0 | `integer` | +| sp4 | `integer` | + +### Returns +- None + +### C Prototype +`void stub_obj_helpers_3(UNUSED s32 sp0, UNUSED s32 sp4);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_scale_over_time](#cur_obj_scale_over_time) + +### Lua Example +`cur_obj_scale_over_time(a0, a1, sp10, sp14)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a0 | `integer` | +| a1 | `integer` | +| sp10 | `number` | +| sp14 | `number` | + +### Returns +- None + +### C Prototype +`void cur_obj_scale_over_time(s32 a0, s32 a1, f32 sp10, f32 sp14);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_pos_to_home_with_debug](#cur_obj_set_pos_to_home_with_debug) + +### Lua Example +`cur_obj_set_pos_to_home_with_debug()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_set_pos_to_home_with_debug(void);` + +[:arrow_up_small:](#) + +
+ +## [stub_obj_helpers_4](#stub_obj_helpers_4) + +### Lua Example +`stub_obj_helpers_4()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void stub_obj_helpers_4(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_is_mario_on_platform](#cur_obj_is_mario_on_platform) + +### Lua Example +`local integerValue = cur_obj_is_mario_on_platform()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_is_mario_on_platform(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_is_any_player_on_platform](#cur_obj_is_any_player_on_platform) + +### Lua Example +`local integerValue = cur_obj_is_any_player_on_platform()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_is_any_player_on_platform(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_shake_y_until](#cur_obj_shake_y_until) + +### Lua Example +`local integerValue = cur_obj_shake_y_until(cycles, amount)` + +### Parameters +| Field | Type | +| ----- | ---- | +| cycles | `integer` | +| amount | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_shake_y_until(s32 cycles, s32 amount);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_move_up_and_down](#cur_obj_move_up_and_down) + +### Lua Example +`local integerValue = cur_obj_move_up_and_down(a0)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a0 | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_move_up_and_down(s32 a0);` + +[:arrow_up_small:](#) + +
+ +## [spawn_star_with_no_lvl_exit](#spawn_star_with_no_lvl_exit) + +### Lua Example +`local ObjectValue = spawn_star_with_no_lvl_exit(sp20, sp24)` + +### Parameters +| Field | Type | +| ----- | ---- | +| sp20 | `integer` | +| sp24 | `integer` | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *spawn_star_with_no_lvl_exit(s32 sp20, s32 sp24);` + +[:arrow_up_small:](#) + +
+ +## [spawn_base_star_with_no_lvl_exit](#spawn_base_star_with_no_lvl_exit) + +### Lua Example +`spawn_base_star_with_no_lvl_exit()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void spawn_base_star_with_no_lvl_exit(void);` + +[:arrow_up_small:](#) + +
+ +## [bit_shift_left](#bit_shift_left) + +### Lua Example +`local integerValue = bit_shift_left(a0)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a0 | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 bit_shift_left(s32 a0);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_mario_far_away](#cur_obj_mario_far_away) + +### Lua Example +`local integerValue = cur_obj_mario_far_away()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_mario_far_away(void);` + +[:arrow_up_small:](#) + +
+ +## [is_mario_moving_fast_or_in_air](#is_mario_moving_fast_or_in_air) + +### Lua Example +`local integerValue = is_mario_moving_fast_or_in_air(speedThreshold)` + +### Parameters +| Field | Type | +| ----- | ---- | +| speedThreshold | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 is_mario_moving_fast_or_in_air(s32 speedThreshold);` + +[:arrow_up_small:](#) + +
+ +## [is_item_in_array](#is_item_in_array) + +### Lua Example +`local integerValue = is_item_in_array(item, array)` + +### Parameters +| Field | Type | +| ----- | ---- | +| item | `integer` | +| array | `Pointer` <`integer`> | + +### Returns +- `integer` + +### C Prototype +`s32 is_item_in_array(s8 item, s8 *array);` + +[:arrow_up_small:](#) + +
+ +## [bhv_init_room](#bhv_init_room) + +### Lua Example +`bhv_init_room()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void bhv_init_room(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_enable_rendering_if_mario_in_room](#cur_obj_enable_rendering_if_mario_in_room) + +### Lua Example +`cur_obj_enable_rendering_if_mario_in_room()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_enable_rendering_if_mario_in_room(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_set_hitbox_and_die_if_attacked](#cur_obj_set_hitbox_and_die_if_attacked) + +### Lua Example +`local integerValue = cur_obj_set_hitbox_and_die_if_attacked(hitbox, deathSound, noLootCoins)` + +### Parameters +| Field | Type | +| ----- | ---- | +| hitbox | [ObjectHitbox](structs.md#ObjectHitbox) | +| deathSound | `integer` | +| noLootCoins | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_set_hitbox_and_die_if_attacked(struct ObjectHitbox *hitbox, s32 deathSound, s32 noLootCoins);` + +[:arrow_up_small:](#) + +
+ +## [obj_explode_and_spawn_coins](#obj_explode_and_spawn_coins) + +### Lua Example +`obj_explode_and_spawn_coins(sp18, sp1C)` + +### Parameters +| Field | Type | +| ----- | ---- | +| sp18 | `number` | +| sp1C | `integer` | + +### Returns +- None + +### C Prototype +`void obj_explode_and_spawn_coins(f32 sp18, s32 sp1C);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_if_hit_wall_bounce_away](#cur_obj_if_hit_wall_bounce_away) + +### Lua Example +`cur_obj_if_hit_wall_bounce_away()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_if_hit_wall_bounce_away(void);` [:arrow_up_small:](#) @@ -2078,39 +4916,342 @@
-## [cur_obj_if_hit_wall_bounce_away](#cur_obj_if_hit_wall_bounce_away) +## [obj_is_hidden](#obj_is_hidden) ### Lua Example -`cur_obj_if_hit_wall_bounce_away()` +`local integerValue = obj_is_hidden(obj)` ### Parameters -- None +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | ### Returns -- None +- `integer` ### C Prototype -`void cur_obj_if_hit_wall_bounce_away(void);` +`s32 obj_is_hidden(struct Object *obj);` [:arrow_up_small:](#)
-## [cur_obj_init_animation](#cur_obj_init_animation) +## [enable_time_stop](#enable_time_stop) ### Lua Example -`cur_obj_init_animation(animIndex)` +`enable_time_stop()` ### Parameters -| Field | Type | -| ----- | ---- | -| animIndex | `integer` | +- None ### Returns - None ### C Prototype -`void cur_obj_init_animation(s32 animIndex);` +`void enable_time_stop(void);` + +[:arrow_up_small:](#) + +
+ +## [enable_time_stop_if_alone](#enable_time_stop_if_alone) + +### Lua Example +`enable_time_stop_if_alone()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void enable_time_stop_if_alone(void);` + +[:arrow_up_small:](#) + +
+ +## [disable_time_stop](#disable_time_stop) + +### Lua Example +`disable_time_stop()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void disable_time_stop(void);` + +[:arrow_up_small:](#) + +
+ +## [set_time_stop_flags](#set_time_stop_flags) + +### Lua Example +`set_time_stop_flags(flags)` + +### Parameters +| Field | Type | +| ----- | ---- | +| flags | `integer` | + +### Returns +- None + +### C Prototype +`void set_time_stop_flags(s32 flags);` + +[:arrow_up_small:](#) + +
+ +## [set_time_stop_flags_if_alone](#set_time_stop_flags_if_alone) + +### Lua Example +`set_time_stop_flags_if_alone(flags)` + +### Parameters +| Field | Type | +| ----- | ---- | +| flags | `integer` | + +### Returns +- None + +### C Prototype +`void set_time_stop_flags_if_alone(s32 flags);` + +[:arrow_up_small:](#) + +
+ +## [clear_time_stop_flags](#clear_time_stop_flags) + +### Lua Example +`clear_time_stop_flags(flags)` + +### Parameters +| Field | Type | +| ----- | ---- | +| flags | `integer` | + +### Returns +- None + +### C Prototype +`void clear_time_stop_flags(s32 flags);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_can_mario_activate_textbox](#cur_obj_can_mario_activate_textbox) + +### Lua Example +`local integerValue = cur_obj_can_mario_activate_textbox(m, radius, height, unused)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| radius | `number` | +| height | `number` | +| unused | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_can_mario_activate_textbox(struct MarioState* m, f32 radius, f32 height, UNUSED s32 unused);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_can_mario_activate_textbox_2](#cur_obj_can_mario_activate_textbox_2) + +### Lua Example +`local integerValue = cur_obj_can_mario_activate_textbox_2(m, radius, height)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| radius | `number` | +| height | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_can_mario_activate_textbox_2(struct MarioState* m, f32 radius, f32 height);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_end_dialog](#cur_obj_end_dialog) + +### Lua Example +`cur_obj_end_dialog(m, dialogFlags, dialogResult)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| dialogFlags | `integer` | +| dialogResult | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_end_dialog(struct MarioState* m, s32 dialogFlags, s32 dialogResult);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_has_model](#cur_obj_has_model) + +### Lua Example +`local integerValue = cur_obj_has_model(modelID)` + +### Parameters +| Field | Type | +| ----- | ---- | +| modelID | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_has_model(u16 modelID);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_align_gfx_with_floor](#cur_obj_align_gfx_with_floor) + +### Lua Example +`cur_obj_align_gfx_with_floor()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void cur_obj_align_gfx_with_floor(void);` + +[:arrow_up_small:](#) + +
+ +## [mario_is_within_rectangle](#mario_is_within_rectangle) + +### Lua Example +`local integerValue = mario_is_within_rectangle(minX, maxX, minZ, maxZ)` + +### Parameters +| Field | Type | +| ----- | ---- | +| minX | `integer` | +| maxX | `integer` | +| minZ | `integer` | +| maxZ | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 mario_is_within_rectangle(s16 minX, s16 maxX, s16 minZ, s16 maxZ);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_shake_screen](#cur_obj_shake_screen) + +### Lua Example +`cur_obj_shake_screen(shake)` + +### Parameters +| Field | Type | +| ----- | ---- | +| shake | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_shake_screen(s32 shake);` + +[:arrow_up_small:](#) + +
+ +## [obj_attack_collided_from_other_object](#obj_attack_collided_from_other_object) + +### Lua Example +`local integerValue = obj_attack_collided_from_other_object(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- `integer` + +### C Prototype +`s32 obj_attack_collided_from_other_object(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_was_attacked_or_ground_pounded](#cur_obj_was_attacked_or_ground_pounded) + +### Lua Example +`local integerValue = cur_obj_was_attacked_or_ground_pounded()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 cur_obj_was_attacked_or_ground_pounded(void);` + +[:arrow_up_small:](#) + +
+ +## [obj_copy_behavior_params](#obj_copy_behavior_params) + +### Lua Example +`obj_copy_behavior_params(dst, src)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dst | [Object](structs.md#Object) | +| src | [Object](structs.md#Object) | + +### Returns +- None + +### C Prototype +`void obj_copy_behavior_params(struct Object *dst, struct Object *src);` [:arrow_up_small:](#) @@ -2177,51 +5318,10 @@
-## [cur_obj_init_animation_with_accel_and_sound](#cur_obj_init_animation_with_accel_and_sound) +## [cur_obj_check_grabbed_mario](#cur_obj_check_grabbed_mario) ### Lua Example -`cur_obj_init_animation_with_accel_and_sound(animIndex, accel)` - -### Parameters -| Field | Type | -| ----- | ---- | -| animIndex | `integer` | -| accel | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_init_animation_with_accel_and_sound(s32 animIndex, f32 accel);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_init_animation_with_sound](#cur_obj_init_animation_with_sound) - -### Lua Example -`cur_obj_init_animation_with_sound(animIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| animIndex | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_init_animation_with_sound(s32 animIndex);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_is_any_player_on_platform](#cur_obj_is_any_player_on_platform) - -### Lua Example -`local integerValue = cur_obj_is_any_player_on_platform()` +`local integerValue = cur_obj_check_grabbed_mario()` ### Parameters - None @@ -2230,16 +5330,16 @@ - `integer` ### C Prototype -`s32 cur_obj_is_any_player_on_platform(void);` +`s32 cur_obj_check_grabbed_mario(void);` [:arrow_up_small:](#)
-## [cur_obj_is_mario_ground_pounding_platform](#cur_obj_is_mario_ground_pounding_platform) +## [player_performed_grab_escape_action](#player_performed_grab_escape_action) ### Lua Example -`local integerValue = cur_obj_is_mario_ground_pounding_platform()` +`local integerValue = player_performed_grab_escape_action()` ### Parameters - None @@ -2248,16 +5348,74 @@ - `integer` ### C Prototype -`s32 cur_obj_is_mario_ground_pounding_platform(void);` +`s32 player_performed_grab_escape_action(void);` [:arrow_up_small:](#)
-## [cur_obj_is_mario_on_platform](#cur_obj_is_mario_on_platform) +## [cur_obj_unused_play_footstep_sound](#cur_obj_unused_play_footstep_sound) ### Lua Example -`local integerValue = cur_obj_is_mario_on_platform()` +`cur_obj_unused_play_footstep_sound(animFrame1, animFrame2, sound)` + +### Parameters +| Field | Type | +| ----- | ---- | +| animFrame1 | `integer` | +| animFrame2 | `integer` | +| sound | `integer` | + +### Returns +- None + +### C Prototype +`void cur_obj_unused_play_footstep_sound(s32 animFrame1, s32 animFrame2, s32 sound);` + +[:arrow_up_small:](#) + +
+ +## [enable_time_stop_including_mario](#enable_time_stop_including_mario) + +### Lua Example +`enable_time_stop_including_mario()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void enable_time_stop_including_mario(void);` + +[:arrow_up_small:](#) + +
+ +## [disable_time_stop_including_mario](#disable_time_stop_including_mario) + +### Lua Example +`disable_time_stop_including_mario()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void disable_time_stop_including_mario(void);` + +[:arrow_up_small:](#) + +
+ +## [cur_obj_check_interacted](#cur_obj_check_interacted) + +### Lua Example +`local integerValue = cur_obj_check_interacted()` ### Parameters - None @@ -2266,970 +5424,7 @@ - `integer` ### C Prototype -`s32 cur_obj_is_mario_on_platform(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_lateral_dist_from_mario_to_home](#cur_obj_lateral_dist_from_mario_to_home) - -### Lua Example -`local numberValue = cur_obj_lateral_dist_from_mario_to_home()` - -### Parameters -- None - -### Returns -- `number` - -### C Prototype -`f32 cur_obj_lateral_dist_from_mario_to_home(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_lateral_dist_from_obj_to_home](#cur_obj_lateral_dist_from_obj_to_home) - -### Lua Example -`local numberValue = cur_obj_lateral_dist_from_obj_to_home(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- `number` - -### C Prototype -`f32 cur_obj_lateral_dist_from_obj_to_home(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_lateral_dist_to_home](#cur_obj_lateral_dist_to_home) - -### Lua Example -`local numberValue = cur_obj_lateral_dist_to_home()` - -### Parameters -- None - -### Returns -- `number` - -### C Prototype -`f32 cur_obj_lateral_dist_to_home(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_mario_far_away](#cur_obj_mario_far_away) - -### Lua Example -`local integerValue = cur_obj_mario_far_away()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_mario_far_away(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_after_thrown_or_dropped](#cur_obj_move_after_thrown_or_dropped) - -### Lua Example -`cur_obj_move_after_thrown_or_dropped(forwardVel, velY)` - -### Parameters -| Field | Type | -| ----- | ---- | -| forwardVel | `number` | -| velY | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_move_after_thrown_or_dropped(f32 forwardVel, f32 velY);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_standard](#cur_obj_move_standard) - -### Lua Example -`cur_obj_move_standard(steepSlopeAngleDegrees)` - -### Parameters -| Field | Type | -| ----- | ---- | -| steepSlopeAngleDegrees | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_move_standard(s16 steepSlopeAngleDegrees);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_up_and_down](#cur_obj_move_up_and_down) - -### Lua Example -`local integerValue = cur_obj_move_up_and_down(a0)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a0 | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_move_up_and_down(s32 a0);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_update_ground_air_flags](#cur_obj_move_update_ground_air_flags) - -### Lua Example -`cur_obj_move_update_ground_air_flags(gravity, bounciness)` - -### Parameters -| Field | Type | -| ----- | ---- | -| gravity | `number` | -| bounciness | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_move_update_ground_air_flags(UNUSED f32 gravity, f32 bounciness);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_update_underwater_flags](#cur_obj_move_update_underwater_flags) - -### Lua Example -`cur_obj_move_update_underwater_flags()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_move_update_underwater_flags(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_using_fvel_and_gravity](#cur_obj_move_using_fvel_and_gravity) - -### Lua Example -`cur_obj_move_using_fvel_and_gravity()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_move_using_fvel_and_gravity(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_using_vel](#cur_obj_move_using_vel) - -### Lua Example -`cur_obj_move_using_vel()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_move_using_vel(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_using_vel_and_gravity](#cur_obj_move_using_vel_and_gravity) - -### Lua Example -`cur_obj_move_using_vel_and_gravity()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_move_using_vel_and_gravity(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_xz](#cur_obj_move_xz) - -### Lua Example -`local integerValue = cur_obj_move_xz(steepSlopeNormalY, careAboutEdgesAndSteepSlopes)` - -### Parameters -| Field | Type | -| ----- | ---- | -| steepSlopeNormalY | `number` | -| careAboutEdgesAndSteepSlopes | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_move_xz(f32 steepSlopeNormalY, s32 careAboutEdgesAndSteepSlopes);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_xz_using_fvel_and_yaw](#cur_obj_move_xz_using_fvel_and_yaw) - -### Lua Example -`cur_obj_move_xz_using_fvel_and_yaw()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_move_xz_using_fvel_and_yaw(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_y](#cur_obj_move_y) - -### Lua Example -`cur_obj_move_y(gravity, bounciness, buoyancy)` - -### Parameters -| Field | Type | -| ----- | ---- | -| gravity | `number` | -| bounciness | `number` | -| buoyancy | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_move_y(f32 gravity, f32 bounciness, f32 buoyancy);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_y_and_get_water_level](#cur_obj_move_y_and_get_water_level) - -### Lua Example -`local numberValue = cur_obj_move_y_and_get_water_level(gravity, buoyancy)` - -### Parameters -| Field | Type | -| ----- | ---- | -| gravity | `number` | -| buoyancy | `number` | - -### Returns -- `number` - -### C Prototype -`f32 cur_obj_move_y_and_get_water_level(f32 gravity, f32 buoyancy);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_move_y_with_terminal_vel](#cur_obj_move_y_with_terminal_vel) - -### Lua Example -`cur_obj_move_y_with_terminal_vel()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_move_y_with_terminal_vel(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_nearest_object_with_behavior](#cur_obj_nearest_object_with_behavior) - -### Lua Example -`local ObjectValue = cur_obj_nearest_object_with_behavior(behavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *cur_obj_nearest_object_with_behavior(const BehaviorScript *behavior);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_outside_home_rectangle](#cur_obj_outside_home_rectangle) - -### Lua Example -`local integerValue = cur_obj_outside_home_rectangle(minX, maxX, minZ, maxZ)` - -### Parameters -| Field | Type | -| ----- | ---- | -| minX | `number` | -| maxX | `number` | -| minZ | `number` | -| maxZ | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_outside_home_rectangle(f32 minX, f32 maxX, f32 minZ, f32 maxZ);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_outside_home_square](#cur_obj_outside_home_square) - -### Lua Example -`local integerValue = cur_obj_outside_home_square(halfLength)` - -### Parameters -| Field | Type | -| ----- | ---- | -| halfLength | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_outside_home_square(f32 halfLength);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_push_mario_away](#cur_obj_push_mario_away) - -### Lua Example -`cur_obj_push_mario_away(radius)` - -### Parameters -| Field | Type | -| ----- | ---- | -| radius | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_push_mario_away(f32 radius);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_push_mario_away_from_cylinder](#cur_obj_push_mario_away_from_cylinder) - -### Lua Example -`cur_obj_push_mario_away_from_cylinder(radius, extentY)` - -### Parameters -| Field | Type | -| ----- | ---- | -| radius | `number` | -| extentY | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_push_mario_away_from_cylinder(f32 radius, f32 extentY);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_reflect_move_angle_off_wall](#cur_obj_reflect_move_angle_off_wall) - -### Lua Example -`local integerValue = cur_obj_reflect_move_angle_off_wall()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s16 cur_obj_reflect_move_angle_off_wall(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_reset_timer_and_subaction](#cur_obj_reset_timer_and_subaction) - -### Lua Example -`cur_obj_reset_timer_and_subaction()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_reset_timer_and_subaction(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_resolve_wall_collisions](#cur_obj_resolve_wall_collisions) - -### Lua Example -`local integerValue = cur_obj_resolve_wall_collisions()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_resolve_wall_collisions(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_reverse_animation](#cur_obj_reverse_animation) - -### Lua Example -`cur_obj_reverse_animation()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_reverse_animation(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_rotate_face_angle_using_vel](#cur_obj_rotate_face_angle_using_vel) - -### Lua Example -`cur_obj_rotate_face_angle_using_vel()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_rotate_face_angle_using_vel(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_rotate_move_angle_using_vel](#cur_obj_rotate_move_angle_using_vel) - -### Lua Example -`cur_obj_rotate_move_angle_using_vel()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_rotate_move_angle_using_vel(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_rotate_yaw_toward](#cur_obj_rotate_yaw_toward) - -### Lua Example -`local integerValue = cur_obj_rotate_yaw_toward(target, increment)` - -### Parameters -| Field | Type | -| ----- | ---- | -| target | `integer` | -| increment | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_rotate_yaw_toward(s16 target, s16 increment);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_scale](#cur_obj_scale) - -### Lua Example -`cur_obj_scale(scale)` - -### Parameters -| Field | Type | -| ----- | ---- | -| scale | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_scale(f32 scale);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_scale_over_time](#cur_obj_scale_over_time) - -### Lua Example -`cur_obj_scale_over_time(a0, a1, sp10, sp14)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a0 | `integer` | -| a1 | `integer` | -| sp10 | `number` | -| sp14 | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_scale_over_time(s32 a0, s32 a1, f32 sp10, f32 sp14);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_behavior](#cur_obj_set_behavior) - -### Lua Example -`cur_obj_set_behavior(behavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | - -### Returns -- None - -### C Prototype -`void cur_obj_set_behavior(const BehaviorScript *behavior);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_billboard_if_vanilla_cam](#cur_obj_set_billboard_if_vanilla_cam) - -### Lua Example -`cur_obj_set_billboard_if_vanilla_cam()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_set_billboard_if_vanilla_cam(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_face_angle_to_move_angle](#cur_obj_set_face_angle_to_move_angle) - -### Lua Example -`cur_obj_set_face_angle_to_move_angle()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_set_face_angle_to_move_angle(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_hitbox_and_die_if_attacked](#cur_obj_set_hitbox_and_die_if_attacked) - -### Lua Example -`local integerValue = cur_obj_set_hitbox_and_die_if_attacked(hitbox, deathSound, noLootCoins)` - -### Parameters -| Field | Type | -| ----- | ---- | -| hitbox | [ObjectHitbox](structs.md#ObjectHitbox) | -| deathSound | `integer` | -| noLootCoins | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_set_hitbox_and_die_if_attacked(struct ObjectHitbox *hitbox, s32 deathSound, s32 noLootCoins);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_hitbox_radius_and_height](#cur_obj_set_hitbox_radius_and_height) - -### Lua Example -`cur_obj_set_hitbox_radius_and_height(radius, height)` - -### Parameters -| Field | Type | -| ----- | ---- | -| radius | `number` | -| height | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_set_hitbox_radius_and_height(f32 radius, f32 height);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_home_once](#cur_obj_set_home_once) - -### Lua Example -`cur_obj_set_home_once()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_set_home_once(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_hurtbox_radius_and_height](#cur_obj_set_hurtbox_radius_and_height) - -### Lua Example -`cur_obj_set_hurtbox_radius_and_height(radius, height)` - -### Parameters -| Field | Type | -| ----- | ---- | -| radius | `number` | -| height | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_set_hurtbox_radius_and_height(f32 radius, f32 height);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_pos_relative](#cur_obj_set_pos_relative) - -### Lua Example -`cur_obj_set_pos_relative(other, dleft, dy, dforward)` - -### Parameters -| Field | Type | -| ----- | ---- | -| other | [Object](structs.md#Object) | -| dleft | `number` | -| dy | `number` | -| dforward | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_set_pos_relative(struct Object *other, f32 dleft, f32 dy, f32 dforward);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_pos_relative_to_parent](#cur_obj_set_pos_relative_to_parent) - -### Lua Example -`cur_obj_set_pos_relative_to_parent(dleft, dy, dforward)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dleft | `number` | -| dy | `number` | -| dforward | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_set_pos_relative_to_parent(f32 dleft, f32 dy, f32 dforward);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_pos_to_home](#cur_obj_set_pos_to_home) - -### Lua Example -`cur_obj_set_pos_to_home()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_set_pos_to_home(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_pos_to_home_and_stop](#cur_obj_set_pos_to_home_and_stop) - -### Lua Example -`cur_obj_set_pos_to_home_and_stop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_set_pos_to_home_and_stop(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_pos_to_home_with_debug](#cur_obj_set_pos_to_home_with_debug) - -### Lua Example -`cur_obj_set_pos_to_home_with_debug()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_set_pos_to_home_with_debug(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_pos_via_transform](#cur_obj_set_pos_via_transform) - -### Lua Example -`cur_obj_set_pos_via_transform()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_set_pos_via_transform(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_vel_from_mario_vel](#cur_obj_set_vel_from_mario_vel) - -### Lua Example -`cur_obj_set_vel_from_mario_vel(m, f12, f14)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| f12 | `number` | -| f14 | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_set_vel_from_mario_vel(struct MarioState* m, f32 f12, f32 f14);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_set_y_vel_and_animation](#cur_obj_set_y_vel_and_animation) - -### Lua Example -`cur_obj_set_y_vel_and_animation(sp18, sp1C)` - -### Parameters -| Field | Type | -| ----- | ---- | -| sp18 | `number` | -| sp1C | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_set_y_vel_and_animation(f32 sp18, s32 sp1C);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_shake_screen](#cur_obj_shake_screen) - -### Lua Example -`cur_obj_shake_screen(shake)` - -### Parameters -| Field | Type | -| ----- | ---- | -| shake | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_shake_screen(s32 shake);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_shake_y](#cur_obj_shake_y) - -### Lua Example -`cur_obj_shake_y(amount)` - -### Parameters -| Field | Type | -| ----- | ---- | -| amount | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_shake_y(f32 amount);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_shake_y_until](#cur_obj_shake_y_until) - -### Lua Example -`local integerValue = cur_obj_shake_y_until(cycles, amount)` - -### Parameters -| Field | Type | -| ----- | ---- | -| cycles | `integer` | -| amount | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_shake_y_until(s32 cycles, s32 amount);` +`s32 cur_obj_check_interacted(void);` [:arrow_up_small:](#) @@ -3253,46 +5448,6 @@
-## [cur_obj_spawn_loot_coin_at_mario_pos](#cur_obj_spawn_loot_coin_at_mario_pos) - -### Lua Example -`cur_obj_spawn_loot_coin_at_mario_pos(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- None - -### C Prototype -`void cur_obj_spawn_loot_coin_at_mario_pos(struct MarioState* m);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_spawn_particles](#cur_obj_spawn_particles) - -### Lua Example -`cur_obj_spawn_particles(info)` - -### Parameters -| Field | Type | -| ----- | ---- | -| info | [SpawnParticlesInfo](structs.md#SpawnParticlesInfo) | - -### Returns -- None - -### C Prototype -`void cur_obj_spawn_particles(struct SpawnParticlesInfo *info);` - -[:arrow_up_small:](#) - -
- ## [cur_obj_spawn_star_at_y_offset](#cur_obj_spawn_star_at_y_offset) ### Lua Example @@ -3316,31 +5471,10 @@
-## [cur_obj_start_cam_event](#cur_obj_start_cam_event) +## [cur_obj_set_home_once](#cur_obj_set_home_once) ### Lua Example -`cur_obj_start_cam_event(obj, cameraEvent)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| cameraEvent | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_start_cam_event(UNUSED struct Object *obj, s32 cameraEvent);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_unhide](#cur_obj_unhide) - -### Lua Example -`cur_obj_unhide()` +`cur_obj_set_home_once()` ### Parameters - None @@ -3349,430 +5483,7 @@ - None ### C Prototype -`void cur_obj_unhide(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_unrender_and_reset_state](#cur_obj_unrender_and_reset_state) - -### Lua Example -`cur_obj_unrender_and_reset_state(sp18, sp1C)` - -### Parameters -| Field | Type | -| ----- | ---- | -| sp18 | `integer` | -| sp1C | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_unrender_and_reset_state(s32 sp18, s32 sp1C);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_unused_init_on_floor](#cur_obj_unused_init_on_floor) - -### Lua Example -`cur_obj_unused_init_on_floor()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_unused_init_on_floor(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_unused_play_footstep_sound](#cur_obj_unused_play_footstep_sound) - -### Lua Example -`cur_obj_unused_play_footstep_sound(animFrame1, animFrame2, sound)` - -### Parameters -| Field | Type | -| ----- | ---- | -| animFrame1 | `integer` | -| animFrame2 | `integer` | -| sound | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_unused_play_footstep_sound(s32 animFrame1, s32 animFrame2, s32 sound);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_unused_resolve_wall_collisions](#cur_obj_unused_resolve_wall_collisions) - -### Lua Example -`cur_obj_unused_resolve_wall_collisions(offsetY, radius)` - -### Parameters -| Field | Type | -| ----- | ---- | -| offsetY | `number` | -| radius | `number` | - -### Returns -- None - -### C Prototype -`void cur_obj_unused_resolve_wall_collisions(f32 offsetY, f32 radius);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_update_floor](#cur_obj_update_floor) - -### Lua Example -`cur_obj_update_floor()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_update_floor(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_update_floor_and_resolve_wall_collisions](#cur_obj_update_floor_and_resolve_wall_collisions) - -### Lua Example -`cur_obj_update_floor_and_resolve_wall_collisions(steepSlopeDegrees)` - -### Parameters -| Field | Type | -| ----- | ---- | -| steepSlopeDegrees | `integer` | - -### Returns -- None - -### C Prototype -`void cur_obj_update_floor_and_resolve_wall_collisions(s16 steepSlopeDegrees);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_update_floor_and_walls](#cur_obj_update_floor_and_walls) - -### Lua Example -`cur_obj_update_floor_and_walls()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_update_floor_and_walls(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_update_floor_height](#cur_obj_update_floor_height) - -### Lua Example -`cur_obj_update_floor_height()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void cur_obj_update_floor_height(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_update_floor_height_and_get_floor](#cur_obj_update_floor_height_and_get_floor) - -### Lua Example -`local SurfaceValue = cur_obj_update_floor_height_and_get_floor()` - -### Parameters -- None - -### Returns -[Surface](structs.md#Surface) - -### C Prototype -`struct Surface *cur_obj_update_floor_height_and_get_floor(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_wait_then_blink](#cur_obj_wait_then_blink) - -### Lua Example -`local integerValue = cur_obj_wait_then_blink(timeUntilBlinking, numBlinks)` - -### Parameters -| Field | Type | -| ----- | ---- | -| timeUntilBlinking | `integer` | -| numBlinks | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_wait_then_blink(s32 timeUntilBlinking, s32 numBlinks);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_was_attacked_or_ground_pounded](#cur_obj_was_attacked_or_ground_pounded) - -### Lua Example -`local integerValue = cur_obj_was_attacked_or_ground_pounded()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_was_attacked_or_ground_pounded(void);` - -[:arrow_up_small:](#) - -
- -## [cur_obj_within_12k_bounds](#cur_obj_within_12k_bounds) - -### Lua Example -`local integerValue = cur_obj_within_12k_bounds()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 cur_obj_within_12k_bounds(void);` - -[:arrow_up_small:](#) - -
- -## [disable_time_stop](#disable_time_stop) - -### Lua Example -`disable_time_stop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void disable_time_stop(void);` - -[:arrow_up_small:](#) - -
- -## [disable_time_stop_including_mario](#disable_time_stop_including_mario) - -### Lua Example -`disable_time_stop_including_mario()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void disable_time_stop_including_mario(void);` - -[:arrow_up_small:](#) - -
- -## [dist_between_object_and_point](#dist_between_object_and_point) - -### Lua Example -`local numberValue = dist_between_object_and_point(obj, pointX, pointY, pointZ)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| pointX | `number` | -| pointY | `number` | -| pointZ | `number` | - -### Returns -- `number` - -### C Prototype -`f32 dist_between_object_and_point(struct Object *obj, f32 pointX, f32 pointY, f32 pointZ);` - -[:arrow_up_small:](#) - -
- -## [dist_between_objects](#dist_between_objects) - -### Lua Example -`local numberValue = dist_between_objects(obj1, obj2)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj1 | [Object](structs.md#Object) | -| obj2 | [Object](structs.md#Object) | - -### Returns -- `number` - -### C Prototype -`f32 dist_between_objects(struct Object *obj1, struct Object *obj2);` - -[:arrow_up_small:](#) - -
- -## [enable_time_stop](#enable_time_stop) - -### Lua Example -`enable_time_stop()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void enable_time_stop(void);` - -[:arrow_up_small:](#) - -
- -## [enable_time_stop_if_alone](#enable_time_stop_if_alone) - -### Lua Example -`enable_time_stop_if_alone()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void enable_time_stop_if_alone(void);` - -[:arrow_up_small:](#) - -
- -## [enable_time_stop_including_mario](#enable_time_stop_including_mario) - -### Lua Example -`enable_time_stop_including_mario()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void enable_time_stop_including_mario(void);` - -[:arrow_up_small:](#) - -
- -## [find_object_with_behavior](#find_object_with_behavior) - -### Lua Example -`local ObjectValue = find_object_with_behavior(behavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *find_object_with_behavior(const BehaviorScript *behavior);` - -[:arrow_up_small:](#) - -
- -## [find_unimportant_object](#find_unimportant_object) - -### Lua Example -`local ObjectValue = find_unimportant_object()` - -### Parameters -- None - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *find_unimportant_object(void);` - -[:arrow_up_small:](#) - -
- -## [get_object_list_from_behavior](#get_object_list_from_behavior) - -### Lua Example -`local integerValue = get_object_list_from_behavior(behavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behavior | `Pointer` <`BehaviorScript`> | - -### Returns -- `integer` - -### C Prototype -`u32 get_object_list_from_behavior(const BehaviorScript *behavior);` +`void cur_obj_set_home_once(void);` [:arrow_up_small:](#) @@ -3798,1717 +5509,6 @@
-## [increment_velocity_toward_range](#increment_velocity_toward_range) - -### Lua Example -`local numberValue = increment_velocity_toward_range(value, center, zeroThreshold, increment)` - -### Parameters -| Field | Type | -| ----- | ---- | -| value | `number` | -| center | `number` | -| zeroThreshold | `number` | -| increment | `number` | - -### Returns -- `number` - -### C Prototype -`f32 increment_velocity_toward_range(f32 value, f32 center, f32 zeroThreshold, f32 increment);` - -[:arrow_up_small:](#) - -
- -## [is_item_in_array](#is_item_in_array) - -### Lua Example -`local integerValue = is_item_in_array(item, array)` - -### Parameters -| Field | Type | -| ----- | ---- | -| item | `integer` | -| array | `Pointer` <`integer`> | - -### Returns -- `integer` - -### C Prototype -`s32 is_item_in_array(s8 item, s8 *array);` - -[:arrow_up_small:](#) - -
- -## [is_mario_moving_fast_or_in_air](#is_mario_moving_fast_or_in_air) - -### Lua Example -`local integerValue = is_mario_moving_fast_or_in_air(speedThreshold)` - -### Parameters -| Field | Type | -| ----- | ---- | -| speedThreshold | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 is_mario_moving_fast_or_in_air(s32 speedThreshold);` - -[:arrow_up_small:](#) - -
- -## [lateral_dist_between_objects](#lateral_dist_between_objects) - -### Lua Example -`local numberValue = lateral_dist_between_objects(obj1, obj2)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj1 | [Object](structs.md#Object) | -| obj2 | [Object](structs.md#Object) | - -### Returns -- `number` - -### C Prototype -`f32 lateral_dist_between_objects(struct Object *obj1, struct Object *obj2);` - -[:arrow_up_small:](#) - -
- -## [linear_mtxf_mul_vec3f](#linear_mtxf_mul_vec3f) - -### Lua Example -`linear_mtxf_mul_vec3f(m, dst, v)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | `Mat4` | -| dst | [Vec3f](structs.md#Vec3f) | -| v | [Vec3f](structs.md#Vec3f) | - -### Returns -- None - -### C Prototype -`void linear_mtxf_mul_vec3f(Mat4 m, Vec3f dst, Vec3f v);` - -[:arrow_up_small:](#) - -
- -## [linear_mtxf_transpose_mul_vec3f](#linear_mtxf_transpose_mul_vec3f) - -### Lua Example -`linear_mtxf_transpose_mul_vec3f(m, dst, v)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | `Mat4` | -| dst | [Vec3f](structs.md#Vec3f) | -| v | [Vec3f](structs.md#Vec3f) | - -### Returns -- None - -### C Prototype -`void linear_mtxf_transpose_mul_vec3f(Mat4 m, Vec3f dst, Vec3f v);` - -[:arrow_up_small:](#) - -
- -## [mario_is_dive_sliding](#mario_is_dive_sliding) - -### Lua Example -`local integerValue = mario_is_dive_sliding(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 mario_is_dive_sliding(struct MarioState* m);` - -[:arrow_up_small:](#) - -
- -## [mario_is_in_air_action](#mario_is_in_air_action) - -### Lua Example -`local integerValue = mario_is_in_air_action(m)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | - -### Returns -- `integer` - -### C Prototype -`s32 mario_is_in_air_action(struct MarioState* m);` - -[:arrow_up_small:](#) - -
- -## [mario_is_within_rectangle](#mario_is_within_rectangle) - -### Lua Example -`local integerValue = mario_is_within_rectangle(minX, maxX, minZ, maxZ)` - -### Parameters -| Field | Type | -| ----- | ---- | -| minX | `integer` | -| maxX | `integer` | -| minZ | `integer` | -| maxZ | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 mario_is_within_rectangle(s16 minX, s16 maxX, s16 minZ, s16 maxZ);` - -[:arrow_up_small:](#) - -
- -## [mario_set_flag](#mario_set_flag) - -### Lua Example -`mario_set_flag(flag)` - -### Parameters -| Field | Type | -| ----- | ---- | -| flag | `integer` | - -### Returns -- None - -### C Prototype -`void mario_set_flag(s32 flag);` - -[:arrow_up_small:](#) - -
- -## [obj_angle_to_object](#obj_angle_to_object) - -### Lua Example -`local integerValue = obj_angle_to_object(obj1, obj2)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj1 | [Object](structs.md#Object) | -| obj2 | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`s16 obj_angle_to_object(struct Object *obj1, struct Object *obj2);` - -[:arrow_up_small:](#) - -
- -## [obj_angle_to_point](#obj_angle_to_point) - -### Lua Example -`local integerValue = obj_angle_to_point(obj, pointX, pointZ)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| pointX | `number` | -| pointZ | `number` | - -### Returns -- `integer` - -### C Prototype -`s16 obj_angle_to_point(struct Object *obj, f32 pointX, f32 pointZ);` - -[:arrow_up_small:](#) - -
- -## [obj_apply_scale_to_matrix](#obj_apply_scale_to_matrix) - -### Lua Example -`obj_apply_scale_to_matrix(obj, dst, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| dst | `Mat4` | -| src | `Mat4` | - -### Returns -- None - -### C Prototype -`void obj_apply_scale_to_matrix(struct Object *obj, Mat4 dst, Mat4 src);` - -[:arrow_up_small:](#) - -
- -## [obj_apply_scale_to_transform](#obj_apply_scale_to_transform) - -### Lua Example -`obj_apply_scale_to_transform(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_apply_scale_to_transform(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_attack_collided_from_other_object](#obj_attack_collided_from_other_object) - -### Lua Example -`local integerValue = obj_attack_collided_from_other_object(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`s32 obj_attack_collided_from_other_object(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_become_tangible](#obj_become_tangible) - -### Lua Example -`obj_become_tangible(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_become_tangible(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_build_relative_transform](#obj_build_relative_transform) - -### Lua Example -`obj_build_relative_transform(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_build_relative_transform(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_build_transform_from_pos_and_angle](#obj_build_transform_from_pos_and_angle) - -### Lua Example -`obj_build_transform_from_pos_and_angle(obj, posIndex, angleIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| posIndex | `integer` | -| angleIndex | `integer` | - -### Returns -- None - -### C Prototype -`void obj_build_transform_from_pos_and_angle(struct Object *obj, s16 posIndex, s16 angleIndex);` - -[:arrow_up_small:](#) - -
- -## [obj_build_transform_relative_to_parent](#obj_build_transform_relative_to_parent) - -### Lua Example -`obj_build_transform_relative_to_parent(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_build_transform_relative_to_parent(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_build_vel_from_transform](#obj_build_vel_from_transform) - -### Lua Example -`obj_build_vel_from_transform(a0)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a0 | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_build_vel_from_transform(struct Object *a0);` - -[:arrow_up_small:](#) - -
- -## [obj_check_if_collided_with_object](#obj_check_if_collided_with_object) - -### Lua Example -`local integerValue = obj_check_if_collided_with_object(obj1, obj2)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj1 | [Object](structs.md#Object) | -| obj2 | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`s32 obj_check_if_collided_with_object(struct Object *obj1, struct Object *obj2);` - -[:arrow_up_small:](#) - -
- -## [obj_copy_angle](#obj_copy_angle) - -### Lua Example -`obj_copy_angle(dst, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dst | [Object](structs.md#Object) | -| src | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_copy_angle(struct Object *dst, struct Object *src);` - -[:arrow_up_small:](#) - -
- -## [obj_copy_behavior_params](#obj_copy_behavior_params) - -### Lua Example -`obj_copy_behavior_params(dst, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dst | [Object](structs.md#Object) | -| src | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_copy_behavior_params(struct Object *dst, struct Object *src);` - -[:arrow_up_small:](#) - -
- -## [obj_copy_graph_y_offset](#obj_copy_graph_y_offset) - -### Lua Example -`obj_copy_graph_y_offset(dst, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dst | [Object](structs.md#Object) | -| src | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_copy_graph_y_offset(struct Object *dst, struct Object *src);` - -[:arrow_up_small:](#) - -
- -## [obj_copy_pos](#obj_copy_pos) - -### Lua Example -`obj_copy_pos(dst, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dst | [Object](structs.md#Object) | -| src | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_copy_pos(struct Object *dst, struct Object *src);` - -[:arrow_up_small:](#) - -
- -## [obj_copy_pos_and_angle](#obj_copy_pos_and_angle) - -### Lua Example -`obj_copy_pos_and_angle(dst, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dst | [Object](structs.md#Object) | -| src | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_copy_pos_and_angle(struct Object *dst, struct Object *src);` - -[:arrow_up_small:](#) - -
- -## [obj_copy_scale](#obj_copy_scale) - -### Lua Example -`obj_copy_scale(dst, src)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dst | [Object](structs.md#Object) | -| src | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_copy_scale(struct Object *dst, struct Object *src);` - -[:arrow_up_small:](#) - -
- -## [obj_create_transform_from_self](#obj_create_transform_from_self) - -### Lua Example -`obj_create_transform_from_self(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_create_transform_from_self(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_explode_and_spawn_coins](#obj_explode_and_spawn_coins) - -### Lua Example -`obj_explode_and_spawn_coins(sp18, sp1C)` - -### Parameters -| Field | Type | -| ----- | ---- | -| sp18 | `number` | -| sp1C | `integer` | - -### Returns -- None - -### C Prototype -`void obj_explode_and_spawn_coins(f32 sp18, s32 sp1C);` - -[:arrow_up_small:](#) - -
- -## [obj_has_behavior](#obj_has_behavior) - -### Lua Example -`local integerValue = obj_has_behavior(obj, behavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| behavior | `Pointer` <`BehaviorScript`> | - -### Returns -- `integer` - -### C Prototype -`s32 obj_has_behavior(struct Object *obj, const BehaviorScript *behavior);` - -[:arrow_up_small:](#) - -
- -## [obj_init_animation](#obj_init_animation) - -### Lua Example -`obj_init_animation(obj, animIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| animIndex | `integer` | - -### Returns -- None - -### C Prototype -`void obj_init_animation(struct Object *obj, s32 animIndex);` - -[:arrow_up_small:](#) - -
- -## [obj_init_animation_with_accel_and_sound](#obj_init_animation_with_accel_and_sound) - -### Lua Example -`obj_init_animation_with_accel_and_sound(obj, animIndex, accel)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| animIndex | `integer` | -| accel | `number` | - -### Returns -- None - -### C Prototype -`void obj_init_animation_with_accel_and_sound(struct Object *obj, s32 animIndex, f32 accel);` - -[:arrow_up_small:](#) - -
- -## [obj_init_animation_with_sound](#obj_init_animation_with_sound) - -### Lua Example -`obj_init_animation_with_sound(obj, animations, animIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| animations | [AnimationTable](structs.md#AnimationTable) | -| animIndex | `integer` | - -### Returns -- None - -### C Prototype -`void obj_init_animation_with_sound(struct Object *obj, const struct AnimationTable* animations, s32 animIndex);` - -[:arrow_up_small:](#) - -
- -## [obj_is_hidden](#obj_is_hidden) - -### Lua Example -`local integerValue = obj_is_hidden(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`s32 obj_is_hidden(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_mark_for_deletion](#obj_mark_for_deletion) - -### Lua Example -`obj_mark_for_deletion(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_mark_for_deletion(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_pitch_to_object](#obj_pitch_to_object) - -### Lua Example -`local integerValue = obj_pitch_to_object(obj, target)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| target | [Object](structs.md#Object) | - -### Returns -- `integer` - -### C Prototype -`s16 obj_pitch_to_object(struct Object* obj, struct Object* target);` - -[:arrow_up_small:](#) - -
- -## [obj_scale](#obj_scale) - -### Lua Example -`obj_scale(obj, scale)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| scale | `number` | - -### Returns -- None - -### C Prototype -`void obj_scale(struct Object *obj, f32 scale);` - -[:arrow_up_small:](#) - -
- -## [obj_scale_random](#obj_scale_random) - -### Lua Example -`obj_scale_random(obj, rangeLength, minScale)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| rangeLength | `number` | -| minScale | `number` | - -### Returns -- None - -### C Prototype -`void obj_scale_random(struct Object *obj, f32 rangeLength, f32 minScale);` - -[:arrow_up_small:](#) - -
- -## [obj_scale_xyz](#obj_scale_xyz) - -### Lua Example -`obj_scale_xyz(obj, xScale, yScale, zScale)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| xScale | `number` | -| yScale | `number` | -| zScale | `number` | - -### Returns -- None - -### C Prototype -`void obj_scale_xyz(struct Object *obj, f32 xScale, f32 yScale, f32 zScale);` - -[:arrow_up_small:](#) - -
- -## [obj_set_angle](#obj_set_angle) - -### Lua Example -`obj_set_angle(obj, pitch, yaw, roll)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| pitch | `integer` | -| yaw | `integer` | -| roll | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll);` - -[:arrow_up_small:](#) - -
- -## [obj_set_behavior](#obj_set_behavior) - -### Lua Example -`obj_set_behavior(obj, behavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| behavior | `Pointer` <`BehaviorScript`> | - -### Returns -- None - -### C Prototype -`void obj_set_behavior(struct Object *obj, const BehaviorScript *behavior);` - -[:arrow_up_small:](#) - -
- -## [obj_set_billboard](#obj_set_billboard) - -### Lua Example -`obj_set_billboard(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_set_billboard(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_set_cylboard](#obj_set_cylboard) - -### Lua Example -`obj_set_cylboard(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_set_cylboard(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_set_face_angle](#obj_set_face_angle) - -### Lua Example -`obj_set_face_angle(obj, pitch, yaw, roll)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| pitch | `integer` | -| yaw | `integer` | -| roll | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_face_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll);` - -[:arrow_up_small:](#) - -
- -## [obj_set_face_angle_to_move_angle](#obj_set_face_angle_to_move_angle) - -### Lua Example -`obj_set_face_angle_to_move_angle(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_set_face_angle_to_move_angle(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_set_gfx_angle](#obj_set_gfx_angle) - -### Lua Example -`obj_set_gfx_angle(obj, pitch, yaw, roll)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| pitch | `integer` | -| yaw | `integer` | -| roll | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_gfx_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll);` - -[:arrow_up_small:](#) - -
- -## [obj_set_gfx_pos](#obj_set_gfx_pos) - -### Lua Example -`obj_set_gfx_pos(obj, x, y, z)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| x | `number` | -| y | `number` | -| z | `number` | - -### Returns -- None - -### C Prototype -`void obj_set_gfx_pos(struct Object *obj, f32 x, f32 y, f32 z);` - -[:arrow_up_small:](#) - -
- -## [obj_set_gfx_pos_at_obj_pos](#obj_set_gfx_pos_at_obj_pos) - -### Lua Example -`obj_set_gfx_pos_at_obj_pos(obj1, obj2)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj1 | [Object](structs.md#Object) | -| obj2 | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_set_gfx_pos_at_obj_pos(struct Object *obj1, struct Object *obj2);` - -[:arrow_up_small:](#) - -
- -## [obj_set_gfx_pos_from_pos](#obj_set_gfx_pos_from_pos) - -### Lua Example -`obj_set_gfx_pos_from_pos(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_set_gfx_pos_from_pos(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_set_gfx_scale](#obj_set_gfx_scale) - -### Lua Example -`obj_set_gfx_scale(obj, x, y, z)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| x | `number` | -| y | `number` | -| z | `number` | - -### Returns -- None - -### C Prototype -`void obj_set_gfx_scale(struct Object *obj, f32 x, f32 y, f32 z);` - -[:arrow_up_small:](#) - -
- -## [obj_set_held_state](#obj_set_held_state) - -### Lua Example -`obj_set_held_state(obj, heldBehavior)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| heldBehavior | `Pointer` <`BehaviorScript`> | - -### Returns -- None - -### C Prototype -`void obj_set_held_state(struct Object *obj, const BehaviorScript *heldBehavior);` - -[:arrow_up_small:](#) - -
- -## [obj_set_hitbox](#obj_set_hitbox) - -### Lua Example -`obj_set_hitbox(obj, hitbox)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| hitbox | [ObjectHitbox](structs.md#ObjectHitbox) | - -### Returns -- None - -### C Prototype -`void obj_set_hitbox(struct Object *obj, struct ObjectHitbox *hitbox);` - -[:arrow_up_small:](#) - -
- -## [obj_set_hitbox_radius_and_height](#obj_set_hitbox_radius_and_height) - -### Lua Example -`obj_set_hitbox_radius_and_height(o, radius, height)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| radius | `number` | -| height | `number` | - -### Returns -- None - -### C Prototype -`void obj_set_hitbox_radius_and_height(struct Object *o, f32 radius, f32 height);` - -[:arrow_up_small:](#) - -
- -## [obj_set_hurtbox_radius_and_height](#obj_set_hurtbox_radius_and_height) - -### Lua Example -`obj_set_hurtbox_radius_and_height(o, radius, height)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| radius | `number` | -| height | `number` | - -### Returns -- None - -### C Prototype -`void obj_set_hurtbox_radius_and_height(struct Object *o, f32 radius, f32 height);` - -[:arrow_up_small:](#) - -
- -## [obj_set_move_angle](#obj_set_move_angle) - -### Lua Example -`obj_set_move_angle(obj, pitch, yaw, roll)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| pitch | `integer` | -| yaw | `integer` | -| roll | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_move_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll);` - -[:arrow_up_small:](#) - -
- -## [obj_set_parent_relative_pos](#obj_set_parent_relative_pos) - -### Lua Example -`obj_set_parent_relative_pos(obj, relX, relY, relZ)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| relX | `integer` | -| relY | `integer` | -| relZ | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_parent_relative_pos(struct Object *obj, s16 relX, s16 relY, s16 relZ);` - -[:arrow_up_small:](#) - -
- -## [obj_set_pos](#obj_set_pos) - -### Lua Example -`obj_set_pos(obj, x, y, z)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| x | `integer` | -| y | `integer` | -| z | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_pos(struct Object *obj, s16 x, s16 y, s16 z);` - -[:arrow_up_small:](#) - -
- -## [obj_set_pos_relative](#obj_set_pos_relative) - -### Lua Example -`obj_set_pos_relative(obj, other, dleft, dy, dforward)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| other | [Object](structs.md#Object) | -| dleft | `number` | -| dy | `number` | -| dforward | `number` | - -### Returns -- None - -### C Prototype -`void obj_set_pos_relative(struct Object *obj, struct Object *other, f32 dleft, f32 dy, f32 dforward);` - -[:arrow_up_small:](#) - -
- -## [obj_set_throw_matrix_from_transform](#obj_set_throw_matrix_from_transform) - -### Lua Example -`obj_set_throw_matrix_from_transform(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_set_throw_matrix_from_transform(struct Object *obj);` - -[:arrow_up_small:](#) - -
- -## [obj_spawn_loot_blue_coins](#obj_spawn_loot_blue_coins) - -### Lua Example -`obj_spawn_loot_blue_coins(obj, numCoins, sp28, posJitter)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| numCoins | `integer` | -| sp28 | `number` | -| posJitter | `integer` | - -### Returns -- None - -### C Prototype -`void obj_spawn_loot_blue_coins(struct Object *obj, s32 numCoins, f32 sp28, s16 posJitter);` - -[:arrow_up_small:](#) - -
- -## [obj_spawn_loot_coins](#obj_spawn_loot_coins) - -### Lua Example -`obj_spawn_loot_coins(obj, numCoins, sp30, coinBehavior, posJitter, model)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| numCoins | `integer` | -| sp30 | `number` | -| coinBehavior | `Pointer` <`BehaviorScript`> | -| posJitter | `integer` | -| model | `integer` | - -### Returns -- None - -### C Prototype -`void obj_spawn_loot_coins(struct Object *obj, s32 numCoins, f32 sp30, const BehaviorScript *coinBehavior, s16 posJitter, s16 model);` - -[:arrow_up_small:](#) - -
- -## [obj_spawn_loot_yellow_coins](#obj_spawn_loot_yellow_coins) - -### Lua Example -`obj_spawn_loot_yellow_coins(obj, numCoins, sp28)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| numCoins | `integer` | -| sp28 | `number` | - -### Returns -- None - -### C Prototype -`void obj_spawn_loot_yellow_coins(struct Object *obj, s32 numCoins, f32 sp28);` - -[:arrow_up_small:](#) - -
- -## [obj_translate_local](#obj_translate_local) - -### Lua Example -`obj_translate_local(obj, posIndex, localTranslateIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| posIndex | `integer` | -| localTranslateIndex | `integer` | - -### Returns -- None - -### C Prototype -`void obj_translate_local(struct Object *obj, s16 posIndex, s16 localTranslateIndex);` - -[:arrow_up_small:](#) - -
- -## [obj_translate_xyz_random](#obj_translate_xyz_random) - -### Lua Example -`obj_translate_xyz_random(obj, rangeLength)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| rangeLength | `number` | - -### Returns -- None - -### C Prototype -`void obj_translate_xyz_random(struct Object *obj, f32 rangeLength);` - -[:arrow_up_small:](#) - -
- -## [obj_translate_xz_random](#obj_translate_xz_random) - -### Lua Example -`obj_translate_xz_random(obj, rangeLength)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| rangeLength | `number` | - -### Returns -- None - -### C Prototype -`void obj_translate_xz_random(struct Object *obj, f32 rangeLength);` - -[:arrow_up_small:](#) - -
- -## [obj_turn_toward_object](#obj_turn_toward_object) - -### Lua Example -`local integerValue = obj_turn_toward_object(obj, target, angleIndex, turnAmount)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | -| target | [Object](structs.md#Object) | -| angleIndex | `integer` | -| turnAmount | `integer` | - -### Returns -- `integer` - -### C Prototype -`s16 obj_turn_toward_object(struct Object *obj, struct Object *target, s16 angleIndex, s16 turnAmount);` - -[:arrow_up_small:](#) - -
- -## [obj_update_pos_from_parent_transformation](#obj_update_pos_from_parent_transformation) - -### Lua Example -`obj_update_pos_from_parent_transformation(a0, a1)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a0 | `Mat4` | -| a1 | [Object](structs.md#Object) | - -### Returns -- None - -### C Prototype -`void obj_update_pos_from_parent_transformation(Mat4 a0, struct Object *a1);` - -[:arrow_up_small:](#) - -
- -## [player_performed_grab_escape_action](#player_performed_grab_escape_action) - -### Lua Example -`local integerValue = player_performed_grab_escape_action()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s32 player_performed_grab_escape_action(void);` - -[:arrow_up_small:](#) - -
- -## [random_f32_around_zero](#random_f32_around_zero) - -### Lua Example -`local numberValue = random_f32_around_zero(diameter)` - -### Parameters -| Field | Type | -| ----- | ---- | -| diameter | `number` | - -### Returns -- `number` - -### C Prototype -`f32 random_f32_around_zero(f32 diameter);` - -[:arrow_up_small:](#) - -
- -## [set_mario_interact_hoot_if_in_range](#set_mario_interact_hoot_if_in_range) - -### Lua Example -`set_mario_interact_hoot_if_in_range(sp0, sp4, sp8)` - -### Parameters -| Field | Type | -| ----- | ---- | -| sp0 | `integer` | -| sp4 | `integer` | -| sp8 | `number` | - -### Returns -- None - -### C Prototype -`void set_mario_interact_hoot_if_in_range(UNUSED s32 sp0, UNUSED s32 sp4, f32 sp8);` - -[:arrow_up_small:](#) - -
- -## [set_room_override](#set_room_override) - -### Lua Example -`set_room_override(room)` - -### Parameters -| Field | Type | -| ----- | ---- | -| room | `integer` | - -### Returns -- None - -### C Prototype -`void set_room_override(s16 room);` - -[:arrow_up_small:](#) - -
- -## [set_time_stop_flags](#set_time_stop_flags) - -### Lua Example -`set_time_stop_flags(flags)` - -### Parameters -| Field | Type | -| ----- | ---- | -| flags | `integer` | - -### Returns -- None - -### C Prototype -`void set_time_stop_flags(s32 flags);` - -[:arrow_up_small:](#) - -
- -## [set_time_stop_flags_if_alone](#set_time_stop_flags_if_alone) - -### Lua Example -`set_time_stop_flags_if_alone(flags)` - -### Parameters -| Field | Type | -| ----- | ---- | -| flags | `integer` | - -### Returns -- None - -### C Prototype -`void set_time_stop_flags_if_alone(s32 flags);` - -[:arrow_up_small:](#) - -
- -## [signum_positive](#signum_positive) - -### Lua Example -`local integerValue = signum_positive(x)` - -### Parameters -| Field | Type | -| ----- | ---- | -| x | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 signum_positive(s32 x);` - -[:arrow_up_small:](#) - -
- -## [spawn_base_star_with_no_lvl_exit](#spawn_base_star_with_no_lvl_exit) - -### Lua Example -`spawn_base_star_with_no_lvl_exit()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void spawn_base_star_with_no_lvl_exit(void);` - -[:arrow_up_small:](#) - -
- -## [spawn_mist_particles](#spawn_mist_particles) - -### Lua Example -`spawn_mist_particles()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void spawn_mist_particles(void);` - -[:arrow_up_small:](#) - -
- -## [spawn_mist_particles_with_sound](#spawn_mist_particles_with_sound) - -### Lua Example -`spawn_mist_particles_with_sound(sp18)` - -### Parameters -| Field | Type | -| ----- | ---- | -| sp18 | `integer` | - -### Returns -- None - -### C Prototype -`void spawn_mist_particles_with_sound(u32 sp18);` - -[:arrow_up_small:](#) - -
- -## [spawn_star_with_no_lvl_exit](#spawn_star_with_no_lvl_exit) - -### Lua Example -`local ObjectValue = spawn_star_with_no_lvl_exit(sp20, sp24)` - -### Parameters -| Field | Type | -| ----- | ---- | -| sp20 | `integer` | -| sp24 | `integer` | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *spawn_star_with_no_lvl_exit(s32 sp20, s32 sp24);` - -[:arrow_up_small:](#) - -
- -## [spawn_water_droplet](#spawn_water_droplet) - -### Lua Example -`local ObjectValue = spawn_water_droplet(parent, params)` - -### Parameters -| Field | Type | -| ----- | ---- | -| parent | [Object](structs.md#Object) | -| params | [WaterDropletParams](structs.md#WaterDropletParams) | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *spawn_water_droplet(struct Object *parent, struct WaterDropletParams *params);` - -[:arrow_up_small:](#) - -
- -## [stub_obj_helpers_3](#stub_obj_helpers_3) - -### Lua Example -`stub_obj_helpers_3(sp0, sp4)` - -### Parameters -| Field | Type | -| ----- | ---- | -| sp0 | `integer` | -| sp4 | `integer` | - -### Returns -- None - -### C Prototype -`void stub_obj_helpers_3(UNUSED s32 sp0, UNUSED s32 sp4);` - -[:arrow_up_small:](#) - -
- -## [stub_obj_helpers_4](#stub_obj_helpers_4) - -### Lua Example -`stub_obj_helpers_4()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void stub_obj_helpers_4(void);` - -[:arrow_up_small:](#) - -
- --- # functions from object_list_processor.h @@ -5569,31 +5569,6 @@ Queues rumble data
-## [queue_rumble_data_mario](#queue_rumble_data_mario) - -### Description -Queues rumble data for Mario - -### Lua Example -`queue_rumble_data_mario(m, a0, a1)` - -### Parameters -| Field | Type | -| ----- | ---- | -| m | [MarioState](structs.md#MarioState) | -| a0 | `integer` | -| a1 | `integer` | - -### Returns -- None - -### C Prototype -`void queue_rumble_data_mario(struct MarioState* m, s16 a0, s16 a1);` - -[:arrow_up_small:](#) - -
- ## [queue_rumble_data_object](#queue_rumble_data_object) ### Description @@ -5619,6 +5594,31 @@ Queues rumble data for object, factoring in its distance from Mario
+## [queue_rumble_data_mario](#queue_rumble_data_mario) + +### Description +Queues rumble data for Mario + +### Lua Example +`queue_rumble_data_mario(m, a0, a1)` + +### Parameters +| Field | Type | +| ----- | ---- | +| m | [MarioState](structs.md#MarioState) | +| a0 | `integer` | +| a1 | `integer` | + +### Returns +- None + +### C Prototype +`void queue_rumble_data_mario(struct MarioState* m, s16 a0, s16 a1);` + +[:arrow_up_small:](#) + +
+ ## [reset_rumble_timers](#reset_rumble_timers) ### Description @@ -5672,24 +5672,25 @@ Resets rumble timers and sets a field based on `a0`
-## [save_file_clear_flags](#save_file_clear_flags) +## [touch_coin_score_age](#touch_coin_score_age) ### Description -Clears specific flags in the current save file. The flags are specified as a bitmask in the `flags` parameter. Ensures that the save file remains valid after clearing. Useful for removing specific game states, such as collected items or completed objectives, without resetting the entire save +Marks the coin score for a specific course as the newest among all save files. Adjusts the age of other scores to reflect the update. Useful for leaderboard tracking or displaying recent progress ### Lua Example -`save_file_clear_flags(flags)` +`touch_coin_score_age(fileIndex, courseIndex)` ### Parameters | Field | Type | | ----- | ---- | -| flags | `integer` | +| fileIndex | `integer` | +| courseIndex | `integer` | ### Returns - None ### C Prototype -`void save_file_clear_flags(u32 flags);` +`void touch_coin_score_age(s32 fileIndex, s32 courseIndex);` [:arrow_up_small:](#) @@ -5763,93 +5764,24 @@ Erases the backup data for the current save file without affecting the primary s
-## [save_file_get_cap_pos](#save_file_get_cap_pos) +## [save_file_reload](#save_file_reload) ### Description -Retrieves the current position of Mario's cap, if it is on the ground in the current level and area. The position is stored in the provided `capPos` parameter. Useful for tracking the cap's location after it has been dropped or lost +Reloads the save file data into memory, optionally resetting all save files. Marks the save file as modified. Useful for reloading state after data corruption or during development debugging ### Lua Example -`local integerValue = save_file_get_cap_pos(capPos)` +`save_file_reload(load_all)` ### Parameters | Field | Type | | ----- | ---- | -| capPos | [Vec3s](structs.md#Vec3s) | +| load_all | `integer` | ### Returns -- `integer` - -### C Prototype -`s32 save_file_get_cap_pos(Vec3s capPos);` - -[:arrow_up_small:](#) - -
- -## [save_file_get_course_coin_score](#save_file_get_course_coin_score) - -### Description -Returns the highest coin score for a specified course in the save file. Performs checks to ensure the coin score is valid. Useful for tracking player achievements and high scores - -### Lua Example -`local integerValue = save_file_get_course_coin_score(fileIndex, courseIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| fileIndex | `integer` | -| courseIndex | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 save_file_get_course_coin_score(s32 fileIndex, s32 courseIndex);` - -[:arrow_up_small:](#) - -
- -## [save_file_get_course_star_count](#save_file_get_course_star_count) - -### Description -Calculates the total number of stars collected in a specific course for a given save file. Useful for determining completion status of individual levels - -### Lua Example -`local integerValue = save_file_get_course_star_count(fileIndex, courseIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| fileIndex | `integer` | -| courseIndex | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 save_file_get_course_star_count(s32 fileIndex, s32 courseIndex);` - -[:arrow_up_small:](#) - -
- -## [save_file_get_flags](#save_file_get_flags) - -### Description -Retrieves the bitmask of flags representing the current state of the save file. Flags indicate collected items, completed objectives, and other game states. Useful for checking specific game progress details - -### Lua Example -`local integerValue = save_file_get_flags()` - -### Parameters - None -### Returns -- `integer` - ### C Prototype -`u32 save_file_get_flags(void);` +`void save_file_reload(u8 load_all);` [:arrow_up_small:](#) @@ -5878,34 +5810,13 @@ Determines the maximum coin score for a course across all save files. Returns th
-## [save_file_get_sound_mode](#save_file_get_sound_mode) +## [save_file_get_course_star_count](#save_file_get_course_star_count) ### Description -Returns the current sound mode (e.g., stereo, mono) stored in the save file. Useful for checking the audio output preferences when loading a save +Calculates the total number of stars collected in a specific course for a given save file. Useful for determining completion status of individual levels ### Lua Example -`local integerValue = save_file_get_sound_mode()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u16 save_file_get_sound_mode(void);` - -[:arrow_up_small:](#) - -
- -## [save_file_get_star_flags](#save_file_get_star_flags) - -### Description -Retrieves the bitmask of stars collected in a specific course or castle secret stars (-1). Useful for evaluating level progress and completion - -### Lua Example -`local integerValue = save_file_get_star_flags(fileIndex, courseIndex)` +`local integerValue = save_file_get_course_star_count(fileIndex, courseIndex)` ### Parameters | Field | Type | @@ -5917,7 +5828,7 @@ Retrieves the bitmask of stars collected in a specific course or castle secret s - `integer` ### C Prototype -`u32 save_file_get_star_flags(s32 fileIndex, s32 courseIndex);` +`s32 save_file_get_course_star_count(s32 fileIndex, s32 courseIndex);` [:arrow_up_small:](#) @@ -5948,103 +5859,6 @@ Calculates the total number of stars collected across multiple courses within a
-## [save_file_is_cannon_unlocked](#save_file_is_cannon_unlocked) - -### Description -Checks whether the cannon in the specified course is unlocked. Returns true if the cannon is unlocked, otherwise false. Useful for tracking course-specific progress and enabling shortcuts - -### Lua Example -`local integerValue = save_file_is_cannon_unlocked(fileIndex, courseIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| fileIndex | `integer` | -| courseIndex | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 save_file_is_cannon_unlocked(s32 fileIndex, s32 courseIndex);` - -[:arrow_up_small:](#) - -
- -## [save_file_reload](#save_file_reload) - -### Description -Reloads the save file data into memory, optionally resetting all save files. Marks the save file as modified. Useful for reloading state after data corruption or during development debugging - -### Lua Example -`save_file_reload(load_all)` - -### Parameters -| Field | Type | -| ----- | ---- | -| load_all | `integer` | - -### Returns -- None - -### C Prototype -`void save_file_reload(u8 load_all);` - -[:arrow_up_small:](#) - -
- -## [save_file_remove_star_flags](#save_file_remove_star_flags) - -### Description -Removes specific star flags from the save file. This modifies the bitmask representing collected stars for a course or castle secret stars. Useful for undoing progress or debugging collected stars - -### Lua Example -`save_file_remove_star_flags(fileIndex, courseIndex, starFlagsToRemove)` - -### Parameters -| Field | Type | -| ----- | ---- | -| fileIndex | `integer` | -| courseIndex | `integer` | -| starFlagsToRemove | `integer` | - -### Returns -- None - -### C Prototype -`void save_file_remove_star_flags(s32 fileIndex, s32 courseIndex, u32 starFlagsToRemove);` - -[:arrow_up_small:](#) - -
- -## [save_file_set_course_coin_score](#save_file_set_course_coin_score) - -### Description -Updates the coin score for a specific course in the save file. The new score is provided in the `coinScore` parameter. Useful for manually setting achievements such as high coin counts in individual levels - -### Lua Example -`save_file_set_course_coin_score(fileIndex, courseIndex, coinScore)` - -### Parameters -| Field | Type | -| ----- | ---- | -| fileIndex | `integer` | -| courseIndex | `integer` | -| coinScore | `integer` | - -### Returns -- None - -### C Prototype -`void save_file_set_course_coin_score(s32 fileIndex, s32 courseIndex, u8 coinScore);` - -[:arrow_up_small:](#) - -
- ## [save_file_set_flags](#save_file_set_flags) ### Description @@ -6068,6 +5882,74 @@ Adds new flags to the save file's flag bitmask. Useful for updating progress or
+## [save_file_clear_flags](#save_file_clear_flags) + +### Description +Clears specific flags in the current save file. The flags are specified as a bitmask in the `flags` parameter. Ensures that the save file remains valid after clearing. Useful for removing specific game states, such as collected items or completed objectives, without resetting the entire save + +### Lua Example +`save_file_clear_flags(flags)` + +### Parameters +| Field | Type | +| ----- | ---- | +| flags | `integer` | + +### Returns +- None + +### C Prototype +`void save_file_clear_flags(u32 flags);` + +[:arrow_up_small:](#) + +
+ +## [save_file_get_flags](#save_file_get_flags) + +### Description +Retrieves the bitmask of flags representing the current state of the save file. Flags indicate collected items, completed objectives, and other game states. Useful for checking specific game progress details + +### Lua Example +`local integerValue = save_file_get_flags()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u32 save_file_get_flags(void);` + +[:arrow_up_small:](#) + +
+ +## [save_file_get_star_flags](#save_file_get_star_flags) + +### Description +Retrieves the bitmask of stars collected in a specific course or castle secret stars (-1). Useful for evaluating level progress and completion + +### Lua Example +`local integerValue = save_file_get_star_flags(fileIndex, courseIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| fileIndex | `integer` | +| courseIndex | `integer` | + +### Returns +- `integer` + +### C Prototype +`u32 save_file_get_star_flags(s32 fileIndex, s32 courseIndex);` + +[:arrow_up_small:](#) + +
+ ## [save_file_set_star_flags](#save_file_set_star_flags) ### Description @@ -6093,13 +5975,38 @@ Adds specific star flags to the save file, indicating collected stars for a cour
-## [touch_coin_score_age](#touch_coin_score_age) +## [save_file_remove_star_flags](#save_file_remove_star_flags) ### Description -Marks the coin score for a specific course as the newest among all save files. Adjusts the age of other scores to reflect the update. Useful for leaderboard tracking or displaying recent progress +Removes specific star flags from the save file. This modifies the bitmask representing collected stars for a course or castle secret stars. Useful for undoing progress or debugging collected stars ### Lua Example -`touch_coin_score_age(fileIndex, courseIndex)` +`save_file_remove_star_flags(fileIndex, courseIndex, starFlagsToRemove)` + +### Parameters +| Field | Type | +| ----- | ---- | +| fileIndex | `integer` | +| courseIndex | `integer` | +| starFlagsToRemove | `integer` | + +### Returns +- None + +### C Prototype +`void save_file_remove_star_flags(s32 fileIndex, s32 courseIndex, u32 starFlagsToRemove);` + +[:arrow_up_small:](#) + +
+ +## [save_file_get_course_coin_score](#save_file_get_course_coin_score) + +### Description +Returns the highest coin score for a specified course in the save file. Performs checks to ensure the coin score is valid. Useful for tracking player achievements and high scores + +### Lua Example +`local integerValue = save_file_get_course_coin_score(fileIndex, courseIndex)` ### Parameters | Field | Type | @@ -6107,11 +6014,104 @@ Marks the coin score for a specific course as the newest among all save files. A | fileIndex | `integer` | | courseIndex | `integer` | +### Returns +- `integer` + +### C Prototype +`s32 save_file_get_course_coin_score(s32 fileIndex, s32 courseIndex);` + +[:arrow_up_small:](#) + +
+ +## [save_file_set_course_coin_score](#save_file_set_course_coin_score) + +### Description +Updates the coin score for a specific course in the save file. The new score is provided in the `coinScore` parameter. Useful for manually setting achievements such as high coin counts in individual levels + +### Lua Example +`save_file_set_course_coin_score(fileIndex, courseIndex, coinScore)` + +### Parameters +| Field | Type | +| ----- | ---- | +| fileIndex | `integer` | +| courseIndex | `integer` | +| coinScore | `integer` | + ### Returns - None ### C Prototype -`void touch_coin_score_age(s32 fileIndex, s32 courseIndex);` +`void save_file_set_course_coin_score(s32 fileIndex, s32 courseIndex, u8 coinScore);` + +[:arrow_up_small:](#) + +
+ +## [save_file_is_cannon_unlocked](#save_file_is_cannon_unlocked) + +### Description +Checks whether the cannon in the specified course is unlocked. Returns true if the cannon is unlocked, otherwise false. Useful for tracking course-specific progress and enabling shortcuts + +### Lua Example +`local integerValue = save_file_is_cannon_unlocked(fileIndex, courseIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| fileIndex | `integer` | +| courseIndex | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 save_file_is_cannon_unlocked(s32 fileIndex, s32 courseIndex);` + +[:arrow_up_small:](#) + +
+ +## [save_file_get_cap_pos](#save_file_get_cap_pos) + +### Description +Retrieves the current position of Mario's cap, if it is on the ground in the current level and area. The position is stored in the provided `capPos` parameter. Useful for tracking the cap's location after it has been dropped or lost + +### Lua Example +`local integerValue = save_file_get_cap_pos(capPos)` + +### Parameters +| Field | Type | +| ----- | ---- | +| capPos | [Vec3s](structs.md#Vec3s) | + +### Returns +- `integer` + +### C Prototype +`s32 save_file_get_cap_pos(Vec3s capPos);` + +[:arrow_up_small:](#) + +
+ +## [save_file_get_sound_mode](#save_file_get_sound_mode) + +### Description +Returns the current sound mode (e.g., stereo, mono) stored in the save file. Useful for checking the audio output preferences when loading a save + +### Lua Example +`local integerValue = save_file_get_sound_mode()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u16 save_file_get_sound_mode(void);` [:arrow_up_small:](#) @@ -6146,10 +6146,34 @@ Gets the tempo of `player`
+## [sequence_player_set_tempo](#sequence_player_set_tempo) + +### Description +Sets the `tempo` of `player`. Resets when another sequence is played + +### Lua Example +`sequence_player_set_tempo(player, tempo)` + +### Parameters +| Field | Type | +| ----- | ---- | +| player | `integer` | +| tempo | `integer` | + +### Returns +- None + +### C Prototype +`void sequence_player_set_tempo(u8 player, u16 tempo);` + +[:arrow_up_small:](#) + +
+ ## [sequence_player_get_tempo_acc](#sequence_player_get_tempo_acc) ### Description -Gets the tempoAcc (tempo ???) of `player` +Gets the tempoAcc (tempo accumulation) of `player` ### Lua Example `local integerValue = sequence_player_get_tempo_acc(player)` @@ -6169,6 +6193,30 @@ Gets the tempoAcc (tempo ???) of `player`
+## [sequence_player_set_tempo_acc](#sequence_player_set_tempo_acc) + +### Description +Sets the `tempoAcc` (tempo accumulation) of `player`. Resets when another sequence is played + +### Lua Example +`sequence_player_set_tempo_acc(player, tempoAcc)` + +### Parameters +| Field | Type | +| ----- | ---- | +| player | `integer` | +| tempoAcc | `integer` | + +### Returns +- None + +### C Prototype +`void sequence_player_set_tempo_acc(u8 player, u16 tempoAcc);` + +[:arrow_up_small:](#) + +
+ ## [sequence_player_get_transposition](#sequence_player_get_transposition) ### Description @@ -6192,54 +6240,6 @@ Gets the transposition (pitch) of `player`
-## [sequence_player_set_tempo](#sequence_player_set_tempo) - -### Description -Sets the `tempo` of `player`. Resets when another sequence is played - -### Lua Example -`sequence_player_set_tempo(player, tempo)` - -### Parameters -| Field | Type | -| ----- | ---- | -| player | `integer` | -| tempo | `integer` | - -### Returns -- None - -### C Prototype -`void sequence_player_set_tempo(u8 player, u16 tempo);` - -[:arrow_up_small:](#) - -
- -## [sequence_player_set_tempo_acc](#sequence_player_set_tempo_acc) - -### Description -Sets the `tempoAcc` (tempo ???) of `player`. Resets when another sequence is played - -### Lua Example -`sequence_player_set_tempo_acc(player, tempoAcc)` - -### Parameters -| Field | Type | -| ----- | ---- | -| player | `integer` | -| tempoAcc | `integer` | - -### Returns -- None - -### C Prototype -`void sequence_player_set_tempo_acc(u8 player, u16 tempoAcc);` - -[:arrow_up_small:](#) - -
- ## [sequence_player_set_transposition](#sequence_player_set_transposition) ### Description @@ -6264,6 +6264,75 @@ Sets the `transposition` (pitch) of `player`. Resets when another sequence is pl
+## [sequence_player_get_volume](#sequence_player_get_volume) + +### Description +Gets the volume of `player` + +### Lua Example +`local numberValue = sequence_player_get_volume(player)` + +### Parameters +| Field | Type | +| ----- | ---- | +| player | `integer` | + +### Returns +- `number` + +### C Prototype +`f32 sequence_player_get_volume(u8 player);` + +[:arrow_up_small:](#) + +
+ +## [sequence_player_get_fade_volume](#sequence_player_get_fade_volume) + +### Description +Gets the fade volume of `player` + +### Lua Example +`local numberValue = sequence_player_get_fade_volume(player)` + +### Parameters +| Field | Type | +| ----- | ---- | +| player | `integer` | + +### Returns +- `number` + +### C Prototype +`f32 sequence_player_get_fade_volume(u8 player);` + +[:arrow_up_small:](#) + +
+ +## [sequence_player_get_mute_volume_scale](#sequence_player_get_mute_volume_scale) + +### Description +Gets the mute volume scale of `player` + +### Lua Example +`local numberValue = sequence_player_get_mute_volume_scale(player)` + +### Parameters +| Field | Type | +| ----- | ---- | +| player | `integer` | + +### Returns +- `number` + +### C Prototype +`f32 sequence_player_get_mute_volume_scale(u8 player);` + +[:arrow_up_small:](#) + +
+ --- # functions from smlua_anim_utils.h @@ -6293,29 +6362,6 @@ Gets a vanilla mario Animation with `index`
-## [smlua_anim_util_get_current_animation_name](#smlua_anim_util_get_current_animation_name) - -### Description -Gets the name of the current animation playing on `obj`, returns `nil` if there's no name - -### Lua Example -`local stringValue = smlua_anim_util_get_current_animation_name(obj)` - -### Parameters -| Field | Type | -| ----- | ---- | -| obj | [Object](structs.md#Object) | - -### Returns -- `string` - -### C Prototype -`const char *smlua_anim_util_get_current_animation_name(struct Object *obj);` - -[:arrow_up_small:](#) - -
- ## [smlua_anim_util_set_animation](#smlua_anim_util_set_animation) ### Description @@ -6340,216 +6386,71 @@ Sets the animation of `obj` to the animation `name` corresponds to
+## [smlua_anim_util_get_current_animation_name](#smlua_anim_util_get_current_animation_name) + +### Description +Gets the name of the current animation playing on `obj`, returns `nil` if there's no name + +### Lua Example +`local stringValue = smlua_anim_util_get_current_animation_name(obj)` + +### Parameters +| Field | Type | +| ----- | ---- | +| obj | [Object](structs.md#Object) | + +### Returns +- `string` + +### C Prototype +`const char *smlua_anim_util_get_current_animation_name(struct Object *obj);` + +[:arrow_up_small:](#) + +
+ --- # functions from smlua_audio_utils.h
-## [audio_sample_destroy](#audio_sample_destroy) - -### Description -Destroys an `audio` sample +## [smlua_audio_utils_reset_all](#smlua_audio_utils_reset_all) ### Lua Example -`audio_sample_destroy(audio)` +`smlua_audio_utils_reset_all()` ### Parameters -| Field | Type | -| ----- | ---- | -| audio | [ModAudio](structs.md#ModAudio) | +- None ### Returns - None ### C Prototype -`void audio_sample_destroy(struct ModAudio* audio);` +`void smlua_audio_utils_reset_all(void);` [:arrow_up_small:](#)
-## [audio_sample_load](#audio_sample_load) - -### Description -Loads an `audio` sample +## [smlua_audio_utils_replace_sequence](#smlua_audio_utils_replace_sequence) ### Lua Example -`local ModAudioValue = audio_sample_load(filename)` +`smlua_audio_utils_replace_sequence(sequenceId, bankId, defaultVolume, m64Name)` ### Parameters | Field | Type | | ----- | ---- | -| filename | `string` | - -### Returns -[ModAudio](structs.md#ModAudio) - -### C Prototype -`struct ModAudio* audio_sample_load(const char* filename);` - -[:arrow_up_small:](#) - -
- -## [audio_sample_play](#audio_sample_play) - -### Description -Plays an `audio` sample at `position` with `volume` - -### Lua Example -`audio_sample_play(audio, position, volume)` - -### Parameters -| Field | Type | -| ----- | ---- | -| audio | [ModAudio](structs.md#ModAudio) | -| position | [Vec3f](structs.md#Vec3f) | -| volume | `number` | +| sequenceId | `integer` | +| bankId | `integer` | +| defaultVolume | `integer` | +| m64Name | `string` | ### Returns - None ### C Prototype -`void audio_sample_play(struct ModAudio* audio, Vec3f position, f32 volume);` - -[:arrow_up_small:](#) - -
- -## [audio_sample_stop](#audio_sample_stop) - -### Description -Stops an `audio` sample - -### Lua Example -`audio_sample_stop(audio)` - -### Parameters -| Field | Type | -| ----- | ---- | -| audio | [ModAudio](structs.md#ModAudio) | - -### Returns -- None - -### C Prototype -`void audio_sample_stop(struct ModAudio* audio);` - -[:arrow_up_small:](#) - -
- -## [audio_stream_destroy](#audio_stream_destroy) - -### Description -Destroys an `audio` stream - -### Lua Example -`audio_stream_destroy(audio)` - -### Parameters -| Field | Type | -| ----- | ---- | -| audio | [ModAudio](structs.md#ModAudio) | - -### Returns -- None - -### C Prototype -`void audio_stream_destroy(struct ModAudio* audio);` - -[:arrow_up_small:](#) - -
- -## [audio_stream_get_frequency](#audio_stream_get_frequency) - -### Description -Gets the frequency of an `audio` stream - -### Lua Example -`local numberValue = audio_stream_get_frequency(audio)` - -### Parameters -| Field | Type | -| ----- | ---- | -| audio | [ModAudio](structs.md#ModAudio) | - -### Returns -- `number` - -### C Prototype -`f32 audio_stream_get_frequency(struct ModAudio* audio);` - -[:arrow_up_small:](#) - -
- -## [audio_stream_get_looping](#audio_stream_get_looping) - -### Description -Gets if an `audio` stream is looping or not - -### Lua Example -`local booleanValue = audio_stream_get_looping(audio)` - -### Parameters -| Field | Type | -| ----- | ---- | -| audio | [ModAudio](structs.md#ModAudio) | - -### Returns -- `boolean` - -### C Prototype -`bool audio_stream_get_looping(struct ModAudio* audio);` - -[:arrow_up_small:](#) - -
- -## [audio_stream_get_position](#audio_stream_get_position) - -### Description -Gets the position of an `audio` stream - -### Lua Example -`local numberValue = audio_stream_get_position(audio)` - -### Parameters -| Field | Type | -| ----- | ---- | -| audio | [ModAudio](structs.md#ModAudio) | - -### Returns -- `number` - -### C Prototype -`f32 audio_stream_get_position(struct ModAudio* audio);` - -[:arrow_up_small:](#) - -
- -## [audio_stream_get_volume](#audio_stream_get_volume) - -### Description -Gets the volume of an `audio` stream - -### Lua Example -`local numberValue = audio_stream_get_volume(audio)` - -### Parameters -| Field | Type | -| ----- | ---- | -| audio | [ModAudio](structs.md#ModAudio) | - -### Returns -- `number` - -### C Prototype -`f32 audio_stream_get_volume(struct ModAudio* audio);` +`void smlua_audio_utils_replace_sequence(u8 sequenceId, u8 bankId, u8 defaultVolume, const char* m64Name);` [:arrow_up_small:](#) @@ -6578,13 +6479,13 @@ Loads an `audio` stream by `filename` (with extension)
-## [audio_stream_pause](#audio_stream_pause) +## [audio_stream_destroy](#audio_stream_destroy) ### Description -Pauses an `audio` stream +Destroys an `audio` stream ### Lua Example -`audio_stream_pause(audio)` +`audio_stream_destroy(audio)` ### Parameters | Field | Type | @@ -6595,7 +6496,7 @@ Pauses an `audio` stream - None ### C Prototype -`void audio_stream_pause(struct ModAudio* audio);` +`void audio_stream_destroy(struct ModAudio* audio);` [:arrow_up_small:](#) @@ -6626,25 +6527,141 @@ Plays an `audio` stream with `volume`. `restart` sets the elapsed time back to 0
-## [audio_stream_set_frequency](#audio_stream_set_frequency) +## [audio_stream_pause](#audio_stream_pause) ### Description -Sets the frequency of an `audio` stream +Pauses an `audio` stream ### Lua Example -`audio_stream_set_frequency(audio, freq)` +`audio_stream_pause(audio)` ### Parameters | Field | Type | | ----- | ---- | | audio | [ModAudio](structs.md#ModAudio) | -| freq | `number` | ### Returns - None ### C Prototype -`void audio_stream_set_frequency(struct ModAudio* audio, f32 freq);` +`void audio_stream_pause(struct ModAudio* audio);` + +[:arrow_up_small:](#) + +
+ +## [audio_stream_stop](#audio_stream_stop) + +### Description +Stops an `audio` stream + +### Lua Example +`audio_stream_stop(audio)` + +### Parameters +| Field | Type | +| ----- | ---- | +| audio | [ModAudio](structs.md#ModAudio) | + +### Returns +- None + +### C Prototype +`void audio_stream_stop(struct ModAudio* audio);` + +[:arrow_up_small:](#) + +
+ +## [audio_stream_get_position](#audio_stream_get_position) + +### Description +Gets the position of an `audio` stream + +### Lua Example +`local numberValue = audio_stream_get_position(audio)` + +### Parameters +| Field | Type | +| ----- | ---- | +| audio | [ModAudio](structs.md#ModAudio) | + +### Returns +- `number` + +### C Prototype +`f32 audio_stream_get_position(struct ModAudio* audio);` + +[:arrow_up_small:](#) + +
+ +## [audio_stream_set_position](#audio_stream_set_position) + +### Description +Sets the position of an `audio` stream + +### Lua Example +`audio_stream_set_position(audio, pos)` + +### Parameters +| Field | Type | +| ----- | ---- | +| audio | [ModAudio](structs.md#ModAudio) | +| pos | `number` | + +### Returns +- None + +### C Prototype +`void audio_stream_set_position(struct ModAudio* audio, f32 pos);` + +[:arrow_up_small:](#) + +
+ +## [audio_stream_get_looping](#audio_stream_get_looping) + +### Description +Gets if an `audio` stream is looping or not + +### Lua Example +`local booleanValue = audio_stream_get_looping(audio)` + +### Parameters +| Field | Type | +| ----- | ---- | +| audio | [ModAudio](structs.md#ModAudio) | + +### Returns +- `boolean` + +### C Prototype +`bool audio_stream_get_looping(struct ModAudio* audio);` + +[:arrow_up_small:](#) + +
+ +## [audio_stream_set_looping](#audio_stream_set_looping) + +### Description +Sets if an `audio` stream is looping or not + +### Lua Example +`audio_stream_set_looping(audio, looping)` + +### Parameters +| Field | Type | +| ----- | ---- | +| audio | [ModAudio](structs.md#ModAudio) | +| looping | `boolean` | + +### Returns +- None + +### C Prototype +`void audio_stream_set_looping(struct ModAudio* audio, bool looping);` [:arrow_up_small:](#) @@ -6675,49 +6692,71 @@ Sets an `audio` stream's loop points (samples)
-## [audio_stream_set_looping](#audio_stream_set_looping) +## [audio_stream_get_frequency](#audio_stream_get_frequency) ### Description -Sets if an `audio` stream is looping or not +Gets the frequency of an `audio` stream ### Lua Example -`audio_stream_set_looping(audio, looping)` +`local numberValue = audio_stream_get_frequency(audio)` ### Parameters | Field | Type | | ----- | ---- | | audio | [ModAudio](structs.md#ModAudio) | -| looping | `boolean` | ### Returns -- None +- `number` ### C Prototype -`void audio_stream_set_looping(struct ModAudio* audio, bool looping);` +`f32 audio_stream_get_frequency(struct ModAudio* audio);` [:arrow_up_small:](#)
-## [audio_stream_set_position](#audio_stream_set_position) +## [audio_stream_set_frequency](#audio_stream_set_frequency) ### Description -Sets the position of an `audio` stream +Sets the frequency of an `audio` stream ### Lua Example -`audio_stream_set_position(audio, pos)` +`audio_stream_set_frequency(audio, freq)` ### Parameters | Field | Type | | ----- | ---- | | audio | [ModAudio](structs.md#ModAudio) | -| pos | `number` | +| freq | `number` | ### Returns - None ### C Prototype -`void audio_stream_set_position(struct ModAudio* audio, f32 pos);` +`void audio_stream_set_frequency(struct ModAudio* audio, f32 freq);` + +[:arrow_up_small:](#) + +
+ +## [audio_stream_get_volume](#audio_stream_get_volume) + +### Description +Gets the volume of an `audio` stream + +### Lua Example +`local numberValue = audio_stream_get_volume(audio)` + +### Parameters +| Field | Type | +| ----- | ---- | +| audio | [ModAudio](structs.md#ModAudio) | + +### Returns +- `number` + +### C Prototype +`f32 audio_stream_get_volume(struct ModAudio* audio);` [:arrow_up_small:](#) @@ -6747,13 +6786,36 @@ Sets the volume of an `audio` stream
-## [audio_stream_stop](#audio_stream_stop) +## [audio_sample_load](#audio_sample_load) ### Description -Stops an `audio` stream +Loads an `audio` sample ### Lua Example -`audio_stream_stop(audio)` +`local ModAudioValue = audio_sample_load(filename)` + +### Parameters +| Field | Type | +| ----- | ---- | +| filename | `string` | + +### Returns +[ModAudio](structs.md#ModAudio) + +### C Prototype +`struct ModAudio* audio_sample_load(const char* filename);` + +[:arrow_up_small:](#) + +
+ +## [audio_sample_destroy](#audio_sample_destroy) + +### Description +Destroys an `audio` sample + +### Lua Example +`audio_sample_destroy(audio)` ### Parameters | Field | Type | @@ -6764,48 +6826,55 @@ Stops an `audio` stream - None ### C Prototype -`void audio_stream_stop(struct ModAudio* audio);` +`void audio_sample_destroy(struct ModAudio* audio);` [:arrow_up_small:](#)
-## [smlua_audio_utils_replace_sequence](#smlua_audio_utils_replace_sequence) +## [audio_sample_stop](#audio_sample_stop) + +### Description +Stops an `audio` sample ### Lua Example -`smlua_audio_utils_replace_sequence(sequenceId, bankId, defaultVolume, m64Name)` +`audio_sample_stop(audio)` ### Parameters | Field | Type | | ----- | ---- | -| sequenceId | `integer` | -| bankId | `integer` | -| defaultVolume | `integer` | -| m64Name | `string` | +| audio | [ModAudio](structs.md#ModAudio) | ### Returns - None ### C Prototype -`void smlua_audio_utils_replace_sequence(u8 sequenceId, u8 bankId, u8 defaultVolume, const char* m64Name);` +`void audio_sample_stop(struct ModAudio* audio);` [:arrow_up_small:](#)
-## [smlua_audio_utils_reset_all](#smlua_audio_utils_reset_all) +## [audio_sample_play](#audio_sample_play) + +### Description +Plays an `audio` sample at `position` with `volume` ### Lua Example -`smlua_audio_utils_reset_all()` +`audio_sample_play(audio, position, volume)` ### Parameters -- None +| Field | Type | +| ----- | ---- | +| audio | [ModAudio](structs.md#ModAudio) | +| position | [Vec3f](structs.md#Vec3f) | +| volume | `number` | ### Returns - None ### C Prototype -`void smlua_audio_utils_reset_all(void);` +`void audio_sample_play(struct ModAudio* audio, Vec3f position, f32 volume);` [:arrow_up_small:](#) @@ -6817,6 +6886,159 @@ Stops an `audio` stream
+## [camera_reset_overrides](#camera_reset_overrides) + +### Description +Resets camera config overrides + +### Lua Example +`camera_reset_overrides()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void camera_reset_overrides(void);` + +[:arrow_up_small:](#) + +
+ +## [camera_freeze](#camera_freeze) + +### Description +Freezes the camera by not updating it + +### Lua Example +`camera_freeze()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void camera_freeze(void);` + +[:arrow_up_small:](#) + +
+ +## [camera_unfreeze](#camera_unfreeze) + +### Description +Unfreezes the camera + +### Lua Example +`camera_unfreeze()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void camera_unfreeze(void);` + +[:arrow_up_small:](#) + +
+ +## [camera_is_frozen](#camera_is_frozen) + +### Description +Checks if the camera is frozen + +### Lua Example +`local booleanValue = camera_is_frozen()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool camera_is_frozen(void);` + +[:arrow_up_small:](#) + +
+ +## [camera_romhack_allow_only_mods](#camera_romhack_allow_only_mods) + +### Description +Sets if only mods are allowed to modify the camera (Enabling prevents the player from modifying the camera through the settings) + +### Lua Example +`camera_romhack_allow_only_mods(allow)` + +### Parameters +| Field | Type | +| ----- | ---- | +| allow | `integer` | + +### Returns +- None + +### C Prototype +`void camera_romhack_allow_only_mods(u8 allow);` + +[:arrow_up_small:](#) + +
+ +## [camera_set_romhack_override](#camera_set_romhack_override) + +### Description +Sets the romhack camera override status + +### Lua Example +`camera_set_romhack_override(rco)` + +### Parameters +| Field | Type | +| ----- | ---- | +| rco | [enum RomhackCameraOverride](constants.md#enum-RomhackCameraOverride) | + +### Returns +- None + +### C Prototype +`void camera_set_romhack_override(enum RomhackCameraOverride rco);` + +[:arrow_up_small:](#) + +
+ +## [camera_romhack_allow_centering](#camera_romhack_allow_centering) + +### Description +Sets if the romhack camera should allow centering, triggered with the L button + +### Lua Example +`camera_romhack_allow_centering(allow)` + +### Parameters +| Field | Type | +| ----- | ---- | +| allow | `integer` | + +### Returns +- None + +### C Prototype +`void camera_romhack_allow_centering(u8 allow);` + +[:arrow_up_small:](#) + +
+ ## [camera_allow_toxic_gas_camera](#camera_allow_toxic_gas_camera) ### Description @@ -6840,148 +7062,151 @@ Sets if the romhack camera should fly above poison gas
-## [camera_config_enable_analog_cam](#camera_config_enable_analog_cam) +## [camera_romhack_allow_dpad_usage](#camera_romhack_allow_dpad_usage) ### Description -Overrides if Analog Camera is enabled +Sets if the romhack camera should allow D-Pad movement ### Lua Example -`camera_config_enable_analog_cam(enable)` +`camera_romhack_allow_dpad_usage(allow)` ### Parameters | Field | Type | | ----- | ---- | -| enable | `boolean` | +| allow | `integer` | ### Returns - None ### C Prototype -`void camera_config_enable_analog_cam(bool enable);` +`void camera_romhack_allow_dpad_usage(u8 allow);` [:arrow_up_small:](#)
-## [camera_config_enable_centering](#camera_config_enable_centering) +## [rom_hack_cam_set_collisions](#rom_hack_cam_set_collisions) ### Description -Overrides if the L button will center the camera +Toggles collision settings for the ROM hack camera. This enables or disables specific collision behaviors in modded levels ### Lua Example -`camera_config_enable_centering(enable)` +`rom_hack_cam_set_collisions(enable)` ### Parameters | Field | Type | | ----- | ---- | -| enable | `boolean` | +| enable | `integer` | ### Returns - None ### C Prototype -`void camera_config_enable_centering(bool enable);` +`void rom_hack_cam_set_collisions(u8 enable);` [:arrow_up_small:](#)
-## [camera_config_enable_collisions](#camera_config_enable_collisions) +## [camera_romhack_set_zoomed_in_dist](#camera_romhack_set_zoomed_in_dist) ### Description -Overrides if Camera Collision is enabled +Sets the romhack camera's zoomed in distance (Default: 900) ### Lua Example -`camera_config_enable_collisions(enable)` +`camera_romhack_set_zoomed_in_dist(val)` ### Parameters | Field | Type | | ----- | ---- | -| enable | `boolean` | +| val | `integer` | ### Returns - None ### C Prototype -`void camera_config_enable_collisions(bool enable);` +`void camera_romhack_set_zoomed_in_dist(u32 val);` [:arrow_up_small:](#)
-## [camera_config_enable_dpad](#camera_config_enable_dpad) +## [camera_romhack_set_zoomed_out_dist](#camera_romhack_set_zoomed_out_dist) ### Description -Overrides if Freecam DPad Behavior is enabled +Sets the romhack camera's zoomed out additional distance (Default: 500) ### Lua Example -`camera_config_enable_dpad(enable)` +`camera_romhack_set_zoomed_out_dist(val)` ### Parameters | Field | Type | | ----- | ---- | -| enable | `boolean` | +| val | `integer` | ### Returns - None ### C Prototype -`void camera_config_enable_dpad(bool enable);` +`void camera_romhack_set_zoomed_out_dist(u32 val);` [:arrow_up_small:](#)
-## [camera_config_enable_free_cam](#camera_config_enable_free_cam) +## [camera_romhack_set_zoomed_in_height](#camera_romhack_set_zoomed_in_height) ### Description -Overrides if Free Camera is enabled +Sets the romhack camera's zoomed in height (Default: 300) ### Lua Example -`camera_config_enable_free_cam(enable)` +`camera_romhack_set_zoomed_in_height(val)` ### Parameters | Field | Type | | ----- | ---- | -| enable | `boolean` | +| val | `integer` | ### Returns - None ### C Prototype -`void camera_config_enable_free_cam(bool enable);` +`void camera_romhack_set_zoomed_in_height(u32 val);` [:arrow_up_small:](#)
-## [camera_config_enable_mouse_look](#camera_config_enable_mouse_look) +## [camera_romhack_set_zoomed_out_height](#camera_romhack_set_zoomed_out_height) ### Description -Overrides if camera mouse look is enabled +Sets the romhack camera's zoomed out additional height (Default: 150) ### Lua Example -`camera_config_enable_mouse_look(enable)` +`camera_romhack_set_zoomed_out_height(val)` ### Parameters | Field | Type | | ----- | ---- | -| enable | `boolean` | +| val | `integer` | ### Returns - None ### C Prototype -`void camera_config_enable_mouse_look(bool enable);` +`void camera_romhack_set_zoomed_out_height(u32 val);` [:arrow_up_small:](#)
-## [camera_config_get_aggression](#camera_config_get_aggression) +## [camera_romhack_get_zoomed_in_dist](#camera_romhack_get_zoomed_in_dist) + +### Description +Gets the romhack camera's zoomed in distance ### Lua Example -`local integerValue = camera_config_get_aggression()` +`local integerValue = camera_romhack_get_zoomed_in_dist()` ### Parameters - None @@ -6990,19 +7215,187 @@ Overrides if camera mouse look is enabled - `integer` ### C Prototype -`u32 camera_config_get_aggression(void);` +`u32 camera_romhack_get_zoomed_in_dist(void);` [:arrow_up_small:](#)
-## [camera_config_get_centering](#camera_config_get_centering) +## [camera_romhack_get_zoomed_out_dist](#camera_romhack_get_zoomed_out_dist) ### Description -Gets if the L button will center the camera +Gets the romhack camera's additional zoomed out distance ### Lua Example -`local booleanValue = camera_config_get_centering()` +`local integerValue = camera_romhack_get_zoomed_out_dist()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u32 camera_romhack_get_zoomed_out_dist(void);` + +[:arrow_up_small:](#) + +
+ +## [camera_romhack_get_zoomed_in_height](#camera_romhack_get_zoomed_in_height) + +### Description +Gets the romhack camera's zoomed in height + +### Lua Example +`local integerValue = camera_romhack_get_zoomed_in_height()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u32 camera_romhack_get_zoomed_in_height(void);` + +[:arrow_up_small:](#) + +
+ +## [camera_romhack_get_zoomed_out_height](#camera_romhack_get_zoomed_out_height) + +### Description +Gets the romhack camera's additional zoomed out height + +### Lua Example +`local integerValue = camera_romhack_get_zoomed_out_height()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u32 camera_romhack_get_zoomed_out_height(void);` + +[:arrow_up_small:](#) + +
+ +## [camera_get_romhack_override](#camera_get_romhack_override) + +### Description +Gets the current romhack camera override status + +### Lua Example +`local enumValue = camera_get_romhack_override()` + +### Parameters +- None + +### Returns +[enum RomhackCameraOverride](constants.md#enum-RomhackCameraOverride) + +### C Prototype +`enum RomhackCameraOverride camera_get_romhack_override(void);` + +[:arrow_up_small:](#) + +
+ +## [camera_romhack_get_allow_centering](#camera_romhack_get_allow_centering) + +### Description +Gets if the romhack camera should allow centering + +### Lua Example +`local integerValue = camera_romhack_get_allow_centering()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u8 camera_romhack_get_allow_centering(void);` + +[:arrow_up_small:](#) + +
+ +## [camera_get_allow_toxic_gas_camera](#camera_get_allow_toxic_gas_camera) + +### Description +Gets if the romhack camera should fly above poison gas + +### Lua Example +`local integerValue = camera_get_allow_toxic_gas_camera()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u8 camera_get_allow_toxic_gas_camera(void);` + +[:arrow_up_small:](#) + +
+ +## [camera_romhack_get_allow_dpad_usage](#camera_romhack_get_allow_dpad_usage) + +### Description +Gets if the romhack camera should allow D-Pad movement + +### Lua Example +`local integerValue = camera_romhack_get_allow_dpad_usage()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u8 camera_romhack_get_allow_dpad_usage(void);` + +[:arrow_up_small:](#) + +
+ +## [camera_romhack_get_collisions](#camera_romhack_get_collisions) + +### Description +Gets if the romhack camera has surface collisions + +### Lua Example +`local integerValue = camera_romhack_get_collisions()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u8 camera_romhack_get_collisions(void);` + +[:arrow_up_small:](#) + +
+ +## [camera_config_is_free_cam_enabled](#camera_config_is_free_cam_enabled) + +### Description +Checks if Free Camera is enabled + +### Lua Example +`local booleanValue = camera_config_is_free_cam_enabled()` ### Parameters - None @@ -7011,125 +7404,7 @@ Gets if the L button will center the camera - `boolean` ### C Prototype -`bool camera_config_get_centering(void);` - -[:arrow_up_small:](#) - -
- -## [camera_config_get_deceleration](#camera_config_get_deceleration) - -### Lua Example -`local integerValue = camera_config_get_deceleration()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u32 camera_config_get_deceleration(void);` - -[:arrow_up_small:](#) - -
- -## [camera_config_get_pan_level](#camera_config_get_pan_level) - -### Lua Example -`local integerValue = camera_config_get_pan_level()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u32 camera_config_get_pan_level(void);` - -[:arrow_up_small:](#) - -
- -## [camera_config_get_x_sensitivity](#camera_config_get_x_sensitivity) - -### Lua Example -`local integerValue = camera_config_get_x_sensitivity()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u32 camera_config_get_x_sensitivity(void);` - -[:arrow_up_small:](#) - -
- -## [camera_config_get_y_sensitivity](#camera_config_get_y_sensitivity) - -### Lua Example -`local integerValue = camera_config_get_y_sensitivity()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u32 camera_config_get_y_sensitivity(void);` - -[:arrow_up_small:](#) - -
- -## [camera_config_invert_x](#camera_config_invert_x) - -### Description -Overrides if camera X is inverted - -### Lua Example -`camera_config_invert_x(invert)` - -### Parameters -| Field | Type | -| ----- | ---- | -| invert | `boolean` | - -### Returns -- None - -### C Prototype -`void camera_config_invert_x(bool invert);` - -[:arrow_up_small:](#) - -
- -## [camera_config_invert_y](#camera_config_invert_y) - -### Description -Overrides if camera Y is inverted - -### Lua Example -`camera_config_invert_y(invert)` - -### Parameters -| Field | Type | -| ----- | ---- | -| invert | `boolean` | - -### Returns -- None - -### C Prototype -`void camera_config_invert_y(bool invert);` +`bool camera_config_is_free_cam_enabled(void);` [:arrow_up_small:](#) @@ -7156,27 +7431,6 @@ Checks if Analog Camera is enabled
-## [camera_config_is_collision_enabled](#camera_config_is_collision_enabled) - -### Description -Checks if Camera Collision is enabled - -### Lua Example -`local booleanValue = camera_config_is_collision_enabled()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool camera_config_is_collision_enabled(void);` - -[:arrow_up_small:](#) - -
- ## [camera_config_is_dpad_enabled](#camera_config_is_dpad_enabled) ### Description @@ -7198,13 +7452,13 @@ Checks if Freecam DPad Behavior is enabled
-## [camera_config_is_free_cam_enabled](#camera_config_is_free_cam_enabled) +## [camera_config_is_collision_enabled](#camera_config_is_collision_enabled) ### Description -Checks if Free Camera is enabled +Checks if Camera Collision is enabled ### Lua Example -`local booleanValue = camera_config_is_free_cam_enabled()` +`local booleanValue = camera_config_is_collision_enabled()` ### Parameters - None @@ -7213,7 +7467,7 @@ Checks if Free Camera is enabled - `boolean` ### C Prototype -`bool camera_config_is_free_cam_enabled(void);` +`bool camera_config_is_collision_enabled(void);` [:arrow_up_small:](#) @@ -7282,70 +7536,296 @@ Checks if camera Y is inverted
-## [camera_config_set_aggression](#camera_config_set_aggression) - -### Description -Overrides camera aggression +## [camera_config_get_x_sensitivity](#camera_config_get_x_sensitivity) ### Lua Example -`camera_config_set_aggression(value)` +`local integerValue = camera_config_get_x_sensitivity()` ### Parameters -| Field | Type | -| ----- | ---- | -| value | `integer` | - -### Returns - None +### Returns +- `integer` + ### C Prototype -`void camera_config_set_aggression(u32 value);` +`u32 camera_config_get_x_sensitivity(void);` [:arrow_up_small:](#)
-## [camera_config_set_deceleration](#camera_config_set_deceleration) - -### Description -Overrides camera deceleration +## [camera_config_get_y_sensitivity](#camera_config_get_y_sensitivity) ### Lua Example -`camera_config_set_deceleration(value)` +`local integerValue = camera_config_get_y_sensitivity()` ### Parameters -| Field | Type | -| ----- | ---- | -| value | `integer` | - -### Returns - None +### Returns +- `integer` + ### C Prototype -`void camera_config_set_deceleration(u32 value);` +`u32 camera_config_get_y_sensitivity(void);` [:arrow_up_small:](#)
-## [camera_config_set_pan_level](#camera_config_set_pan_level) - -### Description -Overrides camera pan level +## [camera_config_get_aggression](#camera_config_get_aggression) ### Lua Example -`camera_config_set_pan_level(value)` +`local integerValue = camera_config_get_aggression()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u32 camera_config_get_aggression(void);` + +[:arrow_up_small:](#) + +
+ +## [camera_config_get_pan_level](#camera_config_get_pan_level) + +### Lua Example +`local integerValue = camera_config_get_pan_level()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u32 camera_config_get_pan_level(void);` + +[:arrow_up_small:](#) + +
+ +## [camera_config_get_deceleration](#camera_config_get_deceleration) + +### Lua Example +`local integerValue = camera_config_get_deceleration()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u32 camera_config_get_deceleration(void);` + +[:arrow_up_small:](#) + +
+ +## [camera_config_get_centering](#camera_config_get_centering) + +### Description +Gets if the L button will center the camera + +### Lua Example +`local booleanValue = camera_config_get_centering()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool camera_config_get_centering(void);` + +[:arrow_up_small:](#) + +
+ +## [camera_config_enable_free_cam](#camera_config_enable_free_cam) + +### Description +Overrides if Free Camera is enabled + +### Lua Example +`camera_config_enable_free_cam(enable)` ### Parameters | Field | Type | | ----- | ---- | -| value | `integer` | +| enable | `boolean` | ### Returns - None ### C Prototype -`void camera_config_set_pan_level(u32 value);` +`void camera_config_enable_free_cam(bool enable);` + +[:arrow_up_small:](#) + +
+ +## [camera_config_enable_analog_cam](#camera_config_enable_analog_cam) + +### Description +Overrides if Analog Camera is enabled + +### Lua Example +`camera_config_enable_analog_cam(enable)` + +### Parameters +| Field | Type | +| ----- | ---- | +| enable | `boolean` | + +### Returns +- None + +### C Prototype +`void camera_config_enable_analog_cam(bool enable);` + +[:arrow_up_small:](#) + +
+ +## [camera_config_enable_centering](#camera_config_enable_centering) + +### Description +Overrides if the L button will center the camera + +### Lua Example +`camera_config_enable_centering(enable)` + +### Parameters +| Field | Type | +| ----- | ---- | +| enable | `boolean` | + +### Returns +- None + +### C Prototype +`void camera_config_enable_centering(bool enable);` + +[:arrow_up_small:](#) + +
+ +## [camera_config_enable_dpad](#camera_config_enable_dpad) + +### Description +Overrides if Freecam DPad Behavior is enabled + +### Lua Example +`camera_config_enable_dpad(enable)` + +### Parameters +| Field | Type | +| ----- | ---- | +| enable | `boolean` | + +### Returns +- None + +### C Prototype +`void camera_config_enable_dpad(bool enable);` + +[:arrow_up_small:](#) + +
+ +## [camera_config_enable_collisions](#camera_config_enable_collisions) + +### Description +Overrides if Camera Collision is enabled + +### Lua Example +`camera_config_enable_collisions(enable)` + +### Parameters +| Field | Type | +| ----- | ---- | +| enable | `boolean` | + +### Returns +- None + +### C Prototype +`void camera_config_enable_collisions(bool enable);` + +[:arrow_up_small:](#) + +
+ +## [camera_config_enable_mouse_look](#camera_config_enable_mouse_look) + +### Description +Overrides if camera mouse look is enabled + +### Lua Example +`camera_config_enable_mouse_look(enable)` + +### Parameters +| Field | Type | +| ----- | ---- | +| enable | `boolean` | + +### Returns +- None + +### C Prototype +`void camera_config_enable_mouse_look(bool enable);` + +[:arrow_up_small:](#) + +
+ +## [camera_config_invert_x](#camera_config_invert_x) + +### Description +Overrides if camera X is inverted + +### Lua Example +`camera_config_invert_x(invert)` + +### Parameters +| Field | Type | +| ----- | ---- | +| invert | `boolean` | + +### Returns +- None + +### C Prototype +`void camera_config_invert_x(bool invert);` + +[:arrow_up_small:](#) + +
+ +## [camera_config_invert_y](#camera_config_invert_y) + +### Description +Overrides if camera Y is inverted + +### Lua Example +`camera_config_invert_y(invert)` + +### Parameters +| Field | Type | +| ----- | ---- | +| invert | `boolean` | + +### Returns +- None + +### C Prototype +`void camera_config_invert_y(bool invert);` [:arrow_up_small:](#) @@ -7397,43 +7877,70 @@ Overrides camera Y sensitivity
-## [camera_freeze](#camera_freeze) +## [camera_config_set_aggression](#camera_config_set_aggression) ### Description -Freezes the camera by not updating it +Overrides camera aggression ### Lua Example -`camera_freeze()` +`camera_config_set_aggression(value)` ### Parameters -- None +| Field | Type | +| ----- | ---- | +| value | `integer` | ### Returns - None ### C Prototype -`void camera_freeze(void);` +`void camera_config_set_aggression(u32 value);` [:arrow_up_small:](#)
-## [camera_get_allow_toxic_gas_camera](#camera_get_allow_toxic_gas_camera) +## [camera_config_set_pan_level](#camera_config_set_pan_level) ### Description -Gets if the romhack camera should fly above poison gas +Overrides camera pan level ### Lua Example -`local integerValue = camera_get_allow_toxic_gas_camera()` +`camera_config_set_pan_level(value)` ### Parameters -- None +| Field | Type | +| ----- | ---- | +| value | `integer` | ### Returns -- `integer` +- None ### C Prototype -`u8 camera_get_allow_toxic_gas_camera(void);` +`void camera_config_set_pan_level(u32 value);` + +[:arrow_up_small:](#) + +
+ +## [camera_config_set_deceleration](#camera_config_set_deceleration) + +### Description +Overrides camera deceleration + +### Lua Example +`camera_config_set_deceleration(value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `integer` | + +### Returns +- None + +### C Prototype +`void camera_config_set_deceleration(u32 value);` [:arrow_up_small:](#) @@ -7460,377 +7967,6 @@ Checks if the camera should account for surfaces
-## [camera_get_romhack_override](#camera_get_romhack_override) - -### Description -Gets the current romhack camera override status - -### Lua Example -`local enumValue = camera_get_romhack_override()` - -### Parameters -- None - -### Returns -[enum RomhackCameraOverride](constants.md#enum-RomhackCameraOverride) - -### C Prototype -`enum RomhackCameraOverride camera_get_romhack_override(void);` - -[:arrow_up_small:](#) - -
- -## [camera_is_frozen](#camera_is_frozen) - -### Description -Checks if the camera is frozen - -### Lua Example -`local booleanValue = camera_is_frozen()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool camera_is_frozen(void);` - -[:arrow_up_small:](#) - -
- -## [camera_reset_overrides](#camera_reset_overrides) - -### Description -Resets camera config overrides - -### Lua Example -`camera_reset_overrides()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void camera_reset_overrides(void);` - -[:arrow_up_small:](#) - -
- -## [camera_romhack_allow_centering](#camera_romhack_allow_centering) - -### Description -Sets if the romhack camera should allow centering, triggered with the L button - -### Lua Example -`camera_romhack_allow_centering(allow)` - -### Parameters -| Field | Type | -| ----- | ---- | -| allow | `integer` | - -### Returns -- None - -### C Prototype -`void camera_romhack_allow_centering(u8 allow);` - -[:arrow_up_small:](#) - -
- -## [camera_romhack_allow_dpad_usage](#camera_romhack_allow_dpad_usage) - -### Description -Sets if the romhack camera should allow D-Pad movement - -### Lua Example -`camera_romhack_allow_dpad_usage(allow)` - -### Parameters -| Field | Type | -| ----- | ---- | -| allow | `integer` | - -### Returns -- None - -### C Prototype -`void camera_romhack_allow_dpad_usage(u8 allow);` - -[:arrow_up_small:](#) - -
- -## [camera_romhack_allow_only_mods](#camera_romhack_allow_only_mods) - -### Description -Sets if only mods are allowed to modify the camera (Enabling prevents the player from modifying the camera through the settings) - -### Lua Example -`camera_romhack_allow_only_mods(allow)` - -### Parameters -| Field | Type | -| ----- | ---- | -| allow | `integer` | - -### Returns -- None - -### C Prototype -`void camera_romhack_allow_only_mods(u8 allow);` - -[:arrow_up_small:](#) - -
- -## [camera_romhack_get_allow_centering](#camera_romhack_get_allow_centering) - -### Description -Gets if the romhack camera should allow centering - -### Lua Example -`local integerValue = camera_romhack_get_allow_centering()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u8 camera_romhack_get_allow_centering(void);` - -[:arrow_up_small:](#) - -
- -## [camera_romhack_get_allow_dpad_usage](#camera_romhack_get_allow_dpad_usage) - -### Description -Gets if the romhack camera should allow D-Pad movement - -### Lua Example -`local integerValue = camera_romhack_get_allow_dpad_usage()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u8 camera_romhack_get_allow_dpad_usage(void);` - -[:arrow_up_small:](#) - -
- -## [camera_romhack_get_collisions](#camera_romhack_get_collisions) - -### Description -Gets if the romhack camera has surface collisions - -### Lua Example -`local integerValue = camera_romhack_get_collisions()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u8 camera_romhack_get_collisions(void);` - -[:arrow_up_small:](#) - -
- -## [camera_romhack_get_zoomed_in_dist](#camera_romhack_get_zoomed_in_dist) - -### Description -Gets the romhack camera's zoomed in distance - -### Lua Example -`local integerValue = camera_romhack_get_zoomed_in_dist()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u32 camera_romhack_get_zoomed_in_dist(void);` - -[:arrow_up_small:](#) - -
- -## [camera_romhack_get_zoomed_in_height](#camera_romhack_get_zoomed_in_height) - -### Description -Gets the romhack camera's zoomed in height - -### Lua Example -`local integerValue = camera_romhack_get_zoomed_in_height()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u32 camera_romhack_get_zoomed_in_height(void);` - -[:arrow_up_small:](#) - -
- -## [camera_romhack_get_zoomed_out_dist](#camera_romhack_get_zoomed_out_dist) - -### Description -Gets the romhack camera's additional zoomed out distance - -### Lua Example -`local integerValue = camera_romhack_get_zoomed_out_dist()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u32 camera_romhack_get_zoomed_out_dist(void);` - -[:arrow_up_small:](#) - -
- -## [camera_romhack_get_zoomed_out_height](#camera_romhack_get_zoomed_out_height) - -### Description -Gets the romhack camera's additional zoomed out height - -### Lua Example -`local integerValue = camera_romhack_get_zoomed_out_height()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u32 camera_romhack_get_zoomed_out_height(void);` - -[:arrow_up_small:](#) - -
- -## [camera_romhack_set_zoomed_in_dist](#camera_romhack_set_zoomed_in_dist) - -### Description -Sets the romhack camera's zoomed in distance (Default: 900) - -### Lua Example -`camera_romhack_set_zoomed_in_dist(val)` - -### Parameters -| Field | Type | -| ----- | ---- | -| val | `integer` | - -### Returns -- None - -### C Prototype -`void camera_romhack_set_zoomed_in_dist(u32 val);` - -[:arrow_up_small:](#) - -
- -## [camera_romhack_set_zoomed_in_height](#camera_romhack_set_zoomed_in_height) - -### Description -Sets the romhack camera's zoomed in height (Default: 300) - -### Lua Example -`camera_romhack_set_zoomed_in_height(val)` - -### Parameters -| Field | Type | -| ----- | ---- | -| val | `integer` | - -### Returns -- None - -### C Prototype -`void camera_romhack_set_zoomed_in_height(u32 val);` - -[:arrow_up_small:](#) - -
- -## [camera_romhack_set_zoomed_out_dist](#camera_romhack_set_zoomed_out_dist) - -### Description -Sets the romhack camera's zoomed out additional distance (Default: 500) - -### Lua Example -`camera_romhack_set_zoomed_out_dist(val)` - -### Parameters -| Field | Type | -| ----- | ---- | -| val | `integer` | - -### Returns -- None - -### C Prototype -`void camera_romhack_set_zoomed_out_dist(u32 val);` - -[:arrow_up_small:](#) - -
- -## [camera_romhack_set_zoomed_out_height](#camera_romhack_set_zoomed_out_height) - -### Description -Sets the romhack camera's zoomed out additional height (Default: 150) - -### Lua Example -`camera_romhack_set_zoomed_out_height(val)` - -### Parameters -| Field | Type | -| ----- | ---- | -| val | `integer` | - -### Returns -- None - -### C Prototype -`void camera_romhack_set_zoomed_out_height(u32 val);` - -[:arrow_up_small:](#) - -
- ## [camera_set_checking_surfaces](#camera_set_checking_surfaces) ### Description @@ -7854,79 +7990,37 @@ Sets if the camera should account for surfaces
-## [camera_set_romhack_override](#camera_set_romhack_override) - -### Description -Sets the romhack camera override status - -### Lua Example -`camera_set_romhack_override(rco)` - -### Parameters -| Field | Type | -| ----- | ---- | -| rco | [enum RomhackCameraOverride](constants.md#enum-RomhackCameraOverride) | - -### Returns -- None - -### C Prototype -`void camera_set_romhack_override(enum RomhackCameraOverride rco);` - -[:arrow_up_small:](#) - -
- -## [camera_unfreeze](#camera_unfreeze) - -### Description -Unfreezes the camera - -### Lua Example -`camera_unfreeze()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void camera_unfreeze(void);` - -[:arrow_up_small:](#) - -
- -## [rom_hack_cam_set_collisions](#rom_hack_cam_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)` - -### Parameters -| Field | Type | -| ----- | ---- | -| enable | `integer` | - -### Returns -- None - -### C Prototype -`void rom_hack_cam_set_collisions(u8 enable);` - -[:arrow_up_small:](#) - -
- --- # functions from smlua_collision_utils.h
+## [collision_find_floor](#collision_find_floor) + +### Description +Finds a potential floor at the given `x`, `y`, and `z` values + +### Lua Example +`local SurfaceValue = collision_find_floor(x, y, z)` + +### Parameters +| Field | Type | +| ----- | ---- | +| x | `number` | +| y | `number` | +| z | `number` | + +### Returns +[Surface](structs.md#Surface) + +### C Prototype +`struct Surface* collision_find_floor(f32 x, f32 y, f32 z);` + +[:arrow_up_small:](#) + +
+ ## [collision_find_ceil](#collision_find_ceil) ### Description @@ -7952,26 +8046,42 @@ Finds a potential ceiling at the given `x`, `y`, and `z` values
-## [collision_find_floor](#collision_find_floor) - -### Description -Finds a potential floor at the given `x`, `y`, and `z` values +## [get_water_surface_pseudo_floor](#get_water_surface_pseudo_floor) ### Lua Example -`local SurfaceValue = collision_find_floor(x, y, z)` +`local SurfaceValue = get_water_surface_pseudo_floor()` ### Parameters -| Field | Type | -| ----- | ---- | -| x | `number` | -| y | `number` | -| z | `number` | +- None ### Returns [Surface](structs.md#Surface) ### C Prototype -`struct Surface* collision_find_floor(f32 x, f32 y, f32 z);` +`struct Surface* get_water_surface_pseudo_floor(void);` + +[:arrow_up_small:](#) + +
+ +## [smlua_collision_util_get](#smlua_collision_util_get) + +### Description +Gets the `Collision` with `name` + +### Lua Example +`local PointerValue = smlua_collision_util_get(name)` + +### Parameters +| Field | Type | +| ----- | ---- | +| name | `string` | + +### Returns +- `Pointer` <`Collision`> + +### C Prototype +`Collision* smlua_collision_util_get(const char* name);` [:arrow_up_small:](#) @@ -8022,70 +8132,6 @@ Gets the surface corresponding to `index` from `wcd`
-## [get_water_surface_pseudo_floor](#get_water_surface_pseudo_floor) - -### Lua Example -`local SurfaceValue = get_water_surface_pseudo_floor()` - -### Parameters -- None - -### Returns -[Surface](structs.md#Surface) - -### C Prototype -`struct Surface* get_water_surface_pseudo_floor(void);` - -[:arrow_up_small:](#) - -
- -## [smlua_collision_util_find_surface_types](#smlua_collision_util_find_surface_types) - -### Description -Gets a table of the surface types from `data` - -### Lua Example -`smlua_collision_util_find_surface_types(data)` - -### Parameters -| Field | Type | -| ----- | ---- | -| data | `Pointer` <`Collision`> | - -### Returns -- None - -### C Prototype -`void smlua_collision_util_find_surface_types(Collision* data);` - -[:arrow_up_small:](#) - -
- -## [smlua_collision_util_get](#smlua_collision_util_get) - -### Description -Gets the `Collision` with `name` - -### Lua Example -`local PointerValue = smlua_collision_util_get(name)` - -### Parameters -| Field | Type | -| ----- | ---- | -| name | `string` | - -### Returns -- `Pointer` <`Collision`> - -### C Prototype -`Collision* smlua_collision_util_get(const char* name);` - -[:arrow_up_small:](#) - -
- ## [smlua_collision_util_get_current_terrain_collision](#smlua_collision_util_get_current_terrain_collision) ### Description @@ -8131,6 +8177,29 @@ Gets the `level` terrain collision from `area`
+## [smlua_collision_util_find_surface_types](#smlua_collision_util_find_surface_types) + +### Description +Gets a table of the surface types from `data` + +### Lua Example +`smlua_collision_util_find_surface_types(data)` + +### Parameters +| Field | Type | +| ----- | ---- | +| data | `Pointer` <`Collision`> | + +### Returns +- None + +### C Prototype +`void smlua_collision_util_find_surface_types(Collision* data);` + +[:arrow_up_small:](#) + +
+ --- # functions from smlua_deprecated.h diff --git a/docs/lua/functions-6.md b/docs/lua/functions-6.md index 3fbfea7ea..7ca49e558 100644 --- a/docs/lua/functions-6.md +++ b/docs/lua/functions-6.md @@ -11,13 +11,82 @@
-## [get_fog_color](#get_fog_color) +## [set_override_fov](#set_override_fov) ### Description -Gets a value of the global fog color +Sets the override FOV ### Lua Example -`local integerValue = get_fog_color(index)` +`set_override_fov(fov)` + +### Parameters +| Field | Type | +| ----- | ---- | +| fov | `number` | + +### Returns +- None + +### C Prototype +`void set_override_fov(f32 fov);` + +[:arrow_up_small:](#) + +
+ +## [set_override_near](#set_override_near) + +### Description +Sets the override near plane + +### Lua Example +`set_override_near(near)` + +### Parameters +| Field | Type | +| ----- | ---- | +| near | `number` | + +### Returns +- None + +### C Prototype +`void set_override_near(f32 near);` + +[:arrow_up_small:](#) + +
+ +## [set_override_far](#set_override_far) + +### Description +Sets the override far plane + +### Lua Example +`set_override_far(far)` + +### Parameters +| Field | Type | +| ----- | ---- | +| far | `number` | + +### Returns +- None + +### C Prototype +`void set_override_far(f32 far);` + +[:arrow_up_small:](#) + +
+ +## [get_lighting_dir](#get_lighting_dir) + +### Description +Gets a value of the global lighting direction + +### Lua Example +`local numberValue = get_lighting_dir(index)` ### Parameters | Field | Type | @@ -25,31 +94,34 @@ Gets a value of the global fog color | index | `integer` | ### Returns -- `integer` +- `number` ### C Prototype -`u8 get_fog_color(u8 index);` +`f32 get_lighting_dir(u8 index);` [:arrow_up_small:](#)
-## [get_fog_intensity](#get_fog_intensity) +## [set_lighting_dir](#set_lighting_dir) ### Description -Gets the intensity of the fog +Sets a value of the global lighting direction ### Lua Example -`local numberValue = get_fog_intensity()` +`set_lighting_dir(index, value)` ### Parameters -- None +| Field | Type | +| ----- | ---- | +| index | `integer` | +| value | `number` | ### Returns -- `number` +- None ### C Prototype -`f32 get_fog_intensity(void);` +`void set_lighting_dir(u8 index, f32 value);` [:arrow_up_small:](#) @@ -101,24 +173,187 @@ Gets a value of the global ambient lighting color
-## [get_lighting_dir](#get_lighting_dir) +## [set_lighting_color](#set_lighting_color) ### Description -Gets a value of the global lighting direction +Sets a value of the global lighting color ### Lua Example -`local numberValue = get_lighting_dir(index)` +`set_lighting_color(index, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| index | `integer` | +| value | `integer` | + +### Returns +- None + +### C Prototype +`void set_lighting_color(u8 index, u8 value);` + +[:arrow_up_small:](#) + +
+ +## [set_lighting_color_ambient](#set_lighting_color_ambient) + +### Description +Sets a value of the global lighting color (run this after `set_lighting_color` for the ambient color to not be overriden) + +### Lua Example +`set_lighting_color_ambient(index, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| index | `integer` | +| value | `integer` | + +### Returns +- None + +### C Prototype +`void set_lighting_color_ambient(u8 index, u8 value);` + +[:arrow_up_small:](#) + +
+ +## [get_vertex_color](#get_vertex_color) + +### Description +Gets a value of the global vertex shading color + +### Lua Example +`local integerValue = get_vertex_color(index)` ### Parameters | Field | Type | | ----- | ---- | | index | `integer` | +### Returns +- `integer` + +### C Prototype +`u8 get_vertex_color(u8 index);` + +[:arrow_up_small:](#) + +
+ +## [set_vertex_color](#set_vertex_color) + +### Description +Sets a value of the global vertex shading color + +### Lua Example +`set_vertex_color(index, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| index | `integer` | +| value | `integer` | + +### Returns +- None + +### C Prototype +`void set_vertex_color(u8 index, u8 value);` + +[:arrow_up_small:](#) + +
+ +## [get_fog_color](#get_fog_color) + +### Description +Gets a value of the global fog color + +### Lua Example +`local integerValue = get_fog_color(index)` + +### Parameters +| Field | Type | +| ----- | ---- | +| index | `integer` | + +### Returns +- `integer` + +### C Prototype +`u8 get_fog_color(u8 index);` + +[:arrow_up_small:](#) + +
+ +## [set_fog_color](#set_fog_color) + +### Description +Sets a value of the global fog color + +### Lua Example +`set_fog_color(index, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| index | `integer` | +| value | `integer` | + +### Returns +- None + +### C Prototype +`void set_fog_color(u8 index, u8 value);` + +[:arrow_up_small:](#) + +
+ +## [get_fog_intensity](#get_fog_intensity) + +### Description +Gets the intensity of the fog + +### Lua Example +`local numberValue = get_fog_intensity()` + +### Parameters +- None + ### Returns - `number` ### C Prototype -`f32 get_lighting_dir(u8 index);` +`f32 get_fog_intensity(void);` + +[:arrow_up_small:](#) + +
+ +## [set_fog_intensity](#set_fog_intensity) + +### Description +Sets the intensity of the fog (this value scales very quickly, 1.0 to 1.1 is a desirable range) + +### Lua Example +`set_fog_intensity(intensity)` + +### Parameters +| Field | Type | +| ----- | ---- | +| intensity | `number` | + +### Returns +- None + +### C Prototype +`void set_fog_intensity(f32 intensity);` [:arrow_up_small:](#) @@ -145,6 +380,29 @@ Gets the current skybox
+## [set_override_skybox](#set_override_skybox) + +### Description +Sets the override skybox + +### Lua Example +`set_override_skybox(background)` + +### Parameters +| Field | Type | +| ----- | ---- | +| background | `integer` | + +### Returns +- None + +### C Prototype +`void set_override_skybox(s8 background);` + +[:arrow_up_small:](#) + +
+ ## [get_skybox_color](#get_skybox_color) ### Description @@ -168,24 +426,49 @@ Gets a value of the global skybox color
-## [get_vertex_color](#get_vertex_color) +## [set_skybox_color](#set_skybox_color) ### Description -Gets a value of the global vertex shading color +Sets a value of the global skybox color ### Lua Example -`local integerValue = get_vertex_color(index)` +`set_skybox_color(index, value)` ### Parameters | Field | Type | | ----- | ---- | | index | `integer` | +| value | `integer` | ### Returns -- `integer` +- None ### C Prototype -`u8 get_vertex_color(u8 index);` +`void set_skybox_color(u8 index, u8 value);` + +[:arrow_up_small:](#) + +
+ +## [gfx_parse](#gfx_parse) + +### Description +Traverses a display list. Takes a Lua function as a parameter, which is called back for each command in the display list with the parameters `cmd` (display list pointer), and `op` + +### Lua Example +`gfx_parse(cmd, func)` + +### Parameters +| Field | Type | +| ----- | ---- | +| cmd | `Pointer` <`Gfx`> | +| func | `Lua Function` () | + +### Returns +- None + +### C Prototype +`void gfx_parse(Gfx* cmd, LuaFunction func);` [:arrow_up_small:](#) @@ -238,30 +521,6 @@ Gets the number of vertices from a display list command if it has the correct op
-## [gfx_parse](#gfx_parse) - -### Description -Traverses a display list. Takes a Lua function as a parameter, which is called back for each command in the display list with the parameters `cmd` (display list pointer), and `op` - -### Lua Example -`gfx_parse(cmd, func)` - -### Parameters -| Field | Type | -| ----- | ---- | -| cmd | `Pointer` <`Gfx`> | -| func | `Lua Function` () | - -### Returns -- None - -### C Prototype -`void gfx_parse(Gfx* cmd, LuaFunction func);` - -[:arrow_up_small:](#) - -
- ## [gfx_set_combine_lerp](#gfx_set_combine_lerp) ### Description @@ -328,324 +587,12 @@ Sets the display list texture image. Pass in textureInfo.texture as `texture`
-## [set_fog_color](#set_fog_color) - -### Description -Sets a value of the global fog color - -### Lua Example -`set_fog_color(index, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| index | `integer` | -| value | `integer` | - -### Returns -- None - -### C Prototype -`void set_fog_color(u8 index, u8 value);` - -[:arrow_up_small:](#) - -
- -## [set_fog_intensity](#set_fog_intensity) - -### Description -Sets the intensity of the fog (this value scales very quickly, 1.0 to 1.1 is a desirable range) - -### Lua Example -`set_fog_intensity(intensity)` - -### Parameters -| Field | Type | -| ----- | ---- | -| intensity | `number` | - -### Returns -- None - -### C Prototype -`void set_fog_intensity(f32 intensity);` - -[:arrow_up_small:](#) - -
- -## [set_lighting_color](#set_lighting_color) - -### Description -Sets a value of the global lighting color - -### Lua Example -`set_lighting_color(index, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| index | `integer` | -| value | `integer` | - -### Returns -- None - -### C Prototype -`void set_lighting_color(u8 index, u8 value);` - -[:arrow_up_small:](#) - -
- -## [set_lighting_color_ambient](#set_lighting_color_ambient) - -### Description -Sets a value of the global lighting color (run this after `set_lighting_color` for the ambient color to not be overriden) - -### Lua Example -`set_lighting_color_ambient(index, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| index | `integer` | -| value | `integer` | - -### Returns -- None - -### C Prototype -`void set_lighting_color_ambient(u8 index, u8 value);` - -[:arrow_up_small:](#) - -
- -## [set_lighting_dir](#set_lighting_dir) - -### Description -Sets a value of the global lighting direction - -### Lua Example -`set_lighting_dir(index, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| index | `integer` | -| value | `number` | - -### Returns -- None - -### C Prototype -`void set_lighting_dir(u8 index, f32 value);` - -[:arrow_up_small:](#) - -
- -## [set_override_far](#set_override_far) - -### Description -Sets the override far plane - -### Lua Example -`set_override_far(far)` - -### Parameters -| Field | Type | -| ----- | ---- | -| far | `number` | - -### Returns -- None - -### C Prototype -`void set_override_far(f32 far);` - -[:arrow_up_small:](#) - -
- -## [set_override_fov](#set_override_fov) - -### Description -Sets the override FOV - -### Lua Example -`set_override_fov(fov)` - -### Parameters -| Field | Type | -| ----- | ---- | -| fov | `number` | - -### Returns -- None - -### C Prototype -`void set_override_fov(f32 fov);` - -[:arrow_up_small:](#) - -
- -## [set_override_near](#set_override_near) - -### Description -Sets the override near plane - -### Lua Example -`set_override_near(near)` - -### Parameters -| Field | Type | -| ----- | ---- | -| near | `number` | - -### Returns -- None - -### C Prototype -`void set_override_near(f32 near);` - -[:arrow_up_small:](#) - -
- -## [set_override_skybox](#set_override_skybox) - -### Description -Sets the override skybox - -### Lua Example -`set_override_skybox(background)` - -### Parameters -| Field | Type | -| ----- | ---- | -| background | `integer` | - -### Returns -- None - -### C Prototype -`void set_override_skybox(s8 background);` - -[:arrow_up_small:](#) - -
- -## [set_skybox_color](#set_skybox_color) - -### Description -Sets a value of the global skybox color - -### Lua Example -`set_skybox_color(index, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| index | `integer` | -| value | `integer` | - -### Returns -- None - -### C Prototype -`void set_skybox_color(u8 index, u8 value);` - -[:arrow_up_small:](#) - -
- -## [set_vertex_color](#set_vertex_color) - -### Description -Sets a value of the global vertex shading color - -### Lua Example -`set_vertex_color(index, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| index | `integer` | -| value | `integer` | - -### Returns -- None - -### C Prototype -`void set_vertex_color(u8 index, u8 value);` - -[:arrow_up_small:](#) - -
- --- # functions from smlua_level_utils.h
-## [level_is_vanilla_level](#level_is_vanilla_level) - -### Description -Checks if `levelNum` is a vanilla level - -### Lua Example -`local booleanValue = level_is_vanilla_level(levelNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| levelNum | `integer` | - -### Returns -- `boolean` - -### C Prototype -`bool level_is_vanilla_level(s16 levelNum);` - -[:arrow_up_small:](#) - -
- -## [level_register](#level_register) - -### Description -Registers a fully custom level. Level ID begins at 50 - -### Lua Example -`local integerValue = level_register(scriptEntryName, courseNum, fullName, shortName, acousticReach, echoLevel1, echoLevel2, echoLevel3)` - -### Parameters -| Field | Type | -| ----- | ---- | -| scriptEntryName | `string` | -| courseNum | `integer` | -| fullName | `string` | -| shortName | `string` | -| acousticReach | `integer` | -| echoLevel1 | `integer` | -| echoLevel2 | `integer` | -| echoLevel3 | `integer` | - -### Returns -- `integer` - -### C Prototype -`s16 level_register(const char* scriptEntryName, s16 courseNum, const char* fullName, const char* shortName, u32 acousticReach, u32 echoLevel1, u32 echoLevel2, u32 echoLevel3);` - -[:arrow_up_small:](#) - -
- ## [smlua_level_util_change_area](#smlua_level_util_change_area) ### Description @@ -692,29 +639,6 @@ Gets information on a custom level from `levelNum`
-## [smlua_level_util_get_info_from_course_num](#smlua_level_util_get_info_from_course_num) - -### Description -Gets information on a custom level from `courseNum` - -### Lua Example -`local CustomLevelInfoValue = smlua_level_util_get_info_from_course_num(courseNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | - -### Returns -[CustomLevelInfo](structs.md#CustomLevelInfo) - -### C Prototype -`struct CustomLevelInfo* smlua_level_util_get_info_from_course_num(u8 courseNum);` - -[:arrow_up_small:](#) - -
- ## [smlua_level_util_get_info_from_short_name](#smlua_level_util_get_info_from_short_name) ### Description @@ -738,114 +662,77 @@ Gets information on a custom level from `shortName`
-## [warp_exit_level](#warp_exit_level) +## [smlua_level_util_get_info_from_course_num](#smlua_level_util_get_info_from_course_num) ### Description -Exits the current level after `aDelay` +Gets information on a custom level from `courseNum` ### Lua Example -`local booleanValue = warp_exit_level(aDelay)` +`local CustomLevelInfoValue = smlua_level_util_get_info_from_course_num(courseNum)` ### Parameters | Field | Type | | ----- | ---- | -| aDelay | `integer` | +| courseNum | `integer` | ### Returns -- `boolean` +[CustomLevelInfo](structs.md#CustomLevelInfo) ### C Prototype -`bool warp_exit_level(s32 aDelay);` +`struct CustomLevelInfo* smlua_level_util_get_info_from_course_num(u8 courseNum);` [:arrow_up_small:](#)
-## [warp_restart_level](#warp_restart_level) +## [level_register](#level_register) ### Description -Restarts the current level +Registers a fully custom level. Level ID begins at 50 ### Lua Example -`local booleanValue = warp_restart_level()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool warp_restart_level(void);` - -[:arrow_up_small:](#) - -
- -## [warp_to_castle](#warp_to_castle) - -### Description -Warps back to the castle from `aLevel` - -### Lua Example -`local booleanValue = warp_to_castle(aLevel)` +`local integerValue = level_register(scriptEntryName, courseNum, fullName, shortName, acousticReach, echoLevel1, echoLevel2, echoLevel3)` ### Parameters | Field | Type | | ----- | ---- | -| aLevel | `integer` | +| scriptEntryName | `string` | +| courseNum | `integer` | +| fullName | `string` | +| shortName | `string` | +| acousticReach | `integer` | +| echoLevel1 | `integer` | +| echoLevel2 | `integer` | +| echoLevel3 | `integer` | ### Returns -- `boolean` +- `integer` ### C Prototype -`bool warp_to_castle(s32 aLevel);` +`s16 level_register(const char* scriptEntryName, s16 courseNum, const char* fullName, const char* shortName, u32 acousticReach, u32 echoLevel1, u32 echoLevel2, u32 echoLevel3);` [:arrow_up_small:](#)
-## [warp_to_level](#warp_to_level) +## [level_is_vanilla_level](#level_is_vanilla_level) ### Description -Warps to `aArea` of `aLevel` in `aAct` +Checks if `levelNum` is a vanilla level ### Lua Example -`local booleanValue = warp_to_level(aLevel, aArea, aAct)` +`local booleanValue = level_is_vanilla_level(levelNum)` ### Parameters | Field | Type | | ----- | ---- | -| aLevel | `integer` | -| aArea | `integer` | -| aAct | `integer` | +| levelNum | `integer` | ### Returns - `boolean` ### C Prototype -`bool warp_to_level(s32 aLevel, s32 aArea, s32 aAct);` - -[:arrow_up_small:](#) - -
- -## [warp_to_start_level](#warp_to_start_level) - -### Description -Warps to the start level (Castle Grounds by default) - -### Lua Example -`local booleanValue = warp_to_start_level()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool warp_to_start_level(void);` +`bool level_is_vanilla_level(s16 levelNum);` [:arrow_up_small:](#) @@ -877,57 +764,331 @@ Warps to `aWarpId` of `aArea` in `aLevel` during `aAct`
+## [warp_to_level](#warp_to_level) + +### Description +Warps to `aArea` of `aLevel` in `aAct` + +### Lua Example +`local booleanValue = warp_to_level(aLevel, aArea, aAct)` + +### Parameters +| Field | Type | +| ----- | ---- | +| aLevel | `integer` | +| aArea | `integer` | +| aAct | `integer` | + +### Returns +- `boolean` + +### C Prototype +`bool warp_to_level(s32 aLevel, s32 aArea, s32 aAct);` + +[:arrow_up_small:](#) + +
+ +## [warp_restart_level](#warp_restart_level) + +### Description +Restarts the current level + +### Lua Example +`local booleanValue = warp_restart_level()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool warp_restart_level(void);` + +[:arrow_up_small:](#) + +
+ +## [warp_to_start_level](#warp_to_start_level) + +### Description +Warps to the start level (Castle Grounds by default) + +### Lua Example +`local booleanValue = warp_to_start_level()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool warp_to_start_level(void);` + +[:arrow_up_small:](#) + +
+ +## [warp_exit_level](#warp_exit_level) + +### Description +Exits the current level after `aDelay` + +### Lua Example +`local booleanValue = warp_exit_level(aDelay)` + +### Parameters +| Field | Type | +| ----- | ---- | +| aDelay | `integer` | + +### Returns +- `boolean` + +### C Prototype +`bool warp_exit_level(s32 aDelay);` + +[:arrow_up_small:](#) + +
+ +## [warp_to_castle](#warp_to_castle) + +### Description +Warps back to the castle from `aLevel` + +### Lua Example +`local booleanValue = warp_to_castle(aLevel)` + +### Parameters +| Field | Type | +| ----- | ---- | +| aLevel | `integer` | + +### Returns +- `boolean` + +### C Prototype +`bool warp_to_castle(s32 aLevel);` + +[:arrow_up_small:](#) + +
+ --- # functions from smlua_math_utils.h
-## [clamp](#clamp) +## [min](#min) ### Description -Clamps a signed 32-bit integer `a` between bounds `b` (minimum) and `c` (maximum) +Finds the minimum of two signed 32-bit integers ### Lua Example -`local integerValue = clamp(a, b, c)` +`local integerValue = min(a, b)` ### Parameters | Field | Type | | ----- | ---- | | a | `integer` | | b | `integer` | -| c | `integer` | ### Returns - `integer` ### C Prototype -`s32 clamp(s32 a, s32 b, s32 c);` +`s32 min(s32 a, s32 b);` [:arrow_up_small:](#)
-## [clampf](#clampf) +## [max](#max) ### Description -Clamps a floating-point number `a` between bounds `b` (minimum) and `c` (maximum) +Finds the maximum of two signed 32-bit integers ### Lua Example -`local numberValue = clampf(a, b, c)` +`local integerValue = max(a, b)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a | `integer` | +| b | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 max(s32 a, s32 b);` + +[:arrow_up_small:](#) + +
+ +## [sqr](#sqr) + +### Description +Computes the square of a signed 32-bit integer + +### Lua Example +`local integerValue = sqr(x)` + +### Parameters +| Field | Type | +| ----- | ---- | +| x | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 sqr(s32 x);` + +[:arrow_up_small:](#) + +
+ +## [minf](#minf) + +### Description +Finds the minimum of two floating-point numbers + +### Lua Example +`local numberValue = minf(a, b)` ### Parameters | Field | Type | | ----- | ---- | | a | `number` | | b | `number` | -| c | `number` | ### Returns - `number` ### C Prototype -`f32 clampf(f32 a, f32 b, f32 c);` +`f32 minf(f32 a, f32 b);` + +[:arrow_up_small:](#) + +
+ +## [maxf](#maxf) + +### Description +Finds the maximum of two floating-point numbers + +### Lua Example +`local numberValue = maxf(a, b)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a | `number` | +| b | `number` | + +### Returns +- `number` + +### C Prototype +`f32 maxf(f32 a, f32 b);` + +[:arrow_up_small:](#) + +
+ +## [sqrf](#sqrf) + +### Description +Computes the square of a floating-point number + +### Lua Example +`local numberValue = sqrf(x)` + +### Parameters +| Field | Type | +| ----- | ---- | +| x | `number` | + +### Returns +- `number` + +### C Prototype +`f32 sqrf(f32 x);` + +[:arrow_up_small:](#) + +
+ +## [sm64_to_radians](#sm64_to_radians) + +### Description +Converts an angle from SM64 format to radians + +### Lua Example +`local numberValue = sm64_to_radians(sm64Angle)` + +### Parameters +| Field | Type | +| ----- | ---- | +| sm64Angle | `integer` | + +### Returns +- `number` + +### C Prototype +`f32 sm64_to_radians(s16 sm64Angle);` + +[:arrow_up_small:](#) + +
+ +## [radians_to_sm64](#radians_to_sm64) + +### Description +Converts an angle from radians to SM64 format + +### Lua Example +`local integerValue = radians_to_sm64(radiansAngle)` + +### Parameters +| Field | Type | +| ----- | ---- | +| radiansAngle | `number` | + +### Returns +- `integer` + +### C Prototype +`s16 radians_to_sm64(f32 radiansAngle);` + +[:arrow_up_small:](#) + +
+ +## [sm64_to_degrees](#sm64_to_degrees) + +### Description +Converts an angle from SM64 format to degrees + +### Lua Example +`local numberValue = sm64_to_degrees(sm64Angle)` + +### Parameters +| Field | Type | +| ----- | ---- | +| sm64Angle | `integer` | + +### Returns +- `number` + +### C Prototype +`f32 sm64_to_degrees(s16 sm64Angle);` [:arrow_up_small:](#) @@ -980,212 +1141,51 @@ Computes the hypotenuse of a right triangle given sides `a` and `b` using the Py
-## [max](#max) +## [clamp](#clamp) ### Description -Finds the maximum of two signed 32-bit integers +Clamps a signed 32-bit integer `a` between bounds `b` (minimum) and `c` (maximum) ### Lua Example -`local integerValue = max(a, b)` +`local integerValue = clamp(a, b, c)` ### Parameters | Field | Type | | ----- | ---- | | a | `integer` | | b | `integer` | +| c | `integer` | ### Returns - `integer` ### C Prototype -`s32 max(s32 a, s32 b);` +`s32 clamp(s32 a, s32 b, s32 c);` [:arrow_up_small:](#)
-## [maxf](#maxf) +## [clampf](#clampf) ### Description -Finds the maximum of two floating-point numbers +Clamps a floating-point number `a` between bounds `b` (minimum) and `c` (maximum) ### Lua Example -`local numberValue = maxf(a, b)` +`local numberValue = clampf(a, b, c)` ### Parameters | Field | Type | | ----- | ---- | | a | `number` | | b | `number` | +| c | `number` | ### Returns - `number` ### C Prototype -`f32 maxf(f32 a, f32 b);` - -[:arrow_up_small:](#) - -
- -## [min](#min) - -### Description -Finds the minimum of two signed 32-bit integers - -### Lua Example -`local integerValue = min(a, b)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a | `integer` | -| b | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 min(s32 a, s32 b);` - -[:arrow_up_small:](#) - -
- -## [minf](#minf) - -### Description -Finds the minimum of two floating-point numbers - -### Lua Example -`local numberValue = minf(a, b)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a | `number` | -| b | `number` | - -### Returns -- `number` - -### C Prototype -`f32 minf(f32 a, f32 b);` - -[:arrow_up_small:](#) - -
- -## [radians_to_sm64](#radians_to_sm64) - -### Description -Converts an angle from radians to SM64 format - -### Lua Example -`local integerValue = radians_to_sm64(radiansAngle)` - -### Parameters -| Field | Type | -| ----- | ---- | -| radiansAngle | `number` | - -### Returns -- `integer` - -### C Prototype -`s16 radians_to_sm64(f32 radiansAngle);` - -[:arrow_up_small:](#) - -
- -## [sm64_to_degrees](#sm64_to_degrees) - -### Description -Converts an angle from SM64 format to degrees - -### Lua Example -`local numberValue = sm64_to_degrees(sm64Angle)` - -### Parameters -| Field | Type | -| ----- | ---- | -| sm64Angle | `integer` | - -### Returns -- `number` - -### C Prototype -`f32 sm64_to_degrees(s16 sm64Angle);` - -[:arrow_up_small:](#) - -
- -## [sm64_to_radians](#sm64_to_radians) - -### Description -Converts an angle from SM64 format to radians - -### Lua Example -`local numberValue = sm64_to_radians(sm64Angle)` - -### Parameters -| Field | Type | -| ----- | ---- | -| sm64Angle | `integer` | - -### Returns -- `number` - -### C Prototype -`f32 sm64_to_radians(s16 sm64Angle);` - -[:arrow_up_small:](#) - -
- -## [sqr](#sqr) - -### Description -Computes the square of a signed 32-bit integer - -### Lua Example -`local integerValue = sqr(x)` - -### Parameters -| Field | Type | -| ----- | ---- | -| x | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 sqr(s32 x);` - -[:arrow_up_small:](#) - -
- -## [sqrf](#sqrf) - -### Description -Computes the square of a floating-point number - -### Lua Example -`local numberValue = sqrf(x)` - -### Parameters -| Field | Type | -| ----- | ---- | -| x | `number` | - -### Returns -- `number` - -### C Prototype -`f32 sqrf(f32 x);` +`f32 clampf(f32 a, f32 b, f32 c);` [:arrow_up_small:](#) @@ -1197,59 +1197,79 @@ Computes the square of a floating-point number
-## [allocate_mario_action](#allocate_mario_action) +## [get_network_area_timer](#get_network_area_timer) ### Description -Allocates an action ID with bitwise flags +Gets the current area's networked timer ### Lua Example -`local integerValue = allocate_mario_action(actFlags)` +`local integerValue = get_network_area_timer()` ### Parameters -| Field | Type | -| ----- | ---- | -| actFlags | `integer` | +- None ### Returns - `integer` ### C Prototype -`u32 allocate_mario_action(u32 actFlags);` +`u32 get_network_area_timer(void);` [:arrow_up_small:](#)
-## [course_is_main_course](#course_is_main_course) +## [get_area_update_counter](#get_area_update_counter) ### Description -Checks if a course is a main course and not the castle or secret levels +Gets the area update counter incremented when objects are updated ### Lua Example -`local booleanValue = course_is_main_course(courseNum)` +`local integerValue = get_area_update_counter()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u16 get_area_update_counter(void);` + +[:arrow_up_small:](#) + +
+ +## [djui_popup_create_global](#djui_popup_create_global) + +### Description +Creates a DJUI popup that is broadcasted to every client + +### Lua Example +`djui_popup_create_global(message, lines)` ### Parameters | Field | Type | | ----- | ---- | -| courseNum | `integer` | +| message | `string` | +| lines | `integer` | ### Returns -- `boolean` +- None ### C Prototype -`bool course_is_main_course(u16 courseNum);` +`void djui_popup_create_global(const char* message, int lines);` [:arrow_up_small:](#)
-## [djui_attempting_to_open_playerlist](#djui_attempting_to_open_playerlist) +## [djui_is_popup_disabled](#djui_is_popup_disabled) ### Description -Checks if the DJUI playerlist is attempting to be opened +Returns if popups are disabled ### Lua Example -`local booleanValue = djui_attempting_to_open_playerlist()` +`local booleanValue = djui_is_popup_disabled()` ### Parameters - None @@ -1258,7 +1278,51 @@ Checks if the DJUI playerlist is attempting to be opened - `boolean` ### C Prototype -`bool djui_attempting_to_open_playerlist(void);` +`bool djui_is_popup_disabled(void);` + +[:arrow_up_small:](#) + +
+ +## [djui_set_popup_disabled_override](#djui_set_popup_disabled_override) + +### Description +Sets if popups are disabled + +### Lua Example +`djui_set_popup_disabled_override(value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `boolean` | + +### Returns +- None + +### C Prototype +`void djui_set_popup_disabled_override(bool value);` + +[:arrow_up_small:](#) + +
+ +## [djui_reset_popup_disabled_override](#djui_reset_popup_disabled_override) + +### Description +Resets if popups are disabled + +### Lua Example +`djui_reset_popup_disabled_override()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void djui_reset_popup_disabled_override(void);` [:arrow_up_small:](#) @@ -1285,13 +1349,13 @@ Checks if the DJUI playerlist is open
-## [djui_is_popup_disabled](#djui_is_popup_disabled) +## [djui_attempting_to_open_playerlist](#djui_attempting_to_open_playerlist) ### Description -Returns if popups are disabled +Checks if the DJUI playerlist is attempting to be opened ### Lua Example -`local booleanValue = djui_is_popup_disabled()` +`local booleanValue = djui_attempting_to_open_playerlist()` ### Parameters - None @@ -1300,7 +1364,28 @@ Returns if popups are disabled - `boolean` ### C Prototype -`bool djui_is_popup_disabled(void);` +`bool djui_attempting_to_open_playerlist(void);` + +[:arrow_up_small:](#) + +
+ +## [djui_get_playerlist_page_index](#djui_get_playerlist_page_index) + +### Description +Gets the DJUI playerlist's page index + +### Lua Example +`local integerValue = djui_get_playerlist_page_index()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u8 djui_get_playerlist_page_index(void);` [:arrow_up_small:](#) @@ -1348,181 +1433,6 @@ Gets the DJUI menu theme
-## [djui_popup_create_global](#djui_popup_create_global) - -### Description -Creates a DJUI popup that is broadcasted to every client - -### Lua Example -`djui_popup_create_global(message, lines)` - -### Parameters -| Field | Type | -| ----- | ---- | -| message | `string` | -| lines | `integer` | - -### Returns -- None - -### C Prototype -`void djui_popup_create_global(const char* message, int lines);` - -[:arrow_up_small:](#) - -
- -## [djui_reset_popup_disabled_override](#djui_reset_popup_disabled_override) - -### Description -Resets if popups are disabled - -### Lua Example -`djui_reset_popup_disabled_override()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void djui_reset_popup_disabled_override(void);` - -[:arrow_up_small:](#) - -
- -## [djui_set_popup_disabled_override](#djui_set_popup_disabled_override) - -### Description -Sets if popups are disabled - -### Lua Example -`djui_set_popup_disabled_override(value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| value | `boolean` | - -### Returns -- None - -### C Prototype -`void djui_set_popup_disabled_override(bool value);` - -[:arrow_up_small:](#) - -
- -## [get_active_mod](#get_active_mod) - -### Description -Gets the mod currently being processed - -### Lua Example -`local ModValue = get_active_mod()` - -### Parameters -- None - -### Returns -[Mod](structs.md#Mod) - -### C Prototype -`struct Mod* get_active_mod(void);` - -[:arrow_up_small:](#) - -
- -## [get_area_update_counter](#get_area_update_counter) - -### Description -Gets the area update counter incremented when objects are updated - -### Lua Example -`local integerValue = get_area_update_counter()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u16 get_area_update_counter(void);` - -[:arrow_up_small:](#) - -
- -## [get_coopnet_id](#get_coopnet_id) - -### Description -Gets the CoopNet ID of a player with `localIndex` if CoopNet is being used and the player is connected, otherwise "-1" is returned - -### Lua Example -`local stringValue = get_coopnet_id(localIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| localIndex | `integer` | - -### Returns -- `string` - -### C Prototype -`const char* get_coopnet_id(s8 localIndex);` - -[:arrow_up_small:](#) - -
- -## [get_current_save_file_num](#get_current_save_file_num) - -### Description -Gets the current save file number (1-indexed) - -### Lua Example -`local integerValue = get_current_save_file_num()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s16 get_current_save_file_num(void);` - -[:arrow_up_small:](#) - -
- -## [get_date_and_time](#get_date_and_time) - -### Description -Gets the system clock's date and time - -### Lua Example -`local DateTimeValue = get_date_and_time()` - -### Parameters -- None - -### Returns -[DateTime](structs.md#DateTime) - -### C Prototype -`struct DateTime* get_date_and_time(void);` - -[:arrow_up_small:](#) - -
- ## [get_dialog_box_state](#get_dialog_box_state) ### Description @@ -1565,13 +1475,13 @@ Gets the current dialog box ID
-## [get_dialog_response](#get_dialog_response) +## [get_last_star_or_key](#get_last_star_or_key) ### Description -Gets the choice selected inside of a dialog box (0-1) +Gets if the last objective collected was a star (0) or a key (1) ### Lua Example -`local integerValue = get_dialog_response()` +`local integerValue = get_last_star_or_key()` ### Parameters - None @@ -1580,63 +1490,42 @@ Gets the choice selected inside of a dialog box (0-1) - `integer` ### C Prototype -`s32 get_dialog_response(void);` +`u8 get_last_star_or_key(void);` [:arrow_up_small:](#)
-## [get_envfx](#get_envfx) +## [set_last_star_or_key](#set_last_star_or_key) ### Description -Gets the non overridden environment effect (e.g. snow) +Sets if the last objective collected was a star (0) or a key (1) ### Lua Example -`local integerValue = get_envfx()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u16 get_envfx(void);` - -[:arrow_up_small:](#) - -
- -## [get_environment_region](#get_environment_region) - -### Description -Gets an environment region (gas/water boxes) height value - -### Lua Example -`local numberValue = get_environment_region(index)` +`set_last_star_or_key(value)` ### Parameters | Field | Type | | ----- | ---- | -| index | `integer` | +| value | `integer` | ### Returns -- `number` +- None ### C Prototype -`f32 get_environment_region(u8 index);` +`void set_last_star_or_key(u8 value);` [:arrow_up_small:](#)
-## [get_global_timer](#get_global_timer) +## [get_last_completed_course_num](#get_last_completed_course_num) ### Description -Gets the global timer that has been ticking at 30 frames per second since game boot +Gets the last course a star or key was collected in ### Lua Example -`local integerValue = get_global_timer()` +`local integerValue = get_last_completed_course_num()` ### Parameters - None @@ -1645,7 +1534,74 @@ Gets the global timer that has been ticking at 30 frames per second since game b - `integer` ### C Prototype -`u32 get_global_timer(void);` +`u8 get_last_completed_course_num(void);` + +[:arrow_up_small:](#) + +
+ +## [set_last_completed_course_num](#set_last_completed_course_num) + +### Description +Sets the last course a star or key was collected in + +### Lua Example +`set_last_completed_course_num(courseNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | + +### Returns +- None + +### C Prototype +`void set_last_completed_course_num(u8 courseNum);` + +[:arrow_up_small:](#) + +
+ +## [get_last_completed_star_num](#get_last_completed_star_num) + +### Description +Gets the last collected star's number (1-7) + +### Lua Example +`local integerValue = get_last_completed_star_num()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u8 get_last_completed_star_num(void);` + +[:arrow_up_small:](#) + +
+ +## [set_last_completed_star_num](#set_last_completed_star_num) + +### Description +Sets the last collected star's number (1-7) + +### Lua Example +`set_last_completed_star_num(starNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| starNum | `integer` | + +### Returns +- None + +### C Prototype +`void set_last_completed_star_num(u8 starNum);` [:arrow_up_small:](#) @@ -1672,6 +1628,347 @@ Checks if the save file's coin "HI SCORE" was obtained with the last star or key
+## [set_got_file_coin_hi_score](#set_got_file_coin_hi_score) + +### Description +Sets if the save file's coin "HI SCORE" was obtained with the last star or key collection + +### Lua Example +`set_got_file_coin_hi_score(value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `boolean` | + +### Returns +- None + +### C Prototype +`void set_got_file_coin_hi_score(bool value);` + +[:arrow_up_small:](#) + +
+ +## [get_save_file_modified](#get_save_file_modified) + +### Description +Checks if the save file has been modified without saving + +### Lua Example +`local booleanValue = get_save_file_modified()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool get_save_file_modified(void);` + +[:arrow_up_small:](#) + +
+ +## [set_save_file_modified](#set_save_file_modified) + +### Description +Sets if the save file has been modified without saving + +### Lua Example +`set_save_file_modified(value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `boolean` | + +### Returns +- None + +### C Prototype +`void set_save_file_modified(bool value);` + +[:arrow_up_small:](#) + +
+ +## [hud_hide](#hud_hide) + +### Description +Hides the HUD + +### Lua Example +`hud_hide()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void hud_hide(void);` + +[:arrow_up_small:](#) + +
+ +## [hud_show](#hud_show) + +### Description +Shows the HUD + +### Lua Example +`hud_show()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void hud_show(void);` + +[:arrow_up_small:](#) + +
+ +## [hud_is_hidden](#hud_is_hidden) + +### Description +Checks if the HUD is hidden + +### Lua Example +`local booleanValue = hud_is_hidden()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool hud_is_hidden(void);` + +[:arrow_up_small:](#) + +
+ +## [hud_get_value](#hud_get_value) + +### Lua Example +`local integerValue = hud_get_value(type)` + +### Parameters +| Field | Type | +| ----- | ---- | +| type | [enum HudDisplayValue](constants.md#enum-HudDisplayValue) | + +### Returns +- `integer` + +### C Prototype +`s32 hud_get_value(enum HudDisplayValue type);` + +[:arrow_up_small:](#) + +
+ +## [hud_set_value](#hud_set_value) + +### Description +Sets a HUD display value + +### Lua Example +`hud_set_value(type, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| type | [enum HudDisplayValue](constants.md#enum-HudDisplayValue) | +| value | `integer` | + +### Returns +- None + +### C Prototype +`void hud_set_value(enum HudDisplayValue type, s32 value);` + +[:arrow_up_small:](#) + +
+ +## [hud_render_power_meter](#hud_render_power_meter) + +### Description +Renders a power meter on the HUD + +### Lua Example +`hud_render_power_meter(health, x, y, width, height)` + +### Parameters +| Field | Type | +| ----- | ---- | +| health | `integer` | +| x | `number` | +| y | `number` | +| width | `number` | +| height | `number` | + +### Returns +- None + +### C Prototype +`void hud_render_power_meter(s32 health, f32 x, f32 y, f32 width, f32 height);` + +[:arrow_up_small:](#) + +
+ +## [hud_render_power_meter_interpolated](#hud_render_power_meter_interpolated) + +### Description +Renders an interpolated power meter on the HUD + +### Lua Example +`hud_render_power_meter_interpolated(health, prevX, prevY, prevWidth, prevHeight, x, y, width, height)` + +### Parameters +| Field | Type | +| ----- | ---- | +| health | `integer` | +| prevX | `number` | +| prevY | `number` | +| prevWidth | `number` | +| prevHeight | `number` | +| x | `number` | +| y | `number` | +| width | `number` | +| height | `number` | + +### Returns +- None + +### C Prototype +`void hud_render_power_meter_interpolated(s32 health, f32 prevX, f32 prevY, f32 prevWidth, f32 prevHeight, f32 x, f32 y, f32 width, f32 height);` + +[:arrow_up_small:](#) + +
+ +## [hud_get_flash](#hud_get_flash) + +### Description +Gets if the star counter on the HUD should flash + +### Lua Example +`local integerValue = hud_get_flash()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s8 hud_get_flash(void);` + +[:arrow_up_small:](#) + +
+ +## [hud_set_flash](#hud_set_flash) + +### Description +Sets if the star counter on the HUD should flash + +### Lua Example +`hud_set_flash(value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| value | `integer` | + +### Returns +- None + +### C Prototype +`void hud_set_flash(s8 value);` + +[:arrow_up_small:](#) + +
+ +## [is_game_paused](#is_game_paused) + +### Description +Checks if the game is paused + +### Lua Example +`local booleanValue = is_game_paused()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool is_game_paused(void);` + +[:arrow_up_small:](#) + +
+ +## [is_transition_playing](#is_transition_playing) + +### Description +Checks if a screen transition is playing + +### Lua Example +`local booleanValue = is_transition_playing()` + +### Parameters +- None + +### Returns +- `boolean` + +### C Prototype +`bool is_transition_playing(void);` + +[:arrow_up_small:](#) + +
+ +## [allocate_mario_action](#allocate_mario_action) + +### Description +Allocates an action ID with bitwise flags + +### Lua Example +`local integerValue = allocate_mario_action(actFlags)` + +### Parameters +| Field | Type | +| ----- | ---- | +| actFlags | `integer` | + +### Returns +- `integer` + +### C Prototype +`u32 allocate_mario_action(u32 actFlags);` + +[:arrow_up_small:](#) + +
+ ## [get_hand_foot_pos_x](#get_hand_foot_pos_x) ### Description @@ -1744,13 +2041,13 @@ Gets the Z coordinate of Mario's hand (0-1) or foot (2-3) but it is important to
-## [get_last_completed_course_num](#get_last_completed_course_num) +## [get_current_save_file_num](#get_current_save_file_num) ### Description -Gets the last course a star or key was collected in +Gets the current save file number (1-indexed) ### Lua Example -`local integerValue = get_last_completed_course_num()` +`local integerValue = get_current_save_file_num()` ### Parameters - None @@ -1759,630 +2056,7 @@ Gets the last course a star or key was collected in - `integer` ### C Prototype -`u8 get_last_completed_course_num(void);` - -[:arrow_up_small:](#) - -
- -## [get_last_completed_star_num](#get_last_completed_star_num) - -### Description -Gets the last collected star's number (1-7) - -### Lua Example -`local integerValue = get_last_completed_star_num()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u8 get_last_completed_star_num(void);` - -[:arrow_up_small:](#) - -
- -## [get_last_star_or_key](#get_last_star_or_key) - -### Description -Gets if the last objective collected was a star (0) or a key (1) - -### Lua Example -`local integerValue = get_last_star_or_key()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u8 get_last_star_or_key(void);` - -[:arrow_up_small:](#) - -
- -## [get_local_discord_id](#get_local_discord_id) - -### Description -Gets the local discord ID if it isn't disabled, otherwise "0" is returned - -### Lua Example -`local stringValue = get_local_discord_id()` - -### Parameters -- None - -### Returns -- `string` - -### C Prototype -`const char* get_local_discord_id(void);` - -[:arrow_up_small:](#) - -
- -## [get_network_area_timer](#get_network_area_timer) - -### Description -Gets the current area's networked timer - -### Lua Example -`local integerValue = get_network_area_timer()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`u32 get_network_area_timer(void);` - -[:arrow_up_small:](#) - -
- -## [get_os_name](#get_os_name) - -### Description -Gets the name of the operating system the game is running on - -### Lua Example -`local stringValue = get_os_name()` - -### Parameters -- None - -### Returns -- `string` - -### C Prototype -`const char* get_os_name(void);` - -[:arrow_up_small:](#) - -
- -## [get_save_file_modified](#get_save_file_modified) - -### Description -Checks if the save file has been modified without saving - -### Lua Example -`local booleanValue = get_save_file_modified()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool get_save_file_modified(void);` - -[:arrow_up_small:](#) - -
- -## [get_time](#get_time) - -### Description -Gets the Unix Timestamp - -### Lua Example -`local integerValue = get_time()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s64 get_time(void);` - -[:arrow_up_small:](#) - -
- -## [get_ttc_speed_setting](#get_ttc_speed_setting) - -### Description -Gets TTC's speed setting - -### Lua Example -`local integerValue = get_ttc_speed_setting()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s16 get_ttc_speed_setting(void);` - -[:arrow_up_small:](#) - -
- -## [get_volume_env](#get_volume_env) - -### Description -Gets the volume level of environment sounds effects - -### Lua Example -`local numberValue = get_volume_env()` - -### Parameters -- None - -### Returns -- `number` - -### C Prototype -`f32 get_volume_env(void);` - -[:arrow_up_small:](#) - -
- -## [get_volume_level](#get_volume_level) - -### Description -Gets the volume level of music - -### Lua Example -`local numberValue = get_volume_level()` - -### Parameters -- None - -### Returns -- `number` - -### C Prototype -`f32 get_volume_level(void);` - -[:arrow_up_small:](#) - -
- -## [get_volume_master](#get_volume_master) - -### Description -Gets the master volume level - -### Lua Example -`local numberValue = get_volume_master()` - -### Parameters -- None - -### Returns -- `number` - -### C Prototype -`f32 get_volume_master(void);` - -[:arrow_up_small:](#) - -
- -## [get_volume_sfx](#get_volume_sfx) - -### Description -Gets the volume level of sound effects - -### Lua Example -`local numberValue = get_volume_sfx()` - -### Parameters -- None - -### Returns -- `number` - -### C Prototype -`f32 get_volume_sfx(void);` - -[:arrow_up_small:](#) - -
- -## [get_water_level](#get_water_level) - -### Description -Gets the water level in an area corresponding to `index` (0-indexed) - -### Lua Example -`local integerValue = get_water_level(index)` - -### Parameters -| Field | Type | -| ----- | ---- | -| index | `integer` | - -### Returns -- `integer` - -### C Prototype -`s16 get_water_level(u8 index);` - -[:arrow_up_small:](#) - -
- -## [hud_get_flash](#hud_get_flash) - -### Description -Gets if the star counter on the HUD should flash - -### Lua Example -`local integerValue = hud_get_flash()` - -### Parameters -- None - -### Returns -- `integer` - -### C Prototype -`s8 hud_get_flash(void);` - -[:arrow_up_small:](#) - -
- -## [hud_get_value](#hud_get_value) - -### Lua Example -`local integerValue = hud_get_value(type)` - -### Parameters -| Field | Type | -| ----- | ---- | -| type | [enum HudDisplayValue](constants.md#enum-HudDisplayValue) | - -### Returns -- `integer` - -### C Prototype -`s32 hud_get_value(enum HudDisplayValue type);` - -[:arrow_up_small:](#) - -
- -## [hud_hide](#hud_hide) - -### Description -Hides the HUD - -### Lua Example -`hud_hide()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void hud_hide(void);` - -[:arrow_up_small:](#) - -
- -## [hud_is_hidden](#hud_is_hidden) - -### Description -Checks if the HUD is hidden - -### Lua Example -`local booleanValue = hud_is_hidden()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool hud_is_hidden(void);` - -[:arrow_up_small:](#) - -
- -## [hud_render_power_meter](#hud_render_power_meter) - -### Description -Renders a power meter on the HUD - -### Lua Example -`hud_render_power_meter(health, x, y, width, height)` - -### Parameters -| Field | Type | -| ----- | ---- | -| health | `integer` | -| x | `number` | -| y | `number` | -| width | `number` | -| height | `number` | - -### Returns -- None - -### C Prototype -`void hud_render_power_meter(s32 health, f32 x, f32 y, f32 width, f32 height);` - -[:arrow_up_small:](#) - -
- -## [hud_render_power_meter_interpolated](#hud_render_power_meter_interpolated) - -### Description -Renders an interpolated power meter on the HUD - -### Lua Example -`hud_render_power_meter_interpolated(health, prevX, prevY, prevWidth, prevHeight, x, y, width, height)` - -### Parameters -| Field | Type | -| ----- | ---- | -| health | `integer` | -| prevX | `number` | -| prevY | `number` | -| prevWidth | `number` | -| prevHeight | `number` | -| x | `number` | -| y | `number` | -| width | `number` | -| height | `number` | - -### Returns -- None - -### C Prototype -`void hud_render_power_meter_interpolated(s32 health, f32 prevX, f32 prevY, f32 prevWidth, f32 prevHeight, f32 x, f32 y, f32 width, f32 height);` - -[:arrow_up_small:](#) - -
- -## [hud_set_flash](#hud_set_flash) - -### Description -Sets if the star counter on the HUD should flash - -### Lua Example -`hud_set_flash(value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| value | `integer` | - -### Returns -- None - -### C Prototype -`void hud_set_flash(s8 value);` - -[:arrow_up_small:](#) - -
- -## [hud_set_value](#hud_set_value) - -### Description -Sets a HUD display value - -### Lua Example -`hud_set_value(type, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| type | [enum HudDisplayValue](constants.md#enum-HudDisplayValue) | -| value | `integer` | - -### Returns -- None - -### C Prototype -`void hud_set_value(enum HudDisplayValue type, s32 value);` - -[:arrow_up_small:](#) - -
- -## [hud_show](#hud_show) - -### Description -Shows the HUD - -### Lua Example -`hud_show()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void hud_show(void);` - -[:arrow_up_small:](#) - -
- -## [is_game_paused](#is_game_paused) - -### Description -Checks if the game is paused - -### Lua Example -`local booleanValue = is_game_paused()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool is_game_paused(void);` - -[:arrow_up_small:](#) - -
- -## [is_transition_playing](#is_transition_playing) - -### Description -Checks if a screen transition is playing - -### Lua Example -`local booleanValue = is_transition_playing()` - -### Parameters -- None - -### Returns -- `boolean` - -### C Prototype -`bool is_transition_playing(void);` - -[:arrow_up_small:](#) - -
- -## [mod_file_exists](#mod_file_exists) - -### Description -Checks if a file exists inside of a mod - -### Lua Example -`local booleanValue = mod_file_exists(filename)` - -### Parameters -| Field | Type | -| ----- | ---- | -| filename | `string` | - -### Returns -- `boolean` - -### C Prototype -`bool mod_file_exists(const char* filename);` - -[:arrow_up_small:](#) - -
- -## [movtexqc_register](#movtexqc_register) - -### Description -Registers a custom moving texture entry (used for vanilla water boxes) - -### Lua Example -`movtexqc_register(name, level, area, type)` - -### Parameters -| Field | Type | -| ----- | ---- | -| name | `string` | -| level | `integer` | -| area | `integer` | -| type | `integer` | - -### Returns -- None - -### C Prototype -`void movtexqc_register(const char* name, s16 level, s16 area, s16 type);` - -[:arrow_up_small:](#) - -
- -## [play_transition](#play_transition) - -### Description -Plays a screen transition - -### Lua Example -`play_transition(transType, time, red, green, blue)` - -### Parameters -| Field | Type | -| ----- | ---- | -| transType | `integer` | -| time | `integer` | -| red | `integer` | -| green | `integer` | -| blue | `integer` | - -### Returns -- None - -### C Prototype -`void play_transition(s16 transType, s16 time, u8 red, u8 green, u8 blue);` - -[:arrow_up_small:](#) - -
- -## [reset_window_title](#reset_window_title) - -### Description -Resets the window title - -### Lua Example -`reset_window_title()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void reset_window_title(void);` +`s16 get_current_save_file_num(void);` [:arrow_up_small:](#) @@ -2432,278 +2106,50 @@ Sets if the save file should use its backup slot
-## [set_environment_region](#set_environment_region) +## [movtexqc_register](#movtexqc_register) ### Description -Sets an environment region (gas/water boxes) height value +Registers a custom moving texture entry (used for vanilla water boxes) ### Lua Example -`set_environment_region(index, value)` +`movtexqc_register(name, level, area, type)` + +### Parameters +| Field | Type | +| ----- | ---- | +| name | `string` | +| level | `integer` | +| area | `integer` | +| type | `integer` | + +### Returns +- None + +### C Prototype +`void movtexqc_register(const char* name, s16 level, s16 area, s16 type);` + +[:arrow_up_small:](#) + +
+ +## [get_water_level](#get_water_level) + +### Description +Gets the water level in an area corresponding to `index` (0-indexed) + +### Lua Example +`local integerValue = get_water_level(index)` ### Parameters | Field | Type | | ----- | ---- | | index | `integer` | -| value | `integer` | ### Returns -- None +- `integer` ### C Prototype -`void set_environment_region(u8 index, s32 value);` - -[:arrow_up_small:](#) - -
- -## [set_got_file_coin_hi_score](#set_got_file_coin_hi_score) - -### Description -Sets if the save file's coin "HI SCORE" was obtained with the last star or key collection - -### Lua Example -`set_got_file_coin_hi_score(value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| value | `boolean` | - -### Returns -- None - -### C Prototype -`void set_got_file_coin_hi_score(bool value);` - -[:arrow_up_small:](#) - -
- -## [set_last_completed_course_num](#set_last_completed_course_num) - -### Description -Sets the last course a star or key was collected in - -### Lua Example -`set_last_completed_course_num(courseNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | - -### Returns -- None - -### C Prototype -`void set_last_completed_course_num(u8 courseNum);` - -[:arrow_up_small:](#) - -
- -## [set_last_completed_star_num](#set_last_completed_star_num) - -### Description -Sets the last collected star's number (1-7) - -### Lua Example -`set_last_completed_star_num(starNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| starNum | `integer` | - -### Returns -- None - -### C Prototype -`void set_last_completed_star_num(u8 starNum);` - -[:arrow_up_small:](#) - -
- -## [set_last_star_or_key](#set_last_star_or_key) - -### Description -Sets if the last objective collected was a star (0) or a key (1) - -### Lua Example -`set_last_star_or_key(value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| value | `integer` | - -### Returns -- None - -### C Prototype -`void set_last_star_or_key(u8 value);` - -[:arrow_up_small:](#) - -
- -## [set_override_envfx](#set_override_envfx) - -### Description -Sets the override environment effect (e.g. snow) - -### Lua Example -`set_override_envfx(envfx)` - -### Parameters -| Field | Type | -| ----- | ---- | -| envfx | `integer` | - -### Returns -- None - -### C Prototype -`void set_override_envfx(s32 envfx);` - -[:arrow_up_small:](#) - -
- -## [set_save_file_modified](#set_save_file_modified) - -### Description -Sets if the save file has been modified without saving - -### Lua Example -`set_save_file_modified(value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| value | `boolean` | - -### Returns -- None - -### C Prototype -`void set_save_file_modified(bool value);` - -[:arrow_up_small:](#) - -
- -## [set_ttc_speed_setting](#set_ttc_speed_setting) - -### Description -Sets TTC's speed setting (TTC_SPEED_*) - -### Lua Example -`set_ttc_speed_setting(speed)` - -### Parameters -| Field | Type | -| ----- | ---- | -| speed | `integer` | - -### Returns -- None - -### C Prototype -`void set_ttc_speed_setting(s16 speed);` - -[:arrow_up_small:](#) - -
- -## [set_volume_env](#set_volume_env) - -### Description -Sets the volume level of environment sounds effects - -### Lua Example -`set_volume_env(volume)` - -### Parameters -| Field | Type | -| ----- | ---- | -| volume | `number` | - -### Returns -- None - -### C Prototype -`void set_volume_env(f32 volume);` - -[:arrow_up_small:](#) - -
- -## [set_volume_level](#set_volume_level) - -### Description -Sets the volume level of music - -### Lua Example -`set_volume_level(volume)` - -### Parameters -| Field | Type | -| ----- | ---- | -| volume | `number` | - -### Returns -- None - -### C Prototype -`void set_volume_level(f32 volume);` - -[:arrow_up_small:](#) - -
- -## [set_volume_master](#set_volume_master) - -### Description -Sets the master volume level - -### Lua Example -`set_volume_master(volume)` - -### Parameters -| Field | Type | -| ----- | ---- | -| volume | `number` | - -### Returns -- None - -### C Prototype -`void set_volume_master(f32 volume);` - -[:arrow_up_small:](#) - -
- -## [set_volume_sfx](#set_volume_sfx) - -### Description -Sets the volume level of sound effects - -### Lua Example -`set_volume_sfx(volume)` - -### Parameters -| Field | Type | -| ----- | ---- | -| volume | `number` | - -### Returns -- None - -### C Prototype -`void set_volume_sfx(f32 volume);` +`s16 get_water_level(u8 index);` [:arrow_up_small:](#) @@ -2734,6 +2180,539 @@ Sets the water level in an area corresponding to `index` (0-indexed)
+## [play_transition](#play_transition) + +### Description +Plays a screen transition + +### Lua Example +`play_transition(transType, time, red, green, blue)` + +### Parameters +| Field | Type | +| ----- | ---- | +| transType | `integer` | +| time | `integer` | +| red | `integer` | +| green | `integer` | +| blue | `integer` | + +### Returns +- None + +### C Prototype +`void play_transition(s16 transType, s16 time, u8 red, u8 green, u8 blue);` + +[:arrow_up_small:](#) + +
+ +## [course_is_main_course](#course_is_main_course) + +### Description +Checks if a course is a main course and not the castle or secret levels + +### Lua Example +`local booleanValue = course_is_main_course(courseNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | + +### Returns +- `boolean` + +### C Prototype +`bool course_is_main_course(u16 courseNum);` + +[:arrow_up_small:](#) + +
+ +## [get_ttc_speed_setting](#get_ttc_speed_setting) + +### Description +Gets TTC's speed setting + +### Lua Example +`local integerValue = get_ttc_speed_setting()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s16 get_ttc_speed_setting(void);` + +[:arrow_up_small:](#) + +
+ +## [set_ttc_speed_setting](#set_ttc_speed_setting) + +### Description +Sets TTC's speed setting (TTC_SPEED_*) + +### Lua Example +`set_ttc_speed_setting(speed)` + +### Parameters +| Field | Type | +| ----- | ---- | +| speed | `integer` | + +### Returns +- None + +### C Prototype +`void set_ttc_speed_setting(s16 speed);` + +[:arrow_up_small:](#) + +
+ +## [get_time](#get_time) + +### Description +Gets the Unix Timestamp + +### Lua Example +`local integerValue = get_time()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s64 get_time(void);` + +[:arrow_up_small:](#) + +
+ +## [get_date_and_time](#get_date_and_time) + +### Description +Gets the system clock's date and time + +### Lua Example +`local DateTimeValue = get_date_and_time()` + +### Parameters +- None + +### Returns +[DateTime](structs.md#DateTime) + +### C Prototype +`struct DateTime* get_date_and_time(void);` + +[:arrow_up_small:](#) + +
+ +## [get_envfx](#get_envfx) + +### Description +Gets the non overridden environment effect (e.g. snow) + +### Lua Example +`local integerValue = get_envfx()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u16 get_envfx(void);` + +[:arrow_up_small:](#) + +
+ +## [set_override_envfx](#set_override_envfx) + +### Description +Sets the override environment effect (e.g. snow) + +### Lua Example +`set_override_envfx(envfx)` + +### Parameters +| Field | Type | +| ----- | ---- | +| envfx | `integer` | + +### Returns +- None + +### C Prototype +`void set_override_envfx(s32 envfx);` + +[:arrow_up_small:](#) + +
+ +## [get_global_timer](#get_global_timer) + +### Description +Gets the global timer that has been ticking at 30 frames per second since game boot + +### Lua Example +`local integerValue = get_global_timer()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`u32 get_global_timer(void);` + +[:arrow_up_small:](#) + +
+ +## [get_dialog_response](#get_dialog_response) + +### Description +Gets the choice selected inside of a dialog box (0-1) + +### Lua Example +`local integerValue = get_dialog_response()` + +### Parameters +- None + +### Returns +- `integer` + +### C Prototype +`s32 get_dialog_response(void);` + +[:arrow_up_small:](#) + +
+ +## [get_local_discord_id](#get_local_discord_id) + +### Description +Gets the local discord ID if it isn't disabled, otherwise "0" is returned + +### Lua Example +`local stringValue = get_local_discord_id()` + +### Parameters +- None + +### Returns +- `string` + +### C Prototype +`const char* get_local_discord_id(void);` + +[:arrow_up_small:](#) + +
+ +## [get_coopnet_id](#get_coopnet_id) + +### Description +Gets the CoopNet ID of a player with `localIndex` if CoopNet is being used and the player is connected, otherwise "-1" is returned + +### Lua Example +`local stringValue = get_coopnet_id(localIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| localIndex | `integer` | + +### Returns +- `string` + +### C Prototype +`const char* get_coopnet_id(s8 localIndex);` + +[:arrow_up_small:](#) + +
+ +## [get_volume_master](#get_volume_master) + +### Description +Gets the master volume level + +### Lua Example +`local numberValue = get_volume_master()` + +### Parameters +- None + +### Returns +- `number` + +### C Prototype +`f32 get_volume_master(void);` + +[:arrow_up_small:](#) + +
+ +## [get_volume_level](#get_volume_level) + +### Description +Gets the volume level of music + +### Lua Example +`local numberValue = get_volume_level()` + +### Parameters +- None + +### Returns +- `number` + +### C Prototype +`f32 get_volume_level(void);` + +[:arrow_up_small:](#) + +
+ +## [get_volume_sfx](#get_volume_sfx) + +### Description +Gets the volume level of sound effects + +### Lua Example +`local numberValue = get_volume_sfx()` + +### Parameters +- None + +### Returns +- `number` + +### C Prototype +`f32 get_volume_sfx(void);` + +[:arrow_up_small:](#) + +
+ +## [get_volume_env](#get_volume_env) + +### Description +Gets the volume level of environment sounds effects + +### Lua Example +`local numberValue = get_volume_env()` + +### Parameters +- None + +### Returns +- `number` + +### C Prototype +`f32 get_volume_env(void);` + +[:arrow_up_small:](#) + +
+ +## [set_volume_master](#set_volume_master) + +### Description +Sets the master volume level + +### Lua Example +`set_volume_master(volume)` + +### Parameters +| Field | Type | +| ----- | ---- | +| volume | `number` | + +### Returns +- None + +### C Prototype +`void set_volume_master(f32 volume);` + +[:arrow_up_small:](#) + +
+ +## [set_volume_level](#set_volume_level) + +### Description +Sets the volume level of music + +### Lua Example +`set_volume_level(volume)` + +### Parameters +| Field | Type | +| ----- | ---- | +| volume | `number` | + +### Returns +- None + +### C Prototype +`void set_volume_level(f32 volume);` + +[:arrow_up_small:](#) + +
+ +## [set_volume_sfx](#set_volume_sfx) + +### Description +Sets the volume level of sound effects + +### Lua Example +`set_volume_sfx(volume)` + +### Parameters +| Field | Type | +| ----- | ---- | +| volume | `number` | + +### Returns +- None + +### C Prototype +`void set_volume_sfx(f32 volume);` + +[:arrow_up_small:](#) + +
+ +## [set_volume_env](#set_volume_env) + +### Description +Sets the volume level of environment sounds effects + +### Lua Example +`set_volume_env(volume)` + +### Parameters +| Field | Type | +| ----- | ---- | +| volume | `number` | + +### Returns +- None + +### C Prototype +`void set_volume_env(f32 volume);` + +[:arrow_up_small:](#) + +
+ +## [get_environment_region](#get_environment_region) + +### Description +Gets an environment region (gas/water boxes) height value + +### Lua Example +`local numberValue = get_environment_region(index)` + +### Parameters +| Field | Type | +| ----- | ---- | +| index | `integer` | + +### Returns +- `number` + +### C Prototype +`f32 get_environment_region(u8 index);` + +[:arrow_up_small:](#) + +
+ +## [set_environment_region](#set_environment_region) + +### Description +Sets an environment region (gas/water boxes) height value + +### Lua Example +`set_environment_region(index, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| index | `integer` | +| value | `integer` | + +### Returns +- None + +### C Prototype +`void set_environment_region(u8 index, s32 value);` + +[:arrow_up_small:](#) + +
+ +## [mod_file_exists](#mod_file_exists) + +### Description +Checks if a file exists inside of a mod + +### Lua Example +`local booleanValue = mod_file_exists(filename)` + +### Parameters +| Field | Type | +| ----- | ---- | +| filename | `string` | + +### Returns +- `boolean` + +### C Prototype +`bool mod_file_exists(const char* filename);` + +[:arrow_up_small:](#) + +
+ +## [get_active_mod](#get_active_mod) + +### Description +Gets the mod currently being processed + +### Lua Example +`local ModValue = get_active_mod()` + +### Parameters +- None + +### Returns +[Mod](structs.md#Mod) + +### C Prototype +`struct Mod* get_active_mod(void);` + +[:arrow_up_small:](#) + +
+ ## [set_window_title](#set_window_title) ### Description @@ -2757,6 +2736,48 @@ Sets the window title to a custom title
+## [reset_window_title](#reset_window_title) + +### Description +Resets the window title + +### Lua Example +`reset_window_title()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void reset_window_title(void);` + +[:arrow_up_small:](#) + +
+ +## [get_os_name](#get_os_name) + +### Description +Gets the name of the operating system the game is running on + +### Lua Example +`local stringValue = get_os_name()` + +### Parameters +- None + +### Returns +- `string` + +### C Prototype +`const char* get_os_name(void);` + +[:arrow_up_small:](#) + +
+ --- # functions from smlua_model_utils.h @@ -2792,6 +2813,180 @@ Gets the extended model ID for the `name` of a `GeoLayout`
+## [spawn_sync_object](#spawn_sync_object) + +### Description +Spawns a synchronized object in at `x`, `y`, and `z` as a child object of the local Mario with his rotation. You can change the fields of the object in `objSetupFunction` + +### Lua Example +`local ObjectValue = spawn_sync_object(behaviorId, modelId, x, y, z, objSetupFunction)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | +| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | +| x | `number` | +| y | `number` | +| z | `number` | +| objSetupFunction | `Lua Function` () | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object* spawn_sync_object(enum BehaviorId behaviorId, enum ModelExtendedId modelId, f32 x, f32 y, f32 z, LuaFunction objSetupFunction);` + +[:arrow_up_small:](#) + +
+ +## [spawn_non_sync_object](#spawn_non_sync_object) + +### Description +Spawns a synchronized object in at `x`, `y`, and `z` as a child object of the local Mario with his rotation. You can change the fields of the object in `objSetupFunction` + +### Lua Example +`local ObjectValue = spawn_non_sync_object(behaviorId, modelId, x, y, z, objSetupFunction)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | +| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | +| x | `number` | +| y | `number` | +| z | `number` | +| objSetupFunction | `Lua Function` () | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object* spawn_non_sync_object(enum BehaviorId behaviorId, enum ModelExtendedId modelId, f32 x, f32 y, f32 z, LuaFunction objSetupFunction);` + +[:arrow_up_small:](#) + +
+ +## [obj_has_behavior_id](#obj_has_behavior_id) + +### Description +Checks if an object has `behaviorId` + +### Lua Example +`local integerValue = obj_has_behavior_id(o, behaviorId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | + +### Returns +- `integer` + +### C Prototype +`s32 obj_has_behavior_id(struct Object *o, enum BehaviorId behaviorId);` + +[:arrow_up_small:](#) + +
+ +## [obj_has_model_extended](#obj_has_model_extended) + +### Description +Checks if an object's model is equal to `modelId` + +### Lua Example +`local integerValue = obj_has_model_extended(o, modelId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | + +### Returns +- `integer` + +### C Prototype +`s32 obj_has_model_extended(struct Object *o, enum ModelExtendedId modelId);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_model_id_extended](#obj_get_model_id_extended) + +### Description +Returns an object's extended model id + +### Lua Example +`local enumValue = obj_get_model_id_extended(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +[enum ModelExtendedId](constants.md#enum-ModelExtendedId) + +### C Prototype +`enum ModelExtendedId obj_get_model_id_extended(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_model_extended](#obj_set_model_extended) + +### Description +Sets an object's model to `modelId` + +### Lua Example +`obj_set_model_extended(o, modelId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | + +### Returns +- None + +### C Prototype +`void obj_set_model_extended(struct Object *o, enum ModelExtendedId modelId);` + +[:arrow_up_small:](#) + +
+ +## [get_trajectory](#get_trajectory) + +### Description +Gets a trajectory by `name` + +### Lua Example +`local PointerValue = get_trajectory(name)` + +### Parameters +| Field | Type | +| ----- | ---- | +| name | `string` | + +### Returns +- `Pointer` <`Trajectory`> + +### C Prototype +`Trajectory* get_trajectory(const char* name);` + +[:arrow_up_small:](#) + +
+ ## [geo_get_current_object](#geo_get_current_object) ### Description @@ -2834,27 +3029,6 @@ Gets the object currently being processed
-## [get_cutscene_focus](#get_cutscene_focus) - -### Description -Gets the cutscene focus object - -### Lua Example -`local ObjectValue = get_cutscene_focus()` - -### Parameters -- None - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *get_cutscene_focus(void);` - -[:arrow_up_small:](#) - -
- ## [get_dialog_object](#get_dialog_object) ### Description @@ -2876,6 +3050,27 @@ Gets the NPC object Mario is talking to
+## [get_cutscene_focus](#get_cutscene_focus) + +### Description +Gets the cutscene focus object + +### Lua Example +`local ObjectValue = get_cutscene_focus()` + +### Parameters +- None + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *get_cutscene_focus(void);` + +[:arrow_up_small:](#) + +
+ ## [get_secondary_camera_focus](#get_secondary_camera_focus) ### Description @@ -2897,98 +3092,263 @@ Gets the secondary camera focus object
-## [get_temp_object_hitbox](#get_temp_object_hitbox) +## [set_cutscene_focus](#set_cutscene_focus) ### Description -Returns a temporary object hitbox pointer +Sets the cutscene focus object ### Lua Example -`local ObjectHitboxValue = get_temp_object_hitbox()` - -### Parameters -- None - -### Returns -[ObjectHitbox](structs.md#ObjectHitbox) - -### C Prototype -`struct ObjectHitbox* get_temp_object_hitbox(void);` - -[:arrow_up_small:](#) - -
- -## [get_trajectory](#get_trajectory) - -### Description -Gets a trajectory by `name` - -### Lua Example -`local PointerValue = get_trajectory(name)` - -### Parameters -| Field | Type | -| ----- | ---- | -| name | `string` | - -### Returns -- `Pointer` <`Trajectory`> - -### C Prototype -`Trajectory* get_trajectory(const char* name);` - -[:arrow_up_small:](#) - -
- -## [obj_check_hitbox_overlap](#obj_check_hitbox_overlap) - -### Description -Checks if `o1`'s hitbox is colliding with `o2`'s hitbox - -### Lua Example -`local booleanValue = obj_check_hitbox_overlap(o1, o2)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o1 | [Object](structs.md#Object) | -| o2 | [Object](structs.md#Object) | - -### Returns -- `boolean` - -### C Prototype -`bool obj_check_hitbox_overlap(struct Object *o1, struct Object *o2);` - -[:arrow_up_small:](#) - -
- -## [obj_check_overlap_with_hitbox_params](#obj_check_overlap_with_hitbox_params) - -### Description -Checks if `o`'s hitbox is colliding with the parameters of a hitbox - -### Lua Example -`local booleanValue = obj_check_overlap_with_hitbox_params(o, x, y, z, h, r, d)` +`local voidValue = set_cutscene_focus(o)` ### Parameters | Field | Type | | ----- | ---- | | o | [Object](structs.md#Object) | -| x | `number` | -| y | `number` | -| z | `number` | -| h | `number` | -| r | `number` | -| d | `number` | ### Returns -- `boolean` +- `void *` ### C Prototype -`bool obj_check_overlap_with_hitbox_params(struct Object *o, f32 x, f32 y, f32 z, f32 h, f32 r, f32 d);` +`void *set_cutscene_focus(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [set_secondary_camera_focus](#set_secondary_camera_focus) + +### Description +Sets the secondary camera focus object + +### Lua Example +`local voidValue = set_secondary_camera_focus(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +- `void *` + +### C Prototype +`void *set_secondary_camera_focus(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_first](#obj_get_first) + +### Description +Gets the first object in an object list + +### Lua Example +`local ObjectValue = obj_get_first(objList)` + +### Parameters +| Field | Type | +| ----- | ---- | +| objList | [enum ObjectList](constants.md#enum-ObjectList) | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_first(enum ObjectList objList);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_first_with_behavior_id](#obj_get_first_with_behavior_id) + +### Description +Gets the first object loaded with `behaviorId` + +### Lua Example +`local ObjectValue = obj_get_first_with_behavior_id(behaviorId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_first_with_behavior_id(enum BehaviorId behaviorId);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_first_with_behavior_id_and_field_s32](#obj_get_first_with_behavior_id_and_field_s32) + +### Description +Gets the first object loaded with `behaviorId` and object signed 32-bit integer field (look in `object_fields.h` to get the index of a field) + +### Lua Example +`local ObjectValue = obj_get_first_with_behavior_id_and_field_s32(behaviorId, fieldIndex, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | +| fieldIndex | `integer` | +| value | `integer` | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_first_with_behavior_id_and_field_s32(enum BehaviorId behaviorId, s32 fieldIndex, s32 value);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_first_with_behavior_id_and_field_f32](#obj_get_first_with_behavior_id_and_field_f32) + +### Description +Gets the first object loaded with `behaviorId` and object float field (look in `object_fields.h` to get the index of a field) + +### Lua Example +`local ObjectValue = obj_get_first_with_behavior_id_and_field_f32(behaviorId, fieldIndex, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | +| fieldIndex | `integer` | +| value | `number` | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_first_with_behavior_id_and_field_f32(enum BehaviorId behaviorId, s32 fieldIndex, f32 value);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_next](#obj_get_next) + +### Description +Gets the next object in an object list + +### Lua Example +`local ObjectValue = obj_get_next(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_next(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_next_with_same_behavior_id](#obj_get_next_with_same_behavior_id) + +### Description +Gets the next object loaded with the same behavior ID + +### Lua Example +`local ObjectValue = obj_get_next_with_same_behavior_id(o)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_next_with_same_behavior_id(struct Object *o);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_next_with_same_behavior_id_and_field_s32](#obj_get_next_with_same_behavior_id_and_field_s32) + +### Description +Gets the next object loaded with the same behavior ID and object signed 32-bit integer field (look in `object_fields.h` to get the index of a field) + +### Lua Example +`local ObjectValue = obj_get_next_with_same_behavior_id_and_field_s32(o, fieldIndex, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| fieldIndex | `integer` | +| value | `integer` | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_next_with_same_behavior_id_and_field_s32(struct Object *o, s32 fieldIndex, s32 value);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_next_with_same_behavior_id_and_field_f32](#obj_get_next_with_same_behavior_id_and_field_f32) + +### Description +Gets the next object loaded with the same behavior ID and object float field (look in `object_fields.h` to get the index of a field) + +### Lua Example +`local ObjectValue = obj_get_next_with_same_behavior_id_and_field_f32(o, fieldIndex, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| fieldIndex | `integer` | +| value | `number` | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_next_with_same_behavior_id_and_field_f32(struct Object *o, s32 fieldIndex, f32 value);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_nearest_object_with_behavior_id](#obj_get_nearest_object_with_behavior_id) + +### Description +Gets the nearest object with `behaviorId` to `o` + +### Lua Example +`local ObjectValue = obj_get_nearest_object_with_behavior_id(o, behaviorId)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | + +### Returns +[Object](structs.md#Object) + +### C Prototype +`struct Object *obj_get_nearest_object_with_behavior_id(struct Object *o, enum BehaviorId behaviorId);` [:arrow_up_small:](#) @@ -3041,6 +3401,54 @@ Gets the corresponding collided object to an index from `o`
+## [obj_get_field_u32](#obj_get_field_u32) + +### Description +Gets the unsigned 32-bit integer value from the field corresponding to `fieldIndex` + +### Lua Example +`local integerValue = obj_get_field_u32(o, fieldIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| fieldIndex | `integer` | + +### Returns +- `integer` + +### C Prototype +`u32 obj_get_field_u32(struct Object *o, s32 fieldIndex);` + +[:arrow_up_small:](#) + +
+ +## [obj_get_field_s32](#obj_get_field_s32) + +### Description +Gets the signed 32-bit integer value from the field corresponding to `fieldIndex` + +### Lua Example +`local integerValue = obj_get_field_s32(o, fieldIndex)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| fieldIndex | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 obj_get_field_s32(struct Object *o, s32 fieldIndex);` + +[:arrow_up_small:](#) + +
+ ## [obj_get_field_f32](#obj_get_field_f32) ### Description @@ -3090,275 +3498,13 @@ Gets the signed 32-bit integer value from the sub field corresponding to `fieldS
-## [obj_get_field_s32](#obj_get_field_s32) +## [obj_set_field_u32](#obj_set_field_u32) ### Description -Gets the signed 32-bit integer value from the field corresponding to `fieldIndex` +Sets the unsigned 32-bit integer value from the field corresponding to `fieldIndex` ### Lua Example -`local integerValue = obj_get_field_s32(o, fieldIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| fieldIndex | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 obj_get_field_s32(struct Object *o, s32 fieldIndex);` - -[:arrow_up_small:](#) - -
- -## [obj_get_field_u32](#obj_get_field_u32) - -### Description -Gets the unsigned 32-bit integer value from the field corresponding to `fieldIndex` - -### Lua Example -`local integerValue = obj_get_field_u32(o, fieldIndex)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| fieldIndex | `integer` | - -### Returns -- `integer` - -### C Prototype -`u32 obj_get_field_u32(struct Object *o, s32 fieldIndex);` - -[:arrow_up_small:](#) - -
- -## [obj_get_first](#obj_get_first) - -### Description -Gets the first object in an object list - -### Lua Example -`local ObjectValue = obj_get_first(objList)` - -### Parameters -| Field | Type | -| ----- | ---- | -| objList | [enum ObjectList](constants.md#enum-ObjectList) | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *obj_get_first(enum ObjectList objList);` - -[:arrow_up_small:](#) - -
- -## [obj_get_first_with_behavior_id](#obj_get_first_with_behavior_id) - -### Description -Gets the first object loaded with `behaviorId` - -### Lua Example -`local ObjectValue = obj_get_first_with_behavior_id(behaviorId)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *obj_get_first_with_behavior_id(enum BehaviorId behaviorId);` - -[:arrow_up_small:](#) - -
- -## [obj_get_first_with_behavior_id_and_field_f32](#obj_get_first_with_behavior_id_and_field_f32) - -### Description -Gets the first object loaded with `behaviorId` and object float field (look in `object_fields.h` to get the index of a field) - -### Lua Example -`local ObjectValue = obj_get_first_with_behavior_id_and_field_f32(behaviorId, fieldIndex, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | -| fieldIndex | `integer` | -| value | `number` | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *obj_get_first_with_behavior_id_and_field_f32(enum BehaviorId behaviorId, s32 fieldIndex, f32 value);` - -[:arrow_up_small:](#) - -
- -## [obj_get_first_with_behavior_id_and_field_s32](#obj_get_first_with_behavior_id_and_field_s32) - -### Description -Gets the first object loaded with `behaviorId` and object signed 32-bit integer field (look in `object_fields.h` to get the index of a field) - -### Lua Example -`local ObjectValue = obj_get_first_with_behavior_id_and_field_s32(behaviorId, fieldIndex, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | -| fieldIndex | `integer` | -| value | `integer` | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *obj_get_first_with_behavior_id_and_field_s32(enum BehaviorId behaviorId, s32 fieldIndex, s32 value);` - -[:arrow_up_small:](#) - -
- -## [obj_get_model_id_extended](#obj_get_model_id_extended) - -### Description -Returns an object's extended model id - -### Lua Example -`local enumValue = obj_get_model_id_extended(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -[enum ModelExtendedId](constants.md#enum-ModelExtendedId) - -### C Prototype -`enum ModelExtendedId obj_get_model_id_extended(struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [obj_get_nearest_object_with_behavior_id](#obj_get_nearest_object_with_behavior_id) - -### Description -Gets the nearest object with `behaviorId` to `o` - -### Lua Example -`local ObjectValue = obj_get_nearest_object_with_behavior_id(o, behaviorId)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *obj_get_nearest_object_with_behavior_id(struct Object *o, enum BehaviorId behaviorId);` - -[:arrow_up_small:](#) - -
- -## [obj_get_next](#obj_get_next) - -### Description -Gets the next object in an object list - -### Lua Example -`local ObjectValue = obj_get_next(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *obj_get_next(struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [obj_get_next_with_same_behavior_id](#obj_get_next_with_same_behavior_id) - -### Description -Gets the next object loaded with the same behavior ID - -### Lua Example -`local ObjectValue = obj_get_next_with_same_behavior_id(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *obj_get_next_with_same_behavior_id(struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [obj_get_next_with_same_behavior_id_and_field_f32](#obj_get_next_with_same_behavior_id_and_field_f32) - -### Description -Gets the next object loaded with the same behavior ID and object float field (look in `object_fields.h` to get the index of a field) - -### Lua Example -`local ObjectValue = obj_get_next_with_same_behavior_id_and_field_f32(o, fieldIndex, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| fieldIndex | `integer` | -| value | `number` | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object *obj_get_next_with_same_behavior_id_and_field_f32(struct Object *o, s32 fieldIndex, f32 value);` - -[:arrow_up_small:](#) - -
- -## [obj_get_next_with_same_behavior_id_and_field_s32](#obj_get_next_with_same_behavior_id_and_field_s32) - -### Description -Gets the next object loaded with the same behavior ID and object signed 32-bit integer field (look in `object_fields.h` to get the index of a field) - -### Lua Example -`local ObjectValue = obj_get_next_with_same_behavior_id_and_field_s32(o, fieldIndex, value)` +`obj_set_field_u32(o, fieldIndex, value)` ### Parameters | Field | Type | @@ -3368,10 +3514,86 @@ Gets the next object loaded with the same behavior ID and object signed 32-bit i | value | `integer` | ### Returns -[Object](structs.md#Object) +- None ### C Prototype -`struct Object *obj_get_next_with_same_behavior_id_and_field_s32(struct Object *o, s32 fieldIndex, s32 value);` +`void obj_set_field_u32(struct Object *o, s32 fieldIndex, u32 value);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_field_s32](#obj_set_field_s32) + +### Description +Sets the signed 32-bit integer value from the field corresponding to `fieldIndex` + +### Lua Example +`obj_set_field_s32(o, fieldIndex, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| fieldIndex | `integer` | +| value | `integer` | + +### Returns +- None + +### C Prototype +`void obj_set_field_s32(struct Object *o, s32 fieldIndex, s32 value);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_field_f32](#obj_set_field_f32) + +### Description +Sets the float value from the field corresponding to `fieldIndex` + +### Lua Example +`obj_set_field_f32(o, fieldIndex, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| fieldIndex | `integer` | +| value | `number` | + +### Returns +- None + +### C Prototype +`void obj_set_field_f32(struct Object *o, s32 fieldIndex, f32 value);` + +[:arrow_up_small:](#) + +
+ +## [obj_set_field_s16](#obj_set_field_s16) + +### Description +Sets the signed 32-bit integer value from the sub field corresponding to `fieldSubIndex` from the field corresponding to `fieldIndex` + +### Lua Example +`obj_set_field_s16(o, fieldIndex, fieldSubIndex, value)` + +### Parameters +| Field | Type | +| ----- | ---- | +| o | [Object](structs.md#Object) | +| fieldIndex | `integer` | +| fieldSubIndex | `integer` | +| value | `integer` | + +### Returns +- None + +### C Prototype +`void obj_set_field_s16(struct Object *o, s32 fieldIndex, s32 fieldSubIndex, s16 value);` [:arrow_up_small:](#) @@ -3400,49 +3622,22 @@ Returns a temporary particle spawn info pointer with its model loaded in from `m
-## [obj_has_behavior_id](#obj_has_behavior_id) +## [get_temp_object_hitbox](#get_temp_object_hitbox) ### Description -Checks if an object has `behaviorId` +Returns a temporary object hitbox pointer ### Lua Example -`local integerValue = obj_has_behavior_id(o, behaviorId)` +`local ObjectHitboxValue = get_temp_object_hitbox()` ### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | +- None ### Returns -- `integer` +[ObjectHitbox](structs.md#ObjectHitbox) ### C Prototype -`s32 obj_has_behavior_id(struct Object *o, enum BehaviorId behaviorId);` - -[:arrow_up_small:](#) - -
- -## [obj_has_model_extended](#obj_has_model_extended) - -### Description -Checks if an object's model is equal to `modelId` - -### Lua Example -`local integerValue = obj_has_model_extended(o, modelId)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | - -### Returns -- `integer` - -### C Prototype -`s32 obj_has_model_extended(struct Object *o, enum ModelExtendedId modelId);` +`struct ObjectHitbox* get_temp_object_hitbox(void);` [:arrow_up_small:](#) @@ -3655,152 +3850,54 @@ Checks if `o` is activated, tangible, and interactible
-## [obj_move_xyz](#obj_move_xyz) +## [obj_check_hitbox_overlap](#obj_check_hitbox_overlap) ### Description -Moves the object in the direction of `dx`, `dy`, and `dz` +Checks if `o1`'s hitbox is colliding with `o2`'s hitbox ### Lua Example -`obj_move_xyz(o, dx, dy, dz)` +`local booleanValue = obj_check_hitbox_overlap(o1, o2)` ### Parameters | Field | Type | | ----- | ---- | -| o | [Object](structs.md#Object) | -| dx | `number` | -| dy | `number` | -| dz | `number` | +| o1 | [Object](structs.md#Object) | +| o2 | [Object](structs.md#Object) | ### Returns -- None +- `boolean` ### C Prototype -`void obj_move_xyz(struct Object *o, f32 dx, f32 dy, f32 dz);` +`bool obj_check_hitbox_overlap(struct Object *o1, struct Object *o2);` [:arrow_up_small:](#)
-## [obj_set_field_f32](#obj_set_field_f32) +## [obj_check_overlap_with_hitbox_params](#obj_check_overlap_with_hitbox_params) ### Description -Sets the float value from the field corresponding to `fieldIndex` +Checks if `o`'s hitbox is colliding with the parameters of a hitbox ### Lua Example -`obj_set_field_f32(o, fieldIndex, value)` +`local booleanValue = obj_check_overlap_with_hitbox_params(o, x, y, z, h, r, d)` ### Parameters | Field | Type | | ----- | ---- | | o | [Object](structs.md#Object) | -| fieldIndex | `integer` | -| value | `number` | +| x | `number` | +| y | `number` | +| z | `number` | +| h | `number` | +| r | `number` | +| d | `number` | ### Returns -- None +- `boolean` ### C Prototype -`void obj_set_field_f32(struct Object *o, s32 fieldIndex, f32 value);` - -[:arrow_up_small:](#) - -
- -## [obj_set_field_s16](#obj_set_field_s16) - -### Description -Sets the signed 32-bit integer value from the sub field corresponding to `fieldSubIndex` from the field corresponding to `fieldIndex` - -### Lua Example -`obj_set_field_s16(o, fieldIndex, fieldSubIndex, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| fieldIndex | `integer` | -| fieldSubIndex | `integer` | -| value | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_field_s16(struct Object *o, s32 fieldIndex, s32 fieldSubIndex, s16 value);` - -[:arrow_up_small:](#) - -
- -## [obj_set_field_s32](#obj_set_field_s32) - -### Description -Sets the signed 32-bit integer value from the field corresponding to `fieldIndex` - -### Lua Example -`obj_set_field_s32(o, fieldIndex, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| fieldIndex | `integer` | -| value | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_field_s32(struct Object *o, s32 fieldIndex, s32 value);` - -[:arrow_up_small:](#) - -
- -## [obj_set_field_u32](#obj_set_field_u32) - -### Description -Sets the unsigned 32-bit integer value from the field corresponding to `fieldIndex` - -### Lua Example -`obj_set_field_u32(o, fieldIndex, value)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| fieldIndex | `integer` | -| value | `integer` | - -### Returns -- None - -### C Prototype -`void obj_set_field_u32(struct Object *o, s32 fieldIndex, u32 value);` - -[:arrow_up_small:](#) - -
- -## [obj_set_model_extended](#obj_set_model_extended) - -### Description -Sets an object's model to `modelId` - -### Lua Example -`obj_set_model_extended(o, modelId)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | -| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | - -### Returns -- None - -### C Prototype -`void obj_set_model_extended(struct Object *o, enum ModelExtendedId modelId);` +`bool obj_check_overlap_with_hitbox_params(struct Object *o, f32 x, f32 y, f32 z, f32 h, f32 r, f32 d);` [:arrow_up_small:](#) @@ -3832,47 +3929,27 @@ Sets an object's velocity to `vx`, `vy`, and `vz`
-## [set_cutscene_focus](#set_cutscene_focus) +## [obj_move_xyz](#obj_move_xyz) ### Description -Sets the cutscene focus object +Moves the object in the direction of `dx`, `dy`, and `dz` ### Lua Example -`local voidValue = set_cutscene_focus(o)` +`obj_move_xyz(o, dx, dy, dz)` ### Parameters | Field | Type | | ----- | ---- | | o | [Object](structs.md#Object) | +| dx | `number` | +| dy | `number` | +| dz | `number` | ### Returns -- `void *` +- None ### C Prototype -`void *set_cutscene_focus(struct Object *o);` - -[:arrow_up_small:](#) - -
- -## [set_secondary_camera_focus](#set_secondary_camera_focus) - -### Description -Sets the secondary camera focus object - -### Lua Example -`local voidValue = set_secondary_camera_focus(o)` - -### Parameters -| Field | Type | -| ----- | ---- | -| o | [Object](structs.md#Object) | - -### Returns -- `void *` - -### C Prototype -`void *set_secondary_camera_focus(struct Object *o);` +`void obj_move_xyz(struct Object *o, f32 dx, f32 dy, f32 dz);` [:arrow_up_small:](#) @@ -3906,68 +3983,233 @@ Sets the parameters of one of the two whirlpools (0-indexed) in an area
-## [spawn_non_sync_object](#spawn_non_sync_object) - -### Description -Spawns a synchronized object in at `x`, `y`, and `z` as a child object of the local Mario with his rotation. You can change the fields of the object in `objSetupFunction` - -### Lua Example -`local ObjectValue = spawn_non_sync_object(behaviorId, modelId, x, y, z, objSetupFunction)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | -| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | -| x | `number` | -| y | `number` | -| z | `number` | -| objSetupFunction | `Lua Function` () | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object* spawn_non_sync_object(enum BehaviorId behaviorId, enum ModelExtendedId modelId, f32 x, f32 y, f32 z, LuaFunction objSetupFunction);` - -[:arrow_up_small:](#) - -
- -## [spawn_sync_object](#spawn_sync_object) - -### Description -Spawns a synchronized object in at `x`, `y`, and `z` as a child object of the local Mario with his rotation. You can change the fields of the object in `objSetupFunction` - -### Lua Example -`local ObjectValue = spawn_sync_object(behaviorId, modelId, x, y, z, objSetupFunction)` - -### Parameters -| Field | Type | -| ----- | ---- | -| behaviorId | [enum BehaviorId](constants.md#enum-BehaviorId) | -| modelId | [enum ModelExtendedId](constants.md#enum-ModelExtendedId) | -| x | `number` | -| y | `number` | -| z | `number` | -| objSetupFunction | `Lua Function` () | - -### Returns -[Object](structs.md#Object) - -### C Prototype -`struct Object* spawn_sync_object(enum BehaviorId behaviorId, enum ModelExtendedId modelId, f32 x, f32 y, f32 z, LuaFunction objSetupFunction);` - -[:arrow_up_small:](#) - -
- --- # functions from smlua_text_utils.h
+## [smlua_text_utils_reset_all](#smlua_text_utils_reset_all) + +### Description +Resets every modified dialog back to vanilla + +### Lua Example +`smlua_text_utils_reset_all()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void smlua_text_utils_reset_all(void);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_dialog_replace](#smlua_text_utils_dialog_replace) + +### Description +Replaces `dialogId` with a custom one + +### Lua Example +`smlua_text_utils_dialog_replace(dialogId, unused, linesPerBox, leftOffset, width, str)` + +### Parameters +| Field | Type | +| ----- | ---- | +| dialogId | [enum DialogId](constants.md#enum-DialogId) | +| unused | `integer` | +| linesPerBox | `integer` | +| leftOffset | `integer` | +| width | `integer` | +| str | `string` | + +### Returns +- None + +### C Prototype +`void smlua_text_utils_dialog_replace(enum DialogId dialogId, u32 unused, s8 linesPerBox, s16 leftOffset, s16 width, const char* str);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_course_acts_replace](#smlua_text_utils_course_acts_replace) + +### Description +Replaces the act names of `courseNum` + +### Lua Example +`smlua_text_utils_course_acts_replace(courseNum, courseName, act1, act2, act3, act4, act5, act6)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | +| courseName | `string` | +| act1 | `string` | +| act2 | `string` | +| act3 | `string` | +| act4 | `string` | +| act5 | `string` | +| act6 | `string` | + +### Returns +- None + +### C Prototype +`void smlua_text_utils_course_acts_replace(s16 courseNum, const char* courseName, const char* act1, const char* act2, const char* act3, const char* act4, const char* act5, const char* act6);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_secret_star_replace](#smlua_text_utils_secret_star_replace) + +### Description +Replaces the secret star course name of `courseNum` with `courseName` + +### Lua Example +`smlua_text_utils_secret_star_replace(courseNum, courseName)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | +| courseName | `string` | + +### Returns +- None + +### C Prototype +`void smlua_text_utils_secret_star_replace(s16 courseNum, const char* courseName);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_course_name_replace](#smlua_text_utils_course_name_replace) + +### Description +Replaces the name of `courseNum` with `name` + +### Lua Example +`smlua_text_utils_course_name_replace(courseNum, name)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | +| name | `string` | + +### Returns +- None + +### C Prototype +`void smlua_text_utils_course_name_replace(s16 courseNum, const char* name);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_course_name_get](#smlua_text_utils_course_name_get) + +### Description +Gets the name of `courseNum` + +### Lua Example +`local stringValue = smlua_text_utils_course_name_get(courseNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | + +### Returns +- `string` + +### C Prototype +`const char* smlua_text_utils_course_name_get(s16 courseNum);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_course_name_mod_index](#smlua_text_utils_course_name_mod_index) + +### Description +Gets the index of the mod that replaced the name of `courseNum` + +### Lua Example +`local integerValue = smlua_text_utils_course_name_mod_index(courseNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | + +### Returns +- `integer` + +### C Prototype +`s32 smlua_text_utils_course_name_mod_index(s16 courseNum);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_course_name_reset](#smlua_text_utils_course_name_reset) + +### Description +Resets the name of `courseNum` + +### Lua Example +`smlua_text_utils_course_name_reset(courseNum)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | + +### Returns +- None + +### C Prototype +`void smlua_text_utils_course_name_reset(s16 courseNum);` + +[:arrow_up_small:](#) + +
+ +## [smlua_text_utils_act_name_replace](#smlua_text_utils_act_name_replace) + +### Description +Replaces the act name of `actNum` in `courseNum` with `name` + +### Lua Example +`smlua_text_utils_act_name_replace(courseNum, actNum, name)` + +### Parameters +| Field | Type | +| ----- | ---- | +| courseNum | `integer` | +| actNum | `integer` | +| name | `string` | + +### Returns +- None + +### C Prototype +`void smlua_text_utils_act_name_replace(s16 courseNum, u8 actNum, const char* name);` + +[:arrow_up_small:](#) + +
+ ## [smlua_text_utils_act_name_get](#smlua_text_utils_act_name_get) ### Description @@ -4016,31 +4258,6 @@ Gets the index of the mod that replaced the act name of `actNum` in `courseNum`
-## [smlua_text_utils_act_name_replace](#smlua_text_utils_act_name_replace) - -### Description -Replaces the act name of `actNum` in `courseNum` with `name` - -### Lua Example -`smlua_text_utils_act_name_replace(courseNum, actNum, name)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | -| actNum | `integer` | -| name | `string` | - -### Returns -- None - -### C Prototype -`void smlua_text_utils_act_name_replace(s16 courseNum, u8 actNum, const char* name);` - -[:arrow_up_small:](#) - -
- ## [smlua_text_utils_act_name_reset](#smlua_text_utils_act_name_reset) ### Description @@ -4088,157 +4305,6 @@ Replaces the castle secret stars text with `name`
-## [smlua_text_utils_course_acts_replace](#smlua_text_utils_course_acts_replace) - -### Description -Replaces the act names of `courseNum` - -### Lua Example -`smlua_text_utils_course_acts_replace(courseNum, courseName, act1, act2, act3, act4, act5, act6)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | -| courseName | `string` | -| act1 | `string` | -| act2 | `string` | -| act3 | `string` | -| act4 | `string` | -| act5 | `string` | -| act6 | `string` | - -### Returns -- None - -### C Prototype -`void smlua_text_utils_course_acts_replace(s16 courseNum, const char* courseName, const char* act1, const char* act2, const char* act3, const char* act4, const char* act5, const char* act6);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_course_name_get](#smlua_text_utils_course_name_get) - -### Description -Gets the name of `courseNum` - -### Lua Example -`local stringValue = smlua_text_utils_course_name_get(courseNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | - -### Returns -- `string` - -### C Prototype -`const char* smlua_text_utils_course_name_get(s16 courseNum);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_course_name_mod_index](#smlua_text_utils_course_name_mod_index) - -### Description -Gets the index of the mod that replaced the name of `courseNum` - -### Lua Example -`local integerValue = smlua_text_utils_course_name_mod_index(courseNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | - -### Returns -- `integer` - -### C Prototype -`s32 smlua_text_utils_course_name_mod_index(s16 courseNum);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_course_name_replace](#smlua_text_utils_course_name_replace) - -### Description -Replaces the name of `courseNum` with `name` - -### Lua Example -`smlua_text_utils_course_name_replace(courseNum, name)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | -| name | `string` | - -### Returns -- None - -### C Prototype -`void smlua_text_utils_course_name_replace(s16 courseNum, const char* name);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_course_name_reset](#smlua_text_utils_course_name_reset) - -### Description -Resets the name of `courseNum` - -### Lua Example -`smlua_text_utils_course_name_reset(courseNum)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | - -### Returns -- None - -### C Prototype -`void smlua_text_utils_course_name_reset(s16 courseNum);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_dialog_replace](#smlua_text_utils_dialog_replace) - -### Description -Replaces `dialogId` with a custom one - -### Lua Example -`smlua_text_utils_dialog_replace(dialogId, unused, linesPerBox, leftOffset, width, str)` - -### Parameters -| Field | Type | -| ----- | ---- | -| dialogId | [enum DialogId](constants.md#enum-DialogId) | -| unused | `integer` | -| linesPerBox | `integer` | -| leftOffset | `integer` | -| width | `integer` | -| str | `string` | - -### Returns -- None - -### C Prototype -`void smlua_text_utils_dialog_replace(enum DialogId dialogId, u32 unused, s8 linesPerBox, s16 leftOffset, s16 width, const char* str);` - -[:arrow_up_small:](#) - -
- ## [smlua_text_utils_extra_text_replace](#smlua_text_utils_extra_text_replace) ### Description @@ -4284,57 +4350,79 @@ Gets the current language
-## [smlua_text_utils_reset_all](#smlua_text_utils_reset_all) - -### Description -Resets every modified dialog back to vanilla - -### Lua Example -`smlua_text_utils_reset_all()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void smlua_text_utils_reset_all(void);` - -[:arrow_up_small:](#) - -
- -## [smlua_text_utils_secret_star_replace](#smlua_text_utils_secret_star_replace) - -### Description -Replaces the secret star course name of `courseNum` with `courseName` - -### Lua Example -`smlua_text_utils_secret_star_replace(courseNum, courseName)` - -### Parameters -| Field | Type | -| ----- | ---- | -| courseNum | `integer` | -| courseName | `string` | - -### Returns -- None - -### C Prototype -`void smlua_text_utils_secret_star_replace(s16 courseNum, const char* courseName);` - -[:arrow_up_small:](#) - -
- --- # functions from sound_init.h
+## [reset_volume](#reset_volume) + +### Description +Resets if music volume has been lowered + +### Lua Example +`reset_volume()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void reset_volume(void);` + +[:arrow_up_small:](#) + +
+ +## [raise_background_noise](#raise_background_noise) + +### Description +Raises music volume back up to normal levels + +### Lua Example +`raise_background_noise(a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a | `integer` | + +### Returns +- None + +### C Prototype +`void raise_background_noise(s32 a);` + +[:arrow_up_small:](#) + +
+ +## [lower_background_noise](#lower_background_noise) + +### Description +Lowers the volume of music by 40% + +### Lua Example +`lower_background_noise(a)` + +### Parameters +| Field | Type | +| ----- | ---- | +| a | `integer` | + +### Returns +- None + +### C Prototype +`void lower_background_noise(s32 a);` + +[:arrow_up_small:](#) + +
+ ## [disable_background_sound](#disable_background_sound) ### Description @@ -4377,163 +4465,6 @@ Enables background soundbanks
-## [fadeout_cap_music](#fadeout_cap_music) - -### Description -Fades out cap music - -### Lua Example -`fadeout_cap_music()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void fadeout_cap_music(void);` - -[:arrow_up_small:](#) - -
- -## [fadeout_level_music](#fadeout_level_music) - -### Description -Fades out the level sequence player - -### Lua Example -`fadeout_level_music(fadeTimer)` - -### Parameters -| Field | Type | -| ----- | ---- | -| fadeTimer | `integer` | - -### Returns -- None - -### C Prototype -`void fadeout_level_music(s16 fadeTimer);` - -[:arrow_up_small:](#) - -
- -## [fadeout_music](#fadeout_music) - -### Description -Fades out level, shell, and cap music - -### Lua Example -`fadeout_music(fadeOutTime)` - -### Parameters -| Field | Type | -| ----- | ---- | -| fadeOutTime | `integer` | - -### Returns -- None - -### C Prototype -`void fadeout_music(s16 fadeOutTime);` - -[:arrow_up_small:](#) - -
- -## [lower_background_noise](#lower_background_noise) - -### Description -Lowers the volume of music by 40% - -### Lua Example -`lower_background_noise(a)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a | `integer` | - -### Returns -- None - -### C Prototype -`void lower_background_noise(s32 a);` - -[:arrow_up_small:](#) - -
- -## [play_cap_music](#play_cap_music) - -### Description -Plays `seqArgs` as cap music - -### Lua Example -`play_cap_music(seqArgs)` - -### Parameters -| Field | Type | -| ----- | ---- | -| seqArgs | `integer` | - -### Returns -- None - -### C Prototype -`void play_cap_music(u16 seqArgs);` - -[:arrow_up_small:](#) - -
- -## [play_cutscene_music](#play_cutscene_music) - -### Description -Plays and sets the current music to `seqArgs` - -### Lua Example -`play_cutscene_music(seqArgs)` - -### Parameters -| Field | Type | -| ----- | ---- | -| seqArgs | `integer` | - -### Returns -- None - -### C Prototype -`void play_cutscene_music(u16 seqArgs);` - -[:arrow_up_small:](#) - -
- -## [play_infinite_stairs_music](#play_infinite_stairs_music) - -### Description -Plays the infinite stairs music if you're in the endless stairs room and have less than `gLevelValues.infiniteStairsRequirement` stars - -### Lua Example -`play_infinite_stairs_music()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void play_infinite_stairs_music(void);` - -[:arrow_up_small:](#) - -
- ## [play_menu_sounds](#play_menu_sounds) ### Description @@ -4578,13 +4509,13 @@ Plays the painting eject sound effect if it has not already been played
-## [play_shell_music](#play_shell_music) +## [play_infinite_stairs_music](#play_infinite_stairs_music) ### Description -Plays shell music +Plays the infinite stairs music if you're in the endless stairs room and have less than `gLevelValues.infiniteStairsRequirement` stars ### Lua Example -`play_shell_music()` +`play_infinite_stairs_music()` ### Parameters - None @@ -4593,51 +4524,7 @@ Plays shell music - None ### C Prototype -`void play_shell_music(void);` - -[:arrow_up_small:](#) - -
- -## [raise_background_noise](#raise_background_noise) - -### Description -Raises music volume back up to normal levels - -### Lua Example -`raise_background_noise(a)` - -### Parameters -| Field | Type | -| ----- | ---- | -| a | `integer` | - -### Returns -- None - -### C Prototype -`void raise_background_noise(s32 a);` - -[:arrow_up_small:](#) - -
- -## [reset_volume](#reset_volume) - -### Description -Resets if music volume has been lowered - -### Lua Example -`reset_volume()` - -### Parameters -- None - -### Returns -- None - -### C Prototype -`void reset_volume(void);` +`void play_infinite_stairs_music(void);` [:arrow_up_small:](#) @@ -4668,13 +4555,82 @@ Sets the background music to `seqArgs` on sequence player `a` with a fade in tim
-## [stop_cap_music](#stop_cap_music) +## [fadeout_music](#fadeout_music) ### Description -Stops cap music completely +Fades out level, shell, and cap music ### Lua Example -`stop_cap_music()` +`fadeout_music(fadeOutTime)` + +### Parameters +| Field | Type | +| ----- | ---- | +| fadeOutTime | `integer` | + +### Returns +- None + +### C Prototype +`void fadeout_music(s16 fadeOutTime);` + +[:arrow_up_small:](#) + +
+ +## [fadeout_level_music](#fadeout_level_music) + +### Description +Fades out the level sequence player + +### Lua Example +`fadeout_level_music(fadeTimer)` + +### Parameters +| Field | Type | +| ----- | ---- | +| fadeTimer | `integer` | + +### Returns +- None + +### C Prototype +`void fadeout_level_music(s16 fadeTimer);` + +[:arrow_up_small:](#) + +
+ +## [play_cutscene_music](#play_cutscene_music) + +### Description +Plays and sets the current music to `seqArgs` + +### Lua Example +`play_cutscene_music(seqArgs)` + +### Parameters +| Field | Type | +| ----- | ---- | +| seqArgs | `integer` | + +### Returns +- None + +### C Prototype +`void play_cutscene_music(u16 seqArgs);` + +[:arrow_up_small:](#) + +
+ +## [play_shell_music](#play_shell_music) + +### Description +Plays shell music + +### Lua Example +`play_shell_music()` ### Parameters - None @@ -4683,7 +4639,7 @@ Stops cap music completely - None ### C Prototype -`void stop_cap_music(void);` +`void play_shell_music(void);` [:arrow_up_small:](#) @@ -4710,76 +4666,93 @@ Stops shell music completely
+## [play_cap_music](#play_cap_music) + +### Description +Plays `seqArgs` as cap music + +### Lua Example +`play_cap_music(seqArgs)` + +### Parameters +| Field | Type | +| ----- | ---- | +| seqArgs | `integer` | + +### Returns +- None + +### C Prototype +`void play_cap_music(u16 seqArgs);` + +[:arrow_up_small:](#) + +
+ +## [fadeout_cap_music](#fadeout_cap_music) + +### Description +Fades out cap music + +### Lua Example +`fadeout_cap_music()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void fadeout_cap_music(void);` + +[:arrow_up_small:](#) + +
+ +## [stop_cap_music](#stop_cap_music) + +### Description +Stops cap music completely + +### Lua Example +`stop_cap_music()` + +### Parameters +- None + +### Returns +- None + +### C Prototype +`void stop_cap_music(void);` + +[:arrow_up_small:](#) + +
+ --- # functions from spawn_sound.h
-## [calc_dist_to_volume_range_1](#calc_dist_to_volume_range_1) - -### Description -Unused vanilla function, calculates a volume based on `distance`. If `distance` is less than 500 then 127, if `distance` is greater than 1500 then 0, if `distance` is between 500 and 1500 then it ranges linearly from 60 to 124. What an even more strange and confusing function +## [exec_anim_sound_state](#exec_anim_sound_state) ### Lua Example -`local integerValue = calc_dist_to_volume_range_1(distance)` +`exec_anim_sound_state(soundStates, maxSoundStates)` ### Parameters | Field | Type | | ----- | ---- | -| distance | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 calc_dist_to_volume_range_1(f32 distance);` - -[:arrow_up_small:](#) - -
- -## [calc_dist_to_volume_range_2](#calc_dist_to_volume_range_2) - -### Description -Unused vanilla function, calculates a volume based on `distance`. If `distance` is less than 1300 then 127, if `distance` is greater than 2300 then 0, if `distance` is between 1300 and 2300 then it ranges linearly from 60 to 127. What a strange and confusing function - -### Lua Example -`local integerValue = calc_dist_to_volume_range_2(distance)` - -### Parameters -| Field | Type | -| ----- | ---- | -| distance | `number` | - -### Returns -- `integer` - -### C Prototype -`s32 calc_dist_to_volume_range_2(f32 distance);` - -[:arrow_up_small:](#) - -
- -## [create_sound_spawner](#create_sound_spawner) - -### Description -Create a sound spawner for objects that need a sound play once. (Breakable walls, King Bobomb exploding, etc) - -### Lua Example -`create_sound_spawner(soundMagic)` - -### Parameters -| Field | Type | -| ----- | ---- | -| soundMagic | `integer` | +| soundStates | [SoundState](structs.md#SoundState) | +| maxSoundStates | `integer` | ### Returns - None ### C Prototype -`void create_sound_spawner(s32 soundMagic);` +`void exec_anim_sound_state(struct SoundState *soundStates, u16 maxSoundStates);` [:arrow_up_small:](#) @@ -4831,22 +4804,70 @@ Plays a sound if the current object is visible and queues rumble for specific so
-## [exec_anim_sound_state](#exec_anim_sound_state) +## [create_sound_spawner](#create_sound_spawner) + +### Description +Create a sound spawner for objects that need a sound play once. (Breakable walls, King Bobomb exploding, etc) ### Lua Example -`exec_anim_sound_state(soundStates, maxSoundStates)` +`create_sound_spawner(soundMagic)` ### Parameters | Field | Type | | ----- | ---- | -| soundStates | [SoundState](structs.md#SoundState) | -| maxSoundStates | `integer` | +| soundMagic | `integer` | ### Returns - None ### C Prototype -`void exec_anim_sound_state(struct SoundState *soundStates, u16 maxSoundStates);` +`void create_sound_spawner(s32 soundMagic);` + +[:arrow_up_small:](#) + +
+ +## [calc_dist_to_volume_range_1](#calc_dist_to_volume_range_1) + +### Description +Unused vanilla function, calculates a volume based on `distance`. If `distance` is less than 500 then 127, if `distance` is greater than 1500 then 0, if `distance` is between 500 and 1500 then it ranges linearly from 60 to 124. What an even more strange and confusing function + +### Lua Example +`local integerValue = calc_dist_to_volume_range_1(distance)` + +### Parameters +| Field | Type | +| ----- | ---- | +| distance | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 calc_dist_to_volume_range_1(f32 distance);` + +[:arrow_up_small:](#) + +
+ +## [calc_dist_to_volume_range_2](#calc_dist_to_volume_range_2) + +### Description +Unused vanilla function, calculates a volume based on `distance`. If `distance` is less than 1300 then 127, if `distance` is greater than 2300 then 0, if `distance` is between 1300 and 2300 then it ranges linearly from 60 to 127. What a strange and confusing function + +### Lua Example +`local integerValue = calc_dist_to_volume_range_2(distance)` + +### Parameters +| Field | Type | +| ----- | ---- | +| distance | `number` | + +### Returns +- `integer` + +### C Prototype +`s32 calc_dist_to_volume_range_2(f32 distance);` [:arrow_up_small:](#) @@ -4858,6 +4879,29 @@ Plays a sound if the current object is visible and queues rumble for specific so
+## [find_wall_collisions](#find_wall_collisions) + +### Description +Detects wall collisions at a given position and adjusts the position based on the walls found. Returns the number of wall collisions detected + +### Lua Example +`local integerValue = find_wall_collisions(colData)` + +### Parameters +| Field | Type | +| ----- | ---- | +| colData | [WallCollisionData](structs.md#WallCollisionData) | + +### Returns +- `integer` + +### C Prototype +`s32 find_wall_collisions(struct WallCollisionData *colData);` + +[:arrow_up_small:](#) + +
+ ## [find_ceil_height](#find_ceil_height) ### Description @@ -4908,53 +4952,6 @@ Finds the height of the highest floor below a given position (x, y, z). If no fl
-## [find_poison_gas_level](#find_poison_gas_level) - -### Description -Finds the height of the poison gas at a given position (x, z), if the position is within a gas region. If no gas is found, returns the default height of `gLevelValues.floorLowerLimit`(-11000 by default) - -### Lua Example -`local numberValue = find_poison_gas_level(x, z)` - -### Parameters -| Field | Type | -| ----- | ---- | -| x | `number` | -| z | `number` | - -### Returns -- `number` - -### C Prototype -`f32 find_poison_gas_level(f32 x, f32 z);` - -[:arrow_up_small:](#) - -
- -## [find_wall_collisions](#find_wall_collisions) - -### Description -Detects wall collisions at a given position and adjusts the position based on the walls found. Returns the number of wall collisions detected - -### Lua Example -`local integerValue = find_wall_collisions(colData)` - -### Parameters -| Field | Type | -| ----- | ---- | -| colData | [WallCollisionData](structs.md#WallCollisionData) | - -### Returns -- `integer` - -### C Prototype -`s32 find_wall_collisions(struct WallCollisionData *colData);` - -[:arrow_up_small:](#) - -
- ## [find_water_level](#find_water_level) ### Description @@ -4979,6 +4976,30 @@ Finds the height of water at a given position (x, z), if the position is within
+## [find_poison_gas_level](#find_poison_gas_level) + +### Description +Finds the height of the poison gas at a given position (x, z), if the position is within a gas region. If no gas is found, returns the default height of `gLevelValues.floorLowerLimit`(-11000 by default) + +### Lua Example +`local numberValue = find_poison_gas_level(x, z)` + +### Parameters +| Field | Type | +| ----- | ---- | +| x | `number` | +| z | `number` | + +### Returns +- `number` + +### C Prototype +`f32 find_poison_gas_level(f32 x, f32 z);` + +[:arrow_up_small:](#) + +
+ ## [set_find_wall_direction](#set_find_wall_direction) ### Description diff --git a/docs/lua/functions.md b/docs/lua/functions.md index bd3bf4392..1fa893c41 100644 --- a/docs/lua/functions.md +++ b/docs/lua/functions.md @@ -39,704 +39,704 @@
- behavior_actions.h + - [spawn_mist_particles_variable](functions-2.md#spawn_mist_particles_variable) + - [bhv_spawn_star_no_level_exit](functions-2.md#bhv_spawn_star_no_level_exit) + - [spawn_triangle_break_particles](functions-2.md#spawn_triangle_break_particles) + - [spawn_mist_from_global](functions-2.md#spawn_mist_from_global) + - [clear_particle_flags](functions-2.md#clear_particle_flags) + - [spawn_wind_particles](functions-2.md#spawn_wind_particles) + - [check_if_moving_over_floor](functions-2.md#check_if_moving_over_floor) - [arc_to_goal_pos](functions-2.md#arc_to_goal_pos) - - [bhv_1up_common_init](functions-2.md#bhv_1up_common_init) - - [bhv_1up_hidden_in_pole_loop](functions-2.md#bhv_1up_hidden_in_pole_loop) - - [bhv_1up_hidden_in_pole_spawner_loop](functions-2.md#bhv_1up_hidden_in_pole_spawner_loop) - - [bhv_1up_hidden_in_pole_trigger_loop](functions-2.md#bhv_1up_hidden_in_pole_trigger_loop) - - [bhv_1up_hidden_loop](functions-2.md#bhv_1up_hidden_loop) - - [bhv_1up_hidden_trigger_loop](functions-2.md#bhv_1up_hidden_trigger_loop) - - [bhv_1up_init](functions-2.md#bhv_1up_init) - - [bhv_1up_jump_on_approach_loop](functions-2.md#bhv_1up_jump_on_approach_loop) - - [bhv_1up_loop](functions-2.md#bhv_1up_loop) - - [bhv_1up_running_away_loop](functions-2.md#bhv_1up_running_away_loop) - - [bhv_1up_sliding_loop](functions-2.md#bhv_1up_sliding_loop) - - [bhv_1up_trigger_init](functions-2.md#bhv_1up_trigger_init) - - [bhv_1up_walking_loop](functions-2.md#bhv_1up_walking_loop) - - [bhv_act_selector_init](functions-2.md#bhv_act_selector_init) - - [bhv_act_selector_loop](functions-2.md#bhv_act_selector_loop) - - [bhv_act_selector_star_type_loop](functions-2.md#bhv_act_selector_star_type_loop) - - [bhv_activated_back_and_forth_platform_init](functions-2.md#bhv_activated_back_and_forth_platform_init) - - [bhv_activated_back_and_forth_platform_update](functions-2.md#bhv_activated_back_and_forth_platform_update) - - [bhv_alpha_boo_key_loop](functions-2.md#bhv_alpha_boo_key_loop) - - [bhv_ambient_light_update](functions-2.md#bhv_ambient_light_update) - - [bhv_ambient_sounds_init](functions-2.md#bhv_ambient_sounds_init) - - [bhv_animated_texture_loop](functions-2.md#bhv_animated_texture_loop) - - [bhv_animates_on_floor_switch_press_init](functions-2.md#bhv_animates_on_floor_switch_press_init) - - [bhv_animates_on_floor_switch_press_loop](functions-2.md#bhv_animates_on_floor_switch_press_loop) - - [bhv_arrow_lift_loop](functions-2.md#bhv_arrow_lift_loop) - - [bhv_bbh_tilting_trap_platform_loop](functions-2.md#bhv_bbh_tilting_trap_platform_loop) - - [bhv_beta_boo_key_loop](functions-2.md#bhv_beta_boo_key_loop) - - [bhv_beta_bowser_anchor_loop](functions-2.md#bhv_beta_bowser_anchor_loop) + - [vec3f_copy_2](functions-2.md#vec3f_copy_2) + - [tox_box_move](functions-2.md#tox_box_move) + - [play_penguin_walking_sound](functions-2.md#play_penguin_walking_sound) + - [update_angle_from_move_flags](functions-2.md#update_angle_from_move_flags) + - [cur_obj_spawn_strong_wind_particles](functions-2.md#cur_obj_spawn_strong_wind_particles) + - [bhv_star_door_loop_2](functions-2.md#bhv_star_door_loop_2) + - [bhv_cap_switch_loop](functions-2.md#bhv_cap_switch_loop) + - [bhv_tiny_star_particles_init](functions-2.md#bhv_tiny_star_particles_init) + - [bhv_grindel_thwomp_loop](functions-2.md#bhv_grindel_thwomp_loop) + - [bhv_koopa_shell_underwater_loop](functions-2.md#bhv_koopa_shell_underwater_loop) + - [bhv_door_init](functions-2.md#bhv_door_init) + - [bhv_door_loop](functions-2.md#bhv_door_loop) + - [bhv_star_door_loop](functions-2.md#bhv_star_door_loop) + - [bhv_mr_i_loop](functions-2.md#bhv_mr_i_loop) + - [bhv_mr_i_body_loop](functions-2.md#bhv_mr_i_body_loop) + - [bhv_mr_i_particle_loop](functions-2.md#bhv_mr_i_particle_loop) + - [bhv_piranha_particle_loop](functions-2.md#bhv_piranha_particle_loop) + - [bhv_giant_pole_loop](functions-2.md#bhv_giant_pole_loop) + - [bhv_pole_init](functions-2.md#bhv_pole_init) + - [bhv_pole_base_loop](functions-2.md#bhv_pole_base_loop) + - [bhv_thi_huge_island_top_loop](functions-2.md#bhv_thi_huge_island_top_loop) + - [bhv_thi_tiny_island_top_loop](functions-2.md#bhv_thi_tiny_island_top_loop) + - [bhv_king_bobomb_loop](functions-2.md#bhv_king_bobomb_loop) + - [bhv_bobomb_anchor_mario_loop](functions-2.md#bhv_bobomb_anchor_mario_loop) - [bhv_beta_chest_bottom_init](functions-2.md#bhv_beta_chest_bottom_init) - [bhv_beta_chest_bottom_loop](functions-2.md#bhv_beta_chest_bottom_loop) - [bhv_beta_chest_lid_loop](functions-2.md#bhv_beta_chest_lid_loop) - - [bhv_beta_fish_splash_spawner_loop](functions-2.md#bhv_beta_fish_splash_spawner_loop) - - [bhv_beta_holdable_object_init](functions-2.md#bhv_beta_holdable_object_init) - - [bhv_beta_holdable_object_loop](functions-2.md#bhv_beta_holdable_object_loop) - - [bhv_beta_moving_flames_loop](functions-2.md#bhv_beta_moving_flames_loop) - - [bhv_beta_moving_flames_spawn_loop](functions-2.md#bhv_beta_moving_flames_spawn_loop) - - [bhv_beta_trampoline_spring_loop](functions-2.md#bhv_beta_trampoline_spring_loop) - - [bhv_beta_trampoline_top_loop](functions-2.md#bhv_beta_trampoline_top_loop) - - [bhv_big_boo_loop](functions-2.md#bhv_big_boo_loop) - - [bhv_big_boulder_generator_loop](functions-2.md#bhv_big_boulder_generator_loop) - - [bhv_big_boulder_init](functions-2.md#bhv_big_boulder_init) - - [bhv_big_boulder_loop](functions-2.md#bhv_big_boulder_loop) - - [bhv_big_bully_init](functions-2.md#bhv_big_bully_init) - - [bhv_big_bully_with_minions_init](functions-2.md#bhv_big_bully_with_minions_init) - - [bhv_big_bully_with_minions_loop](functions-2.md#bhv_big_bully_with_minions_loop) - - [bhv_bird_update](functions-2.md#bhv_bird_update) - - [bhv_birds_sound_loop](functions-2.md#bhv_birds_sound_loop) - - [bhv_bitfs_sinking_cage_platform_loop](functions-2.md#bhv_bitfs_sinking_cage_platform_loop) - - [bhv_bitfs_sinking_platform_loop](functions-2.md#bhv_bitfs_sinking_platform_loop) - - [bhv_black_smoke_bowser_loop](functions-2.md#bhv_black_smoke_bowser_loop) - - [bhv_black_smoke_mario_loop](functions-2.md#bhv_black_smoke_mario_loop) - - [bhv_black_smoke_upward_loop](functions-2.md#bhv_black_smoke_upward_loop) - - [bhv_blue_bowser_flame_init](functions-2.md#bhv_blue_bowser_flame_init) - - [bhv_blue_bowser_flame_loop](functions-2.md#bhv_blue_bowser_flame_loop) - - [bhv_blue_coin_jumping_loop](functions-2.md#bhv_blue_coin_jumping_loop) - - [bhv_blue_coin_number_loop](functions-2.md#bhv_blue_coin_number_loop) - - [bhv_blue_coin_sliding_jumping_init](functions-2.md#bhv_blue_coin_sliding_jumping_init) - - [bhv_blue_coin_sliding_loop](functions-2.md#bhv_blue_coin_sliding_loop) - - [bhv_blue_coin_switch_init](functions-2.md#bhv_blue_coin_switch_init) - - [bhv_blue_coin_switch_loop](functions-2.md#bhv_blue_coin_switch_loop) - - [bhv_blue_fish_movement_loop](functions-2.md#bhv_blue_fish_movement_loop) - - [bhv_blue_flames_group_loop](functions-2.md#bhv_blue_flames_group_loop) - - [bhv_bob_pit_bowling_ball_init](functions-2.md#bhv_bob_pit_bowling_ball_init) - - [bhv_bob_pit_bowling_ball_loop](functions-2.md#bhv_bob_pit_bowling_ball_loop) - - [bhv_bobomb_anchor_mario_loop](functions-2.md#bhv_bobomb_anchor_mario_loop) - - [bhv_bobomb_buddy_init](functions-2.md#bhv_bobomb_buddy_init) - - [bhv_bobomb_buddy_loop](functions-2.md#bhv_bobomb_buddy_loop) - - [bhv_bobomb_bully_death_smoke_init](functions-2.md#bhv_bobomb_bully_death_smoke_init) - - [bhv_bobomb_explosion_bubble_init](functions-2.md#bhv_bobomb_explosion_bubble_init) - - [bhv_bobomb_explosion_bubble_loop](functions-2.md#bhv_bobomb_explosion_bubble_loop) - - [bhv_bobomb_fuse_smoke_init](functions-2.md#bhv_bobomb_fuse_smoke_init) - - [bhv_bobomb_init](functions-2.md#bhv_bobomb_init) - - [bhv_bobomb_loop](functions-2.md#bhv_bobomb_loop) - - [bhv_boo_boss_spawned_bridge_loop](functions-2.md#bhv_boo_boss_spawned_bridge_loop) - - [bhv_boo_cage_init](functions-2.md#bhv_boo_cage_init) - - [bhv_boo_cage_loop](functions-2.md#bhv_boo_cage_loop) - - [bhv_boo_in_castle_loop](functions-2.md#bhv_boo_in_castle_loop) - - [bhv_boo_init](functions-2.md#bhv_boo_init) - - [bhv_boo_loop](functions-2.md#bhv_boo_loop) - - [bhv_boo_with_cage_init](functions-2.md#bhv_boo_with_cage_init) - - [bhv_boo_with_cage_loop](functions-2.md#bhv_boo_with_cage_loop) - - [bhv_book_switch_loop](functions-2.md#bhv_book_switch_loop) - - [bhv_bookend_spawn_loop](functions-2.md#bhv_bookend_spawn_loop) - - [bhv_bouncing_fireball_flame_loop](functions-2.md#bhv_bouncing_fireball_flame_loop) - - [bhv_bouncing_fireball_loop](functions-2.md#bhv_bouncing_fireball_loop) - - [bhv_bowling_ball_init](functions-2.md#bhv_bowling_ball_init) - - [bhv_bowling_ball_loop](functions-2.md#bhv_bowling_ball_loop) - - [bhv_bowser_body_anchor_init](functions-2.md#bhv_bowser_body_anchor_init) - - [bhv_bowser_body_anchor_loop](functions-2.md#bhv_bowser_body_anchor_loop) - - [bhv_bowser_bomb_explosion_loop](functions-2.md#bhv_bowser_bomb_explosion_loop) - - [bhv_bowser_bomb_loop](functions-2.md#bhv_bowser_bomb_loop) - - [bhv_bowser_bomb_smoke_loop](functions-2.md#bhv_bowser_bomb_smoke_loop) - - [bhv_bowser_course_red_coin_star_loop](functions-2.md#bhv_bowser_course_red_coin_star_loop) - - [bhv_bowser_flame_spawn_loop](functions-2.md#bhv_bowser_flame_spawn_loop) - - [bhv_bowser_init](functions-2.md#bhv_bowser_init) - - [bhv_bowser_key_course_exit_loop](functions-2.md#bhv_bowser_key_course_exit_loop) - - [bhv_bowser_key_init](functions-2.md#bhv_bowser_key_init) - - [bhv_bowser_key_loop](functions-2.md#bhv_bowser_key_loop) - - [bhv_bowser_key_unlock_door_loop](functions-2.md#bhv_bowser_key_unlock_door_loop) - - [bhv_bowser_loop](functions-2.md#bhv_bowser_loop) - - [bhv_bowser_shock_wave_loop](functions-2.md#bhv_bowser_shock_wave_loop) - - [bhv_bowser_tail_anchor_init](functions-2.md#bhv_bowser_tail_anchor_init) - - [bhv_bowser_tail_anchor_loop](functions-2.md#bhv_bowser_tail_anchor_loop) - - [bhv_bowsers_sub_loop](functions-2.md#bhv_bowsers_sub_loop) - - [bhv_breakable_box_loop](functions-2.md#bhv_breakable_box_loop) - - [bhv_breakable_box_small_init](functions-2.md#bhv_breakable_box_small_init) - - [bhv_breakable_box_small_loop](functions-2.md#bhv_breakable_box_small_loop) - - [bhv_bub_loop](functions-2.md#bhv_bub_loop) - - [bhv_bub_spawner_loop](functions-2.md#bhv_bub_spawner_loop) - - [bhv_bubba_loop](functions-2.md#bhv_bubba_loop) - - [bhv_bubble_cannon_barrel_loop](functions-2.md#bhv_bubble_cannon_barrel_loop) + - [bhv_bubble_wave_init](functions-2.md#bhv_bubble_wave_init) - [bhv_bubble_maybe_loop](functions-2.md#bhv_bubble_maybe_loop) - [bhv_bubble_player_loop](functions-2.md#bhv_bubble_player_loop) - - [bhv_bubble_splash_init](functions-2.md#bhv_bubble_splash_init) - - [bhv_bubble_wave_init](functions-2.md#bhv_bubble_wave_init) + - [bhv_water_air_bubble_init](functions-2.md#bhv_water_air_bubble_init) + - [bhv_water_air_bubble_loop](functions-2.md#bhv_water_air_bubble_loop) + - [bhv_particle_init](functions-2.md#bhv_particle_init) + - [bhv_particle_loop](functions-2.md#bhv_particle_loop) + - [bhv_water_waves_init](functions-2.md#bhv_water_waves_init) + - [bhv_small_bubbles_loop](functions-2.md#bhv_small_bubbles_loop) + - [bhv_fish_group_loop](functions-2.md#bhv_fish_group_loop) + - [bhv_cannon_base_loop](functions-2.md#bhv_cannon_base_loop) + - [bhv_cannon_barrel_loop](functions-2.md#bhv_cannon_barrel_loop) + - [bhv_cannon_base_unused_loop](functions-2.md#bhv_cannon_base_unused_loop) + - [common_anchor_mario_behavior](functions-2.md#common_anchor_mario_behavior) + - [bhv_chuckya_loop](functions-2.md#bhv_chuckya_loop) + - [bhv_chuckya_anchor_mario_loop](functions-2.md#bhv_chuckya_anchor_mario_loop) + - [bhv_rotating_platform_loop](functions-2.md#bhv_rotating_platform_loop) + - [bhv_wf_breakable_wall_loop](functions-2.md#bhv_wf_breakable_wall_loop) + - [bhv_kickable_board_loop](functions-2.md#bhv_kickable_board_loop) + - [bhv_tower_door_loop](functions-2.md#bhv_tower_door_loop) + - [bhv_wf_rotating_wooden_platform_init](functions-2.md#bhv_wf_rotating_wooden_platform_init) + - [bhv_wf_rotating_wooden_platform_loop](functions-2.md#bhv_wf_rotating_wooden_platform_loop) + - [bhv_fading_warp_loop](functions-2.md#bhv_fading_warp_loop) + - [bhv_warp_loop](functions-2.md#bhv_warp_loop) + - [bhv_white_puff_exploding_loop](functions-2.md#bhv_white_puff_exploding_loop) + - [bhv_spawned_star_init](functions-2.md#bhv_spawned_star_init) + - [bhv_spawned_star_loop](functions-2.md#bhv_spawned_star_loop) + - [bhv_coin_init](functions-2.md#bhv_coin_init) + - [bhv_coin_loop](functions-2.md#bhv_coin_loop) + - [bhv_coin_inside_boo_loop](functions-2.md#bhv_coin_inside_boo_loop) + - [bhv_coin_formation_init](functions-2.md#bhv_coin_formation_init) + - [bhv_coin_formation_spawn_loop](functions-2.md#bhv_coin_formation_spawn_loop) + - [bhv_coin_formation_loop](functions-2.md#bhv_coin_formation_loop) + - [bhv_temp_coin_loop](functions-2.md#bhv_temp_coin_loop) + - [bhv_coin_sparkles_loop](functions-2.md#bhv_coin_sparkles_loop) + - [bhv_golden_coin_sparkles_loop](functions-2.md#bhv_golden_coin_sparkles_loop) + - [bhv_wall_tiny_star_particle_loop](functions-2.md#bhv_wall_tiny_star_particle_loop) + - [bhv_pound_tiny_star_particle_loop](functions-2.md#bhv_pound_tiny_star_particle_loop) + - [bhv_pound_tiny_star_particle_init](functions-2.md#bhv_pound_tiny_star_particle_init) + - [bhv_punch_tiny_triangle_loop](functions-2.md#bhv_punch_tiny_triangle_loop) + - [bhv_punch_tiny_triangle_init](functions-2.md#bhv_punch_tiny_triangle_init) + - [bhv_tumbling_bridge_platform_loop](functions-2.md#bhv_tumbling_bridge_platform_loop) + - [bhv_tumbling_bridge_loop](functions-2.md#bhv_tumbling_bridge_loop) + - [bhv_elevator_init](functions-2.md#bhv_elevator_init) + - [bhv_elevator_loop](functions-2.md#bhv_elevator_loop) + - [bhv_water_mist_loop](functions-2.md#bhv_water_mist_loop) + - [bhv_water_mist_spawn_loop](functions-2.md#bhv_water_mist_spawn_loop) + - [bhv_water_mist_2_loop](functions-2.md#bhv_water_mist_2_loop) + - [bhv_pound_white_puffs_init](functions-2.md#bhv_pound_white_puffs_init) + - [bhv_ground_sand_init](functions-2.md#bhv_ground_sand_init) + - [bhv_ground_snow_init](functions-2.md#bhv_ground_snow_init) + - [bhv_wind_loop](functions-2.md#bhv_wind_loop) + - [bhv_unused_particle_spawn_loop](functions-2.md#bhv_unused_particle_spawn_loop) + - [bhv_ukiki_cage_star_loop](functions-2.md#bhv_ukiki_cage_star_loop) + - [bhv_ukiki_cage_loop](functions-2.md#bhv_ukiki_cage_loop) + - [bhv_bitfs_sinking_platform_loop](functions-2.md#bhv_bitfs_sinking_platform_loop) + - [bhv_bitfs_sinking_cage_platform_loop](functions-2.md#bhv_bitfs_sinking_cage_platform_loop) + - [bhv_ddd_moving_pole_loop](functions-2.md#bhv_ddd_moving_pole_loop) + - [bhv_platform_normals_init](functions-2.md#bhv_platform_normals_init) + - [bhv_tilting_inverted_pyramid_loop](functions-2.md#bhv_tilting_inverted_pyramid_loop) + - [bhv_squishable_platform_loop](functions-2.md#bhv_squishable_platform_loop) + - [bhv_beta_moving_flames_spawn_loop](functions-2.md#bhv_beta_moving_flames_spawn_loop) + - [bhv_beta_moving_flames_loop](functions-2.md#bhv_beta_moving_flames_loop) + - [bhv_rr_rotating_bridge_platform_loop](functions-2.md#bhv_rr_rotating_bridge_platform_loop) + - [bhv_flamethrower_loop](functions-2.md#bhv_flamethrower_loop) + - [bhv_flamethrower_flame_loop](functions-2.md#bhv_flamethrower_flame_loop) + - [bhv_bouncing_fireball_loop](functions-2.md#bhv_bouncing_fireball_loop) + - [bhv_bouncing_fireball_flame_loop](functions-2.md#bhv_bouncing_fireball_flame_loop) + - [bhv_bowser_shock_wave_loop](functions-2.md#bhv_bowser_shock_wave_loop) + - [bhv_flame_mario_loop](functions-2.md#bhv_flame_mario_loop) + - [bhv_black_smoke_mario_loop](functions-2.md#bhv_black_smoke_mario_loop) + - [bhv_black_smoke_bowser_loop](functions-2.md#bhv_black_smoke_bowser_loop) + - [bhv_black_smoke_upward_loop](functions-2.md#bhv_black_smoke_upward_loop) + - [bhv_beta_fish_splash_spawner_loop](functions-2.md#bhv_beta_fish_splash_spawner_loop) + - [bhv_spindrift_loop](functions-2.md#bhv_spindrift_loop) + - [bhv_tower_platform_group_init](functions-2.md#bhv_tower_platform_group_init) + - [bhv_tower_platform_group_loop](functions-2.md#bhv_tower_platform_group_loop) + - [bhv_wf_sliding_tower_platform_loop](functions-2.md#bhv_wf_sliding_tower_platform_loop) + - [bhv_wf_elevator_tower_platform_loop](functions-2.md#bhv_wf_elevator_tower_platform_loop) + - [bhv_wf_solid_tower_platform_loop](functions-2.md#bhv_wf_solid_tower_platform_loop) + - [bhv_snow_leaf_particle_spawn_init](functions-2.md#bhv_snow_leaf_particle_spawn_init) + - [bhv_tree_snow_or_leaf_loop](functions-2.md#bhv_tree_snow_or_leaf_loop) + - [bhv_piranha_plant_bubble_loop](functions-2.md#bhv_piranha_plant_bubble_loop) + - [bhv_piranha_plant_waking_bubbles_loop](functions-2.md#bhv_piranha_plant_waking_bubbles_loop) + - [bhv_purple_switch_loop](functions-2.md#bhv_purple_switch_loop) + - [bhv_hidden_object_loop](functions-2.md#bhv_hidden_object_loop) + - [bhv_breakable_box_loop](functions-2.md#bhv_breakable_box_loop) + - [bhv_pushable_loop](functions-2.md#bhv_pushable_loop) + - [bhv_small_water_wave_loop](functions-2.md#bhv_small_water_wave_loop) + - [bhv_yellow_coin_init](functions-2.md#bhv_yellow_coin_init) + - [bhv_yellow_coin_loop](functions-2.md#bhv_yellow_coin_loop) + - [bhv_squarish_path_moving_loop](functions-2.md#bhv_squarish_path_moving_loop) + - [bhv_squarish_path_parent_init](functions-2.md#bhv_squarish_path_parent_init) + - [bhv_squarish_path_parent_loop](functions-2.md#bhv_squarish_path_parent_loop) + - [bhv_heave_ho_loop](functions-2.md#bhv_heave_ho_loop) + - [bhv_heave_ho_throw_mario_loop](functions-2.md#bhv_heave_ho_throw_mario_loop) + - [bhv_ccm_touched_star_spawn_loop](functions-2.md#bhv_ccm_touched_star_spawn_loop) + - [bhv_unused_poundable_platform](functions-2.md#bhv_unused_poundable_platform) + - [bhv_beta_trampoline_top_loop](functions-2.md#bhv_beta_trampoline_top_loop) + - [bhv_beta_trampoline_spring_loop](functions-2.md#bhv_beta_trampoline_spring_loop) + - [bhv_jumping_box_loop](functions-2.md#bhv_jumping_box_loop) + - [bhv_boo_cage_init](functions-2.md#bhv_boo_cage_init) + - [bhv_boo_cage_loop](functions-2.md#bhv_boo_cage_loop) + - [bhv_bowser_key_init](functions-2.md#bhv_bowser_key_init) + - [bhv_bowser_key_loop](functions-2.md#bhv_bowser_key_loop) + - [bhv_grand_star_init](functions-2.md#bhv_grand_star_init) + - [bhv_grand_star_loop](functions-2.md#bhv_grand_star_loop) + - [bhv_beta_boo_key_loop](functions-2.md#bhv_beta_boo_key_loop) + - [bhv_alpha_boo_key_loop](functions-2.md#bhv_alpha_boo_key_loop) - [bhv_bullet_bill_init](functions-2.md#bhv_bullet_bill_init) - [bhv_bullet_bill_loop](functions-2.md#bhv_bullet_bill_loop) - - [bhv_bully_loop](functions-2.md#bhv_bully_loop) - - [bhv_butterfly_init](functions-2.md#bhv_butterfly_init) - - [bhv_butterfly_loop](functions-2.md#bhv_butterfly_loop) - - [bhv_camera_lakitu_init](functions-2.md#bhv_camera_lakitu_init) - - [bhv_camera_lakitu_update](functions-2.md#bhv_camera_lakitu_update) - - [bhv_cannon_barrel_loop](functions-2.md#bhv_cannon_barrel_loop) - - [bhv_cannon_base_loop](functions-2.md#bhv_cannon_base_loop) - - [bhv_cannon_base_unused_loop](functions-2.md#bhv_cannon_base_unused_loop) - - [bhv_cannon_closed_init](functions-2.md#bhv_cannon_closed_init) - - [bhv_cannon_closed_loop](functions-2.md#bhv_cannon_closed_loop) - - [bhv_cap_switch_loop](functions-2.md#bhv_cap_switch_loop) - - [bhv_castle_cannon_grate_init](functions-2.md#bhv_castle_cannon_grate_init) - - [bhv_castle_flag_init](functions-2.md#bhv_castle_flag_init) - - [bhv_castle_floor_trap_init](functions-2.md#bhv_castle_floor_trap_init) - - [bhv_castle_floor_trap_loop](functions-2.md#bhv_castle_floor_trap_loop) - - [bhv_ccm_touched_star_spawn_loop](functions-2.md#bhv_ccm_touched_star_spawn_loop) - - [bhv_celebration_star_init](functions-2.md#bhv_celebration_star_init) - - [bhv_celebration_star_loop](functions-2.md#bhv_celebration_star_loop) - - [bhv_celebration_star_sparkle_loop](functions-2.md#bhv_celebration_star_sparkle_loop) - - [bhv_chain_chomp_chain_part_update](functions-2.md#bhv_chain_chomp_chain_part_update) - - [bhv_chain_chomp_gate_init](functions-2.md#bhv_chain_chomp_gate_init) - - [bhv_chain_chomp_gate_update](functions-2.md#bhv_chain_chomp_gate_update) - - [bhv_chain_chomp_update](functions-2.md#bhv_chain_chomp_update) + - [bhv_white_puff_smoke_init](functions-2.md#bhv_white_puff_smoke_init) + - [bhv_bowser_tail_anchor_init](functions-2.md#bhv_bowser_tail_anchor_init) + - [bhv_bowser_tail_anchor_loop](functions-2.md#bhv_bowser_tail_anchor_loop) + - [bhv_bowser_init](functions-2.md#bhv_bowser_init) + - [bhv_bowser_loop](functions-2.md#bhv_bowser_loop) + - [bhv_bowser_body_anchor_init](functions-2.md#bhv_bowser_body_anchor_init) + - [bhv_bowser_body_anchor_loop](functions-2.md#bhv_bowser_body_anchor_loop) + - [bhv_bowser_flame_spawn_loop](functions-2.md#bhv_bowser_flame_spawn_loop) + - [bhv_tilting_bowser_lava_platform_init](functions-2.md#bhv_tilting_bowser_lava_platform_init) + - [bhv_falling_bowser_platform_loop](functions-2.md#bhv_falling_bowser_platform_loop) + - [bhv_blue_bowser_flame_init](functions-2.md#bhv_blue_bowser_flame_init) + - [bhv_blue_bowser_flame_loop](functions-2.md#bhv_blue_bowser_flame_loop) + - [bhv_flame_floating_landing_init](functions-2.md#bhv_flame_floating_landing_init) + - [bhv_flame_floating_landing_loop](functions-2.md#bhv_flame_floating_landing_loop) + - [bhv_blue_flames_group_loop](functions-2.md#bhv_blue_flames_group_loop) + - [bhv_flame_bouncing_init](functions-2.md#bhv_flame_bouncing_init) + - [bhv_flame_bouncing_loop](functions-2.md#bhv_flame_bouncing_loop) + - [bhv_flame_moving_forward_growing_init](functions-2.md#bhv_flame_moving_forward_growing_init) + - [bhv_flame_moving_forward_growing_loop](functions-2.md#bhv_flame_moving_forward_growing_loop) + - [bhv_flame_bowser_init](functions-2.md#bhv_flame_bowser_init) + - [bhv_flame_bowser_loop](functions-2.md#bhv_flame_bowser_loop) + - [bhv_flame_large_burning_out_init](functions-2.md#bhv_flame_large_burning_out_init) + - [bhv_blue_fish_movement_loop](functions-2.md#bhv_blue_fish_movement_loop) + - [bhv_tank_fish_group_loop](functions-2.md#bhv_tank_fish_group_loop) - [bhv_checkerboard_elevator_group_init](functions-2.md#bhv_checkerboard_elevator_group_init) - [bhv_checkerboard_elevator_group_loop](functions-2.md#bhv_checkerboard_elevator_group_loop) - [bhv_checkerboard_platform_init](functions-2.md#bhv_checkerboard_platform_init) - [bhv_checkerboard_platform_loop](functions-2.md#bhv_checkerboard_platform_loop) - - [bhv_chuckya_anchor_mario_loop](functions-2.md#bhv_chuckya_anchor_mario_loop) - - [bhv_chuckya_loop](functions-2.md#bhv_chuckya_loop) - - [bhv_circling_amp_init](functions-2.md#bhv_circling_amp_init) - - [bhv_circling_amp_loop](functions-2.md#bhv_circling_amp_loop) - - [bhv_clam_loop](functions-2.md#bhv_clam_loop) - - [bhv_cloud_part_update](functions-2.md#bhv_cloud_part_update) - - [bhv_cloud_update](functions-2.md#bhv_cloud_update) - - [bhv_coffin_loop](functions-2.md#bhv_coffin_loop) - - [bhv_coffin_spawner_loop](functions-2.md#bhv_coffin_spawner_loop) - - [bhv_coin_formation_init](functions-2.md#bhv_coin_formation_init) - - [bhv_coin_formation_loop](functions-2.md#bhv_coin_formation_loop) - - [bhv_coin_formation_spawn_loop](functions-2.md#bhv_coin_formation_spawn_loop) - - [bhv_coin_init](functions-2.md#bhv_coin_init) - - [bhv_coin_inside_boo_loop](functions-2.md#bhv_coin_inside_boo_loop) - - [bhv_coin_loop](functions-2.md#bhv_coin_loop) - - [bhv_coin_sparkles_loop](functions-2.md#bhv_coin_sparkles_loop) - - [bhv_collect_star_init](functions-2.md#bhv_collect_star_init) - - [bhv_collect_star_loop](functions-2.md#bhv_collect_star_loop) - - [bhv_controllable_platform_init](functions-2.md#bhv_controllable_platform_init) - - [bhv_controllable_platform_loop](functions-2.md#bhv_controllable_platform_loop) - - [bhv_controllable_platform_sub_loop](functions-2.md#bhv_controllable_platform_sub_loop) - - [bhv_courtyard_boo_triplet_init](functions-2.md#bhv_courtyard_boo_triplet_init) - - [bhv_ddd_moving_pole_loop](functions-2.md#bhv_ddd_moving_pole_loop) - - [bhv_ddd_pole_init](functions-2.md#bhv_ddd_pole_init) - - [bhv_ddd_pole_update](functions-2.md#bhv_ddd_pole_update) - - [bhv_ddd_warp_loop](functions-2.md#bhv_ddd_warp_loop) - - [bhv_decorative_pendulum_init](functions-2.md#bhv_decorative_pendulum_init) - - [bhv_decorative_pendulum_loop](functions-2.md#bhv_decorative_pendulum_loop) - - [bhv_donut_platform_spawner_update](functions-2.md#bhv_donut_platform_spawner_update) - - [bhv_donut_platform_update](functions-2.md#bhv_donut_platform_update) - - [bhv_door_init](functions-2.md#bhv_door_init) - - [bhv_door_loop](functions-2.md#bhv_door_loop) - - [bhv_dorrie_update](functions-2.md#bhv_dorrie_update) - - [bhv_elevator_init](functions-2.md#bhv_elevator_init) - - [bhv_elevator_loop](functions-2.md#bhv_elevator_loop) - - [bhv_end_birds_1_loop](functions-2.md#bhv_end_birds_1_loop) - - [bhv_end_birds_2_loop](functions-2.md#bhv_end_birds_2_loop) - - [bhv_enemy_lakitu_update](functions-2.md#bhv_enemy_lakitu_update) - - [bhv_exclamation_box_init](functions-2.md#bhv_exclamation_box_init) - - [bhv_exclamation_box_loop](functions-2.md#bhv_exclamation_box_loop) - - [bhv_explosion_init](functions-2.md#bhv_explosion_init) - - [bhv_explosion_loop](functions-2.md#bhv_explosion_loop) - - [bhv_eyerok_boss_init](functions-2.md#bhv_eyerok_boss_init) - - [bhv_eyerok_boss_loop](functions-2.md#bhv_eyerok_boss_loop) - - [bhv_eyerok_hand_loop](functions-2.md#bhv_eyerok_hand_loop) - - [bhv_fading_warp_loop](functions-2.md#bhv_fading_warp_loop) - - [bhv_falling_bowser_platform_loop](functions-2.md#bhv_falling_bowser_platform_loop) - - [bhv_falling_pillar_hitbox_loop](functions-2.md#bhv_falling_pillar_hitbox_loop) - - [bhv_falling_pillar_init](functions-2.md#bhv_falling_pillar_init) - - [bhv_falling_pillar_loop](functions-2.md#bhv_falling_pillar_loop) - - [bhv_ferris_wheel_axle_init](functions-2.md#bhv_ferris_wheel_axle_init) - - [bhv_ferris_wheel_platform_init](functions-2.md#bhv_ferris_wheel_platform_init) - - [bhv_ferris_wheel_platform_update](functions-2.md#bhv_ferris_wheel_platform_update) - - [bhv_fire_piranha_plant_init](functions-2.md#bhv_fire_piranha_plant_init) - - [bhv_fire_piranha_plant_update](functions-2.md#bhv_fire_piranha_plant_update) - - [bhv_fire_spitter_update](functions-2.md#bhv_fire_spitter_update) - - [bhv_fish_group_loop](functions-2.md#bhv_fish_group_loop) - - [bhv_fish_loop](functions-2.md#bhv_fish_loop) - - [bhv_fish_spawner_loop](functions-2.md#bhv_fish_spawner_loop) - - [bhv_flame_bouncing_init](functions-2.md#bhv_flame_bouncing_init) - - [bhv_flame_bouncing_loop](functions-2.md#bhv_flame_bouncing_loop) - - [bhv_flame_bowser_init](functions-2.md#bhv_flame_bowser_init) - - [bhv_flame_bowser_loop](functions-2.md#bhv_flame_bowser_loop) - - [bhv_flame_floating_landing_init](functions-2.md#bhv_flame_floating_landing_init) - - [bhv_flame_floating_landing_loop](functions-2.md#bhv_flame_floating_landing_loop) - - [bhv_flame_large_burning_out_init](functions-2.md#bhv_flame_large_burning_out_init) - - [bhv_flame_mario_loop](functions-2.md#bhv_flame_mario_loop) - - [bhv_flame_moving_forward_growing_init](functions-2.md#bhv_flame_moving_forward_growing_init) - - [bhv_flame_moving_forward_growing_loop](functions-2.md#bhv_flame_moving_forward_growing_loop) - - [bhv_flamethrower_flame_loop](functions-2.md#bhv_flamethrower_flame_loop) - - [bhv_flamethrower_loop](functions-2.md#bhv_flamethrower_loop) - - [bhv_floating_platform_loop](functions-2.md#bhv_floating_platform_loop) - - [bhv_floor_trap_in_castle_loop](functions-2.md#bhv_floor_trap_in_castle_loop) - - [bhv_fly_guy_flame_loop](functions-2.md#bhv_fly_guy_flame_loop) - - [bhv_fly_guy_update](functions-2.md#bhv_fly_guy_update) - - [bhv_flying_bookend_loop](functions-2.md#bhv_flying_bookend_loop) - - [bhv_free_bowling_ball_init](functions-2.md#bhv_free_bowling_ball_init) - - [bhv_free_bowling_ball_loop](functions-2.md#bhv_free_bowling_ball_loop) - - [bhv_generic_bowling_ball_spawner_init](functions-2.md#bhv_generic_bowling_ball_spawner_init) - - [bhv_generic_bowling_ball_spawner_loop](functions-2.md#bhv_generic_bowling_ball_spawner_loop) - - [bhv_giant_pole_loop](functions-2.md#bhv_giant_pole_loop) - - [bhv_golden_coin_sparkles_loop](functions-2.md#bhv_golden_coin_sparkles_loop) - - [bhv_goomba_init](functions-2.md#bhv_goomba_init) - - [bhv_goomba_triplet_spawner_update](functions-2.md#bhv_goomba_triplet_spawner_update) - - [bhv_goomba_update](functions-2.md#bhv_goomba_update) - - [bhv_grand_star_init](functions-2.md#bhv_grand_star_init) - - [bhv_grand_star_loop](functions-2.md#bhv_grand_star_loop) - - [bhv_grindel_thwomp_loop](functions-2.md#bhv_grindel_thwomp_loop) - - [bhv_ground_sand_init](functions-2.md#bhv_ground_sand_init) - - [bhv_ground_snow_init](functions-2.md#bhv_ground_snow_init) - - [bhv_haunted_bookshelf_loop](functions-2.md#bhv_haunted_bookshelf_loop) - - [bhv_haunted_bookshelf_manager_loop](functions-2.md#bhv_haunted_bookshelf_manager_loop) - - [bhv_haunted_chair_init](functions-2.md#bhv_haunted_chair_init) - - [bhv_haunted_chair_loop](functions-2.md#bhv_haunted_chair_loop) - - [bhv_heave_ho_loop](functions-2.md#bhv_heave_ho_loop) - - [bhv_heave_ho_throw_mario_loop](functions-2.md#bhv_heave_ho_throw_mario_loop) - - [bhv_hidden_blue_coin_loop](functions-2.md#bhv_hidden_blue_coin_loop) - - [bhv_hidden_object_loop](functions-2.md#bhv_hidden_object_loop) - - [bhv_hidden_red_coin_star_init](functions-2.md#bhv_hidden_red_coin_star_init) - - [bhv_hidden_red_coin_star_loop](functions-2.md#bhv_hidden_red_coin_star_loop) - - [bhv_hidden_star_init](functions-2.md#bhv_hidden_star_init) - - [bhv_hidden_star_loop](functions-2.md#bhv_hidden_star_loop) - - [bhv_hidden_star_trigger_loop](functions-2.md#bhv_hidden_star_trigger_loop) - - [bhv_homing_amp_init](functions-2.md#bhv_homing_amp_init) - - [bhv_homing_amp_loop](functions-2.md#bhv_homing_amp_loop) - - [bhv_hoot_init](functions-2.md#bhv_hoot_init) - - [bhv_hoot_loop](functions-2.md#bhv_hoot_loop) - - [bhv_horizontal_grindel_init](functions-2.md#bhv_horizontal_grindel_init) - - [bhv_horizontal_grindel_update](functions-2.md#bhv_horizontal_grindel_update) - - [bhv_idle_water_wave_loop](functions-2.md#bhv_idle_water_wave_loop) - - [bhv_init_changing_water_level_loop](functions-2.md#bhv_init_changing_water_level_loop) - - [bhv_intro_lakitu_loop](functions-2.md#bhv_intro_lakitu_loop) - - [bhv_intro_peach_loop](functions-2.md#bhv_intro_peach_loop) - - [bhv_intro_scene_loop](functions-2.md#bhv_intro_scene_loop) + - [bhv_bowser_key_unlock_door_loop](functions-2.md#bhv_bowser_key_unlock_door_loop) + - [bhv_bowser_key_course_exit_loop](functions-2.md#bhv_bowser_key_course_exit_loop) - [bhv_invisible_objects_under_bridge_init](functions-2.md#bhv_invisible_objects_under_bridge_init) - [bhv_invisible_objects_under_bridge_loop](functions-2.md#bhv_invisible_objects_under_bridge_loop) - - [bhv_jet_stream_loop](functions-2.md#bhv_jet_stream_loop) - - [bhv_jet_stream_ring_spawner_loop](functions-2.md#bhv_jet_stream_ring_spawner_loop) - - [bhv_jet_stream_water_ring_init](functions-2.md#bhv_jet_stream_water_ring_init) - - [bhv_jet_stream_water_ring_loop](functions-2.md#bhv_jet_stream_water_ring_loop) - - [bhv_jrb_floating_box_loop](functions-2.md#bhv_jrb_floating_box_loop) - - [bhv_jrb_sliding_box_loop](functions-2.md#bhv_jrb_sliding_box_loop) - - [bhv_jumping_box_loop](functions-2.md#bhv_jumping_box_loop) - - [bhv_kickable_board_loop](functions-2.md#bhv_kickable_board_loop) - - [bhv_king_bobomb_loop](functions-2.md#bhv_king_bobomb_loop) - - [bhv_klepto_init](functions-2.md#bhv_klepto_init) - - [bhv_klepto_update](functions-2.md#bhv_klepto_update) - - [bhv_koopa_init](functions-2.md#bhv_koopa_init) - - [bhv_koopa_race_endpoint_update](functions-2.md#bhv_koopa_race_endpoint_update) - - [bhv_koopa_shell_flame_loop](functions-2.md#bhv_koopa_shell_flame_loop) - - [bhv_koopa_shell_loop](functions-2.md#bhv_koopa_shell_loop) - - [bhv_koopa_shell_underwater_loop](functions-2.md#bhv_koopa_shell_underwater_loop) - - [bhv_koopa_update](functions-2.md#bhv_koopa_update) - - [bhv_large_bomp_init](functions-2.md#bhv_large_bomp_init) - - [bhv_large_bomp_loop](functions-2.md#bhv_large_bomp_loop) - - [bhv_lll_bowser_puzzle_loop](functions-2.md#bhv_lll_bowser_puzzle_loop) - - [bhv_lll_bowser_puzzle_piece_loop](functions-2.md#bhv_lll_bowser_puzzle_piece_loop) - - [bhv_lll_drawbridge_loop](functions-2.md#bhv_lll_drawbridge_loop) - - [bhv_lll_drawbridge_spawner_init](functions-2.md#bhv_lll_drawbridge_spawner_init) - - [bhv_lll_drawbridge_spawner_loop](functions-2.md#bhv_lll_drawbridge_spawner_loop) - - [bhv_lll_floating_wood_bridge_loop](functions-2.md#bhv_lll_floating_wood_bridge_loop) + - [bhv_water_level_pillar_init](functions-2.md#bhv_water_level_pillar_init) + - [bhv_water_level_pillar_loop](functions-2.md#bhv_water_level_pillar_loop) + - [bhv_ddd_warp_loop](functions-2.md#bhv_ddd_warp_loop) + - [bhv_moat_grills_loop](functions-2.md#bhv_moat_grills_loop) + - [bhv_rotating_clock_arm_loop](functions-2.md#bhv_rotating_clock_arm_loop) + - [bhv_ukiki_init](functions-2.md#bhv_ukiki_init) + - [bhv_ukiki_loop](functions-2.md#bhv_ukiki_loop) + - [bhv_lll_sinking_rock_block_loop](functions-2.md#bhv_lll_sinking_rock_block_loop) - [bhv_lll_moving_octagonal_mesh_platform_loop](functions-2.md#bhv_lll_moving_octagonal_mesh_platform_loop) - - [bhv_lll_rolling_log_init](functions-2.md#bhv_lll_rolling_log_init) - [bhv_lll_rotating_block_fire_bars_loop](functions-2.md#bhv_lll_rotating_block_fire_bars_loop) - [bhv_lll_rotating_hex_flame_loop](functions-2.md#bhv_lll_rotating_hex_flame_loop) + - [bhv_lll_wood_piece_loop](functions-2.md#bhv_lll_wood_piece_loop) + - [bhv_lll_floating_wood_bridge_loop](functions-2.md#bhv_lll_floating_wood_bridge_loop) + - [bhv_volcano_flames_loop](functions-2.md#bhv_volcano_flames_loop) - [bhv_lll_rotating_hexagonal_ring_loop](functions-2.md#bhv_lll_rotating_hexagonal_ring_loop) - [bhv_lll_sinking_rectangular_platform_loop](functions-2.md#bhv_lll_sinking_rectangular_platform_loop) - - [bhv_lll_sinking_rock_block_loop](functions-2.md#bhv_lll_sinking_rock_block_loop) - [bhv_lll_sinking_square_platforms_loop](functions-2.md#bhv_lll_sinking_square_platforms_loop) - - [bhv_lll_wood_piece_loop](functions-2.md#bhv_lll_wood_piece_loop) - - [bhv_mad_piano_update](functions-2.md#bhv_mad_piano_update) - - [bhv_manta_ray_init](functions-2.md#bhv_manta_ray_init) - - [bhv_manta_ray_loop](functions-2.md#bhv_manta_ray_loop) - - [bhv_manta_ray_water_ring_init](functions-2.md#bhv_manta_ray_water_ring_init) - - [bhv_manta_ray_water_ring_loop](functions-2.md#bhv_manta_ray_water_ring_loop) + - [bhv_koopa_shell_loop](functions-2.md#bhv_koopa_shell_loop) + - [bhv_koopa_shell_flame_loop](functions-2.md#bhv_koopa_shell_flame_loop) + - [bhv_tox_box_loop](functions-2.md#bhv_tox_box_loop) + - [mario_moving_fast_enough_to_make_piranha_plant_bite](functions-2.md#mario_moving_fast_enough_to_make_piranha_plant_bite) + - [bhv_piranha_plant_loop](functions-2.md#bhv_piranha_plant_loop) + - [bhv_lll_bowser_puzzle_piece_loop](functions-2.md#bhv_lll_bowser_puzzle_piece_loop) + - [bhv_lll_bowser_puzzle_loop](functions-2.md#bhv_lll_bowser_puzzle_loop) + - [bhv_tuxies_mother_loop](functions-2.md#bhv_tuxies_mother_loop) + - [bhv_small_penguin_loop](functions-2.md#bhv_small_penguin_loop) + - [bhv_fish_spawner_loop](functions-2.md#bhv_fish_spawner_loop) + - [bhv_fish_loop](functions-2.md#bhv_fish_loop) + - [bhv_wdw_express_elevator_loop](functions-2.md#bhv_wdw_express_elevator_loop) + - [bhv_bub_spawner_loop](functions-2.md#bhv_bub_spawner_loop) + - [bhv_bub_loop](functions-2.md#bhv_bub_loop) + - [bhv_exclamation_box_init](functions-2.md#bhv_exclamation_box_init) + - [bhv_exclamation_box_loop](functions-2.md#bhv_exclamation_box_loop) + - [bhv_rotating_exclamation_box_loop](functions-2.md#bhv_rotating_exclamation_box_loop) + - [bhv_sound_spawner_init](functions-2.md#bhv_sound_spawner_init) + - [bhv_bowsers_sub_loop](functions-2.md#bhv_bowsers_sub_loop) + - [bhv_sushi_shark_loop](functions-2.md#bhv_sushi_shark_loop) + - [bhv_sushi_shark_collision_loop](functions-2.md#bhv_sushi_shark_collision_loop) + - [bhv_jrb_sliding_box_loop](functions-2.md#bhv_jrb_sliding_box_loop) + - [bhv_ship_part_3_loop](functions-2.md#bhv_ship_part_3_loop) + - [bhv_sunken_ship_part_loop](functions-2.md#bhv_sunken_ship_part_loop) + - [bhv_white_puff_1_loop](functions-2.md#bhv_white_puff_1_loop) + - [bhv_white_puff_2_loop](functions-2.md#bhv_white_puff_2_loop) + - [bhv_blue_coin_number_loop](functions-2.md#bhv_blue_coin_number_loop) + - [bhv_blue_coin_switch_init](functions-2.md#bhv_blue_coin_switch_init) + - [bhv_blue_coin_switch_loop](functions-2.md#bhv_blue_coin_switch_loop) + - [bhv_hidden_blue_coin_loop](functions-2.md#bhv_hidden_blue_coin_loop) + - [bhv_openable_cage_door_loop](functions-2.md#bhv_openable_cage_door_loop) + - [bhv_openable_grill_loop](functions-2.md#bhv_openable_grill_loop) + - [bhv_water_level_diamond_loop](functions-2.md#bhv_water_level_diamond_loop) + - [bhv_init_changing_water_level_loop](functions-2.md#bhv_init_changing_water_level_loop) + - [bhv_tweester_sand_particle_loop](functions-2.md#bhv_tweester_sand_particle_loop) + - [bhv_tweester_loop](functions-2.md#bhv_tweester_loop) + - [bhv_merry_go_round_boo_manager_loop](functions-2.md#bhv_merry_go_round_boo_manager_loop) + - [bhv_animated_texture_loop](functions-2.md#bhv_animated_texture_loop) + - [bhv_boo_in_castle_loop](functions-2.md#bhv_boo_in_castle_loop) + - [bhv_boo_with_cage_init](functions-2.md#bhv_boo_with_cage_init) + - [bhv_boo_with_cage_loop](functions-2.md#bhv_boo_with_cage_loop) + - [bhv_boo_init](functions-2.md#bhv_boo_init) + - [bhv_big_boo_loop](functions-2.md#bhv_big_boo_loop) + - [bhv_courtyard_boo_triplet_init](functions-2.md#bhv_courtyard_boo_triplet_init) + - [obj_set_secondary_camera_focus](functions-2.md#obj_set_secondary_camera_focus) + - [bhv_boo_loop](functions-2.md#bhv_boo_loop) + - [bhv_boo_boss_spawned_bridge_loop](functions-2.md#bhv_boo_boss_spawned_bridge_loop) + - [bhv_bbh_tilting_trap_platform_loop](functions-2.md#bhv_bbh_tilting_trap_platform_loop) + - [bhv_haunted_bookshelf_loop](functions-2.md#bhv_haunted_bookshelf_loop) + - [bhv_merry_go_round_loop](functions-2.md#bhv_merry_go_round_loop) + - [bhv_play_music_track_when_touched_loop](functions-2.md#bhv_play_music_track_when_touched_loop) + - [bhv_beta_bowser_anchor_loop](functions-2.md#bhv_beta_bowser_anchor_loop) + - [bhv_static_checkered_platform_loop](functions-2.md#bhv_static_checkered_platform_loop) + - [bhv_castle_floor_trap_init](functions-2.md#bhv_castle_floor_trap_init) + - [bhv_castle_floor_trap_loop](functions-2.md#bhv_castle_floor_trap_loop) + - [bhv_floor_trap_in_castle_loop](functions-2.md#bhv_floor_trap_in_castle_loop) + - [bhv_sparkle_spawn_loop](functions-2.md#bhv_sparkle_spawn_loop) + - [bhv_scuttlebug_loop](functions-2.md#bhv_scuttlebug_loop) + - [bhv_scuttlebug_spawn_loop](functions-2.md#bhv_scuttlebug_spawn_loop) + - [bhv_whomp_loop](functions-2.md#bhv_whomp_loop) + - [bhv_water_splash_spawn_droplets](functions-2.md#bhv_water_splash_spawn_droplets) + - [bhv_water_droplet_loop](functions-2.md#bhv_water_droplet_loop) + - [bhv_water_droplet_splash_init](functions-2.md#bhv_water_droplet_splash_init) + - [bhv_bubble_splash_init](functions-2.md#bhv_bubble_splash_init) + - [bhv_idle_water_wave_loop](functions-2.md#bhv_idle_water_wave_loop) + - [bhv_shallow_water_splash_init](functions-2.md#bhv_shallow_water_splash_init) + - [bhv_wave_trail_shrink](functions-2.md#bhv_wave_trail_shrink) + - [bhv_strong_wind_particle_loop](functions-2.md#bhv_strong_wind_particle_loop) + - [bhv_sl_snowman_wind_loop](functions-2.md#bhv_sl_snowman_wind_loop) + - [bhv_sl_walking_penguin_loop](functions-2.md#bhv_sl_walking_penguin_loop) - [bhv_menu_button_init](functions-2.md#bhv_menu_button_init) - [bhv_menu_button_loop](functions-2.md#bhv_menu_button_loop) - [bhv_menu_button_manager_init](functions-2.md#bhv_menu_button_manager_init) - [bhv_menu_button_manager_loop](functions-2.md#bhv_menu_button_manager_loop) - - [bhv_merry_go_round_boo_manager_loop](functions-2.md#bhv_merry_go_round_boo_manager_loop) - - [bhv_merry_go_round_loop](functions-2.md#bhv_merry_go_round_loop) - - [bhv_metal_cap_init](functions-2.md#bhv_metal_cap_init) - - [bhv_metal_cap_loop](functions-2.md#bhv_metal_cap_loop) - - [bhv_mips_init](functions-2.md#bhv_mips_init) - - [bhv_mips_loop](functions-2.md#bhv_mips_loop) - - [bhv_moat_grills_loop](functions-2.md#bhv_moat_grills_loop) - - [bhv_moneybag_hidden_loop](functions-2.md#bhv_moneybag_hidden_loop) - - [bhv_moneybag_init](functions-2.md#bhv_moneybag_init) - - [bhv_moneybag_loop](functions-2.md#bhv_moneybag_loop) - - [bhv_monty_mole_hole_update](functions-2.md#bhv_monty_mole_hole_update) - - [bhv_monty_mole_init](functions-2.md#bhv_monty_mole_init) - - [bhv_monty_mole_rock_update](functions-2.md#bhv_monty_mole_rock_update) - - [bhv_monty_mole_update](functions-2.md#bhv_monty_mole_update) - - [bhv_moving_blue_coin_init](functions-2.md#bhv_moving_blue_coin_init) - - [bhv_moving_blue_coin_loop](functions-2.md#bhv_moving_blue_coin_loop) + - [bhv_act_selector_star_type_loop](functions-2.md#bhv_act_selector_star_type_loop) + - [bhv_act_selector_init](functions-2.md#bhv_act_selector_init) + - [bhv_act_selector_loop](functions-2.md#bhv_act_selector_loop) - [bhv_moving_yellow_coin_init](functions-2.md#bhv_moving_yellow_coin_init) - [bhv_moving_yellow_coin_loop](functions-2.md#bhv_moving_yellow_coin_loop) - - [bhv_mr_blizzard_init](functions-2.md#bhv_mr_blizzard_init) - - [bhv_mr_blizzard_snowball](functions-2.md#bhv_mr_blizzard_snowball) - - [bhv_mr_blizzard_update](functions-2.md#bhv_mr_blizzard_update) - - [bhv_mr_i_body_loop](functions-2.md#bhv_mr_i_body_loop) - - [bhv_mr_i_loop](functions-2.md#bhv_mr_i_loop) - - [bhv_mr_i_particle_loop](functions-2.md#bhv_mr_i_particle_loop) - - [bhv_normal_cap_init](functions-2.md#bhv_normal_cap_init) - - [bhv_normal_cap_loop](functions-2.md#bhv_normal_cap_loop) + - [bhv_moving_blue_coin_init](functions-2.md#bhv_moving_blue_coin_init) + - [bhv_moving_blue_coin_loop](functions-2.md#bhv_moving_blue_coin_loop) + - [bhv_blue_coin_sliding_jumping_init](functions-2.md#bhv_blue_coin_sliding_jumping_init) + - [bhv_blue_coin_sliding_loop](functions-2.md#bhv_blue_coin_sliding_loop) + - [bhv_blue_coin_jumping_loop](functions-2.md#bhv_blue_coin_jumping_loop) + - [bhv_seaweed_init](functions-2.md#bhv_seaweed_init) + - [bhv_seaweed_bundle_init](functions-2.md#bhv_seaweed_bundle_init) + - [bhv_bobomb_init](functions-2.md#bhv_bobomb_init) + - [bhv_bobomb_loop](functions-2.md#bhv_bobomb_loop) + - [bhv_bobomb_fuse_smoke_init](functions-2.md#bhv_bobomb_fuse_smoke_init) + - [bhv_bobomb_buddy_init](functions-2.md#bhv_bobomb_buddy_init) + - [bhv_bobomb_buddy_loop](functions-2.md#bhv_bobomb_buddy_loop) + - [bhv_cannon_closed_init](functions-2.md#bhv_cannon_closed_init) + - [bhv_cannon_closed_loop](functions-2.md#bhv_cannon_closed_loop) + - [bhv_whirlpool_init](functions-2.md#bhv_whirlpool_init) + - [bhv_whirlpool_loop](functions-2.md#bhv_whirlpool_loop) + - [bhv_jet_stream_loop](functions-2.md#bhv_jet_stream_loop) + - [bhv_homing_amp_init](functions-2.md#bhv_homing_amp_init) + - [bhv_homing_amp_loop](functions-2.md#bhv_homing_amp_loop) + - [bhv_circling_amp_init](functions-2.md#bhv_circling_amp_init) + - [bhv_circling_amp_loop](functions-2.md#bhv_circling_amp_loop) + - [bhv_butterfly_init](functions-2.md#bhv_butterfly_init) + - [bhv_butterfly_loop](functions-2.md#bhv_butterfly_loop) + - [bhv_hoot_init](functions-2.md#bhv_hoot_init) + - [bhv_hoot_loop](functions-2.md#bhv_hoot_loop) + - [bhv_beta_holdable_object_init](functions-2.md#bhv_beta_holdable_object_init) + - [bhv_beta_holdable_object_loop](functions-2.md#bhv_beta_holdable_object_loop) - [bhv_object_bubble_init](functions-2.md#bhv_object_bubble_init) - [bhv_object_bubble_loop](functions-2.md#bhv_object_bubble_loop) - [bhv_object_water_wave_init](functions-2.md#bhv_object_water_wave_init) - [bhv_object_water_wave_loop](functions-2.md#bhv_object_water_wave_loop) - - [bhv_openable_cage_door_loop](functions-2.md#bhv_openable_cage_door_loop) - - [bhv_openable_grill_loop](functions-2.md#bhv_openable_grill_loop) - - [bhv_orange_number_init](functions-2.md#bhv_orange_number_init) - - [bhv_orange_number_loop](functions-2.md#bhv_orange_number_loop) - - [bhv_particle_init](functions-2.md#bhv_particle_init) - - [bhv_particle_loop](functions-2.md#bhv_particle_loop) - - [bhv_penguin_race_finish_line_update](functions-2.md#bhv_penguin_race_finish_line_update) - - [bhv_penguin_race_shortcut_check_update](functions-2.md#bhv_penguin_race_shortcut_check_update) - - [bhv_piranha_particle_loop](functions-2.md#bhv_piranha_particle_loop) - - [bhv_piranha_plant_bubble_loop](functions-2.md#bhv_piranha_plant_bubble_loop) - - [bhv_piranha_plant_loop](functions-2.md#bhv_piranha_plant_loop) - - [bhv_piranha_plant_waking_bubbles_loop](functions-2.md#bhv_piranha_plant_waking_bubbles_loop) - - [bhv_platform_normals_init](functions-2.md#bhv_platform_normals_init) - - [bhv_platform_on_track_init](functions-2.md#bhv_platform_on_track_init) - - [bhv_platform_on_track_update](functions-2.md#bhv_platform_on_track_update) - - [bhv_play_music_track_when_touched_loop](functions-2.md#bhv_play_music_track_when_touched_loop) - - [bhv_point_light_init](functions-2.md#bhv_point_light_init) - - [bhv_point_light_loop](functions-2.md#bhv_point_light_loop) - - [bhv_pokey_body_part_update](functions-2.md#bhv_pokey_body_part_update) - - [bhv_pokey_update](functions-2.md#bhv_pokey_update) - - [bhv_pole_base_loop](functions-2.md#bhv_pole_base_loop) - - [bhv_pole_init](functions-2.md#bhv_pole_init) - - [bhv_pound_tiny_star_particle_init](functions-2.md#bhv_pound_tiny_star_particle_init) - - [bhv_pound_tiny_star_particle_loop](functions-2.md#bhv_pound_tiny_star_particle_loop) - - [bhv_pound_white_puffs_init](functions-2.md#bhv_pound_white_puffs_init) - - [bhv_punch_tiny_triangle_init](functions-2.md#bhv_punch_tiny_triangle_init) - - [bhv_punch_tiny_triangle_loop](functions-2.md#bhv_punch_tiny_triangle_loop) - - [bhv_purple_switch_loop](functions-2.md#bhv_purple_switch_loop) - - [bhv_pushable_loop](functions-2.md#bhv_pushable_loop) + - [bhv_explosion_init](functions-2.md#bhv_explosion_init) + - [bhv_explosion_loop](functions-2.md#bhv_explosion_loop) + - [bhv_bobomb_bully_death_smoke_init](functions-2.md#bhv_bobomb_bully_death_smoke_init) + - [bhv_bobomb_explosion_bubble_init](functions-2.md#bhv_bobomb_explosion_bubble_init) + - [bhv_bobomb_explosion_bubble_loop](functions-2.md#bhv_bobomb_explosion_bubble_loop) + - [bhv_respawner_loop](functions-2.md#bhv_respawner_loop) + - [bhv_small_bully_init](functions-2.md#bhv_small_bully_init) + - [bhv_bully_loop](functions-2.md#bhv_bully_loop) + - [bhv_big_bully_init](functions-2.md#bhv_big_bully_init) + - [bhv_big_bully_with_minions_init](functions-2.md#bhv_big_bully_with_minions_init) + - [bhv_big_bully_with_minions_loop](functions-2.md#bhv_big_bully_with_minions_loop) + - [bhv_jet_stream_ring_spawner_loop](functions-2.md#bhv_jet_stream_ring_spawner_loop) + - [bhv_jet_stream_water_ring_init](functions-2.md#bhv_jet_stream_water_ring_init) + - [bhv_jet_stream_water_ring_loop](functions-2.md#bhv_jet_stream_water_ring_loop) + - [bhv_manta_ray_water_ring_init](functions-2.md#bhv_manta_ray_water_ring_init) + - [bhv_manta_ray_water_ring_loop](functions-2.md#bhv_manta_ray_water_ring_loop) + - [bhv_bowser_bomb_loop](functions-2.md#bhv_bowser_bomb_loop) + - [bhv_bowser_bomb_explosion_loop](functions-2.md#bhv_bowser_bomb_explosion_loop) + - [bhv_bowser_bomb_smoke_loop](functions-2.md#bhv_bowser_bomb_smoke_loop) + - [bhv_celebration_star_init](functions-2.md#bhv_celebration_star_init) + - [bhv_celebration_star_loop](functions-2.md#bhv_celebration_star_loop) + - [bhv_celebration_star_sparkle_loop](functions-2.md#bhv_celebration_star_sparkle_loop) + - [bhv_star_key_collection_puff_spawner_loop](functions-2.md#bhv_star_key_collection_puff_spawner_loop) + - [bhv_lll_drawbridge_spawner_init](functions-2.md#bhv_lll_drawbridge_spawner_init) + - [bhv_lll_drawbridge_spawner_loop](functions-2.md#bhv_lll_drawbridge_spawner_loop) + - [bhv_lll_drawbridge_loop](functions-2.md#bhv_lll_drawbridge_loop) + - [bhv_small_bomp_init](functions-2.md#bhv_small_bomp_init) + - [bhv_small_bomp_loop](functions-2.md#bhv_small_bomp_loop) + - [bhv_large_bomp_init](functions-2.md#bhv_large_bomp_init) + - [bhv_large_bomp_loop](functions-2.md#bhv_large_bomp_loop) + - [bhv_wf_sliding_platform_init](functions-2.md#bhv_wf_sliding_platform_init) + - [bhv_wf_sliding_platform_loop](functions-2.md#bhv_wf_sliding_platform_loop) + - [bhv_moneybag_init](functions-2.md#bhv_moneybag_init) + - [bhv_moneybag_loop](functions-2.md#bhv_moneybag_loop) + - [bhv_moneybag_hidden_loop](functions-2.md#bhv_moneybag_hidden_loop) + - [bhv_bob_pit_bowling_ball_init](functions-2.md#bhv_bob_pit_bowling_ball_init) + - [bhv_bob_pit_bowling_ball_loop](functions-2.md#bhv_bob_pit_bowling_ball_loop) + - [bhv_free_bowling_ball_init](functions-2.md#bhv_free_bowling_ball_init) + - [bhv_free_bowling_ball_loop](functions-2.md#bhv_free_bowling_ball_loop) + - [bhv_bowling_ball_init](functions-2.md#bhv_bowling_ball_init) + - [bhv_bowling_ball_loop](functions-2.md#bhv_bowling_ball_loop) + - [bhv_generic_bowling_ball_spawner_init](functions-2.md#bhv_generic_bowling_ball_spawner_init) + - [bhv_generic_bowling_ball_spawner_loop](functions-2.md#bhv_generic_bowling_ball_spawner_loop) + - [bhv_thi_bowling_ball_spawner_loop](functions-2.md#bhv_thi_bowling_ball_spawner_loop) + - [bhv_rr_cruiser_wing_init](functions-2.md#bhv_rr_cruiser_wing_init) + - [bhv_rr_cruiser_wing_loop](functions-2.md#bhv_rr_cruiser_wing_loop) + - [bhv_spindel_init](functions-2.md#bhv_spindel_init) + - [bhv_spindel_loop](functions-2.md#bhv_spindel_loop) + - [bhv_ssl_moving_pyramid_wall_init](functions-2.md#bhv_ssl_moving_pyramid_wall_init) + - [bhv_ssl_moving_pyramid_wall_loop](functions-2.md#bhv_ssl_moving_pyramid_wall_loop) - [bhv_pyramid_elevator_init](functions-2.md#bhv_pyramid_elevator_init) - [bhv_pyramid_elevator_loop](functions-2.md#bhv_pyramid_elevator_loop) - [bhv_pyramid_elevator_trajectory_marker_ball_loop](functions-2.md#bhv_pyramid_elevator_trajectory_marker_ball_loop) - - [bhv_pyramid_pillar_touch_detector_loop](functions-2.md#bhv_pyramid_pillar_touch_detector_loop) - - [bhv_pyramid_top_fragment_init](functions-2.md#bhv_pyramid_top_fragment_init) - - [bhv_pyramid_top_fragment_loop](functions-2.md#bhv_pyramid_top_fragment_loop) - [bhv_pyramid_top_init](functions-2.md#bhv_pyramid_top_init) - [bhv_pyramid_top_loop](functions-2.md#bhv_pyramid_top_loop) - - [bhv_racing_penguin_init](functions-2.md#bhv_racing_penguin_init) - - [bhv_racing_penguin_update](functions-2.md#bhv_racing_penguin_update) - - [bhv_recovery_heart_loop](functions-2.md#bhv_recovery_heart_loop) - - [bhv_red_coin_init](functions-2.md#bhv_red_coin_init) - - [bhv_red_coin_loop](functions-2.md#bhv_red_coin_loop) - - [bhv_red_coin_star_marker_init](functions-2.md#bhv_red_coin_star_marker_init) - - [bhv_respawner_loop](functions-2.md#bhv_respawner_loop) - - [bhv_rolling_log_loop](functions-2.md#bhv_rolling_log_loop) - - [bhv_rotating_clock_arm_loop](functions-2.md#bhv_rotating_clock_arm_loop) - - [bhv_rotating_exclamation_box_loop](functions-2.md#bhv_rotating_exclamation_box_loop) - - [bhv_rotating_octagonal_plat_init](functions-2.md#bhv_rotating_octagonal_plat_init) - - [bhv_rotating_octagonal_plat_loop](functions-2.md#bhv_rotating_octagonal_plat_loop) - - [bhv_rotating_platform_loop](functions-2.md#bhv_rotating_platform_loop) - - [bhv_rr_cruiser_wing_init](functions-2.md#bhv_rr_cruiser_wing_init) - - [bhv_rr_cruiser_wing_loop](functions-2.md#bhv_rr_cruiser_wing_loop) - - [bhv_rr_rotating_bridge_platform_loop](functions-2.md#bhv_rr_rotating_bridge_platform_loop) + - [bhv_pyramid_top_fragment_init](functions-2.md#bhv_pyramid_top_fragment_init) + - [bhv_pyramid_top_fragment_loop](functions-2.md#bhv_pyramid_top_fragment_loop) + - [bhv_pyramid_pillar_touch_detector_loop](functions-2.md#bhv_pyramid_pillar_touch_detector_loop) + - [bhv_waterfall_sound_loop](functions-2.md#bhv_waterfall_sound_loop) + - [bhv_volcano_sound_loop](functions-2.md#bhv_volcano_sound_loop) + - [bhv_castle_flag_init](functions-2.md#bhv_castle_flag_init) + - [bhv_birds_sound_loop](functions-2.md#bhv_birds_sound_loop) + - [bhv_ambient_sounds_init](functions-2.md#bhv_ambient_sounds_init) - [bhv_sand_sound_loop](functions-2.md#bhv_sand_sound_loop) - - [bhv_scuttlebug_loop](functions-2.md#bhv_scuttlebug_loop) - - [bhv_scuttlebug_spawn_loop](functions-2.md#bhv_scuttlebug_spawn_loop) - - [bhv_seaweed_bundle_init](functions-2.md#bhv_seaweed_bundle_init) - - [bhv_seaweed_init](functions-2.md#bhv_seaweed_init) - - [bhv_seesaw_platform_init](functions-2.md#bhv_seesaw_platform_init) - - [bhv_seesaw_platform_update](functions-2.md#bhv_seesaw_platform_update) - - [bhv_shallow_water_splash_init](functions-2.md#bhv_shallow_water_splash_init) - - [bhv_ship_part_3_loop](functions-2.md#bhv_ship_part_3_loop) - - [bhv_skeeter_update](functions-2.md#bhv_skeeter_update) - - [bhv_skeeter_wave_update](functions-2.md#bhv_skeeter_wave_update) - - [bhv_sl_snowman_wind_loop](functions-2.md#bhv_sl_snowman_wind_loop) - - [bhv_sl_walking_penguin_loop](functions-2.md#bhv_sl_walking_penguin_loop) - - [bhv_sliding_plat_2_init](functions-2.md#bhv_sliding_plat_2_init) - - [bhv_sliding_plat_2_loop](functions-2.md#bhv_sliding_plat_2_loop) - - [bhv_sliding_snow_mound_loop](functions-2.md#bhv_sliding_snow_mound_loop) - - [bhv_small_bomp_init](functions-2.md#bhv_small_bomp_init) - - [bhv_small_bomp_loop](functions-2.md#bhv_small_bomp_loop) - - [bhv_small_bubbles_loop](functions-2.md#bhv_small_bubbles_loop) - - [bhv_small_bully_init](functions-2.md#bhv_small_bully_init) - - [bhv_small_penguin_loop](functions-2.md#bhv_small_penguin_loop) - - [bhv_small_piranha_flame_loop](functions-2.md#bhv_small_piranha_flame_loop) - - [bhv_small_water_wave_loop](functions-2.md#bhv_small_water_wave_loop) - - [bhv_snow_leaf_particle_spawn_init](functions-2.md#bhv_snow_leaf_particle_spawn_init) - - [bhv_snow_mound_spawn_loop](functions-2.md#bhv_snow_mound_spawn_loop) - - [bhv_snowmans_body_checkpoint_loop](functions-2.md#bhv_snowmans_body_checkpoint_loop) + - [bhv_castle_cannon_grate_init](functions-2.md#bhv_castle_cannon_grate_init) - [bhv_snowmans_bottom_init](functions-2.md#bhv_snowmans_bottom_init) - [bhv_snowmans_bottom_loop](functions-2.md#bhv_snowmans_bottom_loop) - [bhv_snowmans_head_init](functions-2.md#bhv_snowmans_head_init) - [bhv_snowmans_head_loop](functions-2.md#bhv_snowmans_head_loop) - - [bhv_snufit_balls_loop](functions-2.md#bhv_snufit_balls_loop) - - [bhv_snufit_loop](functions-2.md#bhv_snufit_loop) - - [bhv_sound_spawner_init](functions-2.md#bhv_sound_spawner_init) - - [bhv_sparkle_spawn_loop](functions-2.md#bhv_sparkle_spawn_loop) - - [bhv_spawn_star_no_level_exit](functions-2.md#bhv_spawn_star_no_level_exit) - - [bhv_spawned_star_init](functions-2.md#bhv_spawned_star_init) - - [bhv_spawned_star_loop](functions-2.md#bhv_spawned_star_loop) - - [bhv_spindel_init](functions-2.md#bhv_spindel_init) - - [bhv_spindel_loop](functions-2.md#bhv_spindel_loop) - - [bhv_spindrift_loop](functions-2.md#bhv_spindrift_loop) - - [bhv_spiny_update](functions-2.md#bhv_spiny_update) - - [bhv_squarish_path_moving_loop](functions-2.md#bhv_squarish_path_moving_loop) - - [bhv_squarish_path_parent_init](functions-2.md#bhv_squarish_path_parent_init) - - [bhv_squarish_path_parent_loop](functions-2.md#bhv_squarish_path_parent_loop) - - [bhv_squishable_platform_loop](functions-2.md#bhv_squishable_platform_loop) - - [bhv_ssl_moving_pyramid_wall_init](functions-2.md#bhv_ssl_moving_pyramid_wall_init) - - [bhv_ssl_moving_pyramid_wall_loop](functions-2.md#bhv_ssl_moving_pyramid_wall_loop) - - [bhv_star_door_loop](functions-2.md#bhv_star_door_loop) - - [bhv_star_door_loop_2](functions-2.md#bhv_star_door_loop_2) - - [bhv_star_key_collection_puff_spawner_loop](functions-2.md#bhv_star_key_collection_puff_spawner_loop) + - [bhv_snowmans_body_checkpoint_loop](functions-2.md#bhv_snowmans_body_checkpoint_loop) + - [bhv_big_boulder_init](functions-2.md#bhv_big_boulder_init) + - [bhv_big_boulder_loop](functions-2.md#bhv_big_boulder_loop) + - [bhv_big_boulder_generator_loop](functions-2.md#bhv_big_boulder_generator_loop) + - [bhv_wing_cap_init](functions-2.md#bhv_wing_cap_init) + - [bhv_wing_vanish_cap_loop](functions-2.md#bhv_wing_vanish_cap_loop) + - [bhv_metal_cap_init](functions-2.md#bhv_metal_cap_init) + - [bhv_metal_cap_loop](functions-2.md#bhv_metal_cap_loop) + - [bhv_normal_cap_init](functions-2.md#bhv_normal_cap_init) + - [bhv_normal_cap_loop](functions-2.md#bhv_normal_cap_loop) + - [bhv_vanish_cap_init](functions-2.md#bhv_vanish_cap_init) - [bhv_star_number_loop](functions-2.md#bhv_star_number_loop) + - [spawn_star_number](functions-2.md#spawn_star_number) + - [bhv_collect_star_init](functions-2.md#bhv_collect_star_init) + - [bhv_collect_star_loop](functions-2.md#bhv_collect_star_loop) - [bhv_star_spawn_init](functions-2.md#bhv_star_spawn_init) - [bhv_star_spawn_loop](functions-2.md#bhv_star_spawn_loop) - - [bhv_static_checkered_platform_loop](functions-2.md#bhv_static_checkered_platform_loop) - - [bhv_strong_wind_particle_loop](functions-2.md#bhv_strong_wind_particle_loop) - - [bhv_sunken_ship_part_loop](functions-2.md#bhv_sunken_ship_part_loop) - - [bhv_sushi_shark_collision_loop](functions-2.md#bhv_sushi_shark_collision_loop) - - [bhv_sushi_shark_loop](functions-2.md#bhv_sushi_shark_loop) - - [bhv_swing_platform_init](functions-2.md#bhv_swing_platform_init) - - [bhv_swing_platform_update](functions-2.md#bhv_swing_platform_update) - - [bhv_swoop_update](functions-2.md#bhv_swoop_update) - - [bhv_tank_fish_group_loop](functions-2.md#bhv_tank_fish_group_loop) - - [bhv_temp_coin_loop](functions-2.md#bhv_temp_coin_loop) - - [bhv_thi_bowling_ball_spawner_loop](functions-2.md#bhv_thi_bowling_ball_spawner_loop) - - [bhv_thi_huge_island_top_loop](functions-2.md#bhv_thi_huge_island_top_loop) - - [bhv_thi_tiny_island_top_loop](functions-2.md#bhv_thi_tiny_island_top_loop) - - [bhv_tilting_bowser_lava_platform_init](functions-2.md#bhv_tilting_bowser_lava_platform_init) - - [bhv_tilting_inverted_pyramid_loop](functions-2.md#bhv_tilting_inverted_pyramid_loop) - - [bhv_tiny_star_particles_init](functions-2.md#bhv_tiny_star_particles_init) - - [bhv_tower_door_loop](functions-2.md#bhv_tower_door_loop) - - [bhv_tower_platform_group_init](functions-2.md#bhv_tower_platform_group_init) - - [bhv_tower_platform_group_loop](functions-2.md#bhv_tower_platform_group_loop) - - [bhv_tox_box_loop](functions-2.md#bhv_tox_box_loop) - - [bhv_track_ball_update](functions-2.md#bhv_track_ball_update) - - [bhv_treasure_chest_bottom_init](functions-2.md#bhv_treasure_chest_bottom_init) - - [bhv_treasure_chest_bottom_loop](functions-2.md#bhv_treasure_chest_bottom_loop) - - [bhv_treasure_chest_init](functions-2.md#bhv_treasure_chest_init) - - [bhv_treasure_chest_jrb_init](functions-2.md#bhv_treasure_chest_jrb_init) - - [bhv_treasure_chest_jrb_loop](functions-2.md#bhv_treasure_chest_jrb_loop) - - [bhv_treasure_chest_loop](functions-2.md#bhv_treasure_chest_loop) + - [bhv_hidden_red_coin_star_init](functions-2.md#bhv_hidden_red_coin_star_init) + - [bhv_hidden_red_coin_star_loop](functions-2.md#bhv_hidden_red_coin_star_loop) + - [bhv_red_coin_init](functions-2.md#bhv_red_coin_init) + - [bhv_red_coin_loop](functions-2.md#bhv_red_coin_loop) + - [bhv_bowser_course_red_coin_star_loop](functions-2.md#bhv_bowser_course_red_coin_star_loop) + - [bhv_hidden_star_init](functions-2.md#bhv_hidden_star_init) + - [bhv_hidden_star_loop](functions-2.md#bhv_hidden_star_loop) + - [bhv_hidden_star_trigger_loop](functions-2.md#bhv_hidden_star_trigger_loop) + - [bhv_ttm_rolling_log_init](functions-2.md#bhv_ttm_rolling_log_init) + - [bhv_rolling_log_loop](functions-2.md#bhv_rolling_log_loop) + - [bhv_lll_rolling_log_init](functions-2.md#bhv_lll_rolling_log_init) + - [bhv_1up_trigger_init](functions-2.md#bhv_1up_trigger_init) + - [bhv_1up_common_init](functions-2.md#bhv_1up_common_init) + - [bhv_1up_walking_loop](functions-2.md#bhv_1up_walking_loop) + - [bhv_1up_running_away_loop](functions-2.md#bhv_1up_running_away_loop) + - [bhv_1up_sliding_loop](functions-2.md#bhv_1up_sliding_loop) + - [bhv_1up_init](functions-2.md#bhv_1up_init) + - [bhv_1up_loop](functions-2.md#bhv_1up_loop) + - [bhv_1up_jump_on_approach_loop](functions-2.md#bhv_1up_jump_on_approach_loop) + - [bhv_1up_hidden_loop](functions-2.md#bhv_1up_hidden_loop) + - [bhv_1up_hidden_trigger_loop](functions-2.md#bhv_1up_hidden_trigger_loop) + - [bhv_1up_hidden_in_pole_loop](functions-2.md#bhv_1up_hidden_in_pole_loop) + - [bhv_1up_hidden_in_pole_trigger_loop](functions-2.md#bhv_1up_hidden_in_pole_trigger_loop) + - [bhv_1up_hidden_in_pole_spawner_loop](functions-2.md#bhv_1up_hidden_in_pole_spawner_loop) + - [bhv_controllable_platform_init](functions-2.md#bhv_controllable_platform_init) + - [bhv_controllable_platform_loop](functions-2.md#bhv_controllable_platform_loop) + - [bhv_controllable_platform_sub_loop](functions-2.md#bhv_controllable_platform_sub_loop) + - [bhv_breakable_box_small_init](functions-2.md#bhv_breakable_box_small_init) + - [bhv_breakable_box_small_loop](functions-2.md#bhv_breakable_box_small_loop) + - [bhv_sliding_snow_mound_loop](functions-2.md#bhv_sliding_snow_mound_loop) + - [bhv_snow_mound_spawn_loop](functions-2.md#bhv_snow_mound_spawn_loop) + - [bhv_floating_platform_loop](functions-2.md#bhv_floating_platform_loop) + - [bhv_arrow_lift_loop](functions-2.md#bhv_arrow_lift_loop) + - [bhv_orange_number_init](functions-2.md#bhv_orange_number_init) + - [bhv_orange_number_loop](functions-2.md#bhv_orange_number_loop) + - [bhv_manta_ray_init](functions-2.md#bhv_manta_ray_init) + - [bhv_manta_ray_loop](functions-2.md#bhv_manta_ray_loop) + - [bhv_falling_pillar_init](functions-2.md#bhv_falling_pillar_init) + - [bhv_falling_pillar_loop](functions-2.md#bhv_falling_pillar_loop) + - [bhv_falling_pillar_hitbox_loop](functions-2.md#bhv_falling_pillar_hitbox_loop) + - [bhv_jrb_floating_box_loop](functions-2.md#bhv_jrb_floating_box_loop) + - [bhv_decorative_pendulum_init](functions-2.md#bhv_decorative_pendulum_init) + - [bhv_decorative_pendulum_loop](functions-2.md#bhv_decorative_pendulum_loop) - [bhv_treasure_chest_ship_init](functions-2.md#bhv_treasure_chest_ship_init) - [bhv_treasure_chest_ship_loop](functions-2.md#bhv_treasure_chest_ship_loop) + - [bhv_treasure_chest_jrb_init](functions-2.md#bhv_treasure_chest_jrb_init) + - [bhv_treasure_chest_jrb_loop](functions-2.md#bhv_treasure_chest_jrb_loop) + - [bhv_treasure_chest_init](functions-2.md#bhv_treasure_chest_init) + - [bhv_treasure_chest_loop](functions-2.md#bhv_treasure_chest_loop) + - [bhv_treasure_chest_bottom_init](functions-2.md#bhv_treasure_chest_bottom_init) + - [bhv_treasure_chest_bottom_loop](functions-2.md#bhv_treasure_chest_bottom_loop) - [bhv_treasure_chest_top_loop](functions-2.md#bhv_treasure_chest_top_loop) - - [bhv_tree_snow_or_leaf_loop](functions-2.md#bhv_tree_snow_or_leaf_loop) - - [bhv_triplet_butterfly_update](functions-2.md#bhv_triplet_butterfly_update) - - [bhv_ttc_2d_rotator_init](functions-2.md#bhv_ttc_2d_rotator_init) - - [bhv_ttc_2d_rotator_update](functions-2.md#bhv_ttc_2d_rotator_update) - - [bhv_ttc_cog_init](functions-2.md#bhv_ttc_cog_init) - - [bhv_ttc_cog_update](functions-2.md#bhv_ttc_cog_update) - - [bhv_ttc_elevator_init](functions-2.md#bhv_ttc_elevator_init) - - [bhv_ttc_elevator_update](functions-2.md#bhv_ttc_elevator_update) - - [bhv_ttc_moving_bar_init](functions-2.md#bhv_ttc_moving_bar_init) - - [bhv_ttc_moving_bar_update](functions-2.md#bhv_ttc_moving_bar_update) - - [bhv_ttc_pendulum_init](functions-2.md#bhv_ttc_pendulum_init) - - [bhv_ttc_pendulum_update](functions-2.md#bhv_ttc_pendulum_update) - - [bhv_ttc_pit_block_init](functions-2.md#bhv_ttc_pit_block_init) - - [bhv_ttc_pit_block_update](functions-2.md#bhv_ttc_pit_block_update) + - [bhv_mips_init](functions-2.md#bhv_mips_init) + - [bhv_mips_loop](functions-2.md#bhv_mips_loop) + - [bhv_yoshi_init](functions-2.md#bhv_yoshi_init) + - [bhv_koopa_init](functions-2.md#bhv_koopa_init) + - [bhv_koopa_update](functions-2.md#bhv_koopa_update) + - [bhv_koopa_race_endpoint_update](functions-2.md#bhv_koopa_race_endpoint_update) + - [bhv_pokey_update](functions-2.md#bhv_pokey_update) + - [bhv_pokey_body_part_update](functions-2.md#bhv_pokey_body_part_update) + - [bhv_swoop_update](functions-2.md#bhv_swoop_update) + - [bhv_fly_guy_update](functions-2.md#bhv_fly_guy_update) + - [bhv_goomba_init](functions-2.md#bhv_goomba_init) + - [bhv_goomba_update](functions-2.md#bhv_goomba_update) + - [bhv_goomba_triplet_spawner_update](functions-2.md#bhv_goomba_triplet_spawner_update) + - [bhv_chain_chomp_update](functions-2.md#bhv_chain_chomp_update) + - [bhv_chain_chomp_chain_part_update](functions-2.md#bhv_chain_chomp_chain_part_update) + - [bhv_wooden_post_update](functions-2.md#bhv_wooden_post_update) + - [bhv_chain_chomp_gate_init](functions-2.md#bhv_chain_chomp_gate_init) + - [bhv_chain_chomp_gate_update](functions-2.md#bhv_chain_chomp_gate_update) + - [bhv_wiggler_update](functions-2.md#bhv_wiggler_update) + - [bhv_wiggler_body_part_update](functions-2.md#bhv_wiggler_body_part_update) + - [bhv_enemy_lakitu_update](functions-2.md#bhv_enemy_lakitu_update) + - [bhv_camera_lakitu_init](functions-2.md#bhv_camera_lakitu_init) + - [bhv_camera_lakitu_update](functions-2.md#bhv_camera_lakitu_update) + - [bhv_cloud_update](functions-2.md#bhv_cloud_update) + - [bhv_cloud_part_update](functions-2.md#bhv_cloud_part_update) + - [bhv_spiny_update](functions-2.md#bhv_spiny_update) + - [bhv_monty_mole_init](functions-2.md#bhv_monty_mole_init) + - [bhv_monty_mole_update](functions-2.md#bhv_monty_mole_update) + - [bhv_monty_mole_hole_update](functions-2.md#bhv_monty_mole_hole_update) + - [bhv_monty_mole_rock_update](functions-2.md#bhv_monty_mole_rock_update) + - [bhv_platform_on_track_init](functions-2.md#bhv_platform_on_track_init) + - [bhv_platform_on_track_update](functions-2.md#bhv_platform_on_track_update) + - [bhv_track_ball_update](functions-2.md#bhv_track_ball_update) + - [bhv_seesaw_platform_init](functions-2.md#bhv_seesaw_platform_init) + - [bhv_seesaw_platform_update](functions-2.md#bhv_seesaw_platform_update) + - [bhv_ferris_wheel_axle_init](functions-2.md#bhv_ferris_wheel_axle_init) + - [bhv_ferris_wheel_platform_init](functions-2.md#bhv_ferris_wheel_platform_init) + - [bhv_ferris_wheel_platform_update](functions-2.md#bhv_ferris_wheel_platform_update) + - [bhv_water_bomb_spawner_update](functions-2.md#bhv_water_bomb_spawner_update) + - [bhv_water_bomb_update](functions-2.md#bhv_water_bomb_update) + - [bhv_water_bomb_shadow_update](functions-2.md#bhv_water_bomb_shadow_update) - [bhv_ttc_rotating_solid_init](functions-2.md#bhv_ttc_rotating_solid_init) - [bhv_ttc_rotating_solid_update](functions-2.md#bhv_ttc_rotating_solid_update) - - [bhv_ttc_spinner_update](functions-2.md#bhv_ttc_spinner_update) + - [bhv_ttc_pendulum_init](functions-2.md#bhv_ttc_pendulum_init) + - [bhv_ttc_pendulum_update](functions-2.md#bhv_ttc_pendulum_update) - [bhv_ttc_treadmill_init](functions-2.md#bhv_ttc_treadmill_init) - [bhv_ttc_treadmill_update](functions-2.md#bhv_ttc_treadmill_update) - - [bhv_ttm_rolling_log_init](functions-2.md#bhv_ttm_rolling_log_init) - - [bhv_tumbling_bridge_loop](functions-2.md#bhv_tumbling_bridge_loop) - - [bhv_tumbling_bridge_platform_loop](functions-2.md#bhv_tumbling_bridge_platform_loop) - - [bhv_tuxies_mother_loop](functions-2.md#bhv_tuxies_mother_loop) - - [bhv_tweester_loop](functions-2.md#bhv_tweester_loop) - - [bhv_tweester_sand_particle_loop](functions-2.md#bhv_tweester_sand_particle_loop) - - [bhv_ukiki_cage_loop](functions-2.md#bhv_ukiki_cage_loop) - - [bhv_ukiki_cage_star_loop](functions-2.md#bhv_ukiki_cage_star_loop) - - [bhv_ukiki_init](functions-2.md#bhv_ukiki_init) - - [bhv_ukiki_loop](functions-2.md#bhv_ukiki_loop) + - [bhv_ttc_moving_bar_init](functions-2.md#bhv_ttc_moving_bar_init) + - [bhv_ttc_moving_bar_update](functions-2.md#bhv_ttc_moving_bar_update) + - [bhv_ttc_cog_init](functions-2.md#bhv_ttc_cog_init) + - [bhv_ttc_cog_update](functions-2.md#bhv_ttc_cog_update) + - [bhv_ttc_pit_block_init](functions-2.md#bhv_ttc_pit_block_init) + - [bhv_ttc_pit_block_update](functions-2.md#bhv_ttc_pit_block_update) + - [bhv_ttc_elevator_init](functions-2.md#bhv_ttc_elevator_init) + - [bhv_ttc_elevator_update](functions-2.md#bhv_ttc_elevator_update) + - [bhv_ttc_2d_rotator_init](functions-2.md#bhv_ttc_2d_rotator_init) + - [bhv_ttc_2d_rotator_update](functions-2.md#bhv_ttc_2d_rotator_update) + - [bhv_ttc_spinner_update](functions-2.md#bhv_ttc_spinner_update) + - [bhv_mr_blizzard_init](functions-2.md#bhv_mr_blizzard_init) + - [bhv_mr_blizzard_update](functions-2.md#bhv_mr_blizzard_update) + - [bhv_mr_blizzard_snowball](functions-2.md#bhv_mr_blizzard_snowball) + - [bhv_sliding_plat_2_init](functions-2.md#bhv_sliding_plat_2_init) + - [bhv_sliding_plat_2_loop](functions-2.md#bhv_sliding_plat_2_loop) + - [bhv_rotating_octagonal_plat_init](functions-2.md#bhv_rotating_octagonal_plat_init) + - [bhv_rotating_octagonal_plat_loop](functions-2.md#bhv_rotating_octagonal_plat_loop) + - [bhv_animates_on_floor_switch_press_init](functions-2.md#bhv_animates_on_floor_switch_press_init) + - [bhv_animates_on_floor_switch_press_loop](functions-2.md#bhv_animates_on_floor_switch_press_loop) + - [bhv_activated_back_and_forth_platform_init](functions-2.md#bhv_activated_back_and_forth_platform_init) + - [bhv_activated_back_and_forth_platform_update](functions-2.md#bhv_activated_back_and_forth_platform_update) + - [bhv_recovery_heart_loop](functions-2.md#bhv_recovery_heart_loop) + - [bhv_water_bomb_cannon_loop](functions-2.md#bhv_water_bomb_cannon_loop) + - [bhv_bubble_cannon_barrel_loop](functions-2.md#bhv_bubble_cannon_barrel_loop) - [bhv_unagi_init](functions-2.md#bhv_unagi_init) - [bhv_unagi_loop](functions-2.md#bhv_unagi_loop) - [bhv_unagi_subobject_loop](functions-2.md#bhv_unagi_subobject_loop) - - [bhv_unused_particle_spawn_loop](functions-2.md#bhv_unused_particle_spawn_loop) - - [bhv_unused_poundable_platform](functions-2.md#bhv_unused_poundable_platform) - - [bhv_vanish_cap_init](functions-2.md#bhv_vanish_cap_init) - - [bhv_volcano_flames_loop](functions-2.md#bhv_volcano_flames_loop) - - [bhv_volcano_sound_loop](functions-2.md#bhv_volcano_sound_loop) - - [bhv_volcano_trap_loop](functions-2.md#bhv_volcano_trap_loop) - - [bhv_wall_tiny_star_particle_loop](functions-2.md#bhv_wall_tiny_star_particle_loop) - - [bhv_warp_loop](functions-2.md#bhv_warp_loop) - - [bhv_water_air_bubble_init](functions-2.md#bhv_water_air_bubble_init) - - [bhv_water_air_bubble_loop](functions-2.md#bhv_water_air_bubble_loop) - - [bhv_water_bomb_cannon_loop](functions-2.md#bhv_water_bomb_cannon_loop) - - [bhv_water_bomb_shadow_update](functions-2.md#bhv_water_bomb_shadow_update) - - [bhv_water_bomb_spawner_update](functions-2.md#bhv_water_bomb_spawner_update) - - [bhv_water_bomb_update](functions-2.md#bhv_water_bomb_update) - - [bhv_water_droplet_loop](functions-2.md#bhv_water_droplet_loop) - - [bhv_water_droplet_splash_init](functions-2.md#bhv_water_droplet_splash_init) - - [bhv_water_level_diamond_loop](functions-2.md#bhv_water_level_diamond_loop) - - [bhv_water_level_pillar_init](functions-2.md#bhv_water_level_pillar_init) - - [bhv_water_level_pillar_loop](functions-2.md#bhv_water_level_pillar_loop) - - [bhv_water_mist_2_loop](functions-2.md#bhv_water_mist_2_loop) - - [bhv_water_mist_loop](functions-2.md#bhv_water_mist_loop) - - [bhv_water_mist_spawn_loop](functions-2.md#bhv_water_mist_spawn_loop) - - [bhv_water_splash_spawn_droplets](functions-2.md#bhv_water_splash_spawn_droplets) - - [bhv_water_waves_init](functions-2.md#bhv_water_waves_init) - - [bhv_waterfall_sound_loop](functions-2.md#bhv_waterfall_sound_loop) - - [bhv_wave_trail_shrink](functions-2.md#bhv_wave_trail_shrink) - - [bhv_wdw_express_elevator_loop](functions-2.md#bhv_wdw_express_elevator_loop) - - [bhv_wf_breakable_wall_loop](functions-2.md#bhv_wf_breakable_wall_loop) - - [bhv_wf_elevator_tower_platform_loop](functions-2.md#bhv_wf_elevator_tower_platform_loop) - - [bhv_wf_rotating_wooden_platform_init](functions-2.md#bhv_wf_rotating_wooden_platform_init) - - [bhv_wf_rotating_wooden_platform_loop](functions-2.md#bhv_wf_rotating_wooden_platform_loop) - - [bhv_wf_sliding_platform_init](functions-2.md#bhv_wf_sliding_platform_init) - - [bhv_wf_sliding_platform_loop](functions-2.md#bhv_wf_sliding_platform_loop) - - [bhv_wf_sliding_tower_platform_loop](functions-2.md#bhv_wf_sliding_tower_platform_loop) - - [bhv_wf_solid_tower_platform_loop](functions-2.md#bhv_wf_solid_tower_platform_loop) - - [bhv_whirlpool_init](functions-2.md#bhv_whirlpool_init) - - [bhv_whirlpool_loop](functions-2.md#bhv_whirlpool_loop) - - [bhv_white_puff_1_loop](functions-2.md#bhv_white_puff_1_loop) - - [bhv_white_puff_2_loop](functions-2.md#bhv_white_puff_2_loop) - - [bhv_white_puff_exploding_loop](functions-2.md#bhv_white_puff_exploding_loop) - - [bhv_white_puff_smoke_init](functions-2.md#bhv_white_puff_smoke_init) - - [bhv_whomp_loop](functions-2.md#bhv_whomp_loop) - - [bhv_wiggler_body_part_update](functions-2.md#bhv_wiggler_body_part_update) - - [bhv_wiggler_update](functions-2.md#bhv_wiggler_update) - - [bhv_wind_loop](functions-2.md#bhv_wind_loop) - - [bhv_wing_cap_init](functions-2.md#bhv_wing_cap_init) - - [bhv_wing_vanish_cap_loop](functions-2.md#bhv_wing_vanish_cap_loop) - - [bhv_wooden_post_update](functions-2.md#bhv_wooden_post_update) - - [bhv_yellow_coin_init](functions-2.md#bhv_yellow_coin_init) - - [bhv_yellow_coin_loop](functions-2.md#bhv_yellow_coin_loop) - - [bhv_yoshi_init](functions-2.md#bhv_yoshi_init) + - [bhv_dorrie_update](functions-2.md#bhv_dorrie_update) + - [bhv_haunted_chair_init](functions-2.md#bhv_haunted_chair_init) + - [bhv_haunted_chair_loop](functions-2.md#bhv_haunted_chair_loop) + - [bhv_mad_piano_update](functions-2.md#bhv_mad_piano_update) + - [bhv_flying_bookend_loop](functions-2.md#bhv_flying_bookend_loop) + - [bhv_bookend_spawn_loop](functions-2.md#bhv_bookend_spawn_loop) + - [bhv_haunted_bookshelf_manager_loop](functions-2.md#bhv_haunted_bookshelf_manager_loop) + - [bhv_book_switch_loop](functions-2.md#bhv_book_switch_loop) + - [bhv_fire_piranha_plant_init](functions-2.md#bhv_fire_piranha_plant_init) + - [bhv_fire_piranha_plant_update](functions-2.md#bhv_fire_piranha_plant_update) + - [bhv_small_piranha_flame_loop](functions-2.md#bhv_small_piranha_flame_loop) + - [bhv_fire_spitter_update](functions-2.md#bhv_fire_spitter_update) + - [bhv_fly_guy_flame_loop](functions-2.md#bhv_fly_guy_flame_loop) + - [bhv_snufit_loop](functions-2.md#bhv_snufit_loop) + - [bhv_snufit_balls_loop](functions-2.md#bhv_snufit_balls_loop) + - [bhv_horizontal_grindel_init](functions-2.md#bhv_horizontal_grindel_init) + - [bhv_horizontal_grindel_update](functions-2.md#bhv_horizontal_grindel_update) + - [bhv_eyerok_boss_init](functions-2.md#bhv_eyerok_boss_init) + - [bhv_eyerok_boss_loop](functions-2.md#bhv_eyerok_boss_loop) + - [bhv_eyerok_hand_loop](functions-2.md#bhv_eyerok_hand_loop) + - [bhv_klepto_init](functions-2.md#bhv_klepto_init) + - [bhv_klepto_update](functions-2.md#bhv_klepto_update) + - [bhv_bird_update](functions-2.md#bhv_bird_update) + - [bhv_racing_penguin_init](functions-2.md#bhv_racing_penguin_init) + - [bhv_racing_penguin_update](functions-2.md#bhv_racing_penguin_update) + - [bhv_penguin_race_finish_line_update](functions-2.md#bhv_penguin_race_finish_line_update) + - [bhv_penguin_race_shortcut_check_update](functions-2.md#bhv_penguin_race_shortcut_check_update) + - [bhv_coffin_spawner_loop](functions-2.md#bhv_coffin_spawner_loop) + - [bhv_coffin_loop](functions-2.md#bhv_coffin_loop) + - [bhv_clam_loop](functions-2.md#bhv_clam_loop) + - [bhv_skeeter_update](functions-2.md#bhv_skeeter_update) + - [bhv_skeeter_wave_update](functions-2.md#bhv_skeeter_wave_update) + - [bhv_swing_platform_init](functions-2.md#bhv_swing_platform_init) + - [bhv_swing_platform_update](functions-2.md#bhv_swing_platform_update) + - [bhv_donut_platform_spawner_update](functions-2.md#bhv_donut_platform_spawner_update) + - [bhv_donut_platform_update](functions-2.md#bhv_donut_platform_update) + - [bhv_ddd_pole_init](functions-2.md#bhv_ddd_pole_init) + - [bhv_ddd_pole_update](functions-2.md#bhv_ddd_pole_update) + - [bhv_red_coin_star_marker_init](functions-2.md#bhv_red_coin_star_marker_init) + - [bhv_triplet_butterfly_update](functions-2.md#bhv_triplet_butterfly_update) + - [bhv_bubba_loop](functions-2.md#bhv_bubba_loop) + - [bhv_intro_lakitu_loop](functions-2.md#bhv_intro_lakitu_loop) + - [bhv_intro_peach_loop](functions-2.md#bhv_intro_peach_loop) + - [bhv_end_birds_1_loop](functions-2.md#bhv_end_birds_1_loop) + - [bhv_end_birds_2_loop](functions-2.md#bhv_end_birds_2_loop) + - [bhv_intro_scene_loop](functions-2.md#bhv_intro_scene_loop) - [bhv_yoshi_loop](functions-2.md#bhv_yoshi_loop) - - [check_if_moving_over_floor](functions-2.md#check_if_moving_over_floor) - - [clear_particle_flags](functions-2.md#clear_particle_flags) - - [common_anchor_mario_behavior](functions-2.md#common_anchor_mario_behavior) - - [cur_obj_spawn_strong_wind_particles](functions-2.md#cur_obj_spawn_strong_wind_particles) - - [mario_moving_fast_enough_to_make_piranha_plant_bite](functions-2.md#mario_moving_fast_enough_to_make_piranha_plant_bite) - - [obj_set_secondary_camera_focus](functions-2.md#obj_set_secondary_camera_focus) - - [play_penguin_walking_sound](functions-2.md#play_penguin_walking_sound) - - [spawn_ambient_light](functions-2.md#spawn_ambient_light) - - [spawn_default_star](functions-2.md#spawn_default_star) - - [spawn_mist_from_global](functions-2.md#spawn_mist_from_global) - - [spawn_mist_particles_variable](functions-2.md#spawn_mist_particles_variable) - - [spawn_no_exit_star](functions-2.md#spawn_no_exit_star) - - [spawn_point_light](functions-2.md#spawn_point_light) - - [spawn_red_coin_cutscene_star](functions-2.md#spawn_red_coin_cutscene_star) - - [spawn_star_number](functions-2.md#spawn_star_number) - - [spawn_triangle_break_particles](functions-2.md#spawn_triangle_break_particles) - - [spawn_wind_particles](functions-2.md#spawn_wind_particles) - - [tox_box_move](functions-2.md#tox_box_move) - - [update_angle_from_move_flags](functions-2.md#update_angle_from_move_flags) + - [bhv_volcano_trap_loop](functions-2.md#bhv_volcano_trap_loop) - [uv_update_scroll](functions-2.md#uv_update_scroll) - - [vec3f_copy_2](functions-2.md#vec3f_copy_2) + - [spawn_ambient_light](functions-2.md#spawn_ambient_light) + - [spawn_point_light](functions-2.md#spawn_point_light) + - [bhv_ambient_light_update](functions-2.md#bhv_ambient_light_update) + - [bhv_point_light_init](functions-2.md#bhv_point_light_init) + - [bhv_point_light_loop](functions-2.md#bhv_point_light_loop) + - [spawn_default_star](functions-2.md#spawn_default_star) + - [spawn_red_coin_cutscene_star](functions-2.md#spawn_red_coin_cutscene_star) + - [spawn_no_exit_star](functions-2.md#spawn_no_exit_star)
- behavior_script.h - - [draw_distance_scalar](functions-3.md#draw_distance_scalar) - - [obj_update_gfx_pos_and_angle](functions-3.md#obj_update_gfx_pos_and_angle) - - [position_based_random_float_position](functions-3.md#position_based_random_float_position) - - [position_based_random_u16](functions-3.md#position_based_random_u16) + - [random_u16](functions-3.md#random_u16) - [random_float](functions-3.md#random_float) - [random_sign](functions-3.md#random_sign) - - [random_u16](functions-3.md#random_u16) + - [obj_update_gfx_pos_and_angle](functions-3.md#obj_update_gfx_pos_and_angle) + - [position_based_random_u16](functions-3.md#position_based_random_u16) + - [position_based_random_float_position](functions-3.md#position_based_random_float_position) + - [draw_distance_scalar](functions-3.md#draw_distance_scalar)
- behavior_table.h + - [get_id_from_behavior](functions-3.md#get_id_from_behavior) + - [get_id_from_vanilla_behavior](functions-3.md#get_id_from_vanilla_behavior) - [get_behavior_from_id](functions-3.md#get_behavior_from_id) - [get_behavior_name_from_id](functions-3.md#get_behavior_name_from_id) - - [get_id_from_behavior](functions-3.md#get_id_from_behavior) - [get_id_from_behavior_name](functions-3.md#get_id_from_behavior_name) - - [get_id_from_vanilla_behavior](functions-3.md#get_id_from_vanilla_behavior)
- camera.h - - [approach_camera_height](functions-3.md#approach_camera_height) - - [approach_f32_asymptotic](functions-3.md#approach_f32_asymptotic) + - [skip_camera_interpolation](functions-3.md#skip_camera_interpolation) + - [set_camera_shake_from_hit](functions-3.md#set_camera_shake_from_hit) + - [set_environmental_camera_shake](functions-3.md#set_environmental_camera_shake) + - [set_camera_shake_from_point](functions-3.md#set_camera_shake_from_point) + - [move_mario_head_c_up](functions-3.md#move_mario_head_c_up) + - [transition_next_state](functions-3.md#transition_next_state) + - [set_camera_mode](functions-3.md#set_camera_mode) + - [soft_reset_camera](functions-3.md#soft_reset_camera) + - [reset_camera](functions-3.md#reset_camera) + - [select_mario_cam_mode](functions-3.md#select_mario_cam_mode) + - [vec3f_sub](functions-3.md#vec3f_sub) + - [object_pos_to_vec3f](functions-3.md#object_pos_to_vec3f) + - [vec3f_to_object_pos](functions-3.md#vec3f_to_object_pos) + - [cam_select_alt_mode](functions-3.md#cam_select_alt_mode) + - [set_cam_angle](functions-3.md#set_cam_angle) + - [set_handheld_shake](functions-3.md#set_handheld_shake) + - [shake_camera_handheld](functions-3.md#shake_camera_handheld) + - [find_c_buttons_pressed](functions-3.md#find_c_buttons_pressed) + - [collide_with_walls](functions-3.md#collide_with_walls) + - [clamp_pitch](functions-3.md#clamp_pitch) + - [is_within_100_units_of_mario](functions-3.md#is_within_100_units_of_mario) + - [set_or_approach_f32_asymptotic](functions-3.md#set_or_approach_f32_asymptotic) - [approach_f32_asymptotic_bool](functions-3.md#approach_f32_asymptotic_bool) - - [approach_s16_asymptotic](functions-3.md#approach_s16_asymptotic) + - [approach_f32_asymptotic](functions-3.md#approach_f32_asymptotic) - [approach_s16_asymptotic_bool](functions-3.md#approach_s16_asymptotic_bool) + - [approach_s16_asymptotic](functions-3.md#approach_s16_asymptotic) - [approach_vec3f_asymptotic](functions-3.md#approach_vec3f_asymptotic) - - [calc_abs_dist](functions-3.md#calc_abs_dist) - - [calc_hor_dist](functions-3.md#calc_hor_dist) - - [calculate_angles](functions-3.md#calculate_angles) + - [set_or_approach_vec3f_asymptotic](functions-3.md#set_or_approach_vec3f_asymptotic) + - [camera_approach_s16_symmetric_bool](functions-3.md#camera_approach_s16_symmetric_bool) + - [set_or_approach_s16_symmetric](functions-3.md#set_or_approach_s16_symmetric) + - [camera_approach_f32_symmetric_bool](functions-3.md#camera_approach_f32_symmetric_bool) + - [camera_approach_f32_symmetric](functions-3.md#camera_approach_f32_symmetric) + - [random_vec3s](functions-3.md#random_vec3s) + - [clamp_positions_and_find_yaw](functions-3.md#clamp_positions_and_find_yaw) + - [is_range_behind_surface](functions-3.md#is_range_behind_surface) + - [scale_along_line](functions-3.md#scale_along_line) - [calculate_pitch](functions-3.md#calculate_pitch) - [calculate_yaw](functions-3.md#calculate_yaw) - - [cam_select_alt_mode](functions-3.md#cam_select_alt_mode) - - [camera_approach_f32_symmetric](functions-3.md#camera_approach_f32_symmetric) - - [camera_approach_f32_symmetric_bool](functions-3.md#camera_approach_f32_symmetric_bool) - - [camera_approach_s16_symmetric_bool](functions-3.md#camera_approach_s16_symmetric_bool) - - [camera_course_processing](functions-3.md#camera_course_processing) - - [camera_set_use_course_specific_settings](functions-3.md#camera_set_use_course_specific_settings) - - [center_rom_hack_camera](functions-3.md#center_rom_hack_camera) - - [clamp_pitch](functions-3.md#clamp_pitch) - - [clamp_positions_and_find_yaw](functions-3.md#clamp_positions_and_find_yaw) - - [collide_with_walls](functions-3.md#collide_with_walls) - - [cutscene_object](functions-3.md#cutscene_object) - - [cutscene_object_with_dialog](functions-3.md#cutscene_object_with_dialog) - - [cutscene_object_without_dialog](functions-3.md#cutscene_object_without_dialog) - - [cutscene_set_fov_shake_preset](functions-3.md#cutscene_set_fov_shake_preset) - - [cutscene_spawn_obj](functions-3.md#cutscene_spawn_obj) - - [find_c_buttons_pressed](functions-3.md#find_c_buttons_pressed) - - [find_mario_floor_and_ceil](functions-3.md#find_mario_floor_and_ceil) - - [get_cutscene_from_mario_status](functions-3.md#get_cutscene_from_mario_status) - - [handle_c_button_movement](functions-3.md#handle_c_button_movement) - - [is_range_behind_surface](functions-3.md#is_range_behind_surface) - - [is_within_100_units_of_mario](functions-3.md#is_within_100_units_of_mario) - - [move_mario_head_c_up](functions-3.md#move_mario_head_c_up) - - [next_lakitu_state](functions-3.md#next_lakitu_state) - - [obj_rotate_towards_point](functions-3.md#obj_rotate_towards_point) - - [object_pos_to_vec3f](functions-3.md#object_pos_to_vec3f) - - [offset_rotated](functions-3.md#offset_rotated) - - [offset_yaw_outward_radial](functions-3.md#offset_yaw_outward_radial) - - [play_camera_buzz_if_c_sideways](functions-3.md#play_camera_buzz_if_c_sideways) - - [play_camera_buzz_if_cbutton](functions-3.md#play_camera_buzz_if_cbutton) - - [play_camera_buzz_if_cdown](functions-3.md#play_camera_buzz_if_cdown) - - [play_cutscene](functions-3.md#play_cutscene) - - [play_sound_button_change_blocked](functions-3.md#play_sound_button_change_blocked) - - [play_sound_cbutton_down](functions-3.md#play_sound_cbutton_down) - - [play_sound_cbutton_side](functions-3.md#play_sound_cbutton_side) - - [play_sound_cbutton_up](functions-3.md#play_sound_cbutton_up) - - [play_sound_if_cam_switched_to_lakitu_or_mario](functions-3.md#play_sound_if_cam_switched_to_lakitu_or_mario) - - [play_sound_rbutton_changed](functions-3.md#play_sound_rbutton_changed) - - [radial_camera_input](functions-3.md#radial_camera_input) - - [random_vec3s](functions-3.md#random_vec3s) - - [reset_camera](functions-3.md#reset_camera) - - [resolve_geometry_collisions](functions-3.md#resolve_geometry_collisions) - - [rotate_camera_around_walls](functions-3.md#rotate_camera_around_walls) + - [calculate_angles](functions-3.md#calculate_angles) + - [calc_abs_dist](functions-3.md#calc_abs_dist) + - [calc_hor_dist](functions-3.md#calc_hor_dist) - [rotate_in_xz](functions-3.md#rotate_in_xz) - [rotate_in_yz](functions-3.md#rotate_in_yz) - - [scale_along_line](functions-3.md#scale_along_line) - - [select_mario_cam_mode](functions-3.md#select_mario_cam_mode) - - [set_cam_angle](functions-3.md#set_cam_angle) - - [set_camera_mode](functions-3.md#set_camera_mode) - - [set_camera_mode_fixed](functions-3.md#set_camera_mode_fixed) - [set_camera_pitch_shake](functions-3.md#set_camera_pitch_shake) - - [set_camera_roll_shake](functions-3.md#set_camera_roll_shake) - - [set_camera_shake_from_hit](functions-3.md#set_camera_shake_from_hit) - - [set_camera_shake_from_point](functions-3.md#set_camera_shake_from_point) - [set_camera_yaw_shake](functions-3.md#set_camera_yaw_shake) - - [set_environmental_camera_shake](functions-3.md#set_environmental_camera_shake) - - [set_fixed_cam_axis_sa_lobby](functions-3.md#set_fixed_cam_axis_sa_lobby) - - [set_fov_function](functions-3.md#set_fov_function) - - [set_fov_shake](functions-3.md#set_fov_shake) - - [set_fov_shake_from_point_preset](functions-3.md#set_fov_shake_from_point_preset) - - [set_handheld_shake](functions-3.md#set_handheld_shake) - - [set_or_approach_f32_asymptotic](functions-3.md#set_or_approach_f32_asymptotic) - - [set_or_approach_s16_symmetric](functions-3.md#set_or_approach_s16_symmetric) - - [set_or_approach_vec3f_asymptotic](functions-3.md#set_or_approach_vec3f_asymptotic) + - [set_camera_roll_shake](functions-3.md#set_camera_roll_shake) - [set_pitch_shake_from_point](functions-3.md#set_pitch_shake_from_point) - - [shake_camera_handheld](functions-3.md#shake_camera_handheld) - [shake_camera_pitch](functions-3.md#shake_camera_pitch) - - [shake_camera_roll](functions-3.md#shake_camera_roll) - [shake_camera_yaw](functions-3.md#shake_camera_yaw) - - [skip_camera_interpolation](functions-3.md#skip_camera_interpolation) - - [snap_to_45_degrees](functions-3.md#snap_to_45_degrees) - - [soft_reset_camera](functions-3.md#soft_reset_camera) - - [start_cutscene](functions-3.md#start_cutscene) - - [start_object_cutscene_without_focus](functions-3.md#start_object_cutscene_without_focus) - - [transition_next_state](functions-3.md#transition_next_state) + - [shake_camera_roll](functions-3.md#shake_camera_roll) + - [offset_yaw_outward_radial](functions-3.md#offset_yaw_outward_radial) + - [play_camera_buzz_if_cdown](functions-3.md#play_camera_buzz_if_cdown) + - [play_camera_buzz_if_cbutton](functions-3.md#play_camera_buzz_if_cbutton) + - [play_camera_buzz_if_c_sideways](functions-3.md#play_camera_buzz_if_c_sideways) + - [play_sound_cbutton_up](functions-3.md#play_sound_cbutton_up) + - [play_sound_cbutton_down](functions-3.md#play_sound_cbutton_down) + - [play_sound_cbutton_side](functions-3.md#play_sound_cbutton_side) + - [play_sound_button_change_blocked](functions-3.md#play_sound_button_change_blocked) + - [play_sound_rbutton_changed](functions-3.md#play_sound_rbutton_changed) + - [play_sound_if_cam_switched_to_lakitu_or_mario](functions-3.md#play_sound_if_cam_switched_to_lakitu_or_mario) + - [radial_camera_input](functions-3.md#radial_camera_input) - [trigger_cutscene_dialog](functions-3.md#trigger_cutscene_dialog) - - [vec3f_sub](functions-3.md#vec3f_sub) - - [vec3f_to_object_pos](functions-3.md#vec3f_to_object_pos) + - [handle_c_button_movement](functions-3.md#handle_c_button_movement) + - [start_cutscene](functions-3.md#start_cutscene) + - [get_cutscene_from_mario_status](functions-3.md#get_cutscene_from_mario_status) - [warp_camera](functions-3.md#warp_camera) + - [approach_camera_height](functions-3.md#approach_camera_height) + - [offset_rotated](functions-3.md#offset_rotated) + - [next_lakitu_state](functions-3.md#next_lakitu_state) + - [set_fixed_cam_axis_sa_lobby](functions-3.md#set_fixed_cam_axis_sa_lobby) + - [camera_course_processing](functions-3.md#camera_course_processing) + - [resolve_geometry_collisions](functions-3.md#resolve_geometry_collisions) + - [rotate_camera_around_walls](functions-3.md#rotate_camera_around_walls) + - [find_mario_floor_and_ceil](functions-3.md#find_mario_floor_and_ceil) + - [start_object_cutscene_without_focus](functions-3.md#start_object_cutscene_without_focus) + - [cutscene_object_with_dialog](functions-3.md#cutscene_object_with_dialog) + - [cutscene_object_without_dialog](functions-3.md#cutscene_object_without_dialog) + - [cutscene_object](functions-3.md#cutscene_object) + - [play_cutscene](functions-3.md#play_cutscene) + - [cutscene_spawn_obj](functions-3.md#cutscene_spawn_obj) + - [set_fov_shake](functions-3.md#set_fov_shake) + - [set_fov_function](functions-3.md#set_fov_function) + - [cutscene_set_fov_shake_preset](functions-3.md#cutscene_set_fov_shake_preset) + - [set_fov_shake_from_point_preset](functions-3.md#set_fov_shake_from_point_preset) + - [obj_rotate_towards_point](functions-3.md#obj_rotate_towards_point) + - [set_camera_mode_fixed](functions-3.md#set_camera_mode_fixed) + - [snap_to_45_degrees](functions-3.md#snap_to_45_degrees) + - [camera_set_use_course_specific_settings](functions-3.md#camera_set_use_course_specific_settings) + - [center_rom_hack_camera](functions-3.md#center_rom_hack_camera)
- characters.h - [get_character](functions-3.md#get_character) - - [get_character_anim](functions-3.md#get_character_anim) - - [get_character_anim_offset](functions-3.md#get_character_anim_offset) - [play_character_sound](functions-3.md#play_character_sound) - - [play_character_sound_if_no_flag](functions-3.md#play_character_sound_if_no_flag) - [play_character_sound_offset](functions-3.md#play_character_sound_offset) + - [play_character_sound_if_no_flag](functions-3.md#play_character_sound_if_no_flag) + - [get_character_anim_offset](functions-3.md#get_character_anim_offset) + - [get_character_anim](functions-3.md#get_character_anim) - [update_character_anim_offset](functions-3.md#update_character_anim_offset)
@@ -752,35 +752,40 @@
- djui_hud_utils.h - - [djui_hud_get_color](functions-3.md#djui_hud_get_color) + - [djui_hud_get_resolution](functions-3.md#djui_hud_get_resolution) + - [djui_hud_set_resolution](functions-3.md#djui_hud_set_resolution) - [djui_hud_get_filter](functions-3.md#djui_hud_get_filter) + - [djui_hud_set_filter](functions-3.md#djui_hud_set_filter) - [djui_hud_get_font](functions-3.md#djui_hud_get_font) - - [djui_hud_get_fov_coeff](functions-3.md#djui_hud_get_fov_coeff) + - [djui_hud_set_font](functions-3.md#djui_hud_set_font) + - [djui_hud_get_color](functions-3.md#djui_hud_get_color) + - [djui_hud_set_color](functions-3.md#djui_hud_set_color) + - [djui_hud_reset_color](functions-3.md#djui_hud_reset_color) + - [djui_hud_get_rotation](functions-3.md#djui_hud_get_rotation) + - [djui_hud_set_rotation](functions-3.md#djui_hud_set_rotation) + - [djui_hud_set_rotation_interpolated](functions-3.md#djui_hud_set_rotation_interpolated) + - [djui_hud_get_screen_width](functions-3.md#djui_hud_get_screen_width) + - [djui_hud_get_screen_height](functions-3.md#djui_hud_get_screen_height) - [djui_hud_get_mouse_x](functions-3.md#djui_hud_get_mouse_x) - [djui_hud_get_mouse_y](functions-3.md#djui_hud_get_mouse_y) - [djui_hud_get_raw_mouse_x](functions-3.md#djui_hud_get_raw_mouse_x) - [djui_hud_get_raw_mouse_y](functions-3.md#djui_hud_get_raw_mouse_y) - - [djui_hud_get_resolution](functions-3.md#djui_hud_get_resolution) - - [djui_hud_get_rotation](functions-3.md#djui_hud_get_rotation) - - [djui_hud_get_screen_height](functions-3.md#djui_hud_get_screen_height) - - [djui_hud_get_screen_width](functions-3.md#djui_hud_get_screen_width) - - [djui_hud_is_pause_menu_created](functions-3.md#djui_hud_is_pause_menu_created) + - [djui_hud_set_mouse_locked](functions-3.md#djui_hud_set_mouse_locked) + - [djui_hud_get_mouse_buttons_down](functions-3.md#djui_hud_get_mouse_buttons_down) + - [djui_hud_get_mouse_buttons_pressed](functions-3.md#djui_hud_get_mouse_buttons_pressed) + - [djui_hud_get_mouse_buttons_released](functions-3.md#djui_hud_get_mouse_buttons_released) + - [djui_hud_get_mouse_scroll_x](functions-3.md#djui_hud_get_mouse_scroll_x) + - [djui_hud_get_mouse_scroll_y](functions-3.md#djui_hud_get_mouse_scroll_y) - [djui_hud_measure_text](functions-3.md#djui_hud_measure_text) - [djui_hud_print_text](functions-3.md#djui_hud_print_text) - [djui_hud_print_text_interpolated](functions-3.md#djui_hud_print_text_interpolated) - [djui_hud_render_rect](functions-3.md#djui_hud_render_rect) - [djui_hud_render_rect_interpolated](functions-3.md#djui_hud_render_rect_interpolated) - - [djui_hud_reset_color](functions-3.md#djui_hud_reset_color) - - [djui_hud_set_color](functions-3.md#djui_hud_set_color) - - [djui_hud_set_filter](functions-3.md#djui_hud_set_filter) - - [djui_hud_set_font](functions-3.md#djui_hud_set_font) - - [djui_hud_set_mouse_locked](functions-3.md#djui_hud_set_mouse_locked) - - [djui_hud_set_resolution](functions-3.md#djui_hud_set_resolution) - - [djui_hud_set_rotation](functions-3.md#djui_hud_set_rotation) - - [djui_hud_set_rotation_interpolated](functions-3.md#djui_hud_set_rotation_interpolated) - - [djui_hud_world_pos_to_screen_pos](functions-3.md#djui_hud_world_pos_to_screen_pos) - - [djui_open_pause_menu](functions-3.md#djui_open_pause_menu) - [get_current_fov](functions-3.md#get_current_fov) + - [djui_hud_get_fov_coeff](functions-3.md#djui_hud_get_fov_coeff) + - [djui_hud_world_pos_to_screen_pos](functions-3.md#djui_hud_world_pos_to_screen_pos) + - [djui_hud_is_pause_menu_created](functions-3.md#djui_hud_is_pause_menu_created) + - [djui_open_pause_menu](functions-3.md#djui_open_pause_menu)
@@ -800,137 +805,137 @@
- external.h - - [drop_queued_background_music](functions-3.md#drop_queued_background_music) - - [fade_volume_scale](functions-3.md#fade_volume_scale) - - [fadeout_background_music](functions-3.md#fadeout_background_music) - - [get_current_background_music](functions-3.md#get_current_background_music) - - [get_current_background_music_default_volume](functions-3.md#get_current_background_music_default_volume) - - [get_current_background_music_max_target_volume](functions-3.md#get_current_background_music_max_target_volume) - - [get_current_background_music_target_volume](functions-3.md#get_current_background_music_target_volume) - - [get_sound_pan](functions-3.md#get_sound_pan) - - [is_current_background_music_volume_lowered](functions-3.md#is_current_background_music_volume_lowered) - - [play_course_clear](functions-3.md#play_course_clear) - - [play_dialog_sound](functions-3.md#play_dialog_sound) - - [play_music](functions-3.md#play_music) - - [play_peachs_jingle](functions-3.md#play_peachs_jingle) - - [play_power_star_jingle](functions-3.md#play_power_star_jingle) - - [play_puzzle_jingle](functions-3.md#play_puzzle_jingle) - - [play_race_fanfare](functions-3.md#play_race_fanfare) - - [play_secondary_music](functions-3.md#play_secondary_music) - [play_sound](functions-3.md#play_sound) - [play_sound_with_freq_scale](functions-3.md#play_sound_with_freq_scale) - - [play_star_fanfare](functions-3.md#play_star_fanfare) - - [play_toads_jingle](functions-3.md#play_toads_jingle) - [seq_player_fade_out](functions-3.md#seq_player_fade_out) + - [fade_volume_scale](functions-3.md#fade_volume_scale) - [seq_player_lower_volume](functions-3.md#seq_player_lower_volume) - [seq_player_unlower_volume](functions-3.md#seq_player_unlower_volume) - - [set_audio_fadeout](functions-3.md#set_audio_fadeout) - [set_audio_muted](functions-3.md#set_audio_muted) - - [set_sound_moving_speed](functions-3.md#set_sound_moving_speed) - - [sound_banks_disable](functions-3.md#sound_banks_disable) - - [sound_banks_enable](functions-3.md#sound_banks_enable) - - [sound_get_level_intensity](functions-3.md#sound_get_level_intensity) - - [sound_reset_background_music_default_volume](functions-3.md#sound_reset_background_music_default_volume) - - [sound_set_background_music_default_volume](functions-3.md#sound_set_background_music_default_volume) - - [stop_background_music](functions-3.md#stop_background_music) - - [stop_secondary_music](functions-3.md#stop_secondary_music) - [stop_sound](functions-3.md#stop_sound) - [stop_sounds_from_source](functions-3.md#stop_sounds_from_source) - [stop_sounds_in_continuous_banks](functions-3.md#stop_sounds_in_continuous_banks) + - [sound_banks_disable](functions-3.md#sound_banks_disable) + - [sound_banks_enable](functions-3.md#sound_banks_enable) + - [set_sound_moving_speed](functions-3.md#set_sound_moving_speed) + - [play_dialog_sound](functions-3.md#play_dialog_sound) + - [play_music](functions-3.md#play_music) + - [stop_background_music](functions-3.md#stop_background_music) + - [fadeout_background_music](functions-3.md#fadeout_background_music) + - [drop_queued_background_music](functions-3.md#drop_queued_background_music) + - [get_current_background_music](functions-3.md#get_current_background_music) + - [get_current_background_music_default_volume](functions-3.md#get_current_background_music_default_volume) + - [get_current_background_music_target_volume](functions-3.md#get_current_background_music_target_volume) + - [get_current_background_music_max_target_volume](functions-3.md#get_current_background_music_max_target_volume) + - [is_current_background_music_volume_lowered](functions-3.md#is_current_background_music_volume_lowered) + - [play_secondary_music](functions-3.md#play_secondary_music) + - [stop_secondary_music](functions-3.md#stop_secondary_music) + - [set_audio_fadeout](functions-3.md#set_audio_fadeout) + - [play_course_clear](functions-3.md#play_course_clear) + - [play_peachs_jingle](functions-3.md#play_peachs_jingle) + - [play_puzzle_jingle](functions-3.md#play_puzzle_jingle) + - [play_star_fanfare](functions-3.md#play_star_fanfare) + - [play_power_star_jingle](functions-3.md#play_power_star_jingle) + - [play_race_fanfare](functions-3.md#play_race_fanfare) + - [play_toads_jingle](functions-3.md#play_toads_jingle) + - [sound_reset_background_music_default_volume](functions-3.md#sound_reset_background_music_default_volume) + - [sound_set_background_music_default_volume](functions-3.md#sound_set_background_music_default_volume) + - [get_sound_pan](functions-3.md#get_sound_pan) + - [sound_get_level_intensity](functions-3.md#sound_get_level_intensity)
- first_person_cam.h - [first_person_check_cancels](functions-3.md#first_person_check_cancels) - - [first_person_reset](functions-3.md#first_person_reset) - [get_first_person_enabled](functions-3.md#get_first_person_enabled) - [set_first_person_enabled](functions-3.md#set_first_person_enabled) + - [first_person_reset](functions-3.md#first_person_reset)
- ingame_menu.h - [create_dialog_box](functions-3.md#create_dialog_box) - - [create_dialog_box_with_response](functions-3.md#create_dialog_box_with_response) - [create_dialog_box_with_var](functions-3.md#create_dialog_box_with_var) - [create_dialog_inverted_box](functions-3.md#create_dialog_inverted_box) - - [reset_dialog_override_color](functions-3.md#reset_dialog_override_color) - - [reset_dialog_override_pos](functions-3.md#reset_dialog_override_pos) + - [create_dialog_box_with_response](functions-3.md#create_dialog_box_with_response) - [reset_dialog_render_state](functions-3.md#reset_dialog_render_state) - - [set_dialog_box_state](functions-3.md#set_dialog_box_state) - - [set_dialog_override_color](functions-3.md#set_dialog_override_color) - - [set_dialog_override_pos](functions-3.md#set_dialog_override_pos) - [set_menu_mode](functions-3.md#set_menu_mode) - [set_min_dialog_width](functions-3.md#set_min_dialog_width) + - [set_dialog_override_pos](functions-3.md#set_dialog_override_pos) + - [reset_dialog_override_pos](functions-3.md#reset_dialog_override_pos) + - [set_dialog_override_color](functions-3.md#set_dialog_override_color) + - [reset_dialog_override_color](functions-3.md#reset_dialog_override_color) + - [set_dialog_box_state](functions-3.md#set_dialog_box_state)
- interaction.h - - [determine_interaction](functions-3.md#determine_interaction) - - [does_mario_have_normal_cap_on_head](functions-3.md#does_mario_have_normal_cap_on_head) - - [get_door_save_file_flag](functions-3.md#get_door_save_file_flag) - - [get_mario_cap_flag](functions-3.md#get_mario_cap_flag) - - [interact_bbh_entrance](functions-3.md#interact_bbh_entrance) - - [interact_bounce_top](functions-3.md#interact_bounce_top) - - [interact_breakable](functions-3.md#interact_breakable) - - [interact_bully](functions-3.md#interact_bully) - - [interact_cannon_base](functions-3.md#interact_cannon_base) - - [interact_cap](functions-3.md#interact_cap) - - [interact_clam_or_bubba](functions-3.md#interact_clam_or_bubba) - [interact_coin](functions-3.md#interact_coin) - - [interact_damage](functions-3.md#interact_damage) - - [interact_door](functions-3.md#interact_door) - - [interact_flame](functions-3.md#interact_flame) - - [interact_grabbable](functions-3.md#interact_grabbable) - - [interact_hit_from_below](functions-3.md#interact_hit_from_below) - - [interact_hoot](functions-3.md#interact_hoot) - - [interact_igloo_barrier](functions-3.md#interact_igloo_barrier) - - [interact_koopa_shell](functions-3.md#interact_koopa_shell) - - [interact_mr_blizzard](functions-3.md#interact_mr_blizzard) - - [interact_player](functions-3.md#interact_player) - - [interact_pole](functions-3.md#interact_pole) - - [interact_shock](functions-3.md#interact_shock) - - [interact_snufit_bullet](functions-3.md#interact_snufit_bullet) - - [interact_spiny_walking](functions-3.md#interact_spiny_walking) + - [interact_water_ring](functions-3.md#interact_water_ring) - [interact_star_or_key](functions-3.md#interact_star_or_key) - - [interact_strong_wind](functions-3.md#interact_strong_wind) - - [interact_text](functions-3.md#interact_text) - - [interact_tornado](functions-3.md#interact_tornado) + - [interact_bbh_entrance](functions-3.md#interact_bbh_entrance) - [interact_warp](functions-3.md#interact_warp) - [interact_warp_door](functions-3.md#interact_warp_door) - - [interact_water_ring](functions-3.md#interact_water_ring) + - [interact_door](functions-3.md#interact_door) + - [interact_cannon_base](functions-3.md#interact_cannon_base) + - [interact_player](functions-3.md#interact_player) + - [interact_igloo_barrier](functions-3.md#interact_igloo_barrier) + - [interact_tornado](functions-3.md#interact_tornado) - [interact_whirlpool](functions-3.md#interact_whirlpool) - - [mario_blow_off_cap](functions-3.md#mario_blow_off_cap) - - [mario_check_object_grab](functions-3.md#mario_check_object_grab) - - [mario_drop_held_object](functions-3.md#mario_drop_held_object) - - [mario_get_collided_object](functions-3.md#mario_get_collided_object) - - [mario_grab_used_object](functions-3.md#mario_grab_used_object) - - [mario_lose_cap_to_enemy](functions-3.md#mario_lose_cap_to_enemy) + - [interact_strong_wind](functions-3.md#interact_strong_wind) + - [interact_flame](functions-3.md#interact_flame) + - [interact_snufit_bullet](functions-3.md#interact_snufit_bullet) + - [interact_clam_or_bubba](functions-3.md#interact_clam_or_bubba) + - [interact_bully](functions-3.md#interact_bully) + - [interact_shock](functions-3.md#interact_shock) + - [interact_mr_blizzard](functions-3.md#interact_mr_blizzard) + - [interact_hit_from_below](functions-3.md#interact_hit_from_below) + - [interact_bounce_top](functions-3.md#interact_bounce_top) + - [interact_spiny_walking](functions-3.md#interact_spiny_walking) + - [interact_damage](functions-3.md#interact_damage) + - [interact_breakable](functions-3.md#interact_breakable) + - [interact_koopa_shell](functions-3.md#interact_koopa_shell) + - [interact_pole](functions-3.md#interact_pole) + - [interact_hoot](functions-3.md#interact_hoot) + - [interact_cap](functions-3.md#interact_cap) + - [interact_grabbable](functions-3.md#interact_grabbable) + - [interact_text](functions-3.md#interact_text) - [mario_obj_angle_to_object](functions-3.md#mario_obj_angle_to_object) - - [mario_retrieve_cap](functions-3.md#mario_retrieve_cap) - - [mario_stop_riding_and_holding](functions-3.md#mario_stop_riding_and_holding) - [mario_stop_riding_object](functions-3.md#mario_stop_riding_object) + - [mario_grab_used_object](functions-3.md#mario_grab_used_object) + - [mario_drop_held_object](functions-3.md#mario_drop_held_object) - [mario_throw_held_object](functions-3.md#mario_throw_held_object) + - [mario_stop_riding_and_holding](functions-3.md#mario_stop_riding_and_holding) + - [does_mario_have_normal_cap_on_head](functions-3.md#does_mario_have_normal_cap_on_head) + - [mario_blow_off_cap](functions-3.md#mario_blow_off_cap) + - [mario_lose_cap_to_enemy](functions-3.md#mario_lose_cap_to_enemy) + - [mario_retrieve_cap](functions-3.md#mario_retrieve_cap) + - [mario_get_collided_object](functions-3.md#mario_get_collided_object) + - [mario_check_object_grab](functions-3.md#mario_check_object_grab) + - [get_door_save_file_flag](functions-3.md#get_door_save_file_flag) - [passes_pvp_interaction_checks](functions-3.md#passes_pvp_interaction_checks) - [should_push_or_pull_door](functions-3.md#should_push_or_pull_door) - [take_damage_and_knock_back](functions-3.md#take_damage_and_knock_back) + - [get_mario_cap_flag](functions-3.md#get_mario_cap_flag) + - [determine_interaction](functions-3.md#determine_interaction)
- lag_compensation.h - - [lag_compensation_get_local_state](functions-3.md#lag_compensation_get_local_state) - - [lag_compensation_get_local_state_index](functions-3.md#lag_compensation_get_local_state_index) - - [lag_compensation_get_local_state_ready](functions-3.md#lag_compensation_get_local_state_ready) - [lag_compensation_store](functions-3.md#lag_compensation_store) + - [lag_compensation_get_local_state](functions-3.md#lag_compensation_get_local_state) + - [lag_compensation_get_local_state_ready](functions-3.md#lag_compensation_get_local_state_ready) + - [lag_compensation_get_local_state_index](functions-3.md#lag_compensation_get_local_state_index)
- level_info.h - - [get_level_name](functions-3.md#get_level_name) - [get_level_name_ascii](functions-3.md#get_level_name_ascii) - [get_level_name_sm64](functions-3.md#get_level_name_sm64) - - [get_star_name](functions-3.md#get_star_name) + - [get_level_name](functions-3.md#get_level_name) - [get_star_name_ascii](functions-3.md#get_star_name_ascii) - [get_star_name_sm64](functions-3.md#get_star_name_sm64) + - [get_star_name](functions-3.md#get_star_name)
@@ -940,211 +945,211 @@
- level_update.h + - [level_control_timer_running](functions-3.md#level_control_timer_running) - [fade_into_special_warp](functions-3.md#fade_into_special_warp) - [get_instant_warp](functions-3.md#get_instant_warp) - [get_painting_warp_node](functions-3.md#get_painting_warp_node) - [initiate_painting_warp](functions-3.md#initiate_painting_warp) - - [level_control_timer_running](functions-3.md#level_control_timer_running) - [level_trigger_warp](functions-3.md#level_trigger_warp) - - [lvl_set_current_level](functions-3.md#lvl_set_current_level) - [warp_special](functions-3.md#warp_special) + - [lvl_set_current_level](functions-3.md#lvl_set_current_level)
- lighting_engine.h - - [le_add_light](functions-3.md#le_add_light) - [le_calculate_lighting_color](functions-3.md#le_calculate_lighting_color) - [le_calculate_lighting_dir](functions-3.md#le_calculate_lighting_dir) - - [le_get_light_count](functions-3.md#le_get_light_count) + - [le_add_light](functions-3.md#le_add_light) - [le_remove_light](functions-3.md#le_remove_light) + - [le_get_light_count](functions-3.md#le_get_light_count) - [le_set_ambient_color](functions-3.md#le_set_ambient_color) - - [le_set_light_color](functions-3.md#le_set_light_color) - - [le_set_light_intensity](functions-3.md#le_set_light_intensity) - [le_set_light_pos](functions-3.md#le_set_light_pos) + - [le_set_light_color](functions-3.md#le_set_light_color) - [le_set_light_radius](functions-3.md#le_set_light_radius) + - [le_set_light_intensity](functions-3.md#le_set_light_intensity)
- mario.h - - [adjust_sound_for_speed](functions-4.md#adjust_sound_for_speed) - - [check_common_action_exits](functions-4.md#check_common_action_exits) - - [check_common_hold_action_exits](functions-4.md#check_common_hold_action_exits) - - [drop_and_set_mario_action](functions-4.md#drop_and_set_mario_action) - - [execute_mario_action](functions-4.md#execute_mario_action) - - [find_floor_height_relative_polar](functions-4.md#find_floor_height_relative_polar) - - [find_floor_slope](functions-4.md#find_floor_slope) - - [find_mario_anim_flags_and_translation](functions-4.md#find_mario_anim_flags_and_translation) - - [force_idle_state](functions-4.md#force_idle_state) - - [hurt_and_set_mario_action](functions-4.md#hurt_and_set_mario_action) - - [init_single_mario](functions-4.md#init_single_mario) - [is_anim_at_end](functions-4.md#is_anim_at_end) - [is_anim_past_end](functions-4.md#is_anim_past_end) + - [set_mario_animation](functions-4.md#set_mario_animation) + - [set_mario_anim_with_accel](functions-4.md#set_mario_anim_with_accel) + - [set_character_animation](functions-4.md#set_character_animation) + - [set_character_anim_with_accel](functions-4.md#set_character_anim_with_accel) + - [set_anim_to_frame](functions-4.md#set_anim_to_frame) - [is_anim_past_frame](functions-4.md#is_anim_past_frame) + - [find_mario_anim_flags_and_translation](functions-4.md#find_mario_anim_flags_and_translation) + - [update_mario_pos_for_anim](functions-4.md#update_mario_pos_for_anim) + - [return_mario_anim_y_translation](functions-4.md#return_mario_anim_y_translation) + - [play_sound_if_no_flag](functions-4.md#play_sound_if_no_flag) + - [play_mario_jump_sound](functions-4.md#play_mario_jump_sound) + - [adjust_sound_for_speed](functions-4.md#adjust_sound_for_speed) + - [play_sound_and_spawn_particles](functions-4.md#play_sound_and_spawn_particles) + - [play_mario_action_sound](functions-4.md#play_mario_action_sound) + - [play_mario_landing_sound](functions-4.md#play_mario_landing_sound) + - [play_mario_landing_sound_once](functions-4.md#play_mario_landing_sound_once) + - [play_mario_heavy_landing_sound](functions-4.md#play_mario_heavy_landing_sound) + - [play_mario_heavy_landing_sound_once](functions-4.md#play_mario_heavy_landing_sound_once) + - [play_mario_sound](functions-4.md#play_mario_sound) + - [mario_is_crouching](functions-4.md#mario_is_crouching) - [mario_can_bubble](functions-4.md#mario_can_bubble) + - [mario_set_bubbled](functions-4.md#mario_set_bubbled) + - [mario_set_forward_vel](functions-4.md#mario_set_forward_vel) + - [mario_get_floor_class](functions-4.md#mario_get_floor_class) + - [mario_get_terrain_sound_addend](functions-4.md#mario_get_terrain_sound_addend) + - [resolve_and_return_wall_collisions](functions-4.md#resolve_and_return_wall_collisions) + - [resolve_and_return_wall_collisions_data](functions-4.md#resolve_and_return_wall_collisions_data) - [mario_facing_downhill](functions-4.md#mario_facing_downhill) - [mario_floor_is_slippery](functions-4.md#mario_floor_is_slippery) - [mario_floor_is_slope](functions-4.md#mario_floor_is_slope) - [mario_floor_is_steep](functions-4.md#mario_floor_is_steep) - - [mario_get_floor_class](functions-4.md#mario_get_floor_class) - - [mario_get_terrain_sound_addend](functions-4.md#mario_get_terrain_sound_addend) - - [mario_is_crouching](functions-4.md#mario_is_crouching) - - [mario_set_bubbled](functions-4.md#mario_set_bubbled) - - [mario_set_forward_vel](functions-4.md#mario_set_forward_vel) - - [mario_update_wall](functions-4.md#mario_update_wall) - - [play_mario_action_sound](functions-4.md#play_mario_action_sound) - - [play_mario_heavy_landing_sound](functions-4.md#play_mario_heavy_landing_sound) - - [play_mario_heavy_landing_sound_once](functions-4.md#play_mario_heavy_landing_sound_once) - - [play_mario_jump_sound](functions-4.md#play_mario_jump_sound) - - [play_mario_landing_sound](functions-4.md#play_mario_landing_sound) - - [play_mario_landing_sound_once](functions-4.md#play_mario_landing_sound_once) - - [play_mario_sound](functions-4.md#play_mario_sound) - - [play_sound_and_spawn_particles](functions-4.md#play_sound_and_spawn_particles) - - [play_sound_if_no_flag](functions-4.md#play_sound_if_no_flag) - - [resolve_and_return_wall_collisions](functions-4.md#resolve_and_return_wall_collisions) - - [resolve_and_return_wall_collisions_data](functions-4.md#resolve_and_return_wall_collisions_data) - - [return_mario_anim_y_translation](functions-4.md#return_mario_anim_y_translation) - - [set_anim_to_frame](functions-4.md#set_anim_to_frame) - - [set_character_anim_with_accel](functions-4.md#set_character_anim_with_accel) - - [set_character_animation](functions-4.md#set_character_animation) + - [find_floor_height_relative_polar](functions-4.md#find_floor_height_relative_polar) + - [find_floor_slope](functions-4.md#find_floor_slope) + - [update_mario_sound_and_camera](functions-4.md#update_mario_sound_and_camera) + - [set_steep_jump_action](functions-4.md#set_steep_jump_action) + - [set_mario_y_vel_based_on_fspeed](functions-4.md#set_mario_y_vel_based_on_fspeed) + - [set_mario_action](functions-4.md#set_mario_action) - [set_jump_from_landing](functions-4.md#set_jump_from_landing) - [set_jumping_action](functions-4.md#set_jumping_action) - - [set_mario_action](functions-4.md#set_mario_action) - - [set_mario_anim_with_accel](functions-4.md#set_mario_anim_with_accel) - - [set_mario_animation](functions-4.md#set_mario_animation) - - [set_mario_particle_flags](functions-4.md#set_mario_particle_flags) - - [set_mario_y_vel_based_on_fspeed](functions-4.md#set_mario_y_vel_based_on_fspeed) - - [set_steep_jump_action](functions-4.md#set_steep_jump_action) - - [set_water_plunge_action](functions-4.md#set_water_plunge_action) + - [drop_and_set_mario_action](functions-4.md#drop_and_set_mario_action) + - [hurt_and_set_mario_action](functions-4.md#hurt_and_set_mario_action) + - [check_common_action_exits](functions-4.md#check_common_action_exits) + - [check_common_hold_action_exits](functions-4.md#check_common_hold_action_exits) - [transition_submerged_to_walking](functions-4.md#transition_submerged_to_walking) - - [update_mario_pos_for_anim](functions-4.md#update_mario_pos_for_anim) - - [update_mario_sound_and_camera](functions-4.md#update_mario_sound_and_camera) + - [set_water_plunge_action](functions-4.md#set_water_plunge_action) + - [execute_mario_action](functions-4.md#execute_mario_action) + - [force_idle_state](functions-4.md#force_idle_state) + - [init_single_mario](functions-4.md#init_single_mario) + - [set_mario_particle_flags](functions-4.md#set_mario_particle_flags) + - [mario_update_wall](functions-4.md#mario_update_wall)
- mario_actions_airborne.c - - [check_common_airborne_cancels](functions-4.md#check_common_airborne_cancels) + - [play_flip_sounds](functions-4.md#play_flip_sounds) + - [play_far_fall_sound](functions-4.md#play_far_fall_sound) + - [play_knockback_sound](functions-4.md#play_knockback_sound) + - [lava_boost_on_wall](functions-4.md#lava_boost_on_wall) - [check_fall_damage](functions-4.md#check_fall_damage) + - [check_kick_or_dive_in_air](functions-4.md#check_kick_or_dive_in_air) + - [should_get_stuck_in_ground](functions-4.md#should_get_stuck_in_ground) - [check_fall_damage_or_get_stuck](functions-4.md#check_fall_damage_or_get_stuck) - [check_horizontal_wind](functions-4.md#check_horizontal_wind) - - [check_kick_or_dive_in_air](functions-4.md#check_kick_or_dive_in_air) - - [check_wall_kick](functions-4.md#check_wall_kick) - - [common_air_action_step](functions-4.md#common_air_action_step) - - [common_air_knockback_step](functions-4.md#common_air_knockback_step) - - [lava_boost_on_wall](functions-4.md#lava_boost_on_wall) - - [mario_execute_airborne_action](functions-4.md#mario_execute_airborne_action) - - [play_far_fall_sound](functions-4.md#play_far_fall_sound) - - [play_flip_sounds](functions-4.md#play_flip_sounds) - - [play_knockback_sound](functions-4.md#play_knockback_sound) - - [should_get_stuck_in_ground](functions-4.md#should_get_stuck_in_ground) - [update_air_with_turn](functions-4.md#update_air_with_turn) - [update_air_without_turn](functions-4.md#update_air_without_turn) - - [update_flying](functions-4.md#update_flying) - - [update_flying_pitch](functions-4.md#update_flying_pitch) - - [update_flying_yaw](functions-4.md#update_flying_yaw) - [update_lava_boost_or_twirling](functions-4.md#update_lava_boost_or_twirling) + - [update_flying_yaw](functions-4.md#update_flying_yaw) + - [update_flying_pitch](functions-4.md#update_flying_pitch) + - [update_flying](functions-4.md#update_flying) + - [common_air_action_step](functions-4.md#common_air_action_step) + - [common_air_knockback_step](functions-4.md#common_air_knockback_step) + - [check_wall_kick](functions-4.md#check_wall_kick) + - [check_common_airborne_cancels](functions-4.md#check_common_airborne_cancels) + - [mario_execute_airborne_action](functions-4.md#mario_execute_airborne_action)
- mario_actions_automatic.c - [add_tree_leaf_particles](functions-4.md#add_tree_leaf_particles) - - [check_common_automatic_cancels](functions-4.md#check_common_automatic_cancels) - - [climb_up_ledge](functions-4.md#climb_up_ledge) - - [let_go_of_ledge](functions-4.md#let_go_of_ledge) - - [mario_execute_automatic_action](functions-4.md#mario_execute_automatic_action) - - [perform_hanging_step](functions-4.md#perform_hanging_step) - [play_climbing_sounds](functions-4.md#play_climbing_sounds) - [set_pole_position](functions-4.md#set_pole_position) + - [perform_hanging_step](functions-4.md#perform_hanging_step) - [update_hang_moving](functions-4.md#update_hang_moving) - [update_hang_stationary](functions-4.md#update_hang_stationary) - - [update_ledge_climb](functions-4.md#update_ledge_climb) + - [let_go_of_ledge](functions-4.md#let_go_of_ledge) + - [climb_up_ledge](functions-4.md#climb_up_ledge) - [update_ledge_climb_camera](functions-4.md#update_ledge_climb_camera) + - [update_ledge_climb](functions-4.md#update_ledge_climb) + - [check_common_automatic_cancels](functions-4.md#check_common_automatic_cancels) + - [mario_execute_automatic_action](functions-4.md#mario_execute_automatic_action)
- mario_actions_cutscene.c + - [get_credits_str_width](functions-4.md#get_credits_str_width) - [bhv_end_peach_loop](functions-4.md#bhv_end_peach_loop) - [bhv_end_toad_loop](functions-4.md#bhv_end_toad_loop) - - [common_death_handler](functions-4.md#common_death_handler) - - [cutscene_put_cap_on](functions-4.md#cutscene_put_cap_on) - - [cutscene_take_cap_off](functions-4.md#cutscene_take_cap_off) - - [general_star_dance_handler](functions-4.md#general_star_dance_handler) - - [generate_yellow_sparkles](functions-4.md#generate_yellow_sparkles) - - [get_credits_str_width](functions-4.md#get_credits_str_width) - [get_star_collection_dialog](functions-4.md#get_star_collection_dialog) - [handle_save_menu](functions-4.md#handle_save_menu) - - [launch_mario_until_land](functions-4.md#launch_mario_until_land) - - [mario_execute_cutscene_action](functions-4.md#mario_execute_cutscene_action) + - [cutscene_take_cap_off](functions-4.md#cutscene_take_cap_off) + - [cutscene_put_cap_on](functions-4.md#cutscene_put_cap_on) - [mario_ready_to_speak](functions-4.md#mario_ready_to_speak) - [should_start_or_continue_dialog](functions-4.md#should_start_or_continue_dialog) + - [general_star_dance_handler](functions-4.md#general_star_dance_handler) + - [common_death_handler](functions-4.md#common_death_handler) + - [launch_mario_until_land](functions-4.md#launch_mario_until_land) - [stuck_in_ground_handler](functions-4.md#stuck_in_ground_handler) + - [generate_yellow_sparkles](functions-4.md#generate_yellow_sparkles) + - [mario_execute_cutscene_action](functions-4.md#mario_execute_cutscene_action)
- mario_actions_moving.c + - [tilt_body_running](functions-4.md#tilt_body_running) + - [play_step_sound](functions-4.md#play_step_sound) - [align_with_floor](functions-4.md#align_with_floor) - - [analog_stick_held_back](functions-4.md#analog_stick_held_back) - - [anim_and_audio_for_heavy_walk](functions-4.md#anim_and_audio_for_heavy_walk) - - [anim_and_audio_for_hold_walk](functions-4.md#anim_and_audio_for_hold_walk) - - [anim_and_audio_for_walk](functions-4.md#anim_and_audio_for_walk) - - [apply_landing_accel](functions-4.md#apply_landing_accel) - - [apply_slope_accel](functions-4.md#apply_slope_accel) - - [apply_slope_decel](functions-4.md#apply_slope_decel) - - [begin_braking_action](functions-4.md#begin_braking_action) - [begin_walking_action](functions-4.md#begin_walking_action) - - [check_common_moving_cancels](functions-4.md#check_common_moving_cancels) - - [check_ground_dive_or_punch](functions-4.md#check_ground_dive_or_punch) - [check_ledge_climb_down](functions-4.md#check_ledge_climb_down) - - [common_ground_knockback_action](functions-4.md#common_ground_knockback_action) - - [common_landing_action](functions-4.md#common_landing_action) + - [slide_bonk](functions-4.md#slide_bonk) + - [set_triple_jump_action](functions-4.md#set_triple_jump_action) + - [update_sliding_angle](functions-4.md#update_sliding_angle) + - [update_sliding](functions-4.md#update_sliding) + - [apply_slope_accel](functions-4.md#apply_slope_accel) + - [apply_landing_accel](functions-4.md#apply_landing_accel) + - [update_shell_speed](functions-4.md#update_shell_speed) + - [apply_slope_decel](functions-4.md#apply_slope_decel) + - [update_decelerating_speed](functions-4.md#update_decelerating_speed) + - [update_walking_speed](functions-4.md#update_walking_speed) + - [should_begin_sliding](functions-4.md#should_begin_sliding) + - [analog_stick_held_back](functions-4.md#analog_stick_held_back) + - [check_ground_dive_or_punch](functions-4.md#check_ground_dive_or_punch) + - [begin_braking_action](functions-4.md#begin_braking_action) + - [anim_and_audio_for_walk](functions-4.md#anim_and_audio_for_walk) + - [anim_and_audio_for_hold_walk](functions-4.md#anim_and_audio_for_hold_walk) + - [anim_and_audio_for_heavy_walk](functions-4.md#anim_and_audio_for_heavy_walk) + - [push_or_sidle_wall](functions-4.md#push_or_sidle_wall) + - [tilt_body_walking](functions-4.md#tilt_body_walking) + - [tilt_body_ground_shell](functions-4.md#tilt_body_ground_shell) + - [tilt_body_butt_slide](functions-4.md#tilt_body_butt_slide) - [common_slide_action](functions-4.md#common_slide_action) - [common_slide_action_with_jump](functions-4.md#common_slide_action_with_jump) - - [mario_execute_moving_action](functions-4.md#mario_execute_moving_action) - - [play_step_sound](functions-4.md#play_step_sound) - - [push_or_sidle_wall](functions-4.md#push_or_sidle_wall) - - [quicksand_jump_land_action](functions-4.md#quicksand_jump_land_action) - - [set_triple_jump_action](functions-4.md#set_triple_jump_action) - - [should_begin_sliding](functions-4.md#should_begin_sliding) - - [slide_bonk](functions-4.md#slide_bonk) - [stomach_slide_action](functions-4.md#stomach_slide_action) - - [tilt_body_butt_slide](functions-4.md#tilt_body_butt_slide) - - [tilt_body_ground_shell](functions-4.md#tilt_body_ground_shell) - - [tilt_body_running](functions-4.md#tilt_body_running) - - [tilt_body_walking](functions-4.md#tilt_body_walking) - - [update_decelerating_speed](functions-4.md#update_decelerating_speed) - - [update_shell_speed](functions-4.md#update_shell_speed) - - [update_sliding](functions-4.md#update_sliding) - - [update_sliding_angle](functions-4.md#update_sliding_angle) - - [update_walking_speed](functions-4.md#update_walking_speed) + - [common_ground_knockback_action](functions-4.md#common_ground_knockback_action) + - [common_landing_action](functions-4.md#common_landing_action) + - [quicksand_jump_land_action](functions-4.md#quicksand_jump_land_action) + - [check_common_moving_cancels](functions-4.md#check_common_moving_cancels) + - [mario_execute_moving_action](functions-4.md#mario_execute_moving_action)
- mario_actions_object.c - [animated_stationary_ground_step](functions-4.md#animated_stationary_ground_step) + - [mario_update_punch_sequence](functions-4.md#mario_update_punch_sequence) - [check_common_object_cancels](functions-4.md#check_common_object_cancels) - [mario_execute_object_action](functions-4.md#mario_execute_object_action) - - [mario_update_punch_sequence](functions-4.md#mario_update_punch_sequence)
- mario_actions_stationary.c - - [check_common_hold_idle_cancels](functions-4.md#check_common_hold_idle_cancels) - [check_common_idle_cancels](functions-4.md#check_common_idle_cancels) - - [check_common_landing_cancels](functions-4.md#check_common_landing_cancels) - - [check_common_stationary_cancels](functions-4.md#check_common_stationary_cancels) - - [landing_step](functions-4.md#landing_step) - - [mario_execute_stationary_action](functions-4.md#mario_execute_stationary_action) + - [check_common_hold_idle_cancels](functions-4.md#check_common_hold_idle_cancels) - [play_anim_sound](functions-4.md#play_anim_sound) - [stopping_step](functions-4.md#stopping_step) + - [landing_step](functions-4.md#landing_step) + - [check_common_landing_cancels](functions-4.md#check_common_landing_cancels) + - [check_common_stationary_cancels](functions-4.md#check_common_stationary_cancels) + - [mario_execute_stationary_action](functions-4.md#mario_execute_stationary_action)
- mario_actions_submerged.c + - [set_swimming_at_surface_particles](functions-4.md#set_swimming_at_surface_particles) + - [perform_water_full_step](functions-4.md#perform_water_full_step) - [apply_water_current](functions-4.md#apply_water_current) + - [perform_water_step](functions-4.md#perform_water_step) - [float_surface_gfx](functions-4.md#float_surface_gfx) - [mario_execute_submerged_action](functions-4.md#mario_execute_submerged_action) - - [perform_water_full_step](functions-4.md#perform_water_full_step) - - [perform_water_step](functions-4.md#perform_water_step) - - [set_swimming_at_surface_particles](functions-4.md#set_swimming_at_surface_particles)
@@ -1153,79 +1158,81 @@ - [bhv_toad_message_loop](functions-4.md#bhv_toad_message_loop) - [bhv_unlock_door_star_init](functions-4.md#bhv_unlock_door_star_init) - [bhv_unlock_door_star_loop](functions-4.md#bhv_unlock_door_star_loop) - - [geo_get_body_state](functions-4.md#geo_get_body_state) - [geo_get_mario_state](functions-4.md#geo_get_mario_state) + - [geo_get_body_state](functions-4.md#geo_get_body_state)
- mario_step.h - [get_additive_y_vel_for_jumps](functions-4.md#get_additive_y_vel_for_jumps) - - [init_bully_collision_data](functions-4.md#init_bully_collision_data) - [mario_bonk_reflection](functions-4.md#mario_bonk_reflection) + - [init_bully_collision_data](functions-4.md#init_bully_collision_data) + - [mario_update_quicksand](functions-4.md#mario_update_quicksand) - [mario_push_off_steep_floor](functions-4.md#mario_push_off_steep_floor) - [mario_update_moving_sand](functions-4.md#mario_update_moving_sand) - - [mario_update_quicksand](functions-4.md#mario_update_quicksand) - [mario_update_windy_ground](functions-4.md#mario_update_windy_ground) - - [perform_air_step](functions-4.md#perform_air_step) - - [perform_ground_step](functions-4.md#perform_ground_step) - - [set_vel_from_pitch_and_yaw](functions-4.md#set_vel_from_pitch_and_yaw) - - [stationary_ground_step](functions-4.md#stationary_ground_step) - [stop_and_set_height_to_floor](functions-4.md#stop_and_set_height_to_floor) + - [stationary_ground_step](functions-4.md#stationary_ground_step) + - [perform_ground_step](functions-4.md#perform_ground_step) + - [perform_air_step](functions-4.md#perform_air_step) + - [set_vel_from_pitch_and_yaw](functions-4.md#set_vel_from_pitch_and_yaw)
- math_util.h - - [anim_spline_init](functions-4.md#anim_spline_init) - - [anim_spline_poll](functions-4.md#anim_spline_poll) - - [approach_f32](functions-4.md#approach_f32) - - [approach_s32](functions-4.md#approach_s32) - - [atan2s](functions-4.md#atan2s) - - [coss](functions-4.md#coss) - - [find_vector_perpendicular_to_plane](functions-4.md#find_vector_perpendicular_to_plane) - - [get_pos_from_transform_mtx](functions-4.md#get_pos_from_transform_mtx) - - [mtxf_align_terrain_normal](functions-4.md#mtxf_align_terrain_normal) - - [mtxf_align_terrain_triangle](functions-4.md#mtxf_align_terrain_triangle) - - [mtxf_billboard](functions-4.md#mtxf_billboard) - - [mtxf_copy](functions-4.md#mtxf_copy) - - [mtxf_cylboard](functions-4.md#mtxf_cylboard) - - [mtxf_identity](functions-4.md#mtxf_identity) - - [mtxf_inverse](functions-4.md#mtxf_inverse) - - [mtxf_lookat](functions-4.md#mtxf_lookat) - - [mtxf_mul](functions-4.md#mtxf_mul) - - [mtxf_mul_vec3s](functions-4.md#mtxf_mul_vec3s) - - [mtxf_rotate_xyz_and_translate](functions-4.md#mtxf_rotate_xyz_and_translate) - - [mtxf_rotate_zxy_and_translate](functions-4.md#mtxf_rotate_zxy_and_translate) - - [mtxf_scale_vec3f](functions-4.md#mtxf_scale_vec3f) - - [mtxf_translate](functions-4.md#mtxf_translate) - - [not_zero](functions-4.md#not_zero) - [sins](functions-4.md#sins) - - [spline_get_weights](functions-4.md#spline_get_weights) - - [vec3f_add](functions-4.md#vec3f_add) - - [vec3f_combine](functions-4.md#vec3f_combine) + - [coss](functions-4.md#coss) - [vec3f_copy](functions-4.md#vec3f_copy) - - [vec3f_cross](functions-4.md#vec3f_cross) - - [vec3f_dif](functions-4.md#vec3f_dif) - - [vec3f_dist](functions-4.md#vec3f_dist) - - [vec3f_dot](functions-4.md#vec3f_dot) - - [vec3f_get_dist_and_angle](functions-4.md#vec3f_get_dist_and_angle) - - [vec3f_length](functions-4.md#vec3f_length) - - [vec3f_mul](functions-4.md#vec3f_mul) - - [vec3f_normalize](functions-4.md#vec3f_normalize) - - [vec3f_project](functions-4.md#vec3f_project) - - [vec3f_rotate_zxy](functions-4.md#vec3f_rotate_zxy) - [vec3f_set](functions-4.md#vec3f_set) - - [vec3f_set_dist_and_angle](functions-4.md#vec3f_set_dist_and_angle) + - [vec3f_add](functions-4.md#vec3f_add) - [vec3f_sum](functions-4.md#vec3f_sum) - - [vec3f_to_vec3s](functions-4.md#vec3f_to_vec3s) - - [vec3s_add](functions-4.md#vec3s_add) + - [vec3f_dif](functions-4.md#vec3f_dif) + - [vec3f_mul](functions-4.md#vec3f_mul) - [vec3s_copy](functions-4.md#vec3s_copy) - [vec3s_set](functions-4.md#vec3s_set) + - [vec3s_add](functions-4.md#vec3s_add) - [vec3s_sum](functions-4.md#vec3s_sum) - [vec3s_to_vec3f](functions-4.md#vec3s_to_vec3f) + - [vec3f_to_vec3s](functions-4.md#vec3f_to_vec3s) + - [find_vector_perpendicular_to_plane](functions-4.md#find_vector_perpendicular_to_plane) + - [vec3f_cross](functions-4.md#vec3f_cross) + - [vec3f_normalize](functions-4.md#vec3f_normalize) + - [vec3f_length](functions-4.md#vec3f_length) + - [vec3f_dot](functions-4.md#vec3f_dot) + - [vec3f_combine](functions-4.md#vec3f_combine) + - [vec3f_rotate_zxy](functions-4.md#vec3f_rotate_zxy) + - [mtxf_copy](functions-4.md#mtxf_copy) + - [mtxf_identity](functions-4.md#mtxf_identity) + - [mtxf_translate](functions-4.md#mtxf_translate) + - [mtxf_lookat](functions-4.md#mtxf_lookat) + - [mtxf_rotate_zxy_and_translate](functions-4.md#mtxf_rotate_zxy_and_translate) + - [mtxf_rotate_xyz_and_translate](functions-4.md#mtxf_rotate_xyz_and_translate) + - [mtxf_billboard](functions-4.md#mtxf_billboard) + - [mtxf_cylboard](functions-4.md#mtxf_cylboard) + - [mtxf_align_terrain_normal](functions-4.md#mtxf_align_terrain_normal) + - [mtxf_align_terrain_triangle](functions-4.md#mtxf_align_terrain_triangle) + - [mtxf_mul](functions-4.md#mtxf_mul) + - [mtxf_scale_vec3f](functions-4.md#mtxf_scale_vec3f) + - [mtxf_mul_vec3s](functions-4.md#mtxf_mul_vec3s) + - [mtxf_inverse](functions-4.md#mtxf_inverse) + - [get_pos_from_transform_mtx](functions-4.md#get_pos_from_transform_mtx) + - [vec3f_get_dist_and_angle](functions-4.md#vec3f_get_dist_and_angle) + - [vec3f_set_dist_and_angle](functions-4.md#vec3f_set_dist_and_angle) + - [approach_s32](functions-4.md#approach_s32) + - [approach_f32](functions-4.md#approach_f32) + - [atan2s](functions-4.md#atan2s) + - [spline_get_weights](functions-4.md#spline_get_weights) + - [anim_spline_init](functions-4.md#anim_spline_init) + - [anim_spline_poll](functions-4.md#anim_spline_poll) + - [not_zero](functions-4.md#not_zero) + - [vec3f_project](functions-4.md#vec3f_project) + - [vec3f_dist](functions-4.md#vec3f_dist)
- misc.h + - [smooth_step](functions-4.md#smooth_step) + - [update_all_mario_stars](functions-4.md#update_all_mario_stars) - [clock_elapsed](functions-4.md#clock_elapsed) - [clock_elapsed_f64](functions-4.md#clock_elapsed_f64) - [clock_elapsed_ticks](functions-4.md#clock_elapsed_ticks) @@ -1234,367 +1241,365 @@ - [delta_interpolate_s32](functions-4.md#delta_interpolate_s32) - [delta_interpolate_vec3f](functions-4.md#delta_interpolate_vec3f) - [delta_interpolate_vec3s](functions-4.md#delta_interpolate_vec3s) - - [smooth_step](functions-4.md#smooth_step) - - [update_all_mario_stars](functions-4.md#update_all_mario_stars)
- mod_storage.h - - [mod_storage_clear](functions-4.md#mod_storage_clear) - - [mod_storage_exists](functions-4.md#mod_storage_exists) - - [mod_storage_load](functions-4.md#mod_storage_load) - - [mod_storage_load_bool](functions-4.md#mod_storage_load_bool) - - [mod_storage_load_number](functions-4.md#mod_storage_load_number) - - [mod_storage_remove](functions-4.md#mod_storage_remove) - [mod_storage_save](functions-4.md#mod_storage_save) - - [mod_storage_save_bool](functions-4.md#mod_storage_save_bool) - [mod_storage_save_number](functions-4.md#mod_storage_save_number) + - [mod_storage_save_bool](functions-4.md#mod_storage_save_bool) + - [mod_storage_load](functions-4.md#mod_storage_load) + - [mod_storage_load_number](functions-4.md#mod_storage_load_number) + - [mod_storage_load_bool](functions-4.md#mod_storage_load_bool) + - [mod_storage_exists](functions-4.md#mod_storage_exists) + - [mod_storage_remove](functions-4.md#mod_storage_remove) + - [mod_storage_clear](functions-4.md#mod_storage_clear)
- network_player.h - - [get_network_player_from_area](functions-4.md#get_network_player_from_area) - - [get_network_player_from_level](functions-4.md#get_network_player_from_level) - - [get_network_player_smallest_global](functions-4.md#get_network_player_smallest_global) - [network_player_connected_count](functions-4.md#network_player_connected_count) - - [network_player_from_global_index](functions-4.md#network_player_from_global_index) - - [network_player_is_override_palette_same](functions-4.md#network_player_is_override_palette_same) - - [network_player_reset_override_palette](functions-4.md#network_player_reset_override_palette) - [network_player_set_description](functions-4.md#network_player_set_description) - [network_player_set_override_location](functions-4.md#network_player_set_override_location) + - [network_player_from_global_index](functions-4.md#network_player_from_global_index) + - [get_network_player_from_level](functions-4.md#get_network_player_from_level) + - [get_network_player_from_area](functions-4.md#get_network_player_from_area) + - [get_network_player_smallest_global](functions-4.md#get_network_player_smallest_global) - [network_player_set_override_palette_color](functions-4.md#network_player_set_override_palette_color) + - [network_player_reset_override_palette](functions-4.md#network_player_reset_override_palette) + - [network_player_is_override_palette_same](functions-4.md#network_player_is_override_palette_same)
- network_utils.h + - [network_global_index_from_local](functions-4.md#network_global_index_from_local) + - [network_local_index_from_global](functions-4.md#network_local_index_from_global) + - [network_is_server](functions-4.md#network_is_server) + - [network_is_moderator](functions-4.md#network_is_moderator) + - [network_get_player_text_color_string](functions-4.md#network_get_player_text_color_string) - [network_check_singleplayer_pause](functions-4.md#network_check_singleplayer_pause) - [network_discord_id_from_local_index](functions-4.md#network_discord_id_from_local_index) - - [network_get_player_text_color_string](functions-4.md#network_get_player_text_color_string) - - [network_global_index_from_local](functions-4.md#network_global_index_from_local) - - [network_is_moderator](functions-4.md#network_is_moderator) - - [network_is_server](functions-4.md#network_is_server) - - [network_local_index_from_global](functions-4.md#network_local_index_from_global)
- obj_behaviors.c + - [set_yoshi_as_not_dead](functions-4.md#set_yoshi_as_not_dead) - [absf_2](functions-4.md#absf_2) + - [turn_obj_away_from_surface](functions-4.md#turn_obj_away_from_surface) + - [obj_find_wall](functions-4.md#obj_find_wall) + - [turn_obj_away_from_steep_floor](functions-4.md#turn_obj_away_from_steep_floor) + - [obj_orient_graph](functions-4.md#obj_orient_graph) + - [calc_obj_friction](functions-4.md#calc_obj_friction) - [calc_new_obj_vel_and_pos_y](functions-4.md#calc_new_obj_vel_and_pos_y) - [calc_new_obj_vel_and_pos_y_underwater](functions-4.md#calc_new_obj_vel_and_pos_y_underwater) - - [calc_obj_friction](functions-4.md#calc_obj_friction) - - [current_mario_room_check](functions-4.md#current_mario_room_check) - - [is_nearest_mario_state_to_object](functions-4.md#is_nearest_mario_state_to_object) - - [is_nearest_player_to_object](functions-4.md#is_nearest_player_to_object) - - [is_other_player_active](functions-4.md#is_other_player_active) - - [is_player_active](functions-4.md#is_player_active) - - [is_player_in_local_area](functions-4.md#is_player_in_local_area) - - [is_point_close_to_object](functions-4.md#is_point_close_to_object) - - [is_point_within_radius_of_any_player](functions-4.md#is_point_within_radius_of_any_player) - - [is_point_within_radius_of_mario](functions-4.md#is_point_within_radius_of_mario) - - [nearest_interacting_mario_state_to_object](functions-4.md#nearest_interacting_mario_state_to_object) - - [nearest_interacting_player_to_object](functions-4.md#nearest_interacting_player_to_object) - - [nearest_mario_state_to_object](functions-4.md#nearest_mario_state_to_object) - - [nearest_player_to_object](functions-4.md#nearest_player_to_object) - - [nearest_possible_mario_state_to_object](functions-4.md#nearest_possible_mario_state_to_object) - - [obj_check_floor_death](functions-4.md#obj_check_floor_death) - - [obj_check_if_facing_toward_angle](functions-4.md#obj_check_if_facing_toward_angle) - - [obj_find_wall](functions-4.md#obj_find_wall) - - [obj_find_wall_displacement](functions-4.md#obj_find_wall_displacement) - - [obj_flicker_and_disappear](functions-4.md#obj_flicker_and_disappear) - - [obj_lava_death](functions-4.md#obj_lava_death) - - [obj_move_xyz_using_fvel_and_yaw](functions-4.md#obj_move_xyz_using_fvel_and_yaw) - - [obj_orient_graph](functions-4.md#obj_orient_graph) - - [obj_return_and_displace_home](functions-4.md#obj_return_and_displace_home) - - [obj_return_home_if_safe](functions-4.md#obj_return_home_if_safe) - - [obj_spawn_yellow_coins](functions-4.md#obj_spawn_yellow_coins) - - [obj_splash](functions-4.md#obj_splash) - [obj_update_pos_vel_xz](functions-4.md#obj_update_pos_vel_xz) + - [obj_splash](functions-4.md#obj_splash) - [object_step](functions-4.md#object_step) - [object_step_without_floor_orient](functions-4.md#object_step_without_floor_orient) + - [obj_move_xyz_using_fvel_and_yaw](functions-4.md#obj_move_xyz_using_fvel_and_yaw) + - [is_point_within_radius_of_mario](functions-4.md#is_point_within_radius_of_mario) + - [is_point_within_radius_of_any_player](functions-4.md#is_point_within_radius_of_any_player) + - [is_player_active](functions-4.md#is_player_active) + - [is_other_player_active](functions-4.md#is_other_player_active) + - [is_player_in_local_area](functions-4.md#is_player_in_local_area) + - [nearest_mario_state_to_object](functions-4.md#nearest_mario_state_to_object) + - [nearest_possible_mario_state_to_object](functions-4.md#nearest_possible_mario_state_to_object) + - [nearest_player_to_object](functions-4.md#nearest_player_to_object) + - [nearest_interacting_mario_state_to_object](functions-4.md#nearest_interacting_mario_state_to_object) + - [nearest_interacting_player_to_object](functions-4.md#nearest_interacting_player_to_object) + - [is_nearest_mario_state_to_object](functions-4.md#is_nearest_mario_state_to_object) + - [is_nearest_player_to_object](functions-4.md#is_nearest_player_to_object) + - [is_point_close_to_object](functions-4.md#is_point_close_to_object) - [set_object_visibility](functions-4.md#set_object_visibility) - - [set_yoshi_as_not_dead](functions-4.md#set_yoshi_as_not_dead) + - [obj_return_home_if_safe](functions-4.md#obj_return_home_if_safe) + - [obj_return_and_displace_home](functions-4.md#obj_return_and_displace_home) + - [obj_check_if_facing_toward_angle](functions-4.md#obj_check_if_facing_toward_angle) + - [obj_find_wall_displacement](functions-4.md#obj_find_wall_displacement) + - [obj_spawn_yellow_coins](functions-4.md#obj_spawn_yellow_coins) + - [obj_flicker_and_disappear](functions-4.md#obj_flicker_and_disappear) + - [current_mario_room_check](functions-4.md#current_mario_room_check) + - [obj_check_floor_death](functions-4.md#obj_check_floor_death) + - [obj_lava_death](functions-4.md#obj_lava_death) - [spawn_orange_number](functions-4.md#spawn_orange_number) - - [turn_obj_away_from_steep_floor](functions-4.md#turn_obj_away_from_steep_floor) - - [turn_obj_away_from_surface](functions-4.md#turn_obj_away_from_surface)
- obj_behaviors_2.c - - [approach_f32_ptr](functions-5.md#approach_f32_ptr) + - [obj_is_rendering_enabled](functions-5.md#obj_is_rendering_enabled) + - [obj_get_pitch_from_vel](functions-5.md#obj_get_pitch_from_vel) + - [obj_set_dist_from_home](functions-5.md#obj_set_dist_from_home) + - [obj_is_near_to_and_facing_mario](functions-5.md#obj_is_near_to_and_facing_mario) + - [platform_on_track_update_pos_or_spawn_ball](functions-5.md#platform_on_track_update_pos_or_spawn_ball) + - [cur_obj_spin_all_dimensions](functions-5.md#cur_obj_spin_all_dimensions) + - [obj_rotate_yaw_and_bounce_off_walls](functions-5.md#obj_rotate_yaw_and_bounce_off_walls) + - [obj_get_pitch_to_home](functions-5.md#obj_get_pitch_to_home) + - [obj_compute_vel_from_move_pitch](functions-5.md#obj_compute_vel_from_move_pitch) + - [cur_obj_init_anim_extend](functions-5.md#cur_obj_init_anim_extend) - [cur_obj_init_anim_and_check_if_end](functions-5.md#cur_obj_init_anim_and_check_if_end) - [cur_obj_init_anim_check_frame](functions-5.md#cur_obj_init_anim_check_frame) - - [cur_obj_init_anim_extend](functions-5.md#cur_obj_init_anim_extend) - - [cur_obj_play_sound_at_anim_range](functions-5.md#cur_obj_play_sound_at_anim_range) - [cur_obj_set_anim_if_at_end](functions-5.md#cur_obj_set_anim_if_at_end) - - [cur_obj_spin_all_dimensions](functions-5.md#cur_obj_spin_all_dimensions) - - [obj_act_knockback](functions-5.md#obj_act_knockback) - - [obj_act_squished](functions-5.md#obj_act_squished) - - [obj_bounce_off_walls_edges_objects](functions-5.md#obj_bounce_off_walls_edges_objects) - - [obj_check_attacks](functions-5.md#obj_check_attacks) - - [obj_compute_vel_from_move_pitch](functions-5.md#obj_compute_vel_from_move_pitch) - - [obj_die_if_above_lava_and_health_non_positive](functions-5.md#obj_die_if_above_lava_and_health_non_positive) - - [obj_die_if_health_non_positive](functions-5.md#obj_die_if_health_non_positive) - - [obj_face_pitch_approach](functions-5.md#obj_face_pitch_approach) - - [obj_face_roll_approach](functions-5.md#obj_face_roll_approach) - - [obj_face_yaw_approach](functions-5.md#obj_face_yaw_approach) - - [obj_forward_vel_approach](functions-5.md#obj_forward_vel_approach) - - [obj_get_pitch_from_vel](functions-5.md#obj_get_pitch_from_vel) - - [obj_get_pitch_to_home](functions-5.md#obj_get_pitch_to_home) - - [obj_grow_then_shrink](functions-5.md#obj_grow_then_shrink) - - [obj_handle_attacks](functions-5.md#obj_handle_attacks) - - [obj_is_near_to_and_facing_mario](functions-5.md#obj_is_near_to_and_facing_mario) - - [obj_is_rendering_enabled](functions-5.md#obj_is_rendering_enabled) - - [obj_move_for_one_second](functions-5.md#obj_move_for_one_second) - - [obj_move_pitch_approach](functions-5.md#obj_move_pitch_approach) - - [obj_random_fixed_turn](functions-5.md#obj_random_fixed_turn) - - [obj_resolve_collisions_and_turn](functions-5.md#obj_resolve_collisions_and_turn) - - [obj_resolve_object_collisions](functions-5.md#obj_resolve_object_collisions) - - [obj_roll_to_match_yaw_turn](functions-5.md#obj_roll_to_match_yaw_turn) - - [obj_rotate_yaw_and_bounce_off_walls](functions-5.md#obj_rotate_yaw_and_bounce_off_walls) - - [obj_set_dist_from_home](functions-5.md#obj_set_dist_from_home) - - [obj_set_knockback_action](functions-5.md#obj_set_knockback_action) - - [obj_set_squished_action](functions-5.md#obj_set_squished_action) - - [obj_smooth_turn](functions-5.md#obj_smooth_turn) - - [obj_spit_fire](functions-5.md#obj_spit_fire) + - [cur_obj_play_sound_at_anim_range](functions-5.md#cur_obj_play_sound_at_anim_range) - [obj_turn_pitch_toward_mario](functions-5.md#obj_turn_pitch_toward_mario) - - [obj_unused_die](functions-5.md#obj_unused_die) - - [obj_update_blinking](functions-5.md#obj_update_blinking) - - [obj_update_standard_actions](functions-5.md#obj_update_standard_actions) + - [approach_f32_ptr](functions-5.md#approach_f32_ptr) + - [obj_forward_vel_approach](functions-5.md#obj_forward_vel_approach) - [obj_y_vel_approach](functions-5.md#obj_y_vel_approach) - - [oscillate_toward](functions-5.md#oscillate_toward) - - [platform_on_track_update_pos_or_spawn_ball](functions-5.md#platform_on_track_update_pos_or_spawn_ball) + - [obj_move_pitch_approach](functions-5.md#obj_move_pitch_approach) + - [obj_face_pitch_approach](functions-5.md#obj_face_pitch_approach) + - [obj_face_yaw_approach](functions-5.md#obj_face_yaw_approach) + - [obj_face_roll_approach](functions-5.md#obj_face_roll_approach) + - [obj_smooth_turn](functions-5.md#obj_smooth_turn) + - [obj_roll_to_match_yaw_turn](functions-5.md#obj_roll_to_match_yaw_turn) - [random_linear_offset](functions-5.md#random_linear_offset) - [random_mod_offset](functions-5.md#random_mod_offset) + - [obj_random_fixed_turn](functions-5.md#obj_random_fixed_turn) + - [obj_grow_then_shrink](functions-5.md#obj_grow_then_shrink) + - [oscillate_toward](functions-5.md#oscillate_toward) + - [obj_update_blinking](functions-5.md#obj_update_blinking) + - [obj_resolve_object_collisions](functions-5.md#obj_resolve_object_collisions) + - [obj_bounce_off_walls_edges_objects](functions-5.md#obj_bounce_off_walls_edges_objects) + - [obj_resolve_collisions_and_turn](functions-5.md#obj_resolve_collisions_and_turn) + - [obj_die_if_health_non_positive](functions-5.md#obj_die_if_health_non_positive) + - [obj_unused_die](functions-5.md#obj_unused_die) + - [obj_set_knockback_action](functions-5.md#obj_set_knockback_action) + - [obj_set_squished_action](functions-5.md#obj_set_squished_action) + - [obj_die_if_above_lava_and_health_non_positive](functions-5.md#obj_die_if_above_lava_and_health_non_positive) + - [obj_handle_attacks](functions-5.md#obj_handle_attacks) + - [obj_act_knockback](functions-5.md#obj_act_knockback) + - [obj_act_squished](functions-5.md#obj_act_squished) + - [obj_update_standard_actions](functions-5.md#obj_update_standard_actions) + - [obj_check_attacks](functions-5.md#obj_check_attacks) + - [obj_move_for_one_second](functions-5.md#obj_move_for_one_second) - [treat_far_home_as_mario](functions-5.md#treat_far_home_as_mario) + - [obj_spit_fire](functions-5.md#obj_spit_fire)
- object_helpers.c - - [abs_angle_diff](functions-5.md#abs_angle_diff) - - [apply_drag_to_value](functions-5.md#apply_drag_to_value) + - [clear_move_flag](functions-5.md#clear_move_flag) + - [set_room_override](functions-5.md#set_room_override) + - [obj_update_pos_from_parent_transformation](functions-5.md#obj_update_pos_from_parent_transformation) + - [obj_apply_scale_to_matrix](functions-5.md#obj_apply_scale_to_matrix) + - [create_transformation_from_matrices](functions-5.md#create_transformation_from_matrices) + - [obj_set_held_state](functions-5.md#obj_set_held_state) + - [lateral_dist_between_objects](functions-5.md#lateral_dist_between_objects) + - [dist_between_objects](functions-5.md#dist_between_objects) + - [dist_between_object_and_point](functions-5.md#dist_between_object_and_point) + - [cur_obj_forward_vel_approach_upward](functions-5.md#cur_obj_forward_vel_approach_upward) - [approach_f32_signed](functions-5.md#approach_f32_signed) - [approach_f32_symmetric](functions-5.md#approach_f32_symmetric) - [approach_s16_symmetric](functions-5.md#approach_s16_symmetric) - - [bhv_dust_smoke_loop](functions-5.md#bhv_dust_smoke_loop) - - [bhv_init_room](functions-5.md#bhv_init_room) - - [bit_shift_left](functions-5.md#bit_shift_left) - - [chain_segment_init](functions-5.md#chain_segment_init) - - [clear_move_flag](functions-5.md#clear_move_flag) - - [clear_time_stop_flags](functions-5.md#clear_time_stop_flags) - - [count_objects_with_behavior](functions-5.md#count_objects_with_behavior) + - [cur_obj_rotate_yaw_toward](functions-5.md#cur_obj_rotate_yaw_toward) + - [obj_angle_to_object](functions-5.md#obj_angle_to_object) + - [obj_pitch_to_object](functions-5.md#obj_pitch_to_object) + - [obj_angle_to_point](functions-5.md#obj_angle_to_point) + - [obj_turn_toward_object](functions-5.md#obj_turn_toward_object) + - [obj_set_parent_relative_pos](functions-5.md#obj_set_parent_relative_pos) + - [obj_set_pos](functions-5.md#obj_set_pos) + - [obj_set_angle](functions-5.md#obj_set_angle) + - [obj_set_move_angle](functions-5.md#obj_set_move_angle) + - [obj_set_face_angle](functions-5.md#obj_set_face_angle) + - [obj_set_gfx_angle](functions-5.md#obj_set_gfx_angle) + - [obj_set_gfx_pos](functions-5.md#obj_set_gfx_pos) + - [obj_set_gfx_scale](functions-5.md#obj_set_gfx_scale) + - [spawn_water_droplet](functions-5.md#spawn_water_droplet) + - [obj_build_relative_transform](functions-5.md#obj_build_relative_transform) + - [cur_obj_move_using_vel](functions-5.md#cur_obj_move_using_vel) + - [obj_copy_graph_y_offset](functions-5.md#obj_copy_graph_y_offset) + - [obj_copy_pos_and_angle](functions-5.md#obj_copy_pos_and_angle) + - [obj_copy_pos](functions-5.md#obj_copy_pos) + - [obj_copy_angle](functions-5.md#obj_copy_angle) + - [obj_set_gfx_pos_from_pos](functions-5.md#obj_set_gfx_pos_from_pos) + - [obj_init_animation](functions-5.md#obj_init_animation) + - [linear_mtxf_mul_vec3f](functions-5.md#linear_mtxf_mul_vec3f) + - [linear_mtxf_transpose_mul_vec3f](functions-5.md#linear_mtxf_transpose_mul_vec3f) + - [obj_apply_scale_to_transform](functions-5.md#obj_apply_scale_to_transform) + - [obj_copy_scale](functions-5.md#obj_copy_scale) + - [obj_scale_xyz](functions-5.md#obj_scale_xyz) + - [obj_scale](functions-5.md#obj_scale) + - [cur_obj_scale](functions-5.md#cur_obj_scale) + - [cur_obj_init_animation](functions-5.md#cur_obj_init_animation) + - [cur_obj_init_animation_with_sound](functions-5.md#cur_obj_init_animation_with_sound) + - [obj_init_animation_with_accel_and_sound](functions-5.md#obj_init_animation_with_accel_and_sound) + - [cur_obj_init_animation_with_accel_and_sound](functions-5.md#cur_obj_init_animation_with_accel_and_sound) + - [obj_init_animation_with_sound](functions-5.md#obj_init_animation_with_sound) + - [cur_obj_enable_rendering_and_become_tangible](functions-5.md#cur_obj_enable_rendering_and_become_tangible) + - [cur_obj_enable_rendering](functions-5.md#cur_obj_enable_rendering) + - [cur_obj_disable_rendering_and_become_intangible](functions-5.md#cur_obj_disable_rendering_and_become_intangible) + - [cur_obj_disable_rendering](functions-5.md#cur_obj_disable_rendering) + - [cur_obj_unhide](functions-5.md#cur_obj_unhide) + - [cur_obj_hide](functions-5.md#cur_obj_hide) + - [cur_obj_set_pos_relative](functions-5.md#cur_obj_set_pos_relative) + - [cur_obj_set_pos_relative_to_parent](functions-5.md#cur_obj_set_pos_relative_to_parent) + - [cur_obj_enable_rendering_2](functions-5.md#cur_obj_enable_rendering_2) + - [cur_obj_unused_init_on_floor](functions-5.md#cur_obj_unused_init_on_floor) + - [obj_set_face_angle_to_move_angle](functions-5.md#obj_set_face_angle_to_move_angle) + - [get_object_list_from_behavior](functions-5.md#get_object_list_from_behavior) + - [cur_obj_nearest_object_with_behavior](functions-5.md#cur_obj_nearest_object_with_behavior) + - [cur_obj_dist_to_nearest_object_with_behavior](functions-5.md#cur_obj_dist_to_nearest_object_with_behavior) + - [cur_obj_find_nearest_pole](functions-5.md#cur_obj_find_nearest_pole) + - [cur_obj_find_nearest_object_with_behavior](functions-5.md#cur_obj_find_nearest_object_with_behavior) + - [cur_obj_count_objects_with_behavior](functions-5.md#cur_obj_count_objects_with_behavior) + - [find_unimportant_object](functions-5.md#find_unimportant_object) - [count_unimportant_objects](functions-5.md#count_unimportant_objects) - - [create_transformation_from_matrices](functions-5.md#create_transformation_from_matrices) - - [cur_obj_abs_y_dist_to_home](functions-5.md#cur_obj_abs_y_dist_to_home) - - [cur_obj_advance_looping_anim](functions-5.md#cur_obj_advance_looping_anim) - - [cur_obj_align_gfx_with_floor](functions-5.md#cur_obj_align_gfx_with_floor) - - [cur_obj_angle_to_home](functions-5.md#cur_obj_angle_to_home) - - [cur_obj_apply_drag_xz](functions-5.md#cur_obj_apply_drag_xz) - - [cur_obj_become_intangible](functions-5.md#cur_obj_become_intangible) - - [cur_obj_become_tangible](functions-5.md#cur_obj_become_tangible) - - [cur_obj_can_mario_activate_textbox](functions-5.md#cur_obj_can_mario_activate_textbox) - - [cur_obj_can_mario_activate_textbox_2](functions-5.md#cur_obj_can_mario_activate_textbox_2) + - [count_objects_with_behavior](functions-5.md#count_objects_with_behavior) + - [find_object_with_behavior](functions-5.md#find_object_with_behavior) + - [cur_obj_find_nearby_held_actor](functions-5.md#cur_obj_find_nearby_held_actor) + - [cur_obj_reset_timer_and_subaction](functions-5.md#cur_obj_reset_timer_and_subaction) - [cur_obj_change_action](functions-5.md#cur_obj_change_action) + - [cur_obj_set_vel_from_mario_vel](functions-5.md#cur_obj_set_vel_from_mario_vel) + - [cur_obj_reverse_animation](functions-5.md#cur_obj_reverse_animation) + - [cur_obj_extend_animation_if_at_end](functions-5.md#cur_obj_extend_animation_if_at_end) + - [cur_obj_check_if_near_animation_end](functions-5.md#cur_obj_check_if_near_animation_end) + - [cur_obj_check_if_at_animation_end](functions-5.md#cur_obj_check_if_at_animation_end) - [cur_obj_check_anim_frame](functions-5.md#cur_obj_check_anim_frame) - [cur_obj_check_anim_frame_in_range](functions-5.md#cur_obj_check_anim_frame_in_range) - [cur_obj_check_frame_prior_current_frame](functions-5.md#cur_obj_check_frame_prior_current_frame) - - [cur_obj_check_grabbed_mario](functions-5.md#cur_obj_check_grabbed_mario) - - [cur_obj_check_if_at_animation_end](functions-5.md#cur_obj_check_if_at_animation_end) - - [cur_obj_check_if_near_animation_end](functions-5.md#cur_obj_check_if_near_animation_end) - - [cur_obj_check_interacted](functions-5.md#cur_obj_check_interacted) - - [cur_obj_clear_interact_status_flag](functions-5.md#cur_obj_clear_interact_status_flag) - - [cur_obj_compute_vel_xz](functions-5.md#cur_obj_compute_vel_xz) - - [cur_obj_count_objects_with_behavior](functions-5.md#cur_obj_count_objects_with_behavior) - - [cur_obj_detect_steep_floor](functions-5.md#cur_obj_detect_steep_floor) - - [cur_obj_disable](functions-5.md#cur_obj_disable) - - [cur_obj_disable_rendering](functions-5.md#cur_obj_disable_rendering) - - [cur_obj_disable_rendering_and_become_intangible](functions-5.md#cur_obj_disable_rendering_and_become_intangible) - - [cur_obj_dist_to_nearest_object_with_behavior](functions-5.md#cur_obj_dist_to_nearest_object_with_behavior) - - [cur_obj_enable_rendering](functions-5.md#cur_obj_enable_rendering) - - [cur_obj_enable_rendering_2](functions-5.md#cur_obj_enable_rendering_2) - - [cur_obj_enable_rendering_and_become_tangible](functions-5.md#cur_obj_enable_rendering_and_become_tangible) - - [cur_obj_enable_rendering_if_mario_in_room](functions-5.md#cur_obj_enable_rendering_if_mario_in_room) - - [cur_obj_end_dialog](functions-5.md#cur_obj_end_dialog) - - [cur_obj_extend_animation_if_at_end](functions-5.md#cur_obj_extend_animation_if_at_end) - - [cur_obj_find_nearby_held_actor](functions-5.md#cur_obj_find_nearby_held_actor) - - [cur_obj_find_nearest_object_with_behavior](functions-5.md#cur_obj_find_nearest_object_with_behavior) - - [cur_obj_find_nearest_pole](functions-5.md#cur_obj_find_nearest_pole) - - [cur_obj_follow_path](functions-5.md#cur_obj_follow_path) - - [cur_obj_forward_vel_approach_upward](functions-5.md#cur_obj_forward_vel_approach_upward) - - [cur_obj_get_dropped](functions-5.md#cur_obj_get_dropped) - - [cur_obj_get_thrown_or_placed](functions-5.md#cur_obj_get_thrown_or_placed) - - [cur_obj_has_behavior](functions-5.md#cur_obj_has_behavior) - - [cur_obj_has_model](functions-5.md#cur_obj_has_model) - - [cur_obj_hide](functions-5.md#cur_obj_hide) - - [cur_obj_hide_if_mario_far_away_y](functions-5.md#cur_obj_hide_if_mario_far_away_y) - - [cur_obj_if_hit_wall_bounce_away](functions-5.md#cur_obj_if_hit_wall_bounce_away) - - [cur_obj_init_animation](functions-5.md#cur_obj_init_animation) - - [cur_obj_init_animation_and_anim_frame](functions-5.md#cur_obj_init_animation_and_anim_frame) - - [cur_obj_init_animation_and_check_if_near_end](functions-5.md#cur_obj_init_animation_and_check_if_near_end) - - [cur_obj_init_animation_and_extend_if_at_end](functions-5.md#cur_obj_init_animation_and_extend_if_at_end) - - [cur_obj_init_animation_with_accel_and_sound](functions-5.md#cur_obj_init_animation_with_accel_and_sound) - - [cur_obj_init_animation_with_sound](functions-5.md#cur_obj_init_animation_with_sound) - - [cur_obj_is_any_player_on_platform](functions-5.md#cur_obj_is_any_player_on_platform) - - [cur_obj_is_mario_ground_pounding_platform](functions-5.md#cur_obj_is_mario_ground_pounding_platform) - - [cur_obj_is_mario_on_platform](functions-5.md#cur_obj_is_mario_on_platform) - - [cur_obj_lateral_dist_from_mario_to_home](functions-5.md#cur_obj_lateral_dist_from_mario_to_home) - - [cur_obj_lateral_dist_from_obj_to_home](functions-5.md#cur_obj_lateral_dist_from_obj_to_home) - - [cur_obj_lateral_dist_to_home](functions-5.md#cur_obj_lateral_dist_to_home) - - [cur_obj_mario_far_away](functions-5.md#cur_obj_mario_far_away) + - [mario_is_in_air_action](functions-5.md#mario_is_in_air_action) + - [mario_is_dive_sliding](functions-5.md#mario_is_dive_sliding) + - [cur_obj_set_y_vel_and_animation](functions-5.md#cur_obj_set_y_vel_and_animation) + - [cur_obj_unrender_and_reset_state](functions-5.md#cur_obj_unrender_and_reset_state) - [cur_obj_move_after_thrown_or_dropped](functions-5.md#cur_obj_move_after_thrown_or_dropped) - - [cur_obj_move_standard](functions-5.md#cur_obj_move_standard) - - [cur_obj_move_up_and_down](functions-5.md#cur_obj_move_up_and_down) - - [cur_obj_move_update_ground_air_flags](functions-5.md#cur_obj_move_update_ground_air_flags) - - [cur_obj_move_update_underwater_flags](functions-5.md#cur_obj_move_update_underwater_flags) - - [cur_obj_move_using_fvel_and_gravity](functions-5.md#cur_obj_move_using_fvel_and_gravity) - - [cur_obj_move_using_vel](functions-5.md#cur_obj_move_using_vel) - - [cur_obj_move_using_vel_and_gravity](functions-5.md#cur_obj_move_using_vel_and_gravity) + - [cur_obj_get_thrown_or_placed](functions-5.md#cur_obj_get_thrown_or_placed) + - [cur_obj_get_dropped](functions-5.md#cur_obj_get_dropped) + - [mario_set_flag](functions-5.md#mario_set_flag) + - [cur_obj_clear_interact_status_flag](functions-5.md#cur_obj_clear_interact_status_flag) + - [obj_mark_for_deletion](functions-5.md#obj_mark_for_deletion) + - [cur_obj_disable](functions-5.md#cur_obj_disable) + - [cur_obj_become_intangible](functions-5.md#cur_obj_become_intangible) + - [cur_obj_become_tangible](functions-5.md#cur_obj_become_tangible) + - [obj_become_tangible](functions-5.md#obj_become_tangible) + - [cur_obj_update_floor_height](functions-5.md#cur_obj_update_floor_height) + - [cur_obj_update_floor_height_and_get_floor](functions-5.md#cur_obj_update_floor_height_and_get_floor) + - [apply_drag_to_value](functions-5.md#apply_drag_to_value) + - [cur_obj_apply_drag_xz](functions-5.md#cur_obj_apply_drag_xz) - [cur_obj_move_xz](functions-5.md#cur_obj_move_xz) - - [cur_obj_move_xz_using_fvel_and_yaw](functions-5.md#cur_obj_move_xz_using_fvel_and_yaw) - - [cur_obj_move_y](functions-5.md#cur_obj_move_y) + - [cur_obj_move_update_underwater_flags](functions-5.md#cur_obj_move_update_underwater_flags) + - [cur_obj_move_update_ground_air_flags](functions-5.md#cur_obj_move_update_ground_air_flags) - [cur_obj_move_y_and_get_water_level](functions-5.md#cur_obj_move_y_and_get_water_level) + - [cur_obj_move_y](functions-5.md#cur_obj_move_y) + - [cur_obj_unused_resolve_wall_collisions](functions-5.md#cur_obj_unused_resolve_wall_collisions) + - [abs_angle_diff](functions-5.md#abs_angle_diff) + - [cur_obj_move_xz_using_fvel_and_yaw](functions-5.md#cur_obj_move_xz_using_fvel_and_yaw) - [cur_obj_move_y_with_terminal_vel](functions-5.md#cur_obj_move_y_with_terminal_vel) - - [cur_obj_nearest_object_with_behavior](functions-5.md#cur_obj_nearest_object_with_behavior) - - [cur_obj_outside_home_rectangle](functions-5.md#cur_obj_outside_home_rectangle) - - [cur_obj_outside_home_square](functions-5.md#cur_obj_outside_home_square) - - [cur_obj_push_mario_away](functions-5.md#cur_obj_push_mario_away) - - [cur_obj_push_mario_away_from_cylinder](functions-5.md#cur_obj_push_mario_away_from_cylinder) - - [cur_obj_reflect_move_angle_off_wall](functions-5.md#cur_obj_reflect_move_angle_off_wall) - - [cur_obj_reset_timer_and_subaction](functions-5.md#cur_obj_reset_timer_and_subaction) - - [cur_obj_resolve_wall_collisions](functions-5.md#cur_obj_resolve_wall_collisions) - - [cur_obj_reverse_animation](functions-5.md#cur_obj_reverse_animation) - - [cur_obj_rotate_face_angle_using_vel](functions-5.md#cur_obj_rotate_face_angle_using_vel) - - [cur_obj_rotate_move_angle_using_vel](functions-5.md#cur_obj_rotate_move_angle_using_vel) - - [cur_obj_rotate_yaw_toward](functions-5.md#cur_obj_rotate_yaw_toward) - - [cur_obj_scale](functions-5.md#cur_obj_scale) - - [cur_obj_scale_over_time](functions-5.md#cur_obj_scale_over_time) + - [cur_obj_compute_vel_xz](functions-5.md#cur_obj_compute_vel_xz) + - [increment_velocity_toward_range](functions-5.md#increment_velocity_toward_range) + - [obj_check_if_collided_with_object](functions-5.md#obj_check_if_collided_with_object) - [cur_obj_set_behavior](functions-5.md#cur_obj_set_behavior) - - [cur_obj_set_billboard_if_vanilla_cam](functions-5.md#cur_obj_set_billboard_if_vanilla_cam) - - [cur_obj_set_face_angle_to_move_angle](functions-5.md#cur_obj_set_face_angle_to_move_angle) - - [cur_obj_set_hitbox_and_die_if_attacked](functions-5.md#cur_obj_set_hitbox_and_die_if_attacked) - - [cur_obj_set_hitbox_radius_and_height](functions-5.md#cur_obj_set_hitbox_radius_and_height) - - [cur_obj_set_home_once](functions-5.md#cur_obj_set_home_once) - - [cur_obj_set_hurtbox_radius_and_height](functions-5.md#cur_obj_set_hurtbox_radius_and_height) - - [cur_obj_set_pos_relative](functions-5.md#cur_obj_set_pos_relative) - - [cur_obj_set_pos_relative_to_parent](functions-5.md#cur_obj_set_pos_relative_to_parent) + - [obj_set_behavior](functions-5.md#obj_set_behavior) + - [cur_obj_has_behavior](functions-5.md#cur_obj_has_behavior) + - [obj_has_behavior](functions-5.md#obj_has_behavior) + - [cur_obj_lateral_dist_from_obj_to_home](functions-5.md#cur_obj_lateral_dist_from_obj_to_home) + - [cur_obj_lateral_dist_from_mario_to_home](functions-5.md#cur_obj_lateral_dist_from_mario_to_home) + - [cur_obj_lateral_dist_to_home](functions-5.md#cur_obj_lateral_dist_to_home) + - [cur_obj_outside_home_square](functions-5.md#cur_obj_outside_home_square) + - [cur_obj_outside_home_rectangle](functions-5.md#cur_obj_outside_home_rectangle) - [cur_obj_set_pos_to_home](functions-5.md#cur_obj_set_pos_to_home) - [cur_obj_set_pos_to_home_and_stop](functions-5.md#cur_obj_set_pos_to_home_and_stop) - - [cur_obj_set_pos_to_home_with_debug](functions-5.md#cur_obj_set_pos_to_home_with_debug) - - [cur_obj_set_pos_via_transform](functions-5.md#cur_obj_set_pos_via_transform) - - [cur_obj_set_vel_from_mario_vel](functions-5.md#cur_obj_set_vel_from_mario_vel) - - [cur_obj_set_y_vel_and_animation](functions-5.md#cur_obj_set_y_vel_and_animation) - - [cur_obj_shake_screen](functions-5.md#cur_obj_shake_screen) - [cur_obj_shake_y](functions-5.md#cur_obj_shake_y) - - [cur_obj_shake_y_until](functions-5.md#cur_obj_shake_y_until) - - [cur_obj_spawn_loot_blue_coin](functions-5.md#cur_obj_spawn_loot_blue_coin) - - [cur_obj_spawn_loot_coin_at_mario_pos](functions-5.md#cur_obj_spawn_loot_coin_at_mario_pos) - - [cur_obj_spawn_particles](functions-5.md#cur_obj_spawn_particles) - - [cur_obj_spawn_star_at_y_offset](functions-5.md#cur_obj_spawn_star_at_y_offset) - [cur_obj_start_cam_event](functions-5.md#cur_obj_start_cam_event) - - [cur_obj_unhide](functions-5.md#cur_obj_unhide) - - [cur_obj_unrender_and_reset_state](functions-5.md#cur_obj_unrender_and_reset_state) - - [cur_obj_unused_init_on_floor](functions-5.md#cur_obj_unused_init_on_floor) - - [cur_obj_unused_play_footstep_sound](functions-5.md#cur_obj_unused_play_footstep_sound) - - [cur_obj_unused_resolve_wall_collisions](functions-5.md#cur_obj_unused_resolve_wall_collisions) + - [set_mario_interact_hoot_if_in_range](functions-5.md#set_mario_interact_hoot_if_in_range) + - [obj_set_billboard](functions-5.md#obj_set_billboard) + - [obj_set_cylboard](functions-5.md#obj_set_cylboard) + - [cur_obj_set_billboard_if_vanilla_cam](functions-5.md#cur_obj_set_billboard_if_vanilla_cam) + - [obj_set_hitbox_radius_and_height](functions-5.md#obj_set_hitbox_radius_and_height) + - [obj_set_hurtbox_radius_and_height](functions-5.md#obj_set_hurtbox_radius_and_height) + - [cur_obj_set_hitbox_radius_and_height](functions-5.md#cur_obj_set_hitbox_radius_and_height) + - [cur_obj_set_hurtbox_radius_and_height](functions-5.md#cur_obj_set_hurtbox_radius_and_height) + - [obj_spawn_loot_coins](functions-5.md#obj_spawn_loot_coins) + - [obj_spawn_loot_blue_coins](functions-5.md#obj_spawn_loot_blue_coins) + - [obj_spawn_loot_yellow_coins](functions-5.md#obj_spawn_loot_yellow_coins) + - [cur_obj_spawn_loot_coin_at_mario_pos](functions-5.md#cur_obj_spawn_loot_coin_at_mario_pos) + - [cur_obj_abs_y_dist_to_home](functions-5.md#cur_obj_abs_y_dist_to_home) + - [cur_obj_advance_looping_anim](functions-5.md#cur_obj_advance_looping_anim) + - [cur_obj_detect_steep_floor](functions-5.md#cur_obj_detect_steep_floor) + - [cur_obj_resolve_wall_collisions](functions-5.md#cur_obj_resolve_wall_collisions) - [cur_obj_update_floor](functions-5.md#cur_obj_update_floor) - [cur_obj_update_floor_and_resolve_wall_collisions](functions-5.md#cur_obj_update_floor_and_resolve_wall_collisions) - [cur_obj_update_floor_and_walls](functions-5.md#cur_obj_update_floor_and_walls) - - [cur_obj_update_floor_height](functions-5.md#cur_obj_update_floor_height) - - [cur_obj_update_floor_height_and_get_floor](functions-5.md#cur_obj_update_floor_height_and_get_floor) - - [cur_obj_wait_then_blink](functions-5.md#cur_obj_wait_then_blink) - - [cur_obj_was_attacked_or_ground_pounded](functions-5.md#cur_obj_was_attacked_or_ground_pounded) + - [cur_obj_move_standard](functions-5.md#cur_obj_move_standard) - [cur_obj_within_12k_bounds](functions-5.md#cur_obj_within_12k_bounds) - - [disable_time_stop](functions-5.md#disable_time_stop) - - [disable_time_stop_including_mario](functions-5.md#disable_time_stop_including_mario) - - [dist_between_object_and_point](functions-5.md#dist_between_object_and_point) - - [dist_between_objects](functions-5.md#dist_between_objects) - - [enable_time_stop](functions-5.md#enable_time_stop) - - [enable_time_stop_if_alone](functions-5.md#enable_time_stop_if_alone) - - [enable_time_stop_including_mario](functions-5.md#enable_time_stop_including_mario) - - [find_object_with_behavior](functions-5.md#find_object_with_behavior) - - [find_unimportant_object](functions-5.md#find_unimportant_object) - - [get_object_list_from_behavior](functions-5.md#get_object_list_from_behavior) - - [get_trajectory_length](functions-5.md#get_trajectory_length) - - [increment_velocity_toward_range](functions-5.md#increment_velocity_toward_range) - - [is_item_in_array](functions-5.md#is_item_in_array) - - [is_mario_moving_fast_or_in_air](functions-5.md#is_mario_moving_fast_or_in_air) - - [lateral_dist_between_objects](functions-5.md#lateral_dist_between_objects) - - [linear_mtxf_mul_vec3f](functions-5.md#linear_mtxf_mul_vec3f) - - [linear_mtxf_transpose_mul_vec3f](functions-5.md#linear_mtxf_transpose_mul_vec3f) - - [mario_is_dive_sliding](functions-5.md#mario_is_dive_sliding) - - [mario_is_in_air_action](functions-5.md#mario_is_in_air_action) - - [mario_is_within_rectangle](functions-5.md#mario_is_within_rectangle) - - [mario_set_flag](functions-5.md#mario_set_flag) - - [obj_angle_to_object](functions-5.md#obj_angle_to_object) - - [obj_angle_to_point](functions-5.md#obj_angle_to_point) - - [obj_apply_scale_to_matrix](functions-5.md#obj_apply_scale_to_matrix) - - [obj_apply_scale_to_transform](functions-5.md#obj_apply_scale_to_transform) - - [obj_attack_collided_from_other_object](functions-5.md#obj_attack_collided_from_other_object) - - [obj_become_tangible](functions-5.md#obj_become_tangible) - - [obj_build_relative_transform](functions-5.md#obj_build_relative_transform) - - [obj_build_transform_from_pos_and_angle](functions-5.md#obj_build_transform_from_pos_and_angle) - - [obj_build_transform_relative_to_parent](functions-5.md#obj_build_transform_relative_to_parent) - - [obj_build_vel_from_transform](functions-5.md#obj_build_vel_from_transform) - - [obj_check_if_collided_with_object](functions-5.md#obj_check_if_collided_with_object) - - [obj_copy_angle](functions-5.md#obj_copy_angle) - - [obj_copy_behavior_params](functions-5.md#obj_copy_behavior_params) - - [obj_copy_graph_y_offset](functions-5.md#obj_copy_graph_y_offset) - - [obj_copy_pos](functions-5.md#obj_copy_pos) - - [obj_copy_pos_and_angle](functions-5.md#obj_copy_pos_and_angle) - - [obj_copy_scale](functions-5.md#obj_copy_scale) - - [obj_create_transform_from_self](functions-5.md#obj_create_transform_from_self) - - [obj_explode_and_spawn_coins](functions-5.md#obj_explode_and_spawn_coins) - - [obj_has_behavior](functions-5.md#obj_has_behavior) - - [obj_init_animation](functions-5.md#obj_init_animation) - - [obj_init_animation_with_accel_and_sound](functions-5.md#obj_init_animation_with_accel_and_sound) - - [obj_init_animation_with_sound](functions-5.md#obj_init_animation_with_sound) - - [obj_is_hidden](functions-5.md#obj_is_hidden) - - [obj_mark_for_deletion](functions-5.md#obj_mark_for_deletion) - - [obj_pitch_to_object](functions-5.md#obj_pitch_to_object) - - [obj_scale](functions-5.md#obj_scale) - - [obj_scale_random](functions-5.md#obj_scale_random) - - [obj_scale_xyz](functions-5.md#obj_scale_xyz) - - [obj_set_angle](functions-5.md#obj_set_angle) - - [obj_set_behavior](functions-5.md#obj_set_behavior) - - [obj_set_billboard](functions-5.md#obj_set_billboard) - - [obj_set_cylboard](functions-5.md#obj_set_cylboard) - - [obj_set_face_angle](functions-5.md#obj_set_face_angle) - - [obj_set_face_angle_to_move_angle](functions-5.md#obj_set_face_angle_to_move_angle) - - [obj_set_gfx_angle](functions-5.md#obj_set_gfx_angle) - - [obj_set_gfx_pos](functions-5.md#obj_set_gfx_pos) - - [obj_set_gfx_pos_at_obj_pos](functions-5.md#obj_set_gfx_pos_at_obj_pos) - - [obj_set_gfx_pos_from_pos](functions-5.md#obj_set_gfx_pos_from_pos) - - [obj_set_gfx_scale](functions-5.md#obj_set_gfx_scale) - - [obj_set_held_state](functions-5.md#obj_set_held_state) - - [obj_set_hitbox](functions-5.md#obj_set_hitbox) - - [obj_set_hitbox_radius_and_height](functions-5.md#obj_set_hitbox_radius_and_height) - - [obj_set_hurtbox_radius_and_height](functions-5.md#obj_set_hurtbox_radius_and_height) - - [obj_set_move_angle](functions-5.md#obj_set_move_angle) - - [obj_set_parent_relative_pos](functions-5.md#obj_set_parent_relative_pos) - - [obj_set_pos](functions-5.md#obj_set_pos) + - [cur_obj_move_using_vel_and_gravity](functions-5.md#cur_obj_move_using_vel_and_gravity) + - [cur_obj_move_using_fvel_and_gravity](functions-5.md#cur_obj_move_using_fvel_and_gravity) - [obj_set_pos_relative](functions-5.md#obj_set_pos_relative) - - [obj_set_throw_matrix_from_transform](functions-5.md#obj_set_throw_matrix_from_transform) - - [obj_spawn_loot_blue_coins](functions-5.md#obj_spawn_loot_blue_coins) - - [obj_spawn_loot_coins](functions-5.md#obj_spawn_loot_coins) - - [obj_spawn_loot_yellow_coins](functions-5.md#obj_spawn_loot_yellow_coins) + - [cur_obj_angle_to_home](functions-5.md#cur_obj_angle_to_home) + - [obj_set_gfx_pos_at_obj_pos](functions-5.md#obj_set_gfx_pos_at_obj_pos) - [obj_translate_local](functions-5.md#obj_translate_local) + - [obj_build_transform_from_pos_and_angle](functions-5.md#obj_build_transform_from_pos_and_angle) + - [obj_set_throw_matrix_from_transform](functions-5.md#obj_set_throw_matrix_from_transform) + - [obj_build_transform_relative_to_parent](functions-5.md#obj_build_transform_relative_to_parent) + - [obj_create_transform_from_self](functions-5.md#obj_create_transform_from_self) + - [cur_obj_rotate_move_angle_using_vel](functions-5.md#cur_obj_rotate_move_angle_using_vel) + - [cur_obj_rotate_face_angle_using_vel](functions-5.md#cur_obj_rotate_face_angle_using_vel) + - [cur_obj_set_face_angle_to_move_angle](functions-5.md#cur_obj_set_face_angle_to_move_angle) + - [cur_obj_follow_path](functions-5.md#cur_obj_follow_path) + - [chain_segment_init](functions-5.md#chain_segment_init) + - [random_f32_around_zero](functions-5.md#random_f32_around_zero) + - [obj_scale_random](functions-5.md#obj_scale_random) - [obj_translate_xyz_random](functions-5.md#obj_translate_xyz_random) - [obj_translate_xz_random](functions-5.md#obj_translate_xz_random) - - [obj_turn_toward_object](functions-5.md#obj_turn_toward_object) - - [obj_update_pos_from_parent_transformation](functions-5.md#obj_update_pos_from_parent_transformation) - - [player_performed_grab_escape_action](functions-5.md#player_performed_grab_escape_action) - - [random_f32_around_zero](functions-5.md#random_f32_around_zero) - - [set_mario_interact_hoot_if_in_range](functions-5.md#set_mario_interact_hoot_if_in_range) - - [set_room_override](functions-5.md#set_room_override) - - [set_time_stop_flags](functions-5.md#set_time_stop_flags) - - [set_time_stop_flags_if_alone](functions-5.md#set_time_stop_flags_if_alone) + - [obj_build_vel_from_transform](functions-5.md#obj_build_vel_from_transform) + - [cur_obj_set_pos_via_transform](functions-5.md#cur_obj_set_pos_via_transform) + - [cur_obj_reflect_move_angle_off_wall](functions-5.md#cur_obj_reflect_move_angle_off_wall) + - [cur_obj_spawn_particles](functions-5.md#cur_obj_spawn_particles) + - [obj_set_hitbox](functions-5.md#obj_set_hitbox) - [signum_positive](functions-5.md#signum_positive) - - [spawn_base_star_with_no_lvl_exit](functions-5.md#spawn_base_star_with_no_lvl_exit) + - [cur_obj_wait_then_blink](functions-5.md#cur_obj_wait_then_blink) + - [cur_obj_is_mario_ground_pounding_platform](functions-5.md#cur_obj_is_mario_ground_pounding_platform) - [spawn_mist_particles](functions-5.md#spawn_mist_particles) - [spawn_mist_particles_with_sound](functions-5.md#spawn_mist_particles_with_sound) - - [spawn_star_with_no_lvl_exit](functions-5.md#spawn_star_with_no_lvl_exit) - - [spawn_water_droplet](functions-5.md#spawn_water_droplet) + - [cur_obj_push_mario_away](functions-5.md#cur_obj_push_mario_away) + - [cur_obj_push_mario_away_from_cylinder](functions-5.md#cur_obj_push_mario_away_from_cylinder) + - [bhv_dust_smoke_loop](functions-5.md#bhv_dust_smoke_loop) - [stub_obj_helpers_3](functions-5.md#stub_obj_helpers_3) + - [cur_obj_scale_over_time](functions-5.md#cur_obj_scale_over_time) + - [cur_obj_set_pos_to_home_with_debug](functions-5.md#cur_obj_set_pos_to_home_with_debug) - [stub_obj_helpers_4](functions-5.md#stub_obj_helpers_4) + - [cur_obj_is_mario_on_platform](functions-5.md#cur_obj_is_mario_on_platform) + - [cur_obj_is_any_player_on_platform](functions-5.md#cur_obj_is_any_player_on_platform) + - [cur_obj_shake_y_until](functions-5.md#cur_obj_shake_y_until) + - [cur_obj_move_up_and_down](functions-5.md#cur_obj_move_up_and_down) + - [spawn_star_with_no_lvl_exit](functions-5.md#spawn_star_with_no_lvl_exit) + - [spawn_base_star_with_no_lvl_exit](functions-5.md#spawn_base_star_with_no_lvl_exit) + - [bit_shift_left](functions-5.md#bit_shift_left) + - [cur_obj_mario_far_away](functions-5.md#cur_obj_mario_far_away) + - [is_mario_moving_fast_or_in_air](functions-5.md#is_mario_moving_fast_or_in_air) + - [is_item_in_array](functions-5.md#is_item_in_array) + - [bhv_init_room](functions-5.md#bhv_init_room) + - [cur_obj_enable_rendering_if_mario_in_room](functions-5.md#cur_obj_enable_rendering_if_mario_in_room) + - [cur_obj_set_hitbox_and_die_if_attacked](functions-5.md#cur_obj_set_hitbox_and_die_if_attacked) + - [obj_explode_and_spawn_coins](functions-5.md#obj_explode_and_spawn_coins) + - [cur_obj_if_hit_wall_bounce_away](functions-5.md#cur_obj_if_hit_wall_bounce_away) + - [cur_obj_hide_if_mario_far_away_y](functions-5.md#cur_obj_hide_if_mario_far_away_y) + - [obj_is_hidden](functions-5.md#obj_is_hidden) + - [enable_time_stop](functions-5.md#enable_time_stop) + - [enable_time_stop_if_alone](functions-5.md#enable_time_stop_if_alone) + - [disable_time_stop](functions-5.md#disable_time_stop) + - [set_time_stop_flags](functions-5.md#set_time_stop_flags) + - [set_time_stop_flags_if_alone](functions-5.md#set_time_stop_flags_if_alone) + - [clear_time_stop_flags](functions-5.md#clear_time_stop_flags) + - [cur_obj_can_mario_activate_textbox](functions-5.md#cur_obj_can_mario_activate_textbox) + - [cur_obj_can_mario_activate_textbox_2](functions-5.md#cur_obj_can_mario_activate_textbox_2) + - [cur_obj_end_dialog](functions-5.md#cur_obj_end_dialog) + - [cur_obj_has_model](functions-5.md#cur_obj_has_model) + - [cur_obj_align_gfx_with_floor](functions-5.md#cur_obj_align_gfx_with_floor) + - [mario_is_within_rectangle](functions-5.md#mario_is_within_rectangle) + - [cur_obj_shake_screen](functions-5.md#cur_obj_shake_screen) + - [obj_attack_collided_from_other_object](functions-5.md#obj_attack_collided_from_other_object) + - [cur_obj_was_attacked_or_ground_pounded](functions-5.md#cur_obj_was_attacked_or_ground_pounded) + - [obj_copy_behavior_params](functions-5.md#obj_copy_behavior_params) + - [cur_obj_init_animation_and_anim_frame](functions-5.md#cur_obj_init_animation_and_anim_frame) + - [cur_obj_init_animation_and_check_if_near_end](functions-5.md#cur_obj_init_animation_and_check_if_near_end) + - [cur_obj_init_animation_and_extend_if_at_end](functions-5.md#cur_obj_init_animation_and_extend_if_at_end) + - [cur_obj_check_grabbed_mario](functions-5.md#cur_obj_check_grabbed_mario) + - [player_performed_grab_escape_action](functions-5.md#player_performed_grab_escape_action) + - [cur_obj_unused_play_footstep_sound](functions-5.md#cur_obj_unused_play_footstep_sound) + - [enable_time_stop_including_mario](functions-5.md#enable_time_stop_including_mario) + - [disable_time_stop_including_mario](functions-5.md#disable_time_stop_including_mario) + - [cur_obj_check_interacted](functions-5.md#cur_obj_check_interacted) + - [cur_obj_spawn_loot_blue_coin](functions-5.md#cur_obj_spawn_loot_blue_coin) + - [cur_obj_spawn_star_at_y_offset](functions-5.md#cur_obj_spawn_star_at_y_offset) + - [cur_obj_set_home_once](functions-5.md#cur_obj_set_home_once) + - [get_trajectory_length](functions-5.md#get_trajectory_length)
@@ -1605,142 +1610,145 @@ - rumble_init.h - [queue_rumble_data](functions-5.md#queue_rumble_data) - - [queue_rumble_data_mario](functions-5.md#queue_rumble_data_mario) - [queue_rumble_data_object](functions-5.md#queue_rumble_data_object) + - [queue_rumble_data_mario](functions-5.md#queue_rumble_data_mario) - [reset_rumble_timers](functions-5.md#reset_rumble_timers) - [reset_rumble_timers_2](functions-5.md#reset_rumble_timers_2)
- save_file.h - - [save_file_clear_flags](functions-5.md#save_file_clear_flags) + - [touch_coin_score_age](functions-5.md#touch_coin_score_age) - [save_file_do_save](functions-5.md#save_file_do_save) - [save_file_erase](functions-5.md#save_file_erase) - [save_file_erase_current_backup_save](functions-5.md#save_file_erase_current_backup_save) - - [save_file_get_cap_pos](functions-5.md#save_file_get_cap_pos) - - [save_file_get_course_coin_score](functions-5.md#save_file_get_course_coin_score) - - [save_file_get_course_star_count](functions-5.md#save_file_get_course_star_count) - - [save_file_get_flags](functions-5.md#save_file_get_flags) - - [save_file_get_max_coin_score](functions-5.md#save_file_get_max_coin_score) - - [save_file_get_sound_mode](functions-5.md#save_file_get_sound_mode) - - [save_file_get_star_flags](functions-5.md#save_file_get_star_flags) - - [save_file_get_total_star_count](functions-5.md#save_file_get_total_star_count) - - [save_file_is_cannon_unlocked](functions-5.md#save_file_is_cannon_unlocked) - [save_file_reload](functions-5.md#save_file_reload) - - [save_file_remove_star_flags](functions-5.md#save_file_remove_star_flags) - - [save_file_set_course_coin_score](functions-5.md#save_file_set_course_coin_score) + - [save_file_get_max_coin_score](functions-5.md#save_file_get_max_coin_score) + - [save_file_get_course_star_count](functions-5.md#save_file_get_course_star_count) + - [save_file_get_total_star_count](functions-5.md#save_file_get_total_star_count) - [save_file_set_flags](functions-5.md#save_file_set_flags) + - [save_file_clear_flags](functions-5.md#save_file_clear_flags) + - [save_file_get_flags](functions-5.md#save_file_get_flags) + - [save_file_get_star_flags](functions-5.md#save_file_get_star_flags) - [save_file_set_star_flags](functions-5.md#save_file_set_star_flags) - - [touch_coin_score_age](functions-5.md#touch_coin_score_age) + - [save_file_remove_star_flags](functions-5.md#save_file_remove_star_flags) + - [save_file_get_course_coin_score](functions-5.md#save_file_get_course_coin_score) + - [save_file_set_course_coin_score](functions-5.md#save_file_set_course_coin_score) + - [save_file_is_cannon_unlocked](functions-5.md#save_file_is_cannon_unlocked) + - [save_file_get_cap_pos](functions-5.md#save_file_get_cap_pos) + - [save_file_get_sound_mode](functions-5.md#save_file_get_sound_mode)
- seqplayer.h - [sequence_player_get_tempo](functions-5.md#sequence_player_get_tempo) - - [sequence_player_get_tempo_acc](functions-5.md#sequence_player_get_tempo_acc) - - [sequence_player_get_transposition](functions-5.md#sequence_player_get_transposition) - [sequence_player_set_tempo](functions-5.md#sequence_player_set_tempo) + - [sequence_player_get_tempo_acc](functions-5.md#sequence_player_get_tempo_acc) - [sequence_player_set_tempo_acc](functions-5.md#sequence_player_set_tempo_acc) + - [sequence_player_get_transposition](functions-5.md#sequence_player_get_transposition) - [sequence_player_set_transposition](functions-5.md#sequence_player_set_transposition) + - [sequence_player_get_volume](functions-5.md#sequence_player_get_volume) + - [sequence_player_get_fade_volume](functions-5.md#sequence_player_get_fade_volume) + - [sequence_player_get_mute_volume_scale](functions-5.md#sequence_player_get_mute_volume_scale)
- smlua_anim_utils.h - [get_mario_vanilla_animation](functions-5.md#get_mario_vanilla_animation) - - [smlua_anim_util_get_current_animation_name](functions-5.md#smlua_anim_util_get_current_animation_name) - [smlua_anim_util_set_animation](functions-5.md#smlua_anim_util_set_animation) + - [smlua_anim_util_get_current_animation_name](functions-5.md#smlua_anim_util_get_current_animation_name)
- smlua_audio_utils.h - - [audio_sample_destroy](functions-5.md#audio_sample_destroy) - - [audio_sample_load](functions-5.md#audio_sample_load) - - [audio_sample_play](functions-5.md#audio_sample_play) - - [audio_sample_stop](functions-5.md#audio_sample_stop) - - [audio_stream_destroy](functions-5.md#audio_stream_destroy) - - [audio_stream_get_frequency](functions-5.md#audio_stream_get_frequency) - - [audio_stream_get_looping](functions-5.md#audio_stream_get_looping) - - [audio_stream_get_position](functions-5.md#audio_stream_get_position) - - [audio_stream_get_volume](functions-5.md#audio_stream_get_volume) - - [audio_stream_load](functions-5.md#audio_stream_load) - - [audio_stream_pause](functions-5.md#audio_stream_pause) - - [audio_stream_play](functions-5.md#audio_stream_play) - - [audio_stream_set_frequency](functions-5.md#audio_stream_set_frequency) - - [audio_stream_set_loop_points](functions-5.md#audio_stream_set_loop_points) - - [audio_stream_set_looping](functions-5.md#audio_stream_set_looping) - - [audio_stream_set_position](functions-5.md#audio_stream_set_position) - - [audio_stream_set_volume](functions-5.md#audio_stream_set_volume) - - [audio_stream_stop](functions-5.md#audio_stream_stop) - - [smlua_audio_utils_replace_sequence](functions-5.md#smlua_audio_utils_replace_sequence) - [smlua_audio_utils_reset_all](functions-5.md#smlua_audio_utils_reset_all) + - [smlua_audio_utils_replace_sequence](functions-5.md#smlua_audio_utils_replace_sequence) + - [audio_stream_load](functions-5.md#audio_stream_load) + - [audio_stream_destroy](functions-5.md#audio_stream_destroy) + - [audio_stream_play](functions-5.md#audio_stream_play) + - [audio_stream_pause](functions-5.md#audio_stream_pause) + - [audio_stream_stop](functions-5.md#audio_stream_stop) + - [audio_stream_get_position](functions-5.md#audio_stream_get_position) + - [audio_stream_set_position](functions-5.md#audio_stream_set_position) + - [audio_stream_get_looping](functions-5.md#audio_stream_get_looping) + - [audio_stream_set_looping](functions-5.md#audio_stream_set_looping) + - [audio_stream_set_loop_points](functions-5.md#audio_stream_set_loop_points) + - [audio_stream_get_frequency](functions-5.md#audio_stream_get_frequency) + - [audio_stream_set_frequency](functions-5.md#audio_stream_set_frequency) + - [audio_stream_get_volume](functions-5.md#audio_stream_get_volume) + - [audio_stream_set_volume](functions-5.md#audio_stream_set_volume) + - [audio_sample_load](functions-5.md#audio_sample_load) + - [audio_sample_destroy](functions-5.md#audio_sample_destroy) + - [audio_sample_stop](functions-5.md#audio_sample_stop) + - [audio_sample_play](functions-5.md#audio_sample_play)
- smlua_camera_utils.h + - [camera_reset_overrides](functions-5.md#camera_reset_overrides) + - [camera_freeze](functions-5.md#camera_freeze) + - [camera_unfreeze](functions-5.md#camera_unfreeze) + - [camera_is_frozen](functions-5.md#camera_is_frozen) + - [camera_romhack_allow_only_mods](functions-5.md#camera_romhack_allow_only_mods) + - [camera_set_romhack_override](functions-5.md#camera_set_romhack_override) + - [camera_romhack_allow_centering](functions-5.md#camera_romhack_allow_centering) - [camera_allow_toxic_gas_camera](functions-5.md#camera_allow_toxic_gas_camera) - - [camera_config_enable_analog_cam](functions-5.md#camera_config_enable_analog_cam) - - [camera_config_enable_centering](functions-5.md#camera_config_enable_centering) - - [camera_config_enable_collisions](functions-5.md#camera_config_enable_collisions) - - [camera_config_enable_dpad](functions-5.md#camera_config_enable_dpad) - - [camera_config_enable_free_cam](functions-5.md#camera_config_enable_free_cam) - - [camera_config_enable_mouse_look](functions-5.md#camera_config_enable_mouse_look) - - [camera_config_get_aggression](functions-5.md#camera_config_get_aggression) - - [camera_config_get_centering](functions-5.md#camera_config_get_centering) - - [camera_config_get_deceleration](functions-5.md#camera_config_get_deceleration) - - [camera_config_get_pan_level](functions-5.md#camera_config_get_pan_level) - - [camera_config_get_x_sensitivity](functions-5.md#camera_config_get_x_sensitivity) - - [camera_config_get_y_sensitivity](functions-5.md#camera_config_get_y_sensitivity) - - [camera_config_invert_x](functions-5.md#camera_config_invert_x) - - [camera_config_invert_y](functions-5.md#camera_config_invert_y) - - [camera_config_is_analog_cam_enabled](functions-5.md#camera_config_is_analog_cam_enabled) - - [camera_config_is_collision_enabled](functions-5.md#camera_config_is_collision_enabled) - - [camera_config_is_dpad_enabled](functions-5.md#camera_config_is_dpad_enabled) + - [camera_romhack_allow_dpad_usage](functions-5.md#camera_romhack_allow_dpad_usage) + - [rom_hack_cam_set_collisions](functions-5.md#rom_hack_cam_set_collisions) + - [camera_romhack_set_zoomed_in_dist](functions-5.md#camera_romhack_set_zoomed_in_dist) + - [camera_romhack_set_zoomed_out_dist](functions-5.md#camera_romhack_set_zoomed_out_dist) + - [camera_romhack_set_zoomed_in_height](functions-5.md#camera_romhack_set_zoomed_in_height) + - [camera_romhack_set_zoomed_out_height](functions-5.md#camera_romhack_set_zoomed_out_height) + - [camera_romhack_get_zoomed_in_dist](functions-5.md#camera_romhack_get_zoomed_in_dist) + - [camera_romhack_get_zoomed_out_dist](functions-5.md#camera_romhack_get_zoomed_out_dist) + - [camera_romhack_get_zoomed_in_height](functions-5.md#camera_romhack_get_zoomed_in_height) + - [camera_romhack_get_zoomed_out_height](functions-5.md#camera_romhack_get_zoomed_out_height) + - [camera_get_romhack_override](functions-5.md#camera_get_romhack_override) + - [camera_romhack_get_allow_centering](functions-5.md#camera_romhack_get_allow_centering) + - [camera_get_allow_toxic_gas_camera](functions-5.md#camera_get_allow_toxic_gas_camera) + - [camera_romhack_get_allow_dpad_usage](functions-5.md#camera_romhack_get_allow_dpad_usage) + - [camera_romhack_get_collisions](functions-5.md#camera_romhack_get_collisions) - [camera_config_is_free_cam_enabled](functions-5.md#camera_config_is_free_cam_enabled) + - [camera_config_is_analog_cam_enabled](functions-5.md#camera_config_is_analog_cam_enabled) + - [camera_config_is_dpad_enabled](functions-5.md#camera_config_is_dpad_enabled) + - [camera_config_is_collision_enabled](functions-5.md#camera_config_is_collision_enabled) - [camera_config_is_mouse_look_enabled](functions-5.md#camera_config_is_mouse_look_enabled) - [camera_config_is_x_inverted](functions-5.md#camera_config_is_x_inverted) - [camera_config_is_y_inverted](functions-5.md#camera_config_is_y_inverted) - - [camera_config_set_aggression](functions-5.md#camera_config_set_aggression) - - [camera_config_set_deceleration](functions-5.md#camera_config_set_deceleration) - - [camera_config_set_pan_level](functions-5.md#camera_config_set_pan_level) + - [camera_config_get_x_sensitivity](functions-5.md#camera_config_get_x_sensitivity) + - [camera_config_get_y_sensitivity](functions-5.md#camera_config_get_y_sensitivity) + - [camera_config_get_aggression](functions-5.md#camera_config_get_aggression) + - [camera_config_get_pan_level](functions-5.md#camera_config_get_pan_level) + - [camera_config_get_deceleration](functions-5.md#camera_config_get_deceleration) + - [camera_config_get_centering](functions-5.md#camera_config_get_centering) + - [camera_config_enable_free_cam](functions-5.md#camera_config_enable_free_cam) + - [camera_config_enable_analog_cam](functions-5.md#camera_config_enable_analog_cam) + - [camera_config_enable_centering](functions-5.md#camera_config_enable_centering) + - [camera_config_enable_dpad](functions-5.md#camera_config_enable_dpad) + - [camera_config_enable_collisions](functions-5.md#camera_config_enable_collisions) + - [camera_config_enable_mouse_look](functions-5.md#camera_config_enable_mouse_look) + - [camera_config_invert_x](functions-5.md#camera_config_invert_x) + - [camera_config_invert_y](functions-5.md#camera_config_invert_y) - [camera_config_set_x_sensitivity](functions-5.md#camera_config_set_x_sensitivity) - [camera_config_set_y_sensitivity](functions-5.md#camera_config_set_y_sensitivity) - - [camera_freeze](functions-5.md#camera_freeze) - - [camera_get_allow_toxic_gas_camera](functions-5.md#camera_get_allow_toxic_gas_camera) + - [camera_config_set_aggression](functions-5.md#camera_config_set_aggression) + - [camera_config_set_pan_level](functions-5.md#camera_config_set_pan_level) + - [camera_config_set_deceleration](functions-5.md#camera_config_set_deceleration) - [camera_get_checking_surfaces](functions-5.md#camera_get_checking_surfaces) - - [camera_get_romhack_override](functions-5.md#camera_get_romhack_override) - - [camera_is_frozen](functions-5.md#camera_is_frozen) - - [camera_reset_overrides](functions-5.md#camera_reset_overrides) - - [camera_romhack_allow_centering](functions-5.md#camera_romhack_allow_centering) - - [camera_romhack_allow_dpad_usage](functions-5.md#camera_romhack_allow_dpad_usage) - - [camera_romhack_allow_only_mods](functions-5.md#camera_romhack_allow_only_mods) - - [camera_romhack_get_allow_centering](functions-5.md#camera_romhack_get_allow_centering) - - [camera_romhack_get_allow_dpad_usage](functions-5.md#camera_romhack_get_allow_dpad_usage) - - [camera_romhack_get_collisions](functions-5.md#camera_romhack_get_collisions) - - [camera_romhack_get_zoomed_in_dist](functions-5.md#camera_romhack_get_zoomed_in_dist) - - [camera_romhack_get_zoomed_in_height](functions-5.md#camera_romhack_get_zoomed_in_height) - - [camera_romhack_get_zoomed_out_dist](functions-5.md#camera_romhack_get_zoomed_out_dist) - - [camera_romhack_get_zoomed_out_height](functions-5.md#camera_romhack_get_zoomed_out_height) - - [camera_romhack_set_zoomed_in_dist](functions-5.md#camera_romhack_set_zoomed_in_dist) - - [camera_romhack_set_zoomed_in_height](functions-5.md#camera_romhack_set_zoomed_in_height) - - [camera_romhack_set_zoomed_out_dist](functions-5.md#camera_romhack_set_zoomed_out_dist) - - [camera_romhack_set_zoomed_out_height](functions-5.md#camera_romhack_set_zoomed_out_height) - [camera_set_checking_surfaces](functions-5.md#camera_set_checking_surfaces) - - [camera_set_romhack_override](functions-5.md#camera_set_romhack_override) - - [camera_unfreeze](functions-5.md#camera_unfreeze) - - [rom_hack_cam_set_collisions](functions-5.md#rom_hack_cam_set_collisions)
- smlua_collision_utils.h - - [collision_find_ceil](functions-5.md#collision_find_ceil) - [collision_find_floor](functions-5.md#collision_find_floor) + - [collision_find_ceil](functions-5.md#collision_find_ceil) + - [get_water_surface_pseudo_floor](functions-5.md#get_water_surface_pseudo_floor) + - [smlua_collision_util_get](functions-5.md#smlua_collision_util_get) - [collision_get_temp_wall_collision_data](functions-5.md#collision_get_temp_wall_collision_data) - [get_surface_from_wcd_index](functions-5.md#get_surface_from_wcd_index) - - [get_water_surface_pseudo_floor](functions-5.md#get_water_surface_pseudo_floor) - - [smlua_collision_util_find_surface_types](functions-5.md#smlua_collision_util_find_surface_types) - - [smlua_collision_util_get](functions-5.md#smlua_collision_util_get) - [smlua_collision_util_get_current_terrain_collision](functions-5.md#smlua_collision_util_get_current_terrain_collision) - [smlua_collision_util_get_level_collision](functions-5.md#smlua_collision_util_get_level_collision) + - [smlua_collision_util_find_surface_types](functions-5.md#smlua_collision_util_find_surface_types)
@@ -1749,137 +1757,138 @@
- smlua_gfx_utils.h - - [get_fog_color](functions-6.md#get_fog_color) - - [get_fog_intensity](functions-6.md#get_fog_intensity) - - [get_lighting_color](functions-6.md#get_lighting_color) - - [get_lighting_color_ambient](functions-6.md#get_lighting_color_ambient) - - [get_lighting_dir](functions-6.md#get_lighting_dir) - - [get_skybox](functions-6.md#get_skybox) - - [get_skybox_color](functions-6.md#get_skybox_color) - - [get_vertex_color](functions-6.md#get_vertex_color) - - [gfx_get_vtx](functions-6.md#gfx_get_vtx) - - [gfx_get_vtx_count](functions-6.md#gfx_get_vtx_count) - - [gfx_parse](functions-6.md#gfx_parse) - - [gfx_set_combine_lerp](functions-6.md#gfx_set_combine_lerp) - - [gfx_set_texture_image](functions-6.md#gfx_set_texture_image) - - [set_fog_color](functions-6.md#set_fog_color) - - [set_fog_intensity](functions-6.md#set_fog_intensity) - - [set_lighting_color](functions-6.md#set_lighting_color) - - [set_lighting_color_ambient](functions-6.md#set_lighting_color_ambient) - - [set_lighting_dir](functions-6.md#set_lighting_dir) - - [set_override_far](functions-6.md#set_override_far) - [set_override_fov](functions-6.md#set_override_fov) - [set_override_near](functions-6.md#set_override_near) - - [set_override_skybox](functions-6.md#set_override_skybox) - - [set_skybox_color](functions-6.md#set_skybox_color) + - [set_override_far](functions-6.md#set_override_far) + - [get_lighting_dir](functions-6.md#get_lighting_dir) + - [set_lighting_dir](functions-6.md#set_lighting_dir) + - [get_lighting_color](functions-6.md#get_lighting_color) + - [get_lighting_color_ambient](functions-6.md#get_lighting_color_ambient) + - [set_lighting_color](functions-6.md#set_lighting_color) + - [set_lighting_color_ambient](functions-6.md#set_lighting_color_ambient) + - [get_vertex_color](functions-6.md#get_vertex_color) - [set_vertex_color](functions-6.md#set_vertex_color) + - [get_fog_color](functions-6.md#get_fog_color) + - [set_fog_color](functions-6.md#set_fog_color) + - [get_fog_intensity](functions-6.md#get_fog_intensity) + - [set_fog_intensity](functions-6.md#set_fog_intensity) + - [get_skybox](functions-6.md#get_skybox) + - [set_override_skybox](functions-6.md#set_override_skybox) + - [get_skybox_color](functions-6.md#get_skybox_color) + - [set_skybox_color](functions-6.md#set_skybox_color) + - [gfx_parse](functions-6.md#gfx_parse) + - [gfx_get_vtx](functions-6.md#gfx_get_vtx) + - [gfx_get_vtx_count](functions-6.md#gfx_get_vtx_count) + - [gfx_set_combine_lerp](functions-6.md#gfx_set_combine_lerp) + - [gfx_set_texture_image](functions-6.md#gfx_set_texture_image)
- smlua_level_utils.h - - [level_is_vanilla_level](functions-6.md#level_is_vanilla_level) - - [level_register](functions-6.md#level_register) - [smlua_level_util_change_area](functions-6.md#smlua_level_util_change_area) - [smlua_level_util_get_info](functions-6.md#smlua_level_util_get_info) - - [smlua_level_util_get_info_from_course_num](functions-6.md#smlua_level_util_get_info_from_course_num) - [smlua_level_util_get_info_from_short_name](functions-6.md#smlua_level_util_get_info_from_short_name) - - [warp_exit_level](functions-6.md#warp_exit_level) - - [warp_restart_level](functions-6.md#warp_restart_level) - - [warp_to_castle](functions-6.md#warp_to_castle) - - [warp_to_level](functions-6.md#warp_to_level) - - [warp_to_start_level](functions-6.md#warp_to_start_level) + - [smlua_level_util_get_info_from_course_num](functions-6.md#smlua_level_util_get_info_from_course_num) + - [level_register](functions-6.md#level_register) + - [level_is_vanilla_level](functions-6.md#level_is_vanilla_level) - [warp_to_warpnode](functions-6.md#warp_to_warpnode) + - [warp_to_level](functions-6.md#warp_to_level) + - [warp_restart_level](functions-6.md#warp_restart_level) + - [warp_to_start_level](functions-6.md#warp_to_start_level) + - [warp_exit_level](functions-6.md#warp_exit_level) + - [warp_to_castle](functions-6.md#warp_to_castle)
- smlua_math_utils.h - - [clamp](functions-6.md#clamp) - - [clampf](functions-6.md#clampf) - - [degrees_to_sm64](functions-6.md#degrees_to_sm64) - - [hypotf](functions-6.md#hypotf) - - [max](functions-6.md#max) - - [maxf](functions-6.md#maxf) - [min](functions-6.md#min) + - [max](functions-6.md#max) + - [sqr](functions-6.md#sqr) - [minf](functions-6.md#minf) + - [maxf](functions-6.md#maxf) + - [sqrf](functions-6.md#sqrf) + - [sm64_to_radians](functions-6.md#sm64_to_radians) - [radians_to_sm64](functions-6.md#radians_to_sm64) - [sm64_to_degrees](functions-6.md#sm64_to_degrees) - - [sm64_to_radians](functions-6.md#sm64_to_radians) - - [sqr](functions-6.md#sqr) - - [sqrf](functions-6.md#sqrf) + - [degrees_to_sm64](functions-6.md#degrees_to_sm64) + - [hypotf](functions-6.md#hypotf) + - [clamp](functions-6.md#clamp) + - [clampf](functions-6.md#clampf)
- smlua_misc_utils.h - - [allocate_mario_action](functions-6.md#allocate_mario_action) - - [course_is_main_course](functions-6.md#course_is_main_course) - - [djui_attempting_to_open_playerlist](functions-6.md#djui_attempting_to_open_playerlist) - - [djui_is_playerlist_open](functions-6.md#djui_is_playerlist_open) + - [get_network_area_timer](functions-6.md#get_network_area_timer) + - [get_area_update_counter](functions-6.md#get_area_update_counter) + - [djui_popup_create_global](functions-6.md#djui_popup_create_global) - [djui_is_popup_disabled](functions-6.md#djui_is_popup_disabled) + - [djui_set_popup_disabled_override](functions-6.md#djui_set_popup_disabled_override) + - [djui_reset_popup_disabled_override](functions-6.md#djui_reset_popup_disabled_override) + - [djui_is_playerlist_open](functions-6.md#djui_is_playerlist_open) + - [djui_attempting_to_open_playerlist](functions-6.md#djui_attempting_to_open_playerlist) + - [djui_get_playerlist_page_index](functions-6.md#djui_get_playerlist_page_index) - [djui_menu_get_font](functions-6.md#djui_menu_get_font) - [djui_menu_get_theme](functions-6.md#djui_menu_get_theme) - - [djui_popup_create_global](functions-6.md#djui_popup_create_global) - - [djui_reset_popup_disabled_override](functions-6.md#djui_reset_popup_disabled_override) - - [djui_set_popup_disabled_override](functions-6.md#djui_set_popup_disabled_override) - - [get_active_mod](functions-6.md#get_active_mod) - - [get_area_update_counter](functions-6.md#get_area_update_counter) - - [get_coopnet_id](functions-6.md#get_coopnet_id) - - [get_current_save_file_num](functions-6.md#get_current_save_file_num) - - [get_date_and_time](functions-6.md#get_date_and_time) - [get_dialog_box_state](functions-6.md#get_dialog_box_state) - [get_dialog_id](functions-6.md#get_dialog_id) - - [get_dialog_response](functions-6.md#get_dialog_response) - - [get_envfx](functions-6.md#get_envfx) - - [get_environment_region](functions-6.md#get_environment_region) - - [get_global_timer](functions-6.md#get_global_timer) + - [get_last_star_or_key](functions-6.md#get_last_star_or_key) + - [set_last_star_or_key](functions-6.md#set_last_star_or_key) + - [get_last_completed_course_num](functions-6.md#get_last_completed_course_num) + - [set_last_completed_course_num](functions-6.md#set_last_completed_course_num) + - [get_last_completed_star_num](functions-6.md#get_last_completed_star_num) + - [set_last_completed_star_num](functions-6.md#set_last_completed_star_num) - [get_got_file_coin_hi_score](functions-6.md#get_got_file_coin_hi_score) + - [set_got_file_coin_hi_score](functions-6.md#set_got_file_coin_hi_score) + - [get_save_file_modified](functions-6.md#get_save_file_modified) + - [set_save_file_modified](functions-6.md#set_save_file_modified) + - [hud_hide](functions-6.md#hud_hide) + - [hud_show](functions-6.md#hud_show) + - [hud_is_hidden](functions-6.md#hud_is_hidden) + - [hud_get_value](functions-6.md#hud_get_value) + - [hud_set_value](functions-6.md#hud_set_value) + - [hud_render_power_meter](functions-6.md#hud_render_power_meter) + - [hud_render_power_meter_interpolated](functions-6.md#hud_render_power_meter_interpolated) + - [hud_get_flash](functions-6.md#hud_get_flash) + - [hud_set_flash](functions-6.md#hud_set_flash) + - [is_game_paused](functions-6.md#is_game_paused) + - [is_transition_playing](functions-6.md#is_transition_playing) + - [allocate_mario_action](functions-6.md#allocate_mario_action) - [get_hand_foot_pos_x](functions-6.md#get_hand_foot_pos_x) - [get_hand_foot_pos_y](functions-6.md#get_hand_foot_pos_y) - [get_hand_foot_pos_z](functions-6.md#get_hand_foot_pos_z) - - [get_last_completed_course_num](functions-6.md#get_last_completed_course_num) - - [get_last_completed_star_num](functions-6.md#get_last_completed_star_num) - - [get_last_star_or_key](functions-6.md#get_last_star_or_key) - - [get_local_discord_id](functions-6.md#get_local_discord_id) - - [get_network_area_timer](functions-6.md#get_network_area_timer) - - [get_os_name](functions-6.md#get_os_name) - - [get_save_file_modified](functions-6.md#get_save_file_modified) - - [get_time](functions-6.md#get_time) - - [get_ttc_speed_setting](functions-6.md#get_ttc_speed_setting) - - [get_volume_env](functions-6.md#get_volume_env) - - [get_volume_level](functions-6.md#get_volume_level) - - [get_volume_master](functions-6.md#get_volume_master) - - [get_volume_sfx](functions-6.md#get_volume_sfx) - - [get_water_level](functions-6.md#get_water_level) - - [hud_get_flash](functions-6.md#hud_get_flash) - - [hud_get_value](functions-6.md#hud_get_value) - - [hud_hide](functions-6.md#hud_hide) - - [hud_is_hidden](functions-6.md#hud_is_hidden) - - [hud_render_power_meter](functions-6.md#hud_render_power_meter) - - [hud_render_power_meter_interpolated](functions-6.md#hud_render_power_meter_interpolated) - - [hud_set_flash](functions-6.md#hud_set_flash) - - [hud_set_value](functions-6.md#hud_set_value) - - [hud_show](functions-6.md#hud_show) - - [is_game_paused](functions-6.md#is_game_paused) - - [is_transition_playing](functions-6.md#is_transition_playing) - - [mod_file_exists](functions-6.md#mod_file_exists) - - [movtexqc_register](functions-6.md#movtexqc_register) - - [play_transition](functions-6.md#play_transition) - - [reset_window_title](functions-6.md#reset_window_title) + - [get_current_save_file_num](functions-6.md#get_current_save_file_num) - [save_file_get_using_backup_slot](functions-6.md#save_file_get_using_backup_slot) - [save_file_set_using_backup_slot](functions-6.md#save_file_set_using_backup_slot) - - [set_environment_region](functions-6.md#set_environment_region) - - [set_got_file_coin_hi_score](functions-6.md#set_got_file_coin_hi_score) - - [set_last_completed_course_num](functions-6.md#set_last_completed_course_num) - - [set_last_completed_star_num](functions-6.md#set_last_completed_star_num) - - [set_last_star_or_key](functions-6.md#set_last_star_or_key) - - [set_override_envfx](functions-6.md#set_override_envfx) - - [set_save_file_modified](functions-6.md#set_save_file_modified) - - [set_ttc_speed_setting](functions-6.md#set_ttc_speed_setting) - - [set_volume_env](functions-6.md#set_volume_env) - - [set_volume_level](functions-6.md#set_volume_level) - - [set_volume_master](functions-6.md#set_volume_master) - - [set_volume_sfx](functions-6.md#set_volume_sfx) + - [movtexqc_register](functions-6.md#movtexqc_register) + - [get_water_level](functions-6.md#get_water_level) - [set_water_level](functions-6.md#set_water_level) + - [play_transition](functions-6.md#play_transition) + - [course_is_main_course](functions-6.md#course_is_main_course) + - [get_ttc_speed_setting](functions-6.md#get_ttc_speed_setting) + - [set_ttc_speed_setting](functions-6.md#set_ttc_speed_setting) + - [get_time](functions-6.md#get_time) + - [get_date_and_time](functions-6.md#get_date_and_time) + - [get_envfx](functions-6.md#get_envfx) + - [set_override_envfx](functions-6.md#set_override_envfx) + - [get_global_timer](functions-6.md#get_global_timer) + - [get_dialog_response](functions-6.md#get_dialog_response) + - [get_local_discord_id](functions-6.md#get_local_discord_id) + - [get_coopnet_id](functions-6.md#get_coopnet_id) + - [get_volume_master](functions-6.md#get_volume_master) + - [get_volume_level](functions-6.md#get_volume_level) + - [get_volume_sfx](functions-6.md#get_volume_sfx) + - [get_volume_env](functions-6.md#get_volume_env) + - [set_volume_master](functions-6.md#set_volume_master) + - [set_volume_level](functions-6.md#set_volume_level) + - [set_volume_sfx](functions-6.md#set_volume_sfx) + - [set_volume_env](functions-6.md#set_volume_env) + - [get_environment_region](functions-6.md#get_environment_region) + - [set_environment_region](functions-6.md#set_environment_region) + - [mod_file_exists](functions-6.md#mod_file_exists) + - [get_active_mod](functions-6.md#get_active_mod) - [set_window_title](functions-6.md#set_window_title) + - [reset_window_title](functions-6.md#reset_window_title) + - [get_os_name](functions-6.md#get_os_name)
@@ -1889,34 +1898,41 @@
- smlua_obj_utils.h - - [geo_get_current_object](functions-6.md#geo_get_current_object) - - [get_current_object](functions-6.md#get_current_object) - - [get_cutscene_focus](functions-6.md#get_cutscene_focus) - - [get_dialog_object](functions-6.md#get_dialog_object) - - [get_secondary_camera_focus](functions-6.md#get_secondary_camera_focus) - - [get_temp_object_hitbox](functions-6.md#get_temp_object_hitbox) - - [get_trajectory](functions-6.md#get_trajectory) - - [obj_check_hitbox_overlap](functions-6.md#obj_check_hitbox_overlap) - - [obj_check_overlap_with_hitbox_params](functions-6.md#obj_check_overlap_with_hitbox_params) - - [obj_count_objects_with_behavior_id](functions-6.md#obj_count_objects_with_behavior_id) - - [obj_get_collided_object](functions-6.md#obj_get_collided_object) - - [obj_get_field_f32](functions-6.md#obj_get_field_f32) - - [obj_get_field_s16](functions-6.md#obj_get_field_s16) - - [obj_get_field_s32](functions-6.md#obj_get_field_s32) - - [obj_get_field_u32](functions-6.md#obj_get_field_u32) - - [obj_get_first](functions-6.md#obj_get_first) - - [obj_get_first_with_behavior_id](functions-6.md#obj_get_first_with_behavior_id) - - [obj_get_first_with_behavior_id_and_field_f32](functions-6.md#obj_get_first_with_behavior_id_and_field_f32) - - [obj_get_first_with_behavior_id_and_field_s32](functions-6.md#obj_get_first_with_behavior_id_and_field_s32) - - [obj_get_model_id_extended](functions-6.md#obj_get_model_id_extended) - - [obj_get_nearest_object_with_behavior_id](functions-6.md#obj_get_nearest_object_with_behavior_id) - - [obj_get_next](functions-6.md#obj_get_next) - - [obj_get_next_with_same_behavior_id](functions-6.md#obj_get_next_with_same_behavior_id) - - [obj_get_next_with_same_behavior_id_and_field_f32](functions-6.md#obj_get_next_with_same_behavior_id_and_field_f32) - - [obj_get_next_with_same_behavior_id_and_field_s32](functions-6.md#obj_get_next_with_same_behavior_id_and_field_s32) - - [obj_get_temp_spawn_particles_info](functions-6.md#obj_get_temp_spawn_particles_info) + - [spawn_sync_object](functions-6.md#spawn_sync_object) + - [spawn_non_sync_object](functions-6.md#spawn_non_sync_object) - [obj_has_behavior_id](functions-6.md#obj_has_behavior_id) - [obj_has_model_extended](functions-6.md#obj_has_model_extended) + - [obj_get_model_id_extended](functions-6.md#obj_get_model_id_extended) + - [obj_set_model_extended](functions-6.md#obj_set_model_extended) + - [get_trajectory](functions-6.md#get_trajectory) + - [geo_get_current_object](functions-6.md#geo_get_current_object) + - [get_current_object](functions-6.md#get_current_object) + - [get_dialog_object](functions-6.md#get_dialog_object) + - [get_cutscene_focus](functions-6.md#get_cutscene_focus) + - [get_secondary_camera_focus](functions-6.md#get_secondary_camera_focus) + - [set_cutscene_focus](functions-6.md#set_cutscene_focus) + - [set_secondary_camera_focus](functions-6.md#set_secondary_camera_focus) + - [obj_get_first](functions-6.md#obj_get_first) + - [obj_get_first_with_behavior_id](functions-6.md#obj_get_first_with_behavior_id) + - [obj_get_first_with_behavior_id_and_field_s32](functions-6.md#obj_get_first_with_behavior_id_and_field_s32) + - [obj_get_first_with_behavior_id_and_field_f32](functions-6.md#obj_get_first_with_behavior_id_and_field_f32) + - [obj_get_next](functions-6.md#obj_get_next) + - [obj_get_next_with_same_behavior_id](functions-6.md#obj_get_next_with_same_behavior_id) + - [obj_get_next_with_same_behavior_id_and_field_s32](functions-6.md#obj_get_next_with_same_behavior_id_and_field_s32) + - [obj_get_next_with_same_behavior_id_and_field_f32](functions-6.md#obj_get_next_with_same_behavior_id_and_field_f32) + - [obj_get_nearest_object_with_behavior_id](functions-6.md#obj_get_nearest_object_with_behavior_id) + - [obj_count_objects_with_behavior_id](functions-6.md#obj_count_objects_with_behavior_id) + - [obj_get_collided_object](functions-6.md#obj_get_collided_object) + - [obj_get_field_u32](functions-6.md#obj_get_field_u32) + - [obj_get_field_s32](functions-6.md#obj_get_field_s32) + - [obj_get_field_f32](functions-6.md#obj_get_field_f32) + - [obj_get_field_s16](functions-6.md#obj_get_field_s16) + - [obj_set_field_u32](functions-6.md#obj_set_field_u32) + - [obj_set_field_s32](functions-6.md#obj_set_field_s32) + - [obj_set_field_f32](functions-6.md#obj_set_field_f32) + - [obj_set_field_s16](functions-6.md#obj_set_field_s16) + - [obj_get_temp_spawn_particles_info](functions-6.md#obj_get_temp_spawn_particles_info) + - [get_temp_object_hitbox](functions-6.md#get_temp_object_hitbox) - [obj_is_attackable](functions-6.md#obj_is_attackable) - [obj_is_breakable_object](functions-6.md#obj_is_breakable_object) - [obj_is_bully](functions-6.md#obj_is_bully) @@ -1926,77 +1942,70 @@ - [obj_is_mushroom_1up](functions-6.md#obj_is_mushroom_1up) - [obj_is_secret](functions-6.md#obj_is_secret) - [obj_is_valid_for_interaction](functions-6.md#obj_is_valid_for_interaction) - - [obj_move_xyz](functions-6.md#obj_move_xyz) - - [obj_set_field_f32](functions-6.md#obj_set_field_f32) - - [obj_set_field_s16](functions-6.md#obj_set_field_s16) - - [obj_set_field_s32](functions-6.md#obj_set_field_s32) - - [obj_set_field_u32](functions-6.md#obj_set_field_u32) - - [obj_set_model_extended](functions-6.md#obj_set_model_extended) + - [obj_check_hitbox_overlap](functions-6.md#obj_check_hitbox_overlap) + - [obj_check_overlap_with_hitbox_params](functions-6.md#obj_check_overlap_with_hitbox_params) - [obj_set_vel](functions-6.md#obj_set_vel) - - [set_cutscene_focus](functions-6.md#set_cutscene_focus) - - [set_secondary_camera_focus](functions-6.md#set_secondary_camera_focus) + - [obj_move_xyz](functions-6.md#obj_move_xyz) - [set_whirlpools](functions-6.md#set_whirlpools) - - [spawn_non_sync_object](functions-6.md#spawn_non_sync_object) - - [spawn_sync_object](functions-6.md#spawn_sync_object)
- smlua_text_utils.h - - [smlua_text_utils_act_name_get](functions-6.md#smlua_text_utils_act_name_get) - - [smlua_text_utils_act_name_mod_index](functions-6.md#smlua_text_utils_act_name_mod_index) - - [smlua_text_utils_act_name_replace](functions-6.md#smlua_text_utils_act_name_replace) - - [smlua_text_utils_act_name_reset](functions-6.md#smlua_text_utils_act_name_reset) - - [smlua_text_utils_castle_secret_stars_replace](functions-6.md#smlua_text_utils_castle_secret_stars_replace) + - [smlua_text_utils_reset_all](functions-6.md#smlua_text_utils_reset_all) + - [smlua_text_utils_dialog_replace](functions-6.md#smlua_text_utils_dialog_replace) - [smlua_text_utils_course_acts_replace](functions-6.md#smlua_text_utils_course_acts_replace) + - [smlua_text_utils_secret_star_replace](functions-6.md#smlua_text_utils_secret_star_replace) + - [smlua_text_utils_course_name_replace](functions-6.md#smlua_text_utils_course_name_replace) - [smlua_text_utils_course_name_get](functions-6.md#smlua_text_utils_course_name_get) - [smlua_text_utils_course_name_mod_index](functions-6.md#smlua_text_utils_course_name_mod_index) - - [smlua_text_utils_course_name_replace](functions-6.md#smlua_text_utils_course_name_replace) - [smlua_text_utils_course_name_reset](functions-6.md#smlua_text_utils_course_name_reset) - - [smlua_text_utils_dialog_replace](functions-6.md#smlua_text_utils_dialog_replace) + - [smlua_text_utils_act_name_replace](functions-6.md#smlua_text_utils_act_name_replace) + - [smlua_text_utils_act_name_get](functions-6.md#smlua_text_utils_act_name_get) + - [smlua_text_utils_act_name_mod_index](functions-6.md#smlua_text_utils_act_name_mod_index) + - [smlua_text_utils_act_name_reset](functions-6.md#smlua_text_utils_act_name_reset) + - [smlua_text_utils_castle_secret_stars_replace](functions-6.md#smlua_text_utils_castle_secret_stars_replace) - [smlua_text_utils_extra_text_replace](functions-6.md#smlua_text_utils_extra_text_replace) - [smlua_text_utils_get_language](functions-6.md#smlua_text_utils_get_language) - - [smlua_text_utils_reset_all](functions-6.md#smlua_text_utils_reset_all) - - [smlua_text_utils_secret_star_replace](functions-6.md#smlua_text_utils_secret_star_replace)
- sound_init.h + - [reset_volume](functions-6.md#reset_volume) + - [raise_background_noise](functions-6.md#raise_background_noise) + - [lower_background_noise](functions-6.md#lower_background_noise) - [disable_background_sound](functions-6.md#disable_background_sound) - [enable_background_sound](functions-6.md#enable_background_sound) - - [fadeout_cap_music](functions-6.md#fadeout_cap_music) - - [fadeout_level_music](functions-6.md#fadeout_level_music) - - [fadeout_music](functions-6.md#fadeout_music) - - [lower_background_noise](functions-6.md#lower_background_noise) - - [play_cap_music](functions-6.md#play_cap_music) - - [play_cutscene_music](functions-6.md#play_cutscene_music) - - [play_infinite_stairs_music](functions-6.md#play_infinite_stairs_music) - [play_menu_sounds](functions-6.md#play_menu_sounds) - [play_painting_eject_sound](functions-6.md#play_painting_eject_sound) - - [play_shell_music](functions-6.md#play_shell_music) - - [raise_background_noise](functions-6.md#raise_background_noise) - - [reset_volume](functions-6.md#reset_volume) + - [play_infinite_stairs_music](functions-6.md#play_infinite_stairs_music) - [set_background_music](functions-6.md#set_background_music) - - [stop_cap_music](functions-6.md#stop_cap_music) + - [fadeout_music](functions-6.md#fadeout_music) + - [fadeout_level_music](functions-6.md#fadeout_level_music) + - [play_cutscene_music](functions-6.md#play_cutscene_music) + - [play_shell_music](functions-6.md#play_shell_music) - [stop_shell_music](functions-6.md#stop_shell_music) + - [play_cap_music](functions-6.md#play_cap_music) + - [fadeout_cap_music](functions-6.md#fadeout_cap_music) + - [stop_cap_music](functions-6.md#stop_cap_music)
- spawn_sound.h - - [calc_dist_to_volume_range_1](functions-6.md#calc_dist_to_volume_range_1) - - [calc_dist_to_volume_range_2](functions-6.md#calc_dist_to_volume_range_2) - - [create_sound_spawner](functions-6.md#create_sound_spawner) + - [exec_anim_sound_state](functions-6.md#exec_anim_sound_state) - [cur_obj_play_sound_1](functions-6.md#cur_obj_play_sound_1) - [cur_obj_play_sound_2](functions-6.md#cur_obj_play_sound_2) - - [exec_anim_sound_state](functions-6.md#exec_anim_sound_state) + - [create_sound_spawner](functions-6.md#create_sound_spawner) + - [calc_dist_to_volume_range_1](functions-6.md#calc_dist_to_volume_range_1) + - [calc_dist_to_volume_range_2](functions-6.md#calc_dist_to_volume_range_2)
- surface_collision.h + - [find_wall_collisions](functions-6.md#find_wall_collisions) - [find_ceil_height](functions-6.md#find_ceil_height) - [find_floor_height](functions-6.md#find_floor_height) - - [find_poison_gas_level](functions-6.md#find_poison_gas_level) - - [find_wall_collisions](functions-6.md#find_wall_collisions) - [find_water_level](functions-6.md#find_water_level) + - [find_poison_gas_level](functions-6.md#find_poison_gas_level) - [set_find_wall_direction](functions-6.md#set_find_wall_direction)
diff --git a/src/audio/seqplayer.c b/src/audio/seqplayer.c index 02cbf4bc9..433ca0b1e 100644 --- a/src/audio/seqplayer.c +++ b/src/audio/seqplayer.c @@ -3075,4 +3075,16 @@ u16 sequence_player_get_tempo_acc(u8 player) { u16 sequence_player_get_transposition(u8 player) { return gSequencePlayers[player].transposition; +} + +f32 sequence_player_get_volume(u8 player) { + return gSequencePlayers[player].volume; +} + +f32 sequence_player_get_fade_volume(u8 player) { + return gSequencePlayers[player].fadeVolume; +} + +f32 sequence_player_get_mute_volume_scale(u8 player) { + return gSequencePlayers[player].muteVolumeScale; } \ No newline at end of file diff --git a/src/audio/seqplayer.h b/src/audio/seqplayer.h index a6e7e02cd..b2b863876 100644 --- a/src/audio/seqplayer.h +++ b/src/audio/seqplayer.h @@ -19,13 +19,19 @@ void init_sequence_players(void); u16 sequence_player_get_tempo(u8 player); /* |description|Sets the `tempo` of `player`. Resets when another sequence is played|descriptionEnd| */ void sequence_player_set_tempo(u8 player, u16 tempo); -/* |description|Gets the tempoAcc (tempo ???) of `player`|descriptionEnd| */ +/* |description|Gets the tempoAcc (tempo accumulation) of `player`|descriptionEnd| */ u16 sequence_player_get_tempo_acc(u8 player); -/* |description|Sets the `tempoAcc` (tempo ???) of `player`. Resets when another sequence is played|descriptionEnd| */ +/* |description|Sets the `tempoAcc` (tempo accumulation) of `player`. Resets when another sequence is played|descriptionEnd| */ void sequence_player_set_tempo_acc(u8 player, u16 tempoAcc); /* |description|Gets the transposition (pitch) of `player`|descriptionEnd| */ u16 sequence_player_get_transposition(u8 player); /* |description|Sets the `transposition` (pitch) of `player`. Resets when another sequence is played|descriptionEnd| */ void sequence_player_set_transposition(u8 player, u16 transposition); +/* |description|Gets the volume of `player`|descriptionEnd| */ +f32 sequence_player_get_volume(u8 player); +/* |description|Gets the fade volume of `player`|descriptionEnd| */ +f32 sequence_player_get_fade_volume(u8 player); +/* |description|Gets the mute volume scale of `player`|descriptionEnd| */ +f32 sequence_player_get_mute_volume_scale(u8 player); #endif // AUDIO_SEQPLAYER_H diff --git a/src/game/game_init.c b/src/game/game_init.c index 17928cafc..2e13c7e57 100644 --- a/src/game/game_init.c +++ b/src/game/game_init.c @@ -26,6 +26,7 @@ #include #include "bettercamera.h" #include "hud.h" +#include "pc/controller/controller_mouse.h" // FIXME: I'm not sure all of these variables belong in this file, but I don't // know of a good way to split them @@ -508,6 +509,17 @@ void read_controller_inputs(void) { gPlayer3Controller->buttonPressed = gPlayer1Controller->buttonPressed; gPlayer3Controller->buttonReleased = gPlayer1Controller->buttonReleased; gPlayer3Controller->buttonDown = gPlayer1Controller->buttonDown;*/ + + // Mouse Input + u32 prev_mouse_window_buttons = mouse_window_buttons; + controller_mouse_read_window(); + mouse_window_buttons_pressed = ~prev_mouse_window_buttons & mouse_window_buttons; + mouse_window_buttons_released = ~mouse_window_buttons & prev_mouse_window_buttons; + + if (gGlobalTimer > mouse_scroll_timestamp) { + mouse_scroll_x = 0; + mouse_scroll_y = 0; + } } // initialize the controller structs to point at the OSCont information. diff --git a/src/game/player_palette.c b/src/game/player_palette.c index 55e10955d..9300df262 100644 --- a/src/game/player_palette.c +++ b/src/game/player_palette.c @@ -87,25 +87,25 @@ static void player_palettes_sort_characters(void) { } void player_palettes_read(const char* palettesPath, bool appendPalettes) { - // construct lang path - char lpath[SYS_MAX_PATH] = ""; + // construct palette path + char ppath[SYS_MAX_PATH] = ""; if (appendPalettes) { - snprintf(lpath, SYS_MAX_PATH, "%s/palettes", palettesPath); + snprintf(ppath, SYS_MAX_PATH, "%s/palettes", palettesPath); } else { - snprintf(lpath, SYS_MAX_PATH, "%s", palettesPath); + snprintf(ppath, SYS_MAX_PATH, "%s", palettesPath); } // open directory struct dirent* dir = NULL; - DIR* d = opendir(lpath); + DIR* d = opendir(ppath); if (!d) { return; } // iterate char path[SYS_MAX_PATH] = { 0 }; while ((dir = readdir(d)) != NULL) { // sanity check / fill path[] - if (!directory_sanity_check(dir, lpath, path)) { continue; } + if (!directory_sanity_check(dir, ppath, path)) { continue; } snprintf(path, SYS_MAX_PATH, "%s", dir->d_name); // strip the name before the . @@ -154,14 +154,14 @@ void player_palettes_read(const char* palettesPath, bool appendPalettes) { } void player_palette_export(char* name) { - // construct lang path + // construct palette path const char* palettesPath = fs_get_write_path(PALETTES_DIRECTORY); - char lpath[SYS_MAX_PATH] = ""; - snprintf(lpath, SYS_MAX_PATH, "%s/%s.ini", palettesPath, name); + char ppath[SYS_MAX_PATH] = ""; + snprintf(ppath, SYS_MAX_PATH, "%s/%s.ini", palettesPath, name); fs_sys_mkdir(palettesPath); printf("Saving palette as '%s.ini'\n", name); - FILE* file = fopen(lpath, "w"); + FILE* file = fopen(ppath, "w"); fprintf(file, "[PALETTE]\n\ PANTS_R = %d\n\ PANTS_G = %d\n\ @@ -215,15 +215,15 @@ EMBLEM_B = %d\n", } bool player_palette_delete(const char* palettesPath, char* name, bool appendPalettes) { - // construct lang path - char lpath[SYS_MAX_PATH] = ""; + // construct palette path + char ppath[SYS_MAX_PATH] = ""; if (appendPalettes) { - snprintf(lpath, SYS_MAX_PATH, "%s/palettes/%s.ini", palettesPath, name); + snprintf(ppath, SYS_MAX_PATH, "%s/palettes/%s.ini", palettesPath, name); } else { - snprintf(lpath, SYS_MAX_PATH, "%s/%s.ini", palettesPath, name); + snprintf(ppath, SYS_MAX_PATH, "%s/%s.ini", palettesPath, name); } - if (remove(lpath) == 0) { + if (remove(ppath) == 0) { printf("Deleting palette '%s.ini'\n", name); return true; } diff --git a/src/pc/configfile.c b/src/pc/configfile.c index aa4a2d312..d4f334ada 100644 --- a/src/pc/configfile.c +++ b/src/pc/configfile.c @@ -21,6 +21,7 @@ #include "djui/djui_hud_utils.h" #include "game/save_file.h" #include "pc/network/network_player.h" +#include "pc/pc_main.h" #define ARRAY_LEN(arr) (sizeof(arr) / sizeof(arr[0])) @@ -183,6 +184,7 @@ bool configMenuRandom = false; bool configMenuDemos = false; bool configDisablePopups = false; char configLanguage[MAX_CONFIG_STRING] = ""; +bool configForce4By3 = false; bool configDynosLocalPlayerModelOnly = false; unsigned int configPvpType = PLAYER_PVP_CLASSIC; // CoopNet settings @@ -332,6 +334,7 @@ static const struct ConfigOption options[] = { // {.name = "coop_menu_demos", .type = CONFIG_TYPE_BOOL, .boolValue = &configMenuDemos}, {.name = "disable_popups", .type = CONFIG_TYPE_BOOL, .boolValue = &configDisablePopups}, {.name = "language", .type = CONFIG_TYPE_STRING, .stringValue = (char*)&configLanguage, .maxStringLength = MAX_CONFIG_STRING}, + {.name = "force_4by3", .type = CONFIG_TYPE_BOOL, .boolValue = &configForce4By3}, {.name = "dynos_local_player_model_only", .type = CONFIG_TYPE_BOOL, .boolValue = &configDynosLocalPlayerModelOnly}, // CoopNet settings {.name = "coopnet_ip", .type = CONFIG_TYPE_STRING, .stringValue = (char*)&configCoopNetIp, .maxStringLength = MAX_CONFIG_STRING}, @@ -761,6 +764,8 @@ NEXT_OPTION: if (configFrameLimit < 30) { configFrameLimit = 30; } if (configFrameLimit > 3000) { configFrameLimit = 3000; } + + gMasterVolume = (f32)configMasterVolume / 127.0f; if (configPlayerModel >= CT_MAX) { configPlayerModel = 0; } diff --git a/src/pc/configfile.h b/src/pc/configfile.h index 6532c1db3..ba5335eba 100644 --- a/src/pc/configfile.h +++ b/src/pc/configfile.h @@ -134,6 +134,7 @@ extern bool configMenuRandom; extern bool configMenuDemos; extern bool configDisablePopups; extern char configLanguage[MAX_CONFIG_STRING]; +extern bool configForce4By3; extern bool configDynosLocalPlayerModelOnly; extern unsigned int configPvpType; // CoopNet settings diff --git a/src/pc/controller/controller_mouse.c b/src/pc/controller/controller_mouse.c index bf6132938..84c10a635 100644 --- a/src/pc/controller/controller_mouse.c +++ b/src/pc/controller/controller_mouse.c @@ -1,4 +1,6 @@ #include "controller_mouse.h" +#include "pc/gfx/gfx_pc.h" +#include "pc/djui/djui.h" #ifdef WAPI_DXGI #define WIN32_LEAN_AND_MEAN @@ -18,9 +20,15 @@ s32 mouse_x; s32 mouse_y; u32 mouse_window_buttons; +u32 mouse_window_buttons_pressed; +u32 mouse_window_buttons_released; s32 mouse_window_x; s32 mouse_window_y; +u32 mouse_scroll_timestamp; +f32 mouse_scroll_x; +f32 mouse_scroll_y; + bool mouse_relative_enabled; #ifdef WAPI_DXGI @@ -30,9 +38,11 @@ bool mouse_dxgi_prev_focus; static u32 controller_mouse_dxgi_button_state(u32* mouse_held, bool has_focus) { u32 mouse = - ((GetKeyState(VK_LBUTTON) < 0) ? (1 << 0) : 0) | - ((GetKeyState(VK_MBUTTON) < 0) ? (1 << 1) : 0) | - ((GetKeyState(VK_RBUTTON) < 0) ? (1 << 2) : 0); + ((GetKeyState(VK_LBUTTON ) < 0) ? MOUSE_BUTTON_1 : 0) | + ((GetKeyState(VK_MBUTTON ) < 0) ? MOUSE_BUTTON_2 : 0) | + ((GetKeyState(VK_RBUTTON ) < 0) ? MOUSE_BUTTON_3 : 0) | + ((GetKeyState(VK_XBUTTON1) < 0) ? MOUSE_BUTTON_4 : 0) | + ((GetKeyState(VK_XBUTTON2) < 0) ? MOUSE_BUTTON_5 : 0); bool prev_focus = mouse_dxgi_prev_focus; mouse_dxgi_prev_focus = has_focus; @@ -66,11 +76,12 @@ void controller_mouse_read_window(void) { POINT p; if (GetCursorPos(&p) && ScreenToClient(game_window, &p)) { - mouse_window_x = p.x; + mouse_window_x = p.x - gfx_current_dimensions.x_adjust_4by3; mouse_window_y = p.y; } #elif defined(CAPI_SDL1) || defined(CAPI_SDL2) mouse_window_buttons = SDL_GetMouseState(&mouse_window_x, &mouse_window_y); + mouse_window_x -= gfx_current_dimensions.x_adjust_4by3; #endif } @@ -143,3 +154,9 @@ void controller_mouse_leave_relative(void) { } } +void mouse_on_scroll(float x, float y) { + djui_interactable_on_scroll(x, y); + mouse_scroll_timestamp = gGlobalTimer; + mouse_scroll_x += x; + mouse_scroll_y += y; +} \ No newline at end of file diff --git a/src/pc/controller/controller_mouse.h b/src/pc/controller/controller_mouse.h index db98c4569..72c1cf5c6 100644 --- a/src/pc/controller/controller_mouse.h +++ b/src/pc/controller/controller_mouse.h @@ -10,10 +10,26 @@ extern u32 mouse_buttons; extern s32 mouse_x; extern s32 mouse_y; +#define MOUSE_BUTTON_1 (1 << 0) +#define MOUSE_BUTTON_2 (1 << 1) +#define MOUSE_BUTTON_3 (1 << 2) +#define MOUSE_BUTTON_4 (1 << 3) +#define MOUSE_BUTTON_5 (1 << 4) + +#define L_MOUSE_BUTTON MOUSE_BUTTON_1 +#define M_MOUSE_BUTTON MOUSE_BUTTON_2 +#define R_MOUSE_BUTTON MOUSE_BUTTON_3 + extern u32 mouse_window_buttons; +extern u32 mouse_window_buttons_pressed; +extern u32 mouse_window_buttons_released; extern s32 mouse_window_x; extern s32 mouse_window_y; +extern u32 mouse_scroll_timestamp; +extern f32 mouse_scroll_x; +extern f32 mouse_scroll_y; + extern bool mouse_relative_enabled; void controller_mouse_read_window(void); @@ -22,4 +38,6 @@ void controller_mouse_read_relative(void); void controller_mouse_enter_relative(void); void controller_mouse_leave_relative(void); +void mouse_on_scroll(float x, float y); + #endif diff --git a/src/pc/crash_handler.c b/src/pc/crash_handler.c index 4acd507ea..a6adb718e 100644 --- a/src/pc/crash_handler.c +++ b/src/pc/crash_handler.c @@ -29,6 +29,7 @@ char gLastRemoteBhv[256] = ""; #include "pc/debuglog.h" #include "pc/pc_main.h" #include "controller/controller_keyboard.h" +#include "controller/controller_mouse.h" typedef struct { s32 x, y; @@ -652,6 +653,7 @@ static void crash_handler(const int signalNum, siginfo_t *info, UNUSED ucontext_ gfx_init(&WAPI, &RAPI, TITLE); WAPI.set_keyboard_callbacks(keyboard_on_key_down, keyboard_on_key_up, keyboard_on_all_keys_up, keyboard_on_text_input, keyboard_on_text_editing); + WAPI.set_scroll_callback(mouse_on_scroll); } if (!gGameInited) djui_unicode_init(); diff --git a/src/pc/djui/djui_chat_box.c b/src/pc/djui/djui_chat_box.c index 02bc61ee7..011eaaf92 100644 --- a/src/pc/djui/djui_chat_box.c +++ b/src/pc/djui/djui_chat_box.c @@ -502,6 +502,23 @@ static void djui_chat_box_input_on_text_editing(struct DjuiBase *base, char* tex djui_inputbox_on_text_editing(base, text, cursorPos); } +static void djui_chat_box_input_on_scroll(UNUSED struct DjuiBase *base, UNUSED float x, float y) { + if (gDjuiChatBox == NULL) { return; } + + f32 yMax = gDjuiChatBox->chatContainer->base.elem.height - gDjuiChatBox->chatFlow->base.height.value; + f32* yValue = &gDjuiChatBox->chatFlow->base.y.value; + bool canScrollUp = (*yValue > yMax); + bool canScrollDown = (*yValue < 0); + + y *= 24; + if (gDjuiInputHeldControl) { y /= 2; } + if (gDjuiInputHeldShift) { y *= 3; } + + gDjuiChatBox->scrolling = true; + if (y > 0 && canScrollDown) { *yValue = fmin(*yValue + y, 0); } + if (y < 0 && canScrollUp) { *yValue = fmax(*yValue + y, yMax); } +} + void djui_chat_box_toggle(void) { if (gDjuiChatBox == NULL) { return; } if (!gDjuiChatBoxFocus) { sDjuiChatBoxClearText = true; } @@ -555,6 +572,7 @@ struct DjuiChatBox* djui_chat_box_create(void) { djui_interactable_hook_key(&chatInput->base, djui_chat_box_input_on_key_down, djui_inputbox_on_key_up); djui_interactable_hook_text_input(&chatInput->base, djui_chat_box_input_on_text_input); djui_interactable_hook_text_editing(&chatInput->base, djui_chat_box_input_on_text_editing); + djui_interactable_hook_scroll(&chatInput->base, djui_chat_box_input_on_scroll); chatBox->chatInput = chatInput; gDjuiChatBox = chatBox; diff --git a/src/pc/djui/djui_gfx.c b/src/pc/djui/djui_gfx.c index 3599842d1..42c2c5b73 100644 --- a/src/pc/djui/djui_gfx.c +++ b/src/pc/djui/djui_gfx.c @@ -47,7 +47,7 @@ const Gfx dl_djui_simple_rect[] = { f32 djui_gfx_get_scale(void) { if (configDjuiScale == 0) { // auto u32 windowWidth, windowHeight; - wm_api->get_dimensions(&windowWidth, &windowHeight); + gfx_get_dimensions(&windowWidth, &windowHeight); if (windowHeight < 768) { return 0.5f; } else if (windowHeight < 1440) { @@ -165,14 +165,14 @@ void djui_gfx_render_texture_tile(const u8* texture, u32 w, u32 h, u32 bitSize, void djui_gfx_position_translate(f32* x, f32* y) { u32 windowWidth, windowHeight; - wm_api->get_dimensions(&windowWidth, &windowHeight); + gfx_get_dimensions(&windowWidth, &windowHeight); *x = GFX_DIMENSIONS_FROM_LEFT_EDGE(0) + *x * ((f32)SCREEN_HEIGHT / (f32)windowHeight) * djui_gfx_get_scale(); *y = SCREEN_HEIGHT - *y * ((f32)SCREEN_HEIGHT / (f32)windowHeight) * djui_gfx_get_scale(); } void djui_gfx_scale_translate(f32* width, f32* height) { u32 windowWidth, windowHeight; - wm_api->get_dimensions(&windowWidth, &windowHeight); + gfx_get_dimensions(&windowWidth, &windowHeight); *width = *width * ((f32)SCREEN_HEIGHT / (f32)windowHeight) * djui_gfx_get_scale(); *height = *height * ((f32)SCREEN_HEIGHT / (f32)windowHeight) * djui_gfx_get_scale(); @@ -180,7 +180,7 @@ void djui_gfx_scale_translate(f32* width, f32* height) { void djui_gfx_size_translate(f32* size) { u32 windowWidth, windowHeight; - wm_api->get_dimensions(&windowWidth, &windowHeight); + gfx_get_dimensions(&windowWidth, &windowHeight); *size = *size * ((f32)SCREEN_HEIGHT / (f32)windowHeight) * djui_gfx_get_scale(); } diff --git a/src/pc/djui/djui_gfx.h b/src/pc/djui/djui_gfx.h index 96af3c762..6739e1467 100644 --- a/src/pc/djui/djui_gfx.h +++ b/src/pc/djui/djui_gfx.h @@ -17,6 +17,8 @@ f32 djui_gfx_get_scale(void); void djui_gfx_render_texture(const u8* texture, u32 w, u32 h, u32 bitSize, bool filter); void djui_gfx_render_texture_tile(const u8* texture, u32 w, u32 h, u32 bitSize, u32 tileX, u32 tileY, u32 tileW, u32 tileH, bool filter, bool font); +void gfx_get_dimensions(u32* width, u32* height); + void djui_gfx_position_translate(f32* x, f32* y); void djui_gfx_scale_translate(f32* width, f32* height); void djui_gfx_size_translate(f32* size); diff --git a/src/pc/djui/djui_hud_utils.c b/src/pc/djui/djui_hud_utils.c index ce9ed24b4..3e0c253c2 100644 --- a/src/pc/djui/djui_hud_utils.c +++ b/src/pc/djui/djui_hud_utils.c @@ -245,18 +245,16 @@ void djui_hud_set_rotation_interpolated(s32 prevRotation, f32 prevPivotX, f32 pr u32 djui_hud_get_screen_width(void) { u32 windowWidth, windowHeight; - wm_api->get_dimensions(&windowWidth, &windowHeight); + gfx_get_dimensions(&windowWidth, &windowHeight); - if (sResolution == RESOLUTION_N64) { - return (GFX_DIMENSIONS_ASPECT_RATIO) * SCREEN_HEIGHT; - } else { - return (windowWidth / djui_gfx_get_scale()); - } + return (sResolution == RESOLUTION_N64) + ? GFX_DIMENSIONS_ASPECT_RATIO * SCREEN_HEIGHT + : (windowWidth / djui_gfx_get_scale()); } u32 djui_hud_get_screen_height(void) { u32 windowWidth, windowHeight; - wm_api->get_dimensions(&windowWidth, &windowHeight); + gfx_get_dimensions(&windowWidth, &windowHeight); return (sResolution == RESOLUTION_N64) ? SCREEN_HEIGHT @@ -285,6 +283,26 @@ void djui_hud_set_mouse_locked(bool locked) { gDjuiHudLockMouse = locked; } +u8 djui_hud_get_mouse_buttons_down(void) { + return mouse_window_buttons; +} + +u8 djui_hud_get_mouse_buttons_pressed(void) { + return mouse_window_buttons_pressed; +} + +u8 djui_hud_get_mouse_buttons_released(void) { + return mouse_window_buttons_released; +} + +f32 djui_hud_get_mouse_scroll_x(void) { + return mouse_scroll_x; +} + +f32 djui_hud_get_mouse_scroll_y(void) { + return mouse_scroll_y; +} + f32 djui_hud_measure_text(const char* message) { if (message == NULL) { return 0; } const struct DjuiFont* font = gDjuiFonts[sFont]; @@ -649,7 +667,7 @@ bool djui_hud_world_pos_to_screen_pos(Vec3f pos, Vec3f out) { screenHeight = SCREEN_HEIGHT; } else { u32 windowWidth, windowHeight; - WAPI.get_dimensions(&windowWidth, &windowHeight); + gfx_get_dimensions(&windowWidth, &windowHeight); screenWidth = (f32) windowWidth; screenHeight = (f32) windowHeight; } diff --git a/src/pc/djui/djui_hud_utils.h b/src/pc/djui/djui_hud_utils.h index a77e1a4ef..e4093f1b1 100644 --- a/src/pc/djui/djui_hud_utils.h +++ b/src/pc/djui/djui_hud_utils.h @@ -94,6 +94,16 @@ f32 djui_hud_get_raw_mouse_x(void); f32 djui_hud_get_raw_mouse_y(void); /* |description|Sets if the cursor is hidden and constrainted to the window|descriptionEnd| */ void djui_hud_set_mouse_locked(bool locked); +/* |description|Returns the flags of the mouse buttons held down|descriptionEnd| */ +u8 djui_hud_get_mouse_buttons_down(void); +/* |description|Returns the flags of the mouse buttons clicked|descriptionEnd| */ +u8 djui_hud_get_mouse_buttons_pressed(void); +/* |description|Returns the flags of the mouse buttons released|descriptionEnd| */ +u8 djui_hud_get_mouse_buttons_released(void); +/* |description|Returns the amount scrolled horizontally (-left/right+)|descriptionEnd| */ +f32 djui_hud_get_mouse_scroll_x(void); +/* |description|Returns the amount scrolled vertically (-down/up+)|descriptionEnd| */ +f32 djui_hud_get_mouse_scroll_y(void); /* |description|Measures the length of `message` in the current font|descriptionEnd| */ f32 djui_hud_measure_text(const char* message); diff --git a/src/pc/djui/djui_inputbox.c b/src/pc/djui/djui_inputbox.c index 408960717..efb1082e8 100644 --- a/src/pc/djui/djui_inputbox.c +++ b/src/pc/djui/djui_inputbox.c @@ -13,9 +13,9 @@ #define DJUI_INPUTBOX_MID_BLINK (DJUI_INPUTBOX_MAX_BLINK / 2) #define DJUI_INPUTBOX_CURSOR_WIDTH (2.0f / 32.0f) -static u8 sHeldShift = 0; -static u8 sHeldControl = 0; -static u8 sHeldAlt = 0; +u8 gDjuiInputHeldShift = 0; +u8 gDjuiInputHeldControl = 0; +u8 gDjuiInputHeldAlt = 0; static u8 sCursorBlink = 0; static void djui_inputbox_update_style(struct DjuiBase* base) { @@ -179,58 +179,58 @@ bool djui_inputbox_on_key_down(struct DjuiBase *base, int scancode) { u16 s2 = fmax(sel[0], sel[1]); switch (scancode) { - case SCANCODE_SHIFT_LEFT: sHeldShift |= (1 << 0); return true; - case SCANCODE_SHIFT_RIGHT: sHeldShift |= (1 << 1); return true; - case SCANCODE_CONTROL_LEFT: sHeldControl |= (1 << 0); return true; - case SCANCODE_CONTROL_RIGHT: sHeldControl |= (1 << 1); return true; - case SCANCODE_ALT_LEFT: sHeldAlt |= (1 << 0); return true; - case SCANCODE_ALT_RIGHT: sHeldAlt |= (1 << 1); return true; + case SCANCODE_SHIFT_LEFT: gDjuiInputHeldShift |= (1 << 0); return true; + case SCANCODE_SHIFT_RIGHT: gDjuiInputHeldShift |= (1 << 1); return true; + case SCANCODE_CONTROL_LEFT: gDjuiInputHeldControl |= (1 << 0); return true; + case SCANCODE_CONTROL_RIGHT: gDjuiInputHeldControl |= (1 << 1); return true; + case SCANCODE_ALT_LEFT: gDjuiInputHeldAlt |= (1 << 0); return true; + case SCANCODE_ALT_RIGHT: gDjuiInputHeldAlt |= (1 << 1); return true; } // [Left], [Ctrl]+[Left], [Shift]+[Left], [Ctrl]+[Shift]+[Left] - if (!sHeldAlt && scancode == SCANCODE_LEFT) { - if (sHeldControl) { + if (!gDjuiInputHeldAlt && scancode == SCANCODE_LEFT) { + if (gDjuiInputHeldControl) { sel[0] = djui_inputbox_jump_word_left(msg, len, sel[0]); } else if (sel[0] > 0) { sel[0]--; } - if (!sHeldShift) { sel[1] = sel[0]; } + if (!gDjuiInputHeldShift) { sel[1] = sel[0]; } sCursorBlink = 0; return true; } // [Right], [Ctrl]+[Right], [Shift]+[Right], [Ctrl]+[Shift]+[Right] - if (!sHeldAlt && scancode == SCANCODE_RIGHT) { - if (sHeldControl) { + if (!gDjuiInputHeldAlt && scancode == SCANCODE_RIGHT) { + if (gDjuiInputHeldControl) { sel[0] = djui_inputbox_jump_word_right(msg, len, sel[0]); } else if (sel[0] < len) { sel[0]++; } - if (!sHeldShift) { sel[1] = sel[0]; } + if (!gDjuiInputHeldShift) { sel[1] = sel[0]; } sCursorBlink = 0; return true; } // [Home], [Shift]+[Home] - if (!sHeldAlt && scancode == SCANCODE_HOME) { + if (!gDjuiInputHeldAlt && scancode == SCANCODE_HOME) { sel[0] = 0; - if (!sHeldShift) { sel[1] = sel[0]; } + if (!gDjuiInputHeldShift) { sel[1] = sel[0]; } sCursorBlink = 0; return true; } // [End], [Shift]+[End] - if (!sHeldAlt && scancode == SCANCODE_END) { + if (!gDjuiInputHeldAlt && scancode == SCANCODE_END) { sel[0] = len; - if (!sHeldShift) { sel[1] = sel[0]; } + if (!gDjuiInputHeldShift) { sel[1] = sel[0]; } sCursorBlink = 0; return true; } // [Backspace], [Ctrl]+[Backspace] - if (!sHeldAlt && scancode == SCANCODE_BACKSPACE) { + if (!gDjuiInputHeldAlt && scancode == SCANCODE_BACKSPACE) { if (sel[0] == sel[1]) { - if (sHeldControl) { + if (gDjuiInputHeldControl) { sel[0] = djui_inputbox_jump_word_left(msg, len, sel[0]); } else if (sel[0] > 0) { sel[0]--; @@ -244,9 +244,9 @@ bool djui_inputbox_on_key_down(struct DjuiBase *base, int scancode) { } // [Delete], [Ctrl]+[Delete] - if (!sHeldAlt && scancode == SCANCODE_DELETE) { + if (!gDjuiInputHeldAlt && scancode == SCANCODE_DELETE) { if (sel[0] == sel[1]) { - if (sHeldControl) { + if (gDjuiInputHeldControl) { sel[1] = djui_inputbox_jump_word_right(msg, len, sel[1]); } else if (sel[1] < len) { sel[1]++; @@ -260,16 +260,16 @@ bool djui_inputbox_on_key_down(struct DjuiBase *base, int scancode) { } // [Ctrl]+[V], [Shift]+[Insert] - if (!sHeldAlt && - ((!sHeldShift && sHeldControl && scancode == SCANCODE_V) || - (!sHeldControl && sHeldShift && scancode == SCANCODE_INSERT))) { + if (!gDjuiInputHeldAlt && + ((!gDjuiInputHeldShift && gDjuiInputHeldControl && scancode == SCANCODE_V) || + (!gDjuiInputHeldControl && gDjuiInputHeldShift && scancode == SCANCODE_INSERT))) { djui_interactable_on_text_input(wm_api->get_clipboard_text()); sCursorBlink = 0; return true; } // [Ctrl]+[C], [Ctrl]+[X] - if (!sHeldAlt && !sHeldShift && sHeldControl && + if (!gDjuiInputHeldAlt && !gDjuiInputHeldShift && gDjuiInputHeldControl && (scancode == SCANCODE_C || scancode == SCANCODE_X)) { if (sel[0] != sel[1]) { char clipboardText[256] = { 0 }; @@ -286,7 +286,7 @@ bool djui_inputbox_on_key_down(struct DjuiBase *base, int scancode) { } // [Ctrl]+[A] - if (!sHeldAlt && !sHeldShift && sHeldControl && scancode == SCANCODE_A) { + if (!gDjuiInputHeldAlt && !gDjuiInputHeldShift && gDjuiInputHeldControl && scancode == SCANCODE_A) { inputbox->selection[0] = djui_unicode_len(msg); inputbox->selection[1] = 0; sCursorBlink = 0; @@ -294,7 +294,7 @@ bool djui_inputbox_on_key_down(struct DjuiBase *base, int scancode) { } // [Esc] - if (!sHeldAlt && !sHeldShift && !sHeldControl && scancode == SCANCODE_ESCAPE) { + if (!gDjuiInputHeldAlt && !gDjuiInputHeldShift && !gDjuiInputHeldControl && scancode == SCANCODE_ESCAPE) { djui_interactable_set_input_focus(NULL); if (inputbox->on_escape_press) { inputbox->on_escape_press(inputbox); @@ -303,7 +303,7 @@ bool djui_inputbox_on_key_down(struct DjuiBase *base, int scancode) { } // [Enter] - if (!sHeldAlt && !sHeldShift && !sHeldControl && scancode == SCANCODE_ENTER) { + if (!gDjuiInputHeldAlt && !gDjuiInputHeldShift && !gDjuiInputHeldControl && scancode == SCANCODE_ENTER) { djui_interactable_set_input_focus(NULL); if (inputbox->on_enter_press) { inputbox->on_enter_press(inputbox); @@ -316,19 +316,19 @@ bool djui_inputbox_on_key_down(struct DjuiBase *base, int scancode) { void djui_inputbox_on_key_up(UNUSED struct DjuiBase *base, int scancode) { switch (scancode) { - case SCANCODE_SHIFT_LEFT: sHeldShift &= ~(1 << 0); break; - case SCANCODE_SHIFT_RIGHT: sHeldShift &= ~(1 << 1); break; - case SCANCODE_CONTROL_LEFT: sHeldControl &= ~(1 << 0); break; - case SCANCODE_CONTROL_RIGHT: sHeldControl &= ~(1 << 1); break; - case SCANCODE_ALT_LEFT: sHeldAlt &= ~(1 << 0); break; - case SCANCODE_ALT_RIGHT: sHeldAlt &= ~(1 << 1); break; + case SCANCODE_SHIFT_LEFT: gDjuiInputHeldShift &= ~(1 << 0); break; + case SCANCODE_SHIFT_RIGHT: gDjuiInputHeldShift &= ~(1 << 1); break; + case SCANCODE_CONTROL_LEFT: gDjuiInputHeldControl &= ~(1 << 0); break; + case SCANCODE_CONTROL_RIGHT: gDjuiInputHeldControl &= ~(1 << 1); break; + case SCANCODE_ALT_LEFT: gDjuiInputHeldAlt &= ~(1 << 0); break; + case SCANCODE_ALT_RIGHT: gDjuiInputHeldAlt &= ~(1 << 1); break; } } void djui_inputbox_on_focus_begin(UNUSED struct DjuiBase* base) { - sHeldShift = 0; - sHeldControl = 0; - sHeldAlt = 0; + gDjuiInputHeldShift = 0; + gDjuiInputHeldControl = 0; + gDjuiInputHeldAlt = 0; wm_api->start_text_input(); } diff --git a/src/pc/djui/djui_inputbox.h b/src/pc/djui/djui_inputbox.h index a590d0f6e..7cc1f70d8 100644 --- a/src/pc/djui/djui_inputbox.h +++ b/src/pc/djui/djui_inputbox.h @@ -15,6 +15,10 @@ struct DjuiInputbox { u16 imePos; }; +extern u8 gDjuiInputHeldShift; +extern u8 gDjuiInputHeldControl; +extern u8 gDjuiInputHeldAlt; + void djui_inputbox_on_focus_begin(UNUSED struct DjuiBase* base); void djui_inputbox_on_focus_end(UNUSED struct DjuiBase* base); void djui_inputbox_set_text_color(struct DjuiInputbox* inputbox, u8 r, u8 g, u8 b, u8 a); diff --git a/src/pc/djui/djui_interactable.c b/src/pc/djui/djui_interactable.c index b950a3cc0..0d67f01a2 100644 --- a/src/pc/djui/djui_interactable.c +++ b/src/pc/djui/djui_interactable.c @@ -335,6 +335,13 @@ void djui_interactable_on_text_editing(char* text, int cursorPos) { gInteractableFocus->interactable->on_text_editing(gInteractableFocus, text, cursorPos); } +void djui_interactable_on_scroll(float x, float y) { + if (gInteractableFocus == NULL) { return; } + if (gInteractableFocus->interactable == NULL) { return; } + if (gInteractableFocus->interactable->on_scroll == NULL) { return; } + gInteractableFocus->interactable->on_scroll(gInteractableFocus, x, y); +} + void djui_interactable_update_pad(void) { OSContPad* pad = &gInteractablePad; @@ -486,9 +493,9 @@ void djui_interactable_hook_cursor_down(struct DjuiBase* base, } void djui_interactable_hook_focus(struct DjuiBase* base, - void (*on_focus_begin)(struct DjuiBase*), - void (*on_focus)(struct DjuiBase*, OSContPad*), - void (*on_focus_end)(struct DjuiBase*)) { + void (*on_focus_begin)(struct DjuiBase*), + void (*on_focus)(struct DjuiBase*, OSContPad*), + void (*on_focus_end)(struct DjuiBase*)) { struct DjuiInteractable* interactable = base->interactable; interactable->on_focus_begin = on_focus_begin; interactable->on_focus = on_focus; @@ -514,8 +521,8 @@ void djui_interactable_hook_bind(struct DjuiBase* base, } void djui_interactable_hook_key(struct DjuiBase* base, - bool (*on_key_down)(struct DjuiBase*, int), - void (*on_key_up)(struct DjuiBase*, int)) { + bool (*on_key_down)(struct DjuiBase*, int), + void (*on_key_up)(struct DjuiBase*, int)) { struct DjuiInteractable *interactable = base->interactable; interactable->on_key_down = on_key_down; interactable->on_key_up = on_key_up; @@ -529,11 +536,17 @@ void djui_interactable_hook_text_input(struct DjuiBase *base, } void djui_interactable_hook_text_editing(struct DjuiBase* base, - void (*on_text_editing)(struct DjuiBase*, char*, int)) { + void (*on_text_editing)(struct DjuiBase*, char*, int)) { struct DjuiInteractable *interactable = base->interactable; interactable->on_text_editing = on_text_editing; } +void djui_interactable_hook_scroll(struct DjuiBase* base, + void (*on_scroll)(struct DjuiBase*, float, float)) { + struct DjuiInteractable *interactable = base->interactable; + interactable->on_scroll = on_scroll; +} + void djui_interactable_hook_enabled_change(struct DjuiBase *base, void (*on_enabled_change)(struct DjuiBase*)) { struct DjuiInteractable *interactable = base->interactable; diff --git a/src/pc/djui/djui_interactable.h b/src/pc/djui/djui_interactable.h index 64d1bddc6..4a4dff258 100644 --- a/src/pc/djui/djui_interactable.h +++ b/src/pc/djui/djui_interactable.h @@ -7,8 +7,6 @@ #define PAD_BUTTON_Z ((u16)(1 << 13)) #define PAD_BUTTON_START ((u16)(1 << 12)) -#define MOUSE_BUTTON_1 ((u16)(1 << 0)) - #define SCANCODE_UP 328 #define SCANCODE_DOWN 336 #define SCANCODE_LEFT 331 @@ -43,6 +41,7 @@ struct DjuiInteractable { void (*on_key_up)(struct DjuiBase*, int scancode); void (*on_text_input)(struct DjuiBase*, char* text); void (*on_text_editing)(struct DjuiBase*, char* text, int cursorPos); + void (*on_scroll)(struct DjuiBase*, float x, float y); void (*on_enabled_change)(struct DjuiBase*); }; @@ -64,6 +63,7 @@ bool djui_interactable_on_key_down(int scancode); void djui_interactable_on_key_up(int scancode); void djui_interactable_on_text_input(char *text); void djui_interactable_on_text_editing(char* text, int cursorPos); +void djui_interactable_on_scroll(float x, float y); void djui_interactable_update(void); @@ -91,14 +91,17 @@ void djui_interactable_hook_bind(struct DjuiBase* base, void (*on_bind)(struct DjuiBase*)); void djui_interactable_hook_key(struct DjuiBase* base, - bool (*on_key_down)(struct DjuiBase*, int), - void (*on_key_up)(struct DjuiBase*, int)); + bool (*on_key_down)(struct DjuiBase*, int), + void (*on_key_up)(struct DjuiBase*, int)); void djui_interactable_hook_text_input(struct DjuiBase* base, void (*on_text_input)(struct DjuiBase*, char*)); void djui_interactable_hook_text_editing(struct DjuiBase* base, - void (*on_text_editing)(struct DjuiBase*, char*, int)); + void (*on_text_editing)(struct DjuiBase*, char*, int)); + +void djui_interactable_hook_scroll(struct DjuiBase* base, + void (*on_scroll)(struct DjuiBase*, float, float)); void djui_interactable_hook_enabled_change(struct DjuiBase *base, void (*on_enabled_change)(struct DjuiBase*)); diff --git a/src/pc/djui/djui_panel_display.c b/src/pc/djui/djui_panel_display.c index 9dd68dad3..36be26435 100644 --- a/src/pc/djui/djui_panel_display.c +++ b/src/pc/djui/djui_panel_display.c @@ -61,6 +61,7 @@ void djui_panel_display_create(struct DjuiBase* caller) { { djui_checkbox_create(body, DLANG(DISPLAY, FULLSCREEN), &configWindow.fullscreen, djui_panel_display_apply); + djui_checkbox_create(body, DLANG(DISPLAY, FORCE_4BY3), &configForce4By3, djui_panel_display_apply); djui_checkbox_create(body, DLANG(DISPLAY, SHOW_FPS), &configShowFPS, NULL); djui_checkbox_create(body, DLANG(DISPLAY, VSYNC), &configWindow.vsync, djui_panel_display_apply); djui_checkbox_create(body, DLANG(DISPLAY, UNCAPPED_FRAMERATE), &configUncappedFramerate, djui_panel_display_uncapped_change); diff --git a/src/pc/djui/djui_root.c b/src/pc/djui/djui_root.c index 3c7437c06..5653e658a 100644 --- a/src/pc/djui/djui_root.c +++ b/src/pc/djui/djui_root.c @@ -5,7 +5,7 @@ static bool djui_root_render(struct DjuiBase* base) { // grab window height u32 windowWidth, windowHeight; - wm_api->get_dimensions(&windowWidth, &windowHeight); + gfx_get_dimensions(&windowWidth, &windowHeight); // fill the screen djui_base_set_location(base, 0, 0); diff --git a/src/pc/gfx/gfx_dummy.c b/src/pc/gfx/gfx_dummy.c index 944af34b1..b8df469ec 100644 --- a/src/pc/gfx/gfx_dummy.c +++ b/src/pc/gfx/gfx_dummy.c @@ -51,6 +51,9 @@ static void gfx_dummy_wm_set_keyboard_callbacks(UNUSED kb_callback_t on_key_down UNUSED void (*on_text_input)(char*), UNUSED void (*on_text_editing)(char*, int)) { } +static void gfx_dummy_wm_set_scroll_callback(UNUSED void (*on_scroll)(float, float)) { +} + static void gfx_dummy_wm_set_fullscreen_changed_callback(UNUSED void (*on_fullscreen_changed)(bool is_now_fullscreen)) { } @@ -201,6 +204,7 @@ static void gfx_dummy_renderer_shutdown(void) { struct GfxWindowManagerAPI gfx_dummy_wm_api = { gfx_dummy_wm_init, gfx_dummy_wm_set_keyboard_callbacks, + gfx_dummy_wm_set_scroll_callback, gfx_dummy_wm_main_loop, gfx_dummy_wm_get_dimensions, gfx_dummy_wm_handle_events, diff --git a/src/pc/gfx/gfx_dxgi.cpp b/src/pc/gfx/gfx_dxgi.cpp index 6f06bfb00..8dcfdad4a 100644 --- a/src/pc/gfx/gfx_dxgi.cpp +++ b/src/pc/gfx/gfx_dxgi.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -93,6 +94,8 @@ static struct { bool (*on_key_up)(int scancode); void (*on_all_keys_up)(void); void (*on_text_input)(char*); + + void (*on_scroll)(float x, float y); } dxgi; static void load_dxgi_library(void) { @@ -272,6 +275,10 @@ static void gfx_dxgi_on_text_input(wchar_t code_unit) { } } +static void gfx_dxgi_on_scroll(WPARAM w_param) { + dxgi.on_scroll(0, GET_WHEEL_DELTA_WPARAM(w_param)/120); +} + static LRESULT CALLBACK gfx_dxgi_wnd_proc(HWND h_wnd, UINT message, WPARAM w_param, LPARAM l_param) { WCHAR wcsFileName[MAX_PATH]; char szFileName[MAX_PATH]; @@ -310,6 +317,10 @@ static LRESULT CALLBACK gfx_dxgi_wnd_proc(HWND h_wnd, UINT message, WPARAM w_par gfx_dxgi_on_text_input((wchar_t)w_param); return 0; } + case WM_MOUSEWHEEL: { + gfx_dxgi_on_scroll(w_param); + return 0; + } case WM_SYSKEYDOWN: { if ((w_param == VK_RETURN) && ((l_param & 1 << 30) == 0)) { toggle_borderless_window_full_screen(!dxgi.is_full_screen); @@ -425,6 +436,10 @@ static void gfx_dxgi_set_keyboard_callbacks(bool (*on_key_down)(int scancode), b dxgi.on_text_input = on_text_input; } +static void gfx_dxgi_set_scroll_callback(void (*on_scroll)(float, float)) { + dxgi.on_scroll = on_scroll; +} + static void gfx_dxgi_main_loop(void (*run_one_game_iter)(void)) { run_one_game_iter(); } @@ -778,6 +793,7 @@ void ThrowIfFailed(HRESULT res, HWND h_wnd, const char *message) { struct GfxWindowManagerAPI gfx_dxgi = { gfx_dxgi_init, gfx_dxgi_set_keyboard_callbacks, + gfx_dxgi_set_scroll_callback, gfx_dxgi_main_loop, gfx_dxgi_get_dimensions, gfx_dxgi_handle_events, diff --git a/src/pc/gfx/gfx_pc.c b/src/pc/gfx/gfx_pc.c index 449fad7cd..38b121888 100644 --- a/src/pc/gfx/gfx_pc.c +++ b/src/pc/gfx/gfx_pc.c @@ -993,17 +993,21 @@ static void OPTIMIZE_O3 gfx_sp_tri1(uint8_t vtx1_idx, uint8_t vtx2_idx, uint8_t } if (rdp.viewport_or_scissor_changed) { - if (memcmp(&rdp.viewport, &rendering_state.viewport, sizeof(rdp.viewport)) != 0) { + static uint32_t x_adjust_4by3_prev; + if (memcmp(&rdp.viewport, &rendering_state.viewport, sizeof(rdp.viewport)) != 0 + || x_adjust_4by3_prev != gfx_current_dimensions.x_adjust_4by3) { gfx_flush(); - gfx_rapi->set_viewport(rdp.viewport.x, rdp.viewport.y, rdp.viewport.width, rdp.viewport.height); + gfx_rapi->set_viewport(rdp.viewport.x + gfx_current_dimensions.x_adjust_4by3, rdp.viewport.y, rdp.viewport.width, rdp.viewport.height); rendering_state.viewport = rdp.viewport; } - if (memcmp(&rdp.scissor, &rendering_state.scissor, sizeof(rdp.scissor)) != 0) { + if (memcmp(&rdp.scissor, &rendering_state.scissor, sizeof(rdp.scissor)) != 0 + || x_adjust_4by3_prev != gfx_current_dimensions.x_adjust_4by3) { gfx_flush(); - gfx_rapi->set_scissor(rdp.scissor.x, rdp.scissor.y, rdp.scissor.width, rdp.scissor.height); + gfx_rapi->set_scissor(rdp.scissor.x + gfx_current_dimensions.x_adjust_4by3, rdp.scissor.y, rdp.scissor.width, rdp.scissor.height); rendering_state.scissor = rdp.scissor; } rdp.viewport_or_scissor_changed = false; + x_adjust_4by3_prev = gfx_current_dimensions.x_adjust_4by3; } struct CombineMode* cm = &rdp.combine_mode; @@ -1842,6 +1846,9 @@ static void gfx_sp_reset(void) { void gfx_get_dimensions(uint32_t *width, uint32_t *height) { gfx_wapi->get_dimensions(width, height); + if (configForce4By3) { + *width = gfx_current_dimensions.aspect_ratio * *height; + } } void gfx_init(struct GfxWindowManagerAPI *wapi, struct GfxRenderingAPI *rapi, const char *window_title) { @@ -1871,6 +1878,11 @@ void gfx_start_frame(void) { // Avoid division by zero gfx_current_dimensions.height = 1; } + if (configForce4By3 + && ((4.0f / 3.0f) * gfx_current_dimensions.height) < gfx_current_dimensions.width) { + gfx_current_dimensions.x_adjust_4by3 = (gfx_current_dimensions.width - (4.0f / 3.0f) * gfx_current_dimensions.height) / 2; + gfx_current_dimensions.width = (4.0f / 3.0f) * gfx_current_dimensions.height; + } else { gfx_current_dimensions.x_adjust_4by3 = 0; } gfx_current_dimensions.aspect_ratio = ((float)gfx_current_dimensions.width / (float)gfx_current_dimensions.height); gfx_current_dimensions.x_adjust_ratio = (4.0f / 3.0f) / gfx_current_dimensions.aspect_ratio; } diff --git a/src/pc/gfx/gfx_pc.h b/src/pc/gfx/gfx_pc.h index 1a89fbd32..09ef6ddca 100644 --- a/src/pc/gfx/gfx_pc.h +++ b/src/pc/gfx/gfx_pc.h @@ -10,6 +10,7 @@ struct GfxDimensions { uint32_t width, height; float aspect_ratio; float x_adjust_ratio; + uint32_t x_adjust_4by3; }; extern struct GfxDimensions gfx_current_dimensions; diff --git a/src/pc/gfx/gfx_sdl2.c b/src/pc/gfx/gfx_sdl2.c index bc2a4a8ce..70d58a12e 100644 --- a/src/pc/gfx/gfx_sdl2.c +++ b/src/pc/gfx/gfx_sdl2.c @@ -67,6 +67,8 @@ static void (*kb_all_keys_up)(void) = NULL; static void (*kb_text_input)(char*) = NULL; static void (*kb_text_editing)(char*, int) = NULL; +static void (*m_scroll)(float, float) = NULL; + #define IS_FULLSCREEN() ((SDL_GetWindowFlags(wnd) & SDL_WINDOW_FULLSCREEN_DESKTOP) != 0) static inline void gfx_sdl_set_vsync(const bool enabled) { @@ -186,6 +188,11 @@ static void gfx_sdl_onkeyup(int scancode) { kb_key_up(translate_sdl_scancode(scancode)); } +static void gfx_sdl_onscroll(float x, float y) { + if (m_scroll) + m_scroll(x, y); +} + static void gfx_sdl_ondropfile(char* path) { #ifdef _WIN32 char portable_path[SYS_MAX_PATH]; @@ -221,6 +228,9 @@ static void gfx_sdl_handle_events(void) { case SDL_KEYUP: gfx_sdl_onkeyup(event.key.keysym.scancode); break; + case SDL_MOUSEWHEEL: + gfx_sdl_onscroll(event.wheel.preciseX, event.wheel.preciseY); + break; case SDL_WINDOWEVENT: if (!IS_FULLSCREEN()) { switch (event.window.event) { @@ -263,6 +273,10 @@ void (*on_all_keys_up)(void), void (*on_text_input)(char*), void (*on_text_editi kb_text_editing = on_text_editing; } +static void gfx_sdl_set_scroll_callback(void (*on_scroll)(float, float)) { + m_scroll = on_scroll; +} + static bool gfx_sdl_start_frame(void) { return true; } @@ -329,6 +343,7 @@ static void gfx_sdl_set_cursor_visible(bool visible) { SDL_ShowCursor(visible ? struct GfxWindowManagerAPI gfx_sdl = { gfx_sdl_init, gfx_sdl_set_keyboard_callbacks, + gfx_sdl_set_scroll_callback, gfx_sdl_main_loop, gfx_sdl_get_dimensions, gfx_sdl_handle_events, diff --git a/src/pc/gfx/gfx_window_manager_api.h b/src/pc/gfx/gfx_window_manager_api.h index 5f1fa5d8a..f1e7760ef 100644 --- a/src/pc/gfx/gfx_window_manager_api.h +++ b/src/pc/gfx/gfx_window_manager_api.h @@ -15,6 +15,7 @@ struct GfxWindowManagerAPI { void (*init)(const char *window_title); void (*set_keyboard_callbacks)(kb_callback_t on_key_down, kb_callback_t on_key_up, void (*on_all_keys_up)(void), void (*on_text_input)(char*), void (*on_text_editing)(char*, int)); + void (*set_scroll_callback)(void (*on_scroll)(float, float)); void (*main_loop)(void (*run_one_game_iter)(void)); void (*get_dimensions)(uint32_t *width, uint32_t *height); void (*handle_events)(void); diff --git a/src/pc/loading.c b/src/pc/loading.c index 2cf6f61c6..dc3adcc03 100644 --- a/src/pc/loading.c +++ b/src/pc/loading.c @@ -48,7 +48,7 @@ static bool loading_screen_on_render(struct DjuiBase* base) { MUTEX_LOCK(gLoadingThread); u32 windowWidth, windowHeight; - WAPI.get_dimensions(&windowWidth, &windowHeight); + gfx_get_dimensions(&windowWidth, &windowHeight); f32 scale = djui_gfx_get_scale(); windowWidth /= scale; windowHeight /= scale; diff --git a/src/pc/lua/smlua_constants_autogen.c b/src/pc/lua/smlua_constants_autogen.c index 2625eaf63..e351eb2e1 100644 --- a/src/pc/lua/smlua_constants_autogen.c +++ b/src/pc/lua/smlua_constants_autogen.c @@ -1076,6 +1076,14 @@ char gSmluaConstants[] = "" "CHAR_SOUND_LETS_A_GO=42\n" "CHAR_SOUND_OKEY_DOKEY=43\n" "CHAR_SOUND_MAX=44\n" +"MOUSE_BUTTON_1=(1 << 0)\n" +"MOUSE_BUTTON_2=(1 << 1)\n" +"MOUSE_BUTTON_3=(1 << 2)\n" +"MOUSE_BUTTON_4=(1 << 3)\n" +"MOUSE_BUTTON_5=(1 << 4)\n" +"L_MOUSE_BUTTON=MOUSE_BUTTON_1\n" +"M_MOUSE_BUTTON=MOUSE_BUTTON_2\n" +"R_MOUSE_BUTTON=MOUSE_BUTTON_3\n" "DIALOG_000=0\n" "DIALOG_001=1\n" "DIALOG_002=2\n" diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c index c9592d644..de1092c7c 100644 --- a/src/pc/lua/smlua_functions_autogen.c +++ b/src/pc/lua/smlua_functions_autogen.c @@ -231,6 +231,143 @@ int smlua_func_area_get_warp_node_from_params(lua_State* L) { // behavior_actions.h // //////////////////////// +int smlua_func_spawn_mist_particles_variable(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", "spawn_mist_particles_variable", 3, top); + return 0; + } + + s32 count = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_mist_particles_variable"); return 0; } + s32 offsetY = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_mist_particles_variable"); return 0; } + f32 size = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "spawn_mist_particles_variable"); return 0; } + + spawn_mist_particles_variable(count, offsetY, size); + + return 1; +} + +int smlua_func_bhv_spawn_star_no_level_exit(lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_spawn_star_no_level_exit", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* object = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "bhv_spawn_star_no_level_exit"); return 0; } + u32 params = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "bhv_spawn_star_no_level_exit"); return 0; } + u8 networkSendEvent = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "bhv_spawn_star_no_level_exit"); return 0; } + + bhv_spawn_star_no_level_exit(object, params, networkSendEvent); + + return 1; +} + +int smlua_func_spawn_triangle_break_particles(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "spawn_triangle_break_particles", 4, top); + return 0; + } + + s16 numTris = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_triangle_break_particles"); return 0; } + s16 triModel = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_triangle_break_particles"); return 0; } + f32 triSize = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "spawn_triangle_break_particles"); return 0; } + s16 triAnimState = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "spawn_triangle_break_particles"); return 0; } + + spawn_triangle_break_particles(numTris, triModel, triSize, triAnimState); + + return 1; +} + +int smlua_func_spawn_mist_from_global(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", "spawn_mist_from_global", 0, top); + return 0; + } + + + spawn_mist_from_global(); + + return 1; +} + +int smlua_func_clear_particle_flags(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", "clear_particle_flags", 1, top); + return 0; + } + + u32 flags = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "clear_particle_flags"); return 0; } + + clear_particle_flags(flags); + + return 1; +} + +int smlua_func_spawn_wind_particles(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", "spawn_wind_particles", 2, top); + return 0; + } + + s16 pitch = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_wind_particles"); return 0; } + s16 yaw = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_wind_particles"); return 0; } + + spawn_wind_particles(pitch, yaw); + + return 1; +} + +int smlua_func_check_if_moving_over_floor(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", "check_if_moving_over_floor", 2, top); + return 0; + } + + f32 a0 = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_if_moving_over_floor"); return 0; } + f32 a1 = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "check_if_moving_over_floor"); return 0; } + + lua_pushinteger(L, check_if_moving_over_floor(a0, a1)); + + return 1; +} + int smlua_func_arc_to_goal_pos(lua_State* L) { if (L == NULL) { return 0; } @@ -262,450 +399,415 @@ int smlua_func_arc_to_goal_pos(lua_State* L) { return 1; } -int smlua_func_bhv_1up_common_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } +int smlua_func_vec3f_copy_2(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", "bhv_1up_common_init", 0, top); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "vec3f_copy_2", 2, top); return 0; } - bhv_1up_common_init(); + Vec3f dest; + smlua_get_vec3f(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_copy_2"); return 0; } + + Vec3f src; + smlua_get_vec3f(src, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_copy_2"); return 0; } + + vec3f_copy_2(dest, src); + + smlua_push_vec3f(dest, 1); + + smlua_push_vec3f(src, 2); return 1; } -int smlua_func_bhv_1up_hidden_in_pole_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } +int smlua_func_tox_box_move(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", "bhv_1up_hidden_in_pole_loop", 0, top); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "tox_box_move", 4, top); return 0; } + f32 forwardVel = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "tox_box_move"); return 0; } + f32 a1 = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "tox_box_move"); return 0; } + s16 deltaPitch = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "tox_box_move"); return 0; } + s16 deltaRoll = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "tox_box_move"); return 0; } - bhv_1up_hidden_in_pole_loop(); + tox_box_move(forwardVel, a1, deltaPitch, deltaRoll); return 1; } -int smlua_func_bhv_1up_hidden_in_pole_spawner_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } +int smlua_func_play_penguin_walking_sound(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", "bhv_1up_hidden_in_pole_spawner_loop", 0, top); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "play_penguin_walking_sound", 1, top); return 0; } + s32 walk = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_penguin_walking_sound"); return 0; } - bhv_1up_hidden_in_pole_spawner_loop(); + play_penguin_walking_sound(walk); return 1; } -int smlua_func_bhv_1up_hidden_in_pole_trigger_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } +int smlua_func_update_angle_from_move_flags(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", "bhv_1up_hidden_in_pole_trigger_loop", 0, top); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "update_angle_from_move_flags", 1, top); return 0; } + s32 * angle = (s32 *)smlua_to_cpointer(L, 1, LVT_S32_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_angle_from_move_flags"); return 0; } - bhv_1up_hidden_in_pole_trigger_loop(); + lua_pushinteger(L, update_angle_from_move_flags(angle)); return 1; } -int smlua_func_bhv_1up_hidden_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } +int smlua_func_cur_obj_spawn_strong_wind_particles(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", "bhv_1up_hidden_loop", 0, top); + if (top != 5) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_spawn_strong_wind_particles", 5, top); return 0; } + s32 windSpread = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_spawn_strong_wind_particles"); return 0; } + f32 scale = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_spawn_strong_wind_particles"); return 0; } + f32 relPosX = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_spawn_strong_wind_particles"); return 0; } + f32 relPosY = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "cur_obj_spawn_strong_wind_particles"); return 0; } + f32 relPosZ = smlua_to_number(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "cur_obj_spawn_strong_wind_particles"); return 0; } - bhv_1up_hidden_loop(); + cur_obj_spawn_strong_wind_particles(windSpread, scale, relPosX, relPosY, relPosZ); return 1; } -int smlua_func_bhv_1up_hidden_trigger_loop(UNUSED lua_State* L) { +int smlua_func_bhv_star_door_loop_2(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_1up_hidden_trigger_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_star_door_loop_2", 0, top); return 0; } - bhv_1up_hidden_trigger_loop(); + bhv_star_door_loop_2(); return 1; } -int smlua_func_bhv_1up_init(UNUSED lua_State* L) { +int smlua_func_bhv_cap_switch_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_1up_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_cap_switch_loop", 0, top); return 0; } - bhv_1up_init(); + bhv_cap_switch_loop(); return 1; } -int smlua_func_bhv_1up_jump_on_approach_loop(UNUSED lua_State* L) { +int smlua_func_bhv_tiny_star_particles_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_1up_jump_on_approach_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_tiny_star_particles_init", 0, top); return 0; } - bhv_1up_jump_on_approach_loop(); + bhv_tiny_star_particles_init(); return 1; } -int smlua_func_bhv_1up_loop(UNUSED lua_State* L) { +int smlua_func_bhv_grindel_thwomp_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_1up_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_grindel_thwomp_loop", 0, top); return 0; } - bhv_1up_loop(); + bhv_grindel_thwomp_loop(); return 1; } -int smlua_func_bhv_1up_running_away_loop(UNUSED lua_State* L) { +int smlua_func_bhv_koopa_shell_underwater_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_1up_running_away_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_koopa_shell_underwater_loop", 0, top); return 0; } - bhv_1up_running_away_loop(); + bhv_koopa_shell_underwater_loop(); return 1; } -int smlua_func_bhv_1up_sliding_loop(UNUSED lua_State* L) { +int smlua_func_bhv_door_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_1up_sliding_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_door_init", 0, top); return 0; } - bhv_1up_sliding_loop(); + bhv_door_init(); return 1; } -int smlua_func_bhv_1up_trigger_init(UNUSED lua_State* L) { +int smlua_func_bhv_door_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_1up_trigger_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_door_loop", 0, top); return 0; } - bhv_1up_trigger_init(); + bhv_door_loop(); return 1; } -int smlua_func_bhv_1up_walking_loop(UNUSED lua_State* L) { +int smlua_func_bhv_star_door_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_1up_walking_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_star_door_loop", 0, top); return 0; } - bhv_1up_walking_loop(); + bhv_star_door_loop(); return 1; } -int smlua_func_bhv_act_selector_init(UNUSED lua_State* L) { +int smlua_func_bhv_mr_i_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_act_selector_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_mr_i_loop", 0, top); return 0; } - bhv_act_selector_init(); + bhv_mr_i_loop(); return 1; } -int smlua_func_bhv_act_selector_loop(UNUSED lua_State* L) { +int smlua_func_bhv_mr_i_body_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_act_selector_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_mr_i_body_loop", 0, top); return 0; } - bhv_act_selector_loop(); + bhv_mr_i_body_loop(); return 1; } -int smlua_func_bhv_act_selector_star_type_loop(UNUSED lua_State* L) { +int smlua_func_bhv_mr_i_particle_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_act_selector_star_type_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_mr_i_particle_loop", 0, top); return 0; } - bhv_act_selector_star_type_loop(); + bhv_mr_i_particle_loop(); return 1; } -int smlua_func_bhv_activated_back_and_forth_platform_init(UNUSED lua_State* L) { +int smlua_func_bhv_piranha_particle_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_activated_back_and_forth_platform_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_piranha_particle_loop", 0, top); return 0; } - bhv_activated_back_and_forth_platform_init(); + bhv_piranha_particle_loop(); return 1; } -int smlua_func_bhv_activated_back_and_forth_platform_update(UNUSED lua_State* L) { +int smlua_func_bhv_giant_pole_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_activated_back_and_forth_platform_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_giant_pole_loop", 0, top); return 0; } - bhv_activated_back_and_forth_platform_update(); + bhv_giant_pole_loop(); return 1; } -int smlua_func_bhv_alpha_boo_key_loop(UNUSED lua_State* L) { +int smlua_func_bhv_pole_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_alpha_boo_key_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_pole_init", 0, top); return 0; } - bhv_alpha_boo_key_loop(); + bhv_pole_init(); return 1; } -int smlua_func_bhv_ambient_light_update(UNUSED lua_State* L) { +int smlua_func_bhv_pole_base_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ambient_light_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_pole_base_loop", 0, top); return 0; } - bhv_ambient_light_update(); + bhv_pole_base_loop(); return 1; } -int smlua_func_bhv_ambient_sounds_init(UNUSED lua_State* L) { +int smlua_func_bhv_thi_huge_island_top_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ambient_sounds_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_thi_huge_island_top_loop", 0, top); return 0; } - bhv_ambient_sounds_init(); + bhv_thi_huge_island_top_loop(); return 1; } -int smlua_func_bhv_animated_texture_loop(UNUSED lua_State* L) { +int smlua_func_bhv_thi_tiny_island_top_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_animated_texture_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_thi_tiny_island_top_loop", 0, top); return 0; } - bhv_animated_texture_loop(); + bhv_thi_tiny_island_top_loop(); return 1; } -int smlua_func_bhv_animates_on_floor_switch_press_init(UNUSED lua_State* L) { +int smlua_func_bhv_king_bobomb_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_animates_on_floor_switch_press_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_king_bobomb_loop", 0, top); return 0; } - bhv_animates_on_floor_switch_press_init(); + bhv_king_bobomb_loop(); return 1; } -int smlua_func_bhv_animates_on_floor_switch_press_loop(UNUSED lua_State* L) { +int smlua_func_bhv_bobomb_anchor_mario_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_animates_on_floor_switch_press_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bobomb_anchor_mario_loop", 0, top); return 0; } - bhv_animates_on_floor_switch_press_loop(); - - return 1; -} - -int smlua_func_bhv_arrow_lift_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_arrow_lift_loop", 0, top); - return 0; - } - - - bhv_arrow_lift_loop(); - - return 1; -} - -int smlua_func_bhv_bbh_tilting_trap_platform_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bbh_tilting_trap_platform_loop", 0, top); - return 0; - } - - - bhv_bbh_tilting_trap_platform_loop(); - - return 1; -} - -int smlua_func_bhv_beta_boo_key_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_beta_boo_key_loop", 0, top); - return 0; - } - - - bhv_beta_boo_key_loop(); - - return 1; -} - -int smlua_func_bhv_beta_bowser_anchor_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_beta_bowser_anchor_loop", 0, top); - return 0; - } - - - bhv_beta_bowser_anchor_loop(); + bhv_bobomb_anchor_mario_loop(); return 1; } @@ -758,1282 +860,18 @@ int smlua_func_bhv_beta_chest_lid_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_bhv_beta_fish_splash_spawner_loop(UNUSED lua_State* L) { +int smlua_func_bhv_bubble_wave_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_beta_fish_splash_spawner_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bubble_wave_init", 0, top); return 0; } - bhv_beta_fish_splash_spawner_loop(); - - return 1; -} - -int smlua_func_bhv_beta_holdable_object_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_beta_holdable_object_init", 0, top); - return 0; - } - - - bhv_beta_holdable_object_init(); - - return 1; -} - -int smlua_func_bhv_beta_holdable_object_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_beta_holdable_object_loop", 0, top); - return 0; - } - - - bhv_beta_holdable_object_loop(); - - return 1; -} - -int smlua_func_bhv_beta_moving_flames_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_beta_moving_flames_loop", 0, top); - return 0; - } - - - bhv_beta_moving_flames_loop(); - - return 1; -} - -int smlua_func_bhv_beta_moving_flames_spawn_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_beta_moving_flames_spawn_loop", 0, top); - return 0; - } - - - bhv_beta_moving_flames_spawn_loop(); - - return 1; -} - -int smlua_func_bhv_beta_trampoline_spring_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_beta_trampoline_spring_loop", 0, top); - return 0; - } - - - bhv_beta_trampoline_spring_loop(); - - return 1; -} - -int smlua_func_bhv_beta_trampoline_top_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_beta_trampoline_top_loop", 0, top); - return 0; - } - - - bhv_beta_trampoline_top_loop(); - - return 1; -} - -int smlua_func_bhv_big_boo_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_big_boo_loop", 0, top); - return 0; - } - - - bhv_big_boo_loop(); - - return 1; -} - -int smlua_func_bhv_big_boulder_generator_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_big_boulder_generator_loop", 0, top); - return 0; - } - - - bhv_big_boulder_generator_loop(); - - return 1; -} - -int smlua_func_bhv_big_boulder_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_big_boulder_init", 0, top); - return 0; - } - - - bhv_big_boulder_init(); - - return 1; -} - -int smlua_func_bhv_big_boulder_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_big_boulder_loop", 0, top); - return 0; - } - - - bhv_big_boulder_loop(); - - return 1; -} - -int smlua_func_bhv_big_bully_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_big_bully_init", 0, top); - return 0; - } - - - bhv_big_bully_init(); - - return 1; -} - -int smlua_func_bhv_big_bully_with_minions_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_big_bully_with_minions_init", 0, top); - return 0; - } - - - bhv_big_bully_with_minions_init(); - - return 1; -} - -int smlua_func_bhv_big_bully_with_minions_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_big_bully_with_minions_loop", 0, top); - return 0; - } - - - bhv_big_bully_with_minions_loop(); - - return 1; -} - -int smlua_func_bhv_bird_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bird_update", 0, top); - return 0; - } - - - bhv_bird_update(); - - return 1; -} - -int smlua_func_bhv_birds_sound_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_birds_sound_loop", 0, top); - return 0; - } - - - bhv_birds_sound_loop(); - - return 1; -} - -int smlua_func_bhv_bitfs_sinking_cage_platform_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bitfs_sinking_cage_platform_loop", 0, top); - return 0; - } - - - bhv_bitfs_sinking_cage_platform_loop(); - - return 1; -} - -int smlua_func_bhv_bitfs_sinking_platform_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bitfs_sinking_platform_loop", 0, top); - return 0; - } - - - bhv_bitfs_sinking_platform_loop(); - - return 1; -} - -int smlua_func_bhv_black_smoke_bowser_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_black_smoke_bowser_loop", 0, top); - return 0; - } - - - bhv_black_smoke_bowser_loop(); - - return 1; -} - -int smlua_func_bhv_black_smoke_mario_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_black_smoke_mario_loop", 0, top); - return 0; - } - - - bhv_black_smoke_mario_loop(); - - return 1; -} - -int smlua_func_bhv_black_smoke_upward_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_black_smoke_upward_loop", 0, top); - return 0; - } - - - bhv_black_smoke_upward_loop(); - - return 1; -} - -int smlua_func_bhv_blue_bowser_flame_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_blue_bowser_flame_init", 0, top); - return 0; - } - - - bhv_blue_bowser_flame_init(); - - return 1; -} - -int smlua_func_bhv_blue_bowser_flame_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_blue_bowser_flame_loop", 0, top); - return 0; - } - - - bhv_blue_bowser_flame_loop(); - - return 1; -} - -int smlua_func_bhv_blue_coin_jumping_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_blue_coin_jumping_loop", 0, top); - return 0; - } - - - bhv_blue_coin_jumping_loop(); - - return 1; -} - -int smlua_func_bhv_blue_coin_number_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_blue_coin_number_loop", 0, top); - return 0; - } - - - bhv_blue_coin_number_loop(); - - return 1; -} - -int smlua_func_bhv_blue_coin_sliding_jumping_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_blue_coin_sliding_jumping_init", 0, top); - return 0; - } - - - bhv_blue_coin_sliding_jumping_init(); - - return 1; -} - -int smlua_func_bhv_blue_coin_sliding_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_blue_coin_sliding_loop", 0, top); - return 0; - } - - - bhv_blue_coin_sliding_loop(); - - return 1; -} - -int smlua_func_bhv_blue_coin_switch_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_blue_coin_switch_init", 0, top); - return 0; - } - - - bhv_blue_coin_switch_init(); - - return 1; -} - -int smlua_func_bhv_blue_coin_switch_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_blue_coin_switch_loop", 0, top); - return 0; - } - - - bhv_blue_coin_switch_loop(); - - return 1; -} - -int smlua_func_bhv_blue_fish_movement_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_blue_fish_movement_loop", 0, top); - return 0; - } - - - bhv_blue_fish_movement_loop(); - - return 1; -} - -int smlua_func_bhv_blue_flames_group_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_blue_flames_group_loop", 0, top); - return 0; - } - - - bhv_blue_flames_group_loop(); - - return 1; -} - -int smlua_func_bhv_bob_pit_bowling_ball_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bob_pit_bowling_ball_init", 0, top); - return 0; - } - - - bhv_bob_pit_bowling_ball_init(); - - return 1; -} - -int smlua_func_bhv_bob_pit_bowling_ball_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bob_pit_bowling_ball_loop", 0, top); - return 0; - } - - - bhv_bob_pit_bowling_ball_loop(); - - return 1; -} - -int smlua_func_bhv_bobomb_anchor_mario_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bobomb_anchor_mario_loop", 0, top); - return 0; - } - - - bhv_bobomb_anchor_mario_loop(); - - return 1; -} - -int smlua_func_bhv_bobomb_buddy_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bobomb_buddy_init", 0, top); - return 0; - } - - - bhv_bobomb_buddy_init(); - - return 1; -} - -int smlua_func_bhv_bobomb_buddy_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bobomb_buddy_loop", 0, top); - return 0; - } - - - bhv_bobomb_buddy_loop(); - - return 1; -} - -int smlua_func_bhv_bobomb_bully_death_smoke_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bobomb_bully_death_smoke_init", 0, top); - return 0; - } - - - bhv_bobomb_bully_death_smoke_init(); - - return 1; -} - -int smlua_func_bhv_bobomb_explosion_bubble_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bobomb_explosion_bubble_init", 0, top); - return 0; - } - - - bhv_bobomb_explosion_bubble_init(); - - return 1; -} - -int smlua_func_bhv_bobomb_explosion_bubble_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bobomb_explosion_bubble_loop", 0, top); - return 0; - } - - - bhv_bobomb_explosion_bubble_loop(); - - return 1; -} - -int smlua_func_bhv_bobomb_fuse_smoke_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bobomb_fuse_smoke_init", 0, top); - return 0; - } - - - bhv_bobomb_fuse_smoke_init(); - - return 1; -} - -int smlua_func_bhv_bobomb_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bobomb_init", 0, top); - return 0; - } - - - bhv_bobomb_init(); - - return 1; -} - -int smlua_func_bhv_bobomb_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bobomb_loop", 0, top); - return 0; - } - - - bhv_bobomb_loop(); - - return 1; -} - -int smlua_func_bhv_boo_boss_spawned_bridge_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_boo_boss_spawned_bridge_loop", 0, top); - return 0; - } - - - bhv_boo_boss_spawned_bridge_loop(); - - return 1; -} - -int smlua_func_bhv_boo_cage_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_boo_cage_init", 0, top); - return 0; - } - - - bhv_boo_cage_init(); - - return 1; -} - -int smlua_func_bhv_boo_cage_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_boo_cage_loop", 0, top); - return 0; - } - - - bhv_boo_cage_loop(); - - return 1; -} - -int smlua_func_bhv_boo_in_castle_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_boo_in_castle_loop", 0, top); - return 0; - } - - - bhv_boo_in_castle_loop(); - - return 1; -} - -int smlua_func_bhv_boo_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_boo_init", 0, top); - return 0; - } - - - bhv_boo_init(); - - return 1; -} - -int smlua_func_bhv_boo_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_boo_loop", 0, top); - return 0; - } - - - bhv_boo_loop(); - - return 1; -} - -int smlua_func_bhv_boo_with_cage_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_boo_with_cage_init", 0, top); - return 0; - } - - - bhv_boo_with_cage_init(); - - return 1; -} - -int smlua_func_bhv_boo_with_cage_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_boo_with_cage_loop", 0, top); - return 0; - } - - - bhv_boo_with_cage_loop(); - - return 1; -} - -int smlua_func_bhv_book_switch_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_book_switch_loop", 0, top); - return 0; - } - - - bhv_book_switch_loop(); - - return 1; -} - -int smlua_func_bhv_bookend_spawn_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bookend_spawn_loop", 0, top); - return 0; - } - - - bhv_bookend_spawn_loop(); - - return 1; -} - -int smlua_func_bhv_bouncing_fireball_flame_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bouncing_fireball_flame_loop", 0, top); - return 0; - } - - - bhv_bouncing_fireball_flame_loop(); - - return 1; -} - -int smlua_func_bhv_bouncing_fireball_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bouncing_fireball_loop", 0, top); - return 0; - } - - - bhv_bouncing_fireball_loop(); - - return 1; -} - -int smlua_func_bhv_bowling_ball_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowling_ball_init", 0, top); - return 0; - } - - - bhv_bowling_ball_init(); - - return 1; -} - -int smlua_func_bhv_bowling_ball_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowling_ball_loop", 0, top); - return 0; - } - - - bhv_bowling_ball_loop(); - - return 1; -} - -int smlua_func_bhv_bowser_body_anchor_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowser_body_anchor_init", 0, top); - return 0; - } - - - bhv_bowser_body_anchor_init(); - - return 1; -} - -int smlua_func_bhv_bowser_body_anchor_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowser_body_anchor_loop", 0, top); - return 0; - } - - - bhv_bowser_body_anchor_loop(); - - return 1; -} - -int smlua_func_bhv_bowser_bomb_explosion_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowser_bomb_explosion_loop", 0, top); - return 0; - } - - - bhv_bowser_bomb_explosion_loop(); - - return 1; -} - -int smlua_func_bhv_bowser_bomb_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowser_bomb_loop", 0, top); - return 0; - } - - - bhv_bowser_bomb_loop(); - - return 1; -} - -int smlua_func_bhv_bowser_bomb_smoke_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowser_bomb_smoke_loop", 0, top); - return 0; - } - - - bhv_bowser_bomb_smoke_loop(); - - return 1; -} - -int smlua_func_bhv_bowser_course_red_coin_star_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowser_course_red_coin_star_loop", 0, top); - return 0; - } - - - bhv_bowser_course_red_coin_star_loop(); - - return 1; -} - -int smlua_func_bhv_bowser_flame_spawn_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowser_flame_spawn_loop", 0, top); - return 0; - } - - - bhv_bowser_flame_spawn_loop(); - - return 1; -} - -int smlua_func_bhv_bowser_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowser_init", 0, top); - return 0; - } - - - bhv_bowser_init(); - - return 1; -} - -int smlua_func_bhv_bowser_key_course_exit_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowser_key_course_exit_loop", 0, top); - return 0; - } - - - bhv_bowser_key_course_exit_loop(); - - return 1; -} - -int smlua_func_bhv_bowser_key_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowser_key_init", 0, top); - return 0; - } - - - bhv_bowser_key_init(); - - return 1; -} - -int smlua_func_bhv_bowser_key_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowser_key_loop", 0, top); - return 0; - } - - - bhv_bowser_key_loop(); - - return 1; -} - -int smlua_func_bhv_bowser_key_unlock_door_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowser_key_unlock_door_loop", 0, top); - return 0; - } - - - bhv_bowser_key_unlock_door_loop(); - - return 1; -} - -int smlua_func_bhv_bowser_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowser_loop", 0, top); - return 0; - } - - - bhv_bowser_loop(); - - return 1; -} - -int smlua_func_bhv_bowser_shock_wave_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowser_shock_wave_loop", 0, top); - return 0; - } - - - bhv_bowser_shock_wave_loop(); - - return 1; -} - -int smlua_func_bhv_bowser_tail_anchor_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowser_tail_anchor_init", 0, top); - return 0; - } - - - bhv_bowser_tail_anchor_init(); - - return 1; -} - -int smlua_func_bhv_bowser_tail_anchor_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowser_tail_anchor_loop", 0, top); - return 0; - } - - - bhv_bowser_tail_anchor_loop(); - - return 1; -} - -int smlua_func_bhv_bowsers_sub_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bowsers_sub_loop", 0, top); - return 0; - } - - - bhv_bowsers_sub_loop(); - - return 1; -} - -int smlua_func_bhv_breakable_box_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_breakable_box_loop", 0, top); - return 0; - } - - - bhv_breakable_box_loop(); - - return 1; -} - -int smlua_func_bhv_breakable_box_small_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_breakable_box_small_init", 0, top); - return 0; - } - - - bhv_breakable_box_small_init(); - - return 1; -} - -int smlua_func_bhv_breakable_box_small_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_breakable_box_small_loop", 0, top); - return 0; - } - - - bhv_breakable_box_small_loop(); - - return 1; -} - -int smlua_func_bhv_bub_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bub_loop", 0, top); - return 0; - } - - - bhv_bub_loop(); - - return 1; -} - -int smlua_func_bhv_bub_spawner_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bub_spawner_loop", 0, top); - return 0; - } - - - bhv_bub_spawner_loop(); - - return 1; -} - -int smlua_func_bhv_bubba_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bubba_loop", 0, top); - return 0; - } - - - bhv_bubba_loop(); - - return 1; -} - -int smlua_func_bhv_bubble_cannon_barrel_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_bubble_cannon_barrel_loop", 0, top); - return 0; - } - - - bhv_bubble_cannon_barrel_loop(); + bhv_bubble_wave_init(); return 1; } @@ -2070,34 +908,1703 @@ int smlua_func_bhv_bubble_player_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_bhv_bubble_splash_init(UNUSED lua_State* L) { +int smlua_func_bhv_water_air_bubble_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_bubble_splash_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_water_air_bubble_init", 0, top); return 0; } - bhv_bubble_splash_init(); + bhv_water_air_bubble_init(); return 1; } -int smlua_func_bhv_bubble_wave_init(UNUSED lua_State* L) { +int smlua_func_bhv_water_air_bubble_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_bubble_wave_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_water_air_bubble_loop", 0, top); return 0; } - bhv_bubble_wave_init(); + bhv_water_air_bubble_loop(); + + return 1; +} + +int smlua_func_bhv_particle_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_particle_init", 0, top); + return 0; + } + + + bhv_particle_init(); + + return 1; +} + +int smlua_func_bhv_particle_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_particle_loop", 0, top); + return 0; + } + + + bhv_particle_loop(); + + return 1; +} + +int smlua_func_bhv_water_waves_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_water_waves_init", 0, top); + return 0; + } + + + bhv_water_waves_init(); + + return 1; +} + +int smlua_func_bhv_small_bubbles_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_small_bubbles_loop", 0, top); + return 0; + } + + + bhv_small_bubbles_loop(); + + return 1; +} + +int smlua_func_bhv_fish_group_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_fish_group_loop", 0, top); + return 0; + } + + + bhv_fish_group_loop(); + + return 1; +} + +int smlua_func_bhv_cannon_base_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_cannon_base_loop", 0, top); + return 0; + } + + + bhv_cannon_base_loop(); + + return 1; +} + +int smlua_func_bhv_cannon_barrel_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_cannon_barrel_loop", 0, top); + return 0; + } + + + bhv_cannon_barrel_loop(); + + return 1; +} + +int smlua_func_bhv_cannon_base_unused_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_cannon_base_unused_loop", 0, top); + return 0; + } + + + bhv_cannon_base_unused_loop(); + + return 1; +} + +int smlua_func_common_anchor_mario_behavior(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", "common_anchor_mario_behavior", 3, top); + return 0; + } + + f32 sp28 = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "common_anchor_mario_behavior"); return 0; } + f32 sp2C = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "common_anchor_mario_behavior"); return 0; } + s32 sp30 = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "common_anchor_mario_behavior"); return 0; } + + common_anchor_mario_behavior(sp28, sp2C, sp30); + + return 1; +} + +int smlua_func_bhv_chuckya_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_chuckya_loop", 0, top); + return 0; + } + + + bhv_chuckya_loop(); + + return 1; +} + +int smlua_func_bhv_chuckya_anchor_mario_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_chuckya_anchor_mario_loop", 0, top); + return 0; + } + + + bhv_chuckya_anchor_mario_loop(); + + return 1; +} + +int smlua_func_bhv_rotating_platform_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_rotating_platform_loop", 0, top); + return 0; + } + + + bhv_rotating_platform_loop(); + + return 1; +} + +int smlua_func_bhv_wf_breakable_wall_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_wf_breakable_wall_loop", 0, top); + return 0; + } + + + bhv_wf_breakable_wall_loop(); + + return 1; +} + +int smlua_func_bhv_kickable_board_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_kickable_board_loop", 0, top); + return 0; + } + + + bhv_kickable_board_loop(); + + return 1; +} + +int smlua_func_bhv_tower_door_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_tower_door_loop", 0, top); + return 0; + } + + + bhv_tower_door_loop(); + + return 1; +} + +int smlua_func_bhv_wf_rotating_wooden_platform_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_wf_rotating_wooden_platform_init", 0, top); + return 0; + } + + + bhv_wf_rotating_wooden_platform_init(); + + return 1; +} + +int smlua_func_bhv_wf_rotating_wooden_platform_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_wf_rotating_wooden_platform_loop", 0, top); + return 0; + } + + + bhv_wf_rotating_wooden_platform_loop(); + + return 1; +} + +int smlua_func_bhv_fading_warp_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_fading_warp_loop", 0, top); + return 0; + } + + + bhv_fading_warp_loop(); + + return 1; +} + +int smlua_func_bhv_warp_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_warp_loop", 0, top); + return 0; + } + + + bhv_warp_loop(); + + return 1; +} + +int smlua_func_bhv_white_puff_exploding_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_white_puff_exploding_loop", 0, top); + return 0; + } + + + bhv_white_puff_exploding_loop(); + + return 1; +} + +int smlua_func_bhv_spawned_star_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_spawned_star_init", 0, top); + return 0; + } + + + bhv_spawned_star_init(); + + return 1; +} + +int smlua_func_bhv_spawned_star_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_spawned_star_loop", 0, top); + return 0; + } + + + bhv_spawned_star_loop(); + + return 1; +} + +int smlua_func_bhv_coin_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_coin_init", 0, top); + return 0; + } + + + bhv_coin_init(); + + return 1; +} + +int smlua_func_bhv_coin_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_coin_loop", 0, top); + return 0; + } + + + bhv_coin_loop(); + + return 1; +} + +int smlua_func_bhv_coin_inside_boo_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_coin_inside_boo_loop", 0, top); + return 0; + } + + + bhv_coin_inside_boo_loop(); + + return 1; +} + +int smlua_func_bhv_coin_formation_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_coin_formation_init", 0, top); + return 0; + } + + + bhv_coin_formation_init(); + + return 1; +} + +int smlua_func_bhv_coin_formation_spawn_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_coin_formation_spawn_loop", 0, top); + return 0; + } + + + bhv_coin_formation_spawn_loop(); + + return 1; +} + +int smlua_func_bhv_coin_formation_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_coin_formation_loop", 0, top); + return 0; + } + + + bhv_coin_formation_loop(); + + return 1; +} + +int smlua_func_bhv_temp_coin_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_temp_coin_loop", 0, top); + return 0; + } + + + bhv_temp_coin_loop(); + + return 1; +} + +int smlua_func_bhv_coin_sparkles_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_coin_sparkles_loop", 0, top); + return 0; + } + + + bhv_coin_sparkles_loop(); + + return 1; +} + +int smlua_func_bhv_golden_coin_sparkles_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_golden_coin_sparkles_loop", 0, top); + return 0; + } + + + bhv_golden_coin_sparkles_loop(); + + return 1; +} + +int smlua_func_bhv_wall_tiny_star_particle_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_wall_tiny_star_particle_loop", 0, top); + return 0; + } + + + bhv_wall_tiny_star_particle_loop(); + + return 1; +} + +int smlua_func_bhv_pound_tiny_star_particle_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_pound_tiny_star_particle_loop", 0, top); + return 0; + } + + + bhv_pound_tiny_star_particle_loop(); + + return 1; +} + +int smlua_func_bhv_pound_tiny_star_particle_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_pound_tiny_star_particle_init", 0, top); + return 0; + } + + + bhv_pound_tiny_star_particle_init(); + + return 1; +} + +int smlua_func_bhv_punch_tiny_triangle_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_punch_tiny_triangle_loop", 0, top); + return 0; + } + + + bhv_punch_tiny_triangle_loop(); + + return 1; +} + +int smlua_func_bhv_punch_tiny_triangle_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_punch_tiny_triangle_init", 0, top); + return 0; + } + + + bhv_punch_tiny_triangle_init(); + + return 1; +} + +int smlua_func_bhv_tumbling_bridge_platform_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_tumbling_bridge_platform_loop", 0, top); + return 0; + } + + + bhv_tumbling_bridge_platform_loop(); + + return 1; +} + +int smlua_func_bhv_tumbling_bridge_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_tumbling_bridge_loop", 0, top); + return 0; + } + + + bhv_tumbling_bridge_loop(); + + return 1; +} + +int smlua_func_bhv_elevator_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_elevator_init", 0, top); + return 0; + } + + + bhv_elevator_init(); + + return 1; +} + +int smlua_func_bhv_elevator_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_elevator_loop", 0, top); + return 0; + } + + + bhv_elevator_loop(); + + return 1; +} + +int smlua_func_bhv_water_mist_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_water_mist_loop", 0, top); + return 0; + } + + + bhv_water_mist_loop(); + + return 1; +} + +int smlua_func_bhv_water_mist_spawn_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_water_mist_spawn_loop", 0, top); + return 0; + } + + + bhv_water_mist_spawn_loop(); + + return 1; +} + +int smlua_func_bhv_water_mist_2_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_water_mist_2_loop", 0, top); + return 0; + } + + + bhv_water_mist_2_loop(); + + return 1; +} + +int smlua_func_bhv_pound_white_puffs_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_pound_white_puffs_init", 0, top); + return 0; + } + + + bhv_pound_white_puffs_init(); + + return 1; +} + +int smlua_func_bhv_ground_sand_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_ground_sand_init", 0, top); + return 0; + } + + + bhv_ground_sand_init(); + + return 1; +} + +int smlua_func_bhv_ground_snow_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_ground_snow_init", 0, top); + return 0; + } + + + bhv_ground_snow_init(); + + return 1; +} + +int smlua_func_bhv_wind_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_wind_loop", 0, top); + return 0; + } + + + bhv_wind_loop(); + + return 1; +} + +int smlua_func_bhv_unused_particle_spawn_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_unused_particle_spawn_loop", 0, top); + return 0; + } + + + bhv_unused_particle_spawn_loop(); + + return 1; +} + +int smlua_func_bhv_ukiki_cage_star_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_ukiki_cage_star_loop", 0, top); + return 0; + } + + + bhv_ukiki_cage_star_loop(); + + return 1; +} + +int smlua_func_bhv_ukiki_cage_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_ukiki_cage_loop", 0, top); + return 0; + } + + + bhv_ukiki_cage_loop(); + + return 1; +} + +int smlua_func_bhv_bitfs_sinking_platform_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bitfs_sinking_platform_loop", 0, top); + return 0; + } + + + bhv_bitfs_sinking_platform_loop(); + + return 1; +} + +int smlua_func_bhv_bitfs_sinking_cage_platform_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bitfs_sinking_cage_platform_loop", 0, top); + return 0; + } + + + bhv_bitfs_sinking_cage_platform_loop(); + + return 1; +} + +int smlua_func_bhv_ddd_moving_pole_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_ddd_moving_pole_loop", 0, top); + return 0; + } + + + bhv_ddd_moving_pole_loop(); + + return 1; +} + +int smlua_func_bhv_platform_normals_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_platform_normals_init", 0, top); + return 0; + } + + + bhv_platform_normals_init(); + + return 1; +} + +int smlua_func_bhv_tilting_inverted_pyramid_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_tilting_inverted_pyramid_loop", 0, top); + return 0; + } + + + bhv_tilting_inverted_pyramid_loop(); + + return 1; +} + +int smlua_func_bhv_squishable_platform_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_squishable_platform_loop", 0, top); + return 0; + } + + + bhv_squishable_platform_loop(); + + return 1; +} + +int smlua_func_bhv_beta_moving_flames_spawn_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_beta_moving_flames_spawn_loop", 0, top); + return 0; + } + + + bhv_beta_moving_flames_spawn_loop(); + + return 1; +} + +int smlua_func_bhv_beta_moving_flames_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_beta_moving_flames_loop", 0, top); + return 0; + } + + + bhv_beta_moving_flames_loop(); + + return 1; +} + +int smlua_func_bhv_rr_rotating_bridge_platform_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_rr_rotating_bridge_platform_loop", 0, top); + return 0; + } + + + bhv_rr_rotating_bridge_platform_loop(); + + return 1; +} + +int smlua_func_bhv_flamethrower_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_flamethrower_loop", 0, top); + return 0; + } + + + bhv_flamethrower_loop(); + + return 1; +} + +int smlua_func_bhv_flamethrower_flame_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_flamethrower_flame_loop", 0, top); + return 0; + } + + + bhv_flamethrower_flame_loop(); + + return 1; +} + +int smlua_func_bhv_bouncing_fireball_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bouncing_fireball_loop", 0, top); + return 0; + } + + + bhv_bouncing_fireball_loop(); + + return 1; +} + +int smlua_func_bhv_bouncing_fireball_flame_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bouncing_fireball_flame_loop", 0, top); + return 0; + } + + + bhv_bouncing_fireball_flame_loop(); + + return 1; +} + +int smlua_func_bhv_bowser_shock_wave_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bowser_shock_wave_loop", 0, top); + return 0; + } + + + bhv_bowser_shock_wave_loop(); + + return 1; +} + +int smlua_func_bhv_flame_mario_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_flame_mario_loop", 0, top); + return 0; + } + + + bhv_flame_mario_loop(); + + return 1; +} + +int smlua_func_bhv_black_smoke_mario_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_black_smoke_mario_loop", 0, top); + return 0; + } + + + bhv_black_smoke_mario_loop(); + + return 1; +} + +int smlua_func_bhv_black_smoke_bowser_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_black_smoke_bowser_loop", 0, top); + return 0; + } + + + bhv_black_smoke_bowser_loop(); + + return 1; +} + +int smlua_func_bhv_black_smoke_upward_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_black_smoke_upward_loop", 0, top); + return 0; + } + + + bhv_black_smoke_upward_loop(); + + return 1; +} + +int smlua_func_bhv_beta_fish_splash_spawner_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_beta_fish_splash_spawner_loop", 0, top); + return 0; + } + + + bhv_beta_fish_splash_spawner_loop(); + + return 1; +} + +int smlua_func_bhv_spindrift_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_spindrift_loop", 0, top); + return 0; + } + + + bhv_spindrift_loop(); + + return 1; +} + +int smlua_func_bhv_tower_platform_group_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_tower_platform_group_init", 0, top); + return 0; + } + + + bhv_tower_platform_group_init(); + + return 1; +} + +int smlua_func_bhv_tower_platform_group_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_tower_platform_group_loop", 0, top); + return 0; + } + + + bhv_tower_platform_group_loop(); + + return 1; +} + +int smlua_func_bhv_wf_sliding_tower_platform_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_wf_sliding_tower_platform_loop", 0, top); + return 0; + } + + + bhv_wf_sliding_tower_platform_loop(); + + return 1; +} + +int smlua_func_bhv_wf_elevator_tower_platform_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_wf_elevator_tower_platform_loop", 0, top); + return 0; + } + + + bhv_wf_elevator_tower_platform_loop(); + + return 1; +} + +int smlua_func_bhv_wf_solid_tower_platform_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_wf_solid_tower_platform_loop", 0, top); + return 0; + } + + + bhv_wf_solid_tower_platform_loop(); + + return 1; +} + +int smlua_func_bhv_snow_leaf_particle_spawn_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_snow_leaf_particle_spawn_init", 0, top); + return 0; + } + + + bhv_snow_leaf_particle_spawn_init(); + + return 1; +} + +int smlua_func_bhv_tree_snow_or_leaf_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_tree_snow_or_leaf_loop", 0, top); + return 0; + } + + + bhv_tree_snow_or_leaf_loop(); + + return 1; +} + +int smlua_func_bhv_piranha_plant_bubble_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_piranha_plant_bubble_loop", 0, top); + return 0; + } + + + bhv_piranha_plant_bubble_loop(); + + return 1; +} + +int smlua_func_bhv_piranha_plant_waking_bubbles_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_piranha_plant_waking_bubbles_loop", 0, top); + return 0; + } + + + bhv_piranha_plant_waking_bubbles_loop(); + + return 1; +} + +int smlua_func_bhv_purple_switch_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_purple_switch_loop", 0, top); + return 0; + } + + + bhv_purple_switch_loop(); + + return 1; +} + +int smlua_func_bhv_hidden_object_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_hidden_object_loop", 0, top); + return 0; + } + + + bhv_hidden_object_loop(); + + return 1; +} + +int smlua_func_bhv_breakable_box_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_breakable_box_loop", 0, top); + return 0; + } + + + bhv_breakable_box_loop(); + + return 1; +} + +int smlua_func_bhv_pushable_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_pushable_loop", 0, top); + return 0; + } + + + bhv_pushable_loop(); + + return 1; +} + +int smlua_func_bhv_small_water_wave_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_small_water_wave_loop", 0, top); + return 0; + } + + + bhv_small_water_wave_loop(); + + return 1; +} + +int smlua_func_bhv_yellow_coin_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_yellow_coin_init", 0, top); + return 0; + } + + + bhv_yellow_coin_init(); + + return 1; +} + +int smlua_func_bhv_yellow_coin_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_yellow_coin_loop", 0, top); + return 0; + } + + + bhv_yellow_coin_loop(); + + return 1; +} + +int smlua_func_bhv_squarish_path_moving_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_squarish_path_moving_loop", 0, top); + return 0; + } + + + bhv_squarish_path_moving_loop(); + + return 1; +} + +int smlua_func_bhv_squarish_path_parent_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_squarish_path_parent_init", 0, top); + return 0; + } + + + bhv_squarish_path_parent_init(); + + return 1; +} + +int smlua_func_bhv_squarish_path_parent_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_squarish_path_parent_loop", 0, top); + return 0; + } + + + bhv_squarish_path_parent_loop(); + + return 1; +} + +int smlua_func_bhv_heave_ho_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_heave_ho_loop", 0, top); + return 0; + } + + + bhv_heave_ho_loop(); + + return 1; +} + +int smlua_func_bhv_heave_ho_throw_mario_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_heave_ho_throw_mario_loop", 0, top); + return 0; + } + + + bhv_heave_ho_throw_mario_loop(); + + return 1; +} + +int smlua_func_bhv_ccm_touched_star_spawn_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_ccm_touched_star_spawn_loop", 0, top); + return 0; + } + + + bhv_ccm_touched_star_spawn_loop(); + + return 1; +} + +int smlua_func_bhv_unused_poundable_platform(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_unused_poundable_platform", 0, top); + return 0; + } + + + bhv_unused_poundable_platform(); + + return 1; +} + +int smlua_func_bhv_beta_trampoline_top_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_beta_trampoline_top_loop", 0, top); + return 0; + } + + + bhv_beta_trampoline_top_loop(); + + return 1; +} + +int smlua_func_bhv_beta_trampoline_spring_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_beta_trampoline_spring_loop", 0, top); + return 0; + } + + + bhv_beta_trampoline_spring_loop(); + + return 1; +} + +int smlua_func_bhv_jumping_box_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_jumping_box_loop", 0, top); + return 0; + } + + + bhv_jumping_box_loop(); + + return 1; +} + +int smlua_func_bhv_boo_cage_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_boo_cage_init", 0, top); + return 0; + } + + + bhv_boo_cage_init(); + + return 1; +} + +int smlua_func_bhv_boo_cage_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_boo_cage_loop", 0, top); + return 0; + } + + + bhv_boo_cage_loop(); + + return 1; +} + +int smlua_func_bhv_bowser_key_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bowser_key_init", 0, top); + return 0; + } + + + bhv_bowser_key_init(); + + return 1; +} + +int smlua_func_bhv_bowser_key_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bowser_key_loop", 0, top); + return 0; + } + + + bhv_bowser_key_loop(); + + return 1; +} + +int smlua_func_bhv_grand_star_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_grand_star_init", 0, top); + return 0; + } + + + bhv_grand_star_init(); + + return 1; +} + +int smlua_func_bhv_grand_star_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_grand_star_loop", 0, top); + return 0; + } + + + bhv_grand_star_loop(); + + return 1; +} + +int smlua_func_bhv_beta_boo_key_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_beta_boo_key_loop", 0, top); + return 0; + } + + + bhv_beta_boo_key_loop(); + + return 1; +} + +int smlua_func_bhv_alpha_boo_key_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_alpha_boo_key_loop", 0, top); + return 0; + } + + + bhv_alpha_boo_key_loop(); return 1; } @@ -2134,370 +2641,386 @@ int smlua_func_bhv_bullet_bill_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_bhv_bully_loop(UNUSED lua_State* L) { +int smlua_func_bhv_white_puff_smoke_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_bully_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_white_puff_smoke_init", 0, top); return 0; } - bhv_bully_loop(); + bhv_white_puff_smoke_init(); return 1; } -int smlua_func_bhv_butterfly_init(UNUSED lua_State* L) { +int smlua_func_bhv_bowser_tail_anchor_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_butterfly_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bowser_tail_anchor_init", 0, top); return 0; } - bhv_butterfly_init(); + bhv_bowser_tail_anchor_init(); return 1; } -int smlua_func_bhv_butterfly_loop(UNUSED lua_State* L) { +int smlua_func_bhv_bowser_tail_anchor_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_butterfly_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bowser_tail_anchor_loop", 0, top); return 0; } - bhv_butterfly_loop(); + bhv_bowser_tail_anchor_loop(); return 1; } -int smlua_func_bhv_camera_lakitu_init(UNUSED lua_State* L) { +int smlua_func_bhv_bowser_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_camera_lakitu_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bowser_init", 0, top); return 0; } - bhv_camera_lakitu_init(); + bhv_bowser_init(); return 1; } -int smlua_func_bhv_camera_lakitu_update(UNUSED lua_State* L) { +int smlua_func_bhv_bowser_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_camera_lakitu_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bowser_loop", 0, top); return 0; } - bhv_camera_lakitu_update(); + bhv_bowser_loop(); return 1; } -int smlua_func_bhv_cannon_barrel_loop(UNUSED lua_State* L) { +int smlua_func_bhv_bowser_body_anchor_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_cannon_barrel_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bowser_body_anchor_init", 0, top); return 0; } - bhv_cannon_barrel_loop(); + bhv_bowser_body_anchor_init(); return 1; } -int smlua_func_bhv_cannon_base_loop(UNUSED lua_State* L) { +int smlua_func_bhv_bowser_body_anchor_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_cannon_base_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bowser_body_anchor_loop", 0, top); return 0; } - bhv_cannon_base_loop(); + bhv_bowser_body_anchor_loop(); return 1; } -int smlua_func_bhv_cannon_base_unused_loop(UNUSED lua_State* L) { +int smlua_func_bhv_bowser_flame_spawn_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_cannon_base_unused_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bowser_flame_spawn_loop", 0, top); return 0; } - bhv_cannon_base_unused_loop(); + bhv_bowser_flame_spawn_loop(); return 1; } -int smlua_func_bhv_cannon_closed_init(UNUSED lua_State* L) { +int smlua_func_bhv_tilting_bowser_lava_platform_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_cannon_closed_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_tilting_bowser_lava_platform_init", 0, top); return 0; } - bhv_cannon_closed_init(); + bhv_tilting_bowser_lava_platform_init(); return 1; } -int smlua_func_bhv_cannon_closed_loop(UNUSED lua_State* L) { +int smlua_func_bhv_falling_bowser_platform_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_cannon_closed_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_falling_bowser_platform_loop", 0, top); return 0; } - bhv_cannon_closed_loop(); + bhv_falling_bowser_platform_loop(); return 1; } -int smlua_func_bhv_cap_switch_loop(UNUSED lua_State* L) { +int smlua_func_bhv_blue_bowser_flame_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_cap_switch_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_blue_bowser_flame_init", 0, top); return 0; } - bhv_cap_switch_loop(); + bhv_blue_bowser_flame_init(); return 1; } -int smlua_func_bhv_castle_cannon_grate_init(UNUSED lua_State* L) { +int smlua_func_bhv_blue_bowser_flame_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_castle_cannon_grate_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_blue_bowser_flame_loop", 0, top); return 0; } - bhv_castle_cannon_grate_init(); + bhv_blue_bowser_flame_loop(); return 1; } -int smlua_func_bhv_castle_flag_init(UNUSED lua_State* L) { +int smlua_func_bhv_flame_floating_landing_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_castle_flag_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_flame_floating_landing_init", 0, top); return 0; } - bhv_castle_flag_init(); + bhv_flame_floating_landing_init(); return 1; } -int smlua_func_bhv_castle_floor_trap_init(UNUSED lua_State* L) { +int smlua_func_bhv_flame_floating_landing_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_castle_floor_trap_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_flame_floating_landing_loop", 0, top); return 0; } - bhv_castle_floor_trap_init(); + bhv_flame_floating_landing_loop(); return 1; } -int smlua_func_bhv_castle_floor_trap_loop(UNUSED lua_State* L) { +int smlua_func_bhv_blue_flames_group_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_castle_floor_trap_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_blue_flames_group_loop", 0, top); return 0; } - bhv_castle_floor_trap_loop(); + bhv_blue_flames_group_loop(); return 1; } -int smlua_func_bhv_ccm_touched_star_spawn_loop(UNUSED lua_State* L) { +int smlua_func_bhv_flame_bouncing_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ccm_touched_star_spawn_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_flame_bouncing_init", 0, top); return 0; } - bhv_ccm_touched_star_spawn_loop(); + bhv_flame_bouncing_init(); return 1; } -int smlua_func_bhv_celebration_star_init(UNUSED lua_State* L) { +int smlua_func_bhv_flame_bouncing_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_celebration_star_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_flame_bouncing_loop", 0, top); return 0; } - bhv_celebration_star_init(); + bhv_flame_bouncing_loop(); return 1; } -int smlua_func_bhv_celebration_star_loop(UNUSED lua_State* L) { +int smlua_func_bhv_flame_moving_forward_growing_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_celebration_star_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_flame_moving_forward_growing_init", 0, top); return 0; } - bhv_celebration_star_loop(); + bhv_flame_moving_forward_growing_init(); return 1; } -int smlua_func_bhv_celebration_star_sparkle_loop(UNUSED lua_State* L) { +int smlua_func_bhv_flame_moving_forward_growing_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_celebration_star_sparkle_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_flame_moving_forward_growing_loop", 0, top); return 0; } - bhv_celebration_star_sparkle_loop(); + bhv_flame_moving_forward_growing_loop(); return 1; } -int smlua_func_bhv_chain_chomp_chain_part_update(UNUSED lua_State* L) { +int smlua_func_bhv_flame_bowser_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_chain_chomp_chain_part_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_flame_bowser_init", 0, top); return 0; } - bhv_chain_chomp_chain_part_update(); + bhv_flame_bowser_init(); return 1; } -int smlua_func_bhv_chain_chomp_gate_init(UNUSED lua_State* L) { +int smlua_func_bhv_flame_bowser_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_chain_chomp_gate_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_flame_bowser_loop", 0, top); return 0; } - bhv_chain_chomp_gate_init(); + bhv_flame_bowser_loop(); return 1; } -int smlua_func_bhv_chain_chomp_gate_update(UNUSED lua_State* L) { +int smlua_func_bhv_flame_large_burning_out_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_chain_chomp_gate_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_flame_large_burning_out_init", 0, top); return 0; } - bhv_chain_chomp_gate_update(); + bhv_flame_large_burning_out_init(); return 1; } -int smlua_func_bhv_chain_chomp_update(UNUSED lua_State* L) { +int smlua_func_bhv_blue_fish_movement_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_chain_chomp_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_blue_fish_movement_loop", 0, top); return 0; } - bhv_chain_chomp_update(); + bhv_blue_fish_movement_loop(); + + return 1; +} + +int smlua_func_bhv_tank_fish_group_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_tank_fish_group_loop", 0, top); + return 0; + } + + + bhv_tank_fish_group_loop(); return 1; } @@ -2566,1826 +3089,34 @@ int smlua_func_bhv_checkerboard_platform_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_bhv_chuckya_anchor_mario_loop(UNUSED lua_State* L) { +int smlua_func_bhv_bowser_key_unlock_door_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_chuckya_anchor_mario_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bowser_key_unlock_door_loop", 0, top); return 0; } - bhv_chuckya_anchor_mario_loop(); + bhv_bowser_key_unlock_door_loop(); return 1; } -int smlua_func_bhv_chuckya_loop(UNUSED lua_State* L) { +int smlua_func_bhv_bowser_key_course_exit_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_chuckya_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bowser_key_course_exit_loop", 0, top); return 0; } - bhv_chuckya_loop(); - - return 1; -} - -int smlua_func_bhv_circling_amp_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_circling_amp_init", 0, top); - return 0; - } - - - bhv_circling_amp_init(); - - return 1; -} - -int smlua_func_bhv_circling_amp_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_circling_amp_loop", 0, top); - return 0; - } - - - bhv_circling_amp_loop(); - - return 1; -} - -int smlua_func_bhv_clam_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_clam_loop", 0, top); - return 0; - } - - - bhv_clam_loop(); - - return 1; -} - -int smlua_func_bhv_cloud_part_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_cloud_part_update", 0, top); - return 0; - } - - - bhv_cloud_part_update(); - - return 1; -} - -int smlua_func_bhv_cloud_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_cloud_update", 0, top); - return 0; - } - - - bhv_cloud_update(); - - return 1; -} - -int smlua_func_bhv_coffin_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_coffin_loop", 0, top); - return 0; - } - - - bhv_coffin_loop(); - - return 1; -} - -int smlua_func_bhv_coffin_spawner_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_coffin_spawner_loop", 0, top); - return 0; - } - - - bhv_coffin_spawner_loop(); - - return 1; -} - -int smlua_func_bhv_coin_formation_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_coin_formation_init", 0, top); - return 0; - } - - - bhv_coin_formation_init(); - - return 1; -} - -int smlua_func_bhv_coin_formation_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_coin_formation_loop", 0, top); - return 0; - } - - - bhv_coin_formation_loop(); - - return 1; -} - -int smlua_func_bhv_coin_formation_spawn_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_coin_formation_spawn_loop", 0, top); - return 0; - } - - - bhv_coin_formation_spawn_loop(); - - return 1; -} - -int smlua_func_bhv_coin_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_coin_init", 0, top); - return 0; - } - - - bhv_coin_init(); - - return 1; -} - -int smlua_func_bhv_coin_inside_boo_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_coin_inside_boo_loop", 0, top); - return 0; - } - - - bhv_coin_inside_boo_loop(); - - return 1; -} - -int smlua_func_bhv_coin_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_coin_loop", 0, top); - return 0; - } - - - bhv_coin_loop(); - - return 1; -} - -int smlua_func_bhv_coin_sparkles_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_coin_sparkles_loop", 0, top); - return 0; - } - - - bhv_coin_sparkles_loop(); - - return 1; -} - -int smlua_func_bhv_collect_star_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_collect_star_init", 0, top); - return 0; - } - - - bhv_collect_star_init(); - - return 1; -} - -int smlua_func_bhv_collect_star_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_collect_star_loop", 0, top); - return 0; - } - - - bhv_collect_star_loop(); - - return 1; -} - -int smlua_func_bhv_controllable_platform_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_controllable_platform_init", 0, top); - return 0; - } - - - bhv_controllable_platform_init(); - - return 1; -} - -int smlua_func_bhv_controllable_platform_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_controllable_platform_loop", 0, top); - return 0; - } - - - bhv_controllable_platform_loop(); - - return 1; -} - -int smlua_func_bhv_controllable_platform_sub_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_controllable_platform_sub_loop", 0, top); - return 0; - } - - - bhv_controllable_platform_sub_loop(); - - return 1; -} - -int smlua_func_bhv_courtyard_boo_triplet_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_courtyard_boo_triplet_init", 0, top); - return 0; - } - - - bhv_courtyard_boo_triplet_init(); - - return 1; -} - -int smlua_func_bhv_ddd_moving_pole_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_ddd_moving_pole_loop", 0, top); - return 0; - } - - - bhv_ddd_moving_pole_loop(); - - return 1; -} - -int smlua_func_bhv_ddd_pole_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_ddd_pole_init", 0, top); - return 0; - } - - - bhv_ddd_pole_init(); - - return 1; -} - -int smlua_func_bhv_ddd_pole_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_ddd_pole_update", 0, top); - return 0; - } - - - bhv_ddd_pole_update(); - - return 1; -} - -int smlua_func_bhv_ddd_warp_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_ddd_warp_loop", 0, top); - return 0; - } - - - bhv_ddd_warp_loop(); - - return 1; -} - -int smlua_func_bhv_decorative_pendulum_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_decorative_pendulum_init", 0, top); - return 0; - } - - - bhv_decorative_pendulum_init(); - - return 1; -} - -int smlua_func_bhv_decorative_pendulum_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_decorative_pendulum_loop", 0, top); - return 0; - } - - - bhv_decorative_pendulum_loop(); - - return 1; -} - -int smlua_func_bhv_donut_platform_spawner_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_donut_platform_spawner_update", 0, top); - return 0; - } - - - bhv_donut_platform_spawner_update(); - - return 1; -} - -int smlua_func_bhv_donut_platform_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_donut_platform_update", 0, top); - return 0; - } - - - bhv_donut_platform_update(); - - return 1; -} - -int smlua_func_bhv_door_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_door_init", 0, top); - return 0; - } - - - bhv_door_init(); - - return 1; -} - -int smlua_func_bhv_door_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_door_loop", 0, top); - return 0; - } - - - bhv_door_loop(); - - return 1; -} - -int smlua_func_bhv_dorrie_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_dorrie_update", 0, top); - return 0; - } - - - bhv_dorrie_update(); - - return 1; -} - -int smlua_func_bhv_elevator_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_elevator_init", 0, top); - return 0; - } - - - bhv_elevator_init(); - - return 1; -} - -int smlua_func_bhv_elevator_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_elevator_loop", 0, top); - return 0; - } - - - bhv_elevator_loop(); - - return 1; -} - -int smlua_func_bhv_end_birds_1_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_end_birds_1_loop", 0, top); - return 0; - } - - - bhv_end_birds_1_loop(); - - return 1; -} - -int smlua_func_bhv_end_birds_2_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_end_birds_2_loop", 0, top); - return 0; - } - - - bhv_end_birds_2_loop(); - - return 1; -} - -int smlua_func_bhv_enemy_lakitu_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_enemy_lakitu_update", 0, top); - return 0; - } - - - bhv_enemy_lakitu_update(); - - return 1; -} - -int smlua_func_bhv_exclamation_box_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_exclamation_box_init", 0, top); - return 0; - } - - - bhv_exclamation_box_init(); - - return 1; -} - -int smlua_func_bhv_exclamation_box_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_exclamation_box_loop", 0, top); - return 0; - } - - - bhv_exclamation_box_loop(); - - return 1; -} - -int smlua_func_bhv_explosion_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_explosion_init", 0, top); - return 0; - } - - - bhv_explosion_init(); - - return 1; -} - -int smlua_func_bhv_explosion_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_explosion_loop", 0, top); - return 0; - } - - - bhv_explosion_loop(); - - return 1; -} - -int smlua_func_bhv_eyerok_boss_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_eyerok_boss_init", 0, top); - return 0; - } - - - bhv_eyerok_boss_init(); - - return 1; -} - -int smlua_func_bhv_eyerok_boss_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_eyerok_boss_loop", 0, top); - return 0; - } - - - bhv_eyerok_boss_loop(); - - return 1; -} - -int smlua_func_bhv_eyerok_hand_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_eyerok_hand_loop", 0, top); - return 0; - } - - - bhv_eyerok_hand_loop(); - - return 1; -} - -int smlua_func_bhv_fading_warp_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_fading_warp_loop", 0, top); - return 0; - } - - - bhv_fading_warp_loop(); - - return 1; -} - -int smlua_func_bhv_falling_bowser_platform_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_falling_bowser_platform_loop", 0, top); - return 0; - } - - - bhv_falling_bowser_platform_loop(); - - return 1; -} - -int smlua_func_bhv_falling_pillar_hitbox_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_falling_pillar_hitbox_loop", 0, top); - return 0; - } - - - bhv_falling_pillar_hitbox_loop(); - - return 1; -} - -int smlua_func_bhv_falling_pillar_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_falling_pillar_init", 0, top); - return 0; - } - - - bhv_falling_pillar_init(); - - return 1; -} - -int smlua_func_bhv_falling_pillar_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_falling_pillar_loop", 0, top); - return 0; - } - - - bhv_falling_pillar_loop(); - - return 1; -} - -int smlua_func_bhv_ferris_wheel_axle_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_ferris_wheel_axle_init", 0, top); - return 0; - } - - - bhv_ferris_wheel_axle_init(); - - return 1; -} - -int smlua_func_bhv_ferris_wheel_platform_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_ferris_wheel_platform_init", 0, top); - return 0; - } - - - bhv_ferris_wheel_platform_init(); - - return 1; -} - -int smlua_func_bhv_ferris_wheel_platform_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_ferris_wheel_platform_update", 0, top); - return 0; - } - - - bhv_ferris_wheel_platform_update(); - - return 1; -} - -int smlua_func_bhv_fire_piranha_plant_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_fire_piranha_plant_init", 0, top); - return 0; - } - - - bhv_fire_piranha_plant_init(); - - return 1; -} - -int smlua_func_bhv_fire_piranha_plant_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_fire_piranha_plant_update", 0, top); - return 0; - } - - - bhv_fire_piranha_plant_update(); - - return 1; -} - -int smlua_func_bhv_fire_spitter_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_fire_spitter_update", 0, top); - return 0; - } - - - bhv_fire_spitter_update(); - - return 1; -} - -int smlua_func_bhv_fish_group_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_fish_group_loop", 0, top); - return 0; - } - - - bhv_fish_group_loop(); - - return 1; -} - -int smlua_func_bhv_fish_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_fish_loop", 0, top); - return 0; - } - - - bhv_fish_loop(); - - return 1; -} - -int smlua_func_bhv_fish_spawner_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_fish_spawner_loop", 0, top); - return 0; - } - - - bhv_fish_spawner_loop(); - - return 1; -} - -int smlua_func_bhv_flame_bouncing_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_flame_bouncing_init", 0, top); - return 0; - } - - - bhv_flame_bouncing_init(); - - return 1; -} - -int smlua_func_bhv_flame_bouncing_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_flame_bouncing_loop", 0, top); - return 0; - } - - - bhv_flame_bouncing_loop(); - - return 1; -} - -int smlua_func_bhv_flame_bowser_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_flame_bowser_init", 0, top); - return 0; - } - - - bhv_flame_bowser_init(); - - return 1; -} - -int smlua_func_bhv_flame_bowser_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_flame_bowser_loop", 0, top); - return 0; - } - - - bhv_flame_bowser_loop(); - - return 1; -} - -int smlua_func_bhv_flame_floating_landing_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_flame_floating_landing_init", 0, top); - return 0; - } - - - bhv_flame_floating_landing_init(); - - return 1; -} - -int smlua_func_bhv_flame_floating_landing_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_flame_floating_landing_loop", 0, top); - return 0; - } - - - bhv_flame_floating_landing_loop(); - - return 1; -} - -int smlua_func_bhv_flame_large_burning_out_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_flame_large_burning_out_init", 0, top); - return 0; - } - - - bhv_flame_large_burning_out_init(); - - return 1; -} - -int smlua_func_bhv_flame_mario_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_flame_mario_loop", 0, top); - return 0; - } - - - bhv_flame_mario_loop(); - - return 1; -} - -int smlua_func_bhv_flame_moving_forward_growing_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_flame_moving_forward_growing_init", 0, top); - return 0; - } - - - bhv_flame_moving_forward_growing_init(); - - return 1; -} - -int smlua_func_bhv_flame_moving_forward_growing_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_flame_moving_forward_growing_loop", 0, top); - return 0; - } - - - bhv_flame_moving_forward_growing_loop(); - - return 1; -} - -int smlua_func_bhv_flamethrower_flame_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_flamethrower_flame_loop", 0, top); - return 0; - } - - - bhv_flamethrower_flame_loop(); - - return 1; -} - -int smlua_func_bhv_flamethrower_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_flamethrower_loop", 0, top); - return 0; - } - - - bhv_flamethrower_loop(); - - return 1; -} - -int smlua_func_bhv_floating_platform_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_floating_platform_loop", 0, top); - return 0; - } - - - bhv_floating_platform_loop(); - - return 1; -} - -int smlua_func_bhv_floor_trap_in_castle_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_floor_trap_in_castle_loop", 0, top); - return 0; - } - - - bhv_floor_trap_in_castle_loop(); - - return 1; -} - -int smlua_func_bhv_fly_guy_flame_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_fly_guy_flame_loop", 0, top); - return 0; - } - - - bhv_fly_guy_flame_loop(); - - return 1; -} - -int smlua_func_bhv_fly_guy_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_fly_guy_update", 0, top); - return 0; - } - - - bhv_fly_guy_update(); - - return 1; -} - -int smlua_func_bhv_flying_bookend_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_flying_bookend_loop", 0, top); - return 0; - } - - - bhv_flying_bookend_loop(); - - return 1; -} - -int smlua_func_bhv_free_bowling_ball_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_free_bowling_ball_init", 0, top); - return 0; - } - - - bhv_free_bowling_ball_init(); - - return 1; -} - -int smlua_func_bhv_free_bowling_ball_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_free_bowling_ball_loop", 0, top); - return 0; - } - - - bhv_free_bowling_ball_loop(); - - return 1; -} - -int smlua_func_bhv_generic_bowling_ball_spawner_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_generic_bowling_ball_spawner_init", 0, top); - return 0; - } - - - bhv_generic_bowling_ball_spawner_init(); - - return 1; -} - -int smlua_func_bhv_generic_bowling_ball_spawner_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_generic_bowling_ball_spawner_loop", 0, top); - return 0; - } - - - bhv_generic_bowling_ball_spawner_loop(); - - return 1; -} - -int smlua_func_bhv_giant_pole_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_giant_pole_loop", 0, top); - return 0; - } - - - bhv_giant_pole_loop(); - - return 1; -} - -int smlua_func_bhv_golden_coin_sparkles_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_golden_coin_sparkles_loop", 0, top); - return 0; - } - - - bhv_golden_coin_sparkles_loop(); - - return 1; -} - -int smlua_func_bhv_goomba_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_goomba_init", 0, top); - return 0; - } - - - bhv_goomba_init(); - - return 1; -} - -int smlua_func_bhv_goomba_triplet_spawner_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_goomba_triplet_spawner_update", 0, top); - return 0; - } - - - bhv_goomba_triplet_spawner_update(); - - return 1; -} - -int smlua_func_bhv_goomba_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_goomba_update", 0, top); - return 0; - } - - - bhv_goomba_update(); - - return 1; -} - -int smlua_func_bhv_grand_star_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_grand_star_init", 0, top); - return 0; - } - - - bhv_grand_star_init(); - - return 1; -} - -int smlua_func_bhv_grand_star_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_grand_star_loop", 0, top); - return 0; - } - - - bhv_grand_star_loop(); - - return 1; -} - -int smlua_func_bhv_grindel_thwomp_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_grindel_thwomp_loop", 0, top); - return 0; - } - - - bhv_grindel_thwomp_loop(); - - return 1; -} - -int smlua_func_bhv_ground_sand_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_ground_sand_init", 0, top); - return 0; - } - - - bhv_ground_sand_init(); - - return 1; -} - -int smlua_func_bhv_ground_snow_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_ground_snow_init", 0, top); - return 0; - } - - - bhv_ground_snow_init(); - - return 1; -} - -int smlua_func_bhv_haunted_bookshelf_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_haunted_bookshelf_loop", 0, top); - return 0; - } - - - bhv_haunted_bookshelf_loop(); - - return 1; -} - -int smlua_func_bhv_haunted_bookshelf_manager_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_haunted_bookshelf_manager_loop", 0, top); - return 0; - } - - - bhv_haunted_bookshelf_manager_loop(); - - return 1; -} - -int smlua_func_bhv_haunted_chair_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_haunted_chair_init", 0, top); - return 0; - } - - - bhv_haunted_chair_init(); - - return 1; -} - -int smlua_func_bhv_haunted_chair_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_haunted_chair_loop", 0, top); - return 0; - } - - - bhv_haunted_chair_loop(); - - return 1; -} - -int smlua_func_bhv_heave_ho_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_heave_ho_loop", 0, top); - return 0; - } - - - bhv_heave_ho_loop(); - - return 1; -} - -int smlua_func_bhv_heave_ho_throw_mario_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_heave_ho_throw_mario_loop", 0, top); - return 0; - } - - - bhv_heave_ho_throw_mario_loop(); - - return 1; -} - -int smlua_func_bhv_hidden_blue_coin_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_hidden_blue_coin_loop", 0, top); - return 0; - } - - - bhv_hidden_blue_coin_loop(); - - return 1; -} - -int smlua_func_bhv_hidden_object_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_hidden_object_loop", 0, top); - return 0; - } - - - bhv_hidden_object_loop(); - - return 1; -} - -int smlua_func_bhv_hidden_red_coin_star_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_hidden_red_coin_star_init", 0, top); - return 0; - } - - - bhv_hidden_red_coin_star_init(); - - return 1; -} - -int smlua_func_bhv_hidden_red_coin_star_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_hidden_red_coin_star_loop", 0, top); - return 0; - } - - - bhv_hidden_red_coin_star_loop(); - - return 1; -} - -int smlua_func_bhv_hidden_star_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_hidden_star_init", 0, top); - return 0; - } - - - bhv_hidden_star_init(); - - return 1; -} - -int smlua_func_bhv_hidden_star_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_hidden_star_loop", 0, top); - return 0; - } - - - bhv_hidden_star_loop(); - - return 1; -} - -int smlua_func_bhv_hidden_star_trigger_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_hidden_star_trigger_loop", 0, top); - return 0; - } - - - bhv_hidden_star_trigger_loop(); - - return 1; -} - -int smlua_func_bhv_homing_amp_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_homing_amp_init", 0, top); - return 0; - } - - - bhv_homing_amp_init(); - - return 1; -} - -int smlua_func_bhv_homing_amp_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_homing_amp_loop", 0, top); - return 0; - } - - - bhv_homing_amp_loop(); - - return 1; -} - -int smlua_func_bhv_hoot_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_hoot_init", 0, top); - return 0; - } - - - bhv_hoot_init(); - - return 1; -} - -int smlua_func_bhv_hoot_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_hoot_loop", 0, top); - return 0; - } - - - bhv_hoot_loop(); - - return 1; -} - -int smlua_func_bhv_horizontal_grindel_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_horizontal_grindel_init", 0, top); - return 0; - } - - - bhv_horizontal_grindel_init(); - - return 1; -} - -int smlua_func_bhv_horizontal_grindel_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_horizontal_grindel_update", 0, top); - return 0; - } - - - bhv_horizontal_grindel_update(); - - return 1; -} - -int smlua_func_bhv_idle_water_wave_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_idle_water_wave_loop", 0, top); - return 0; - } - - - bhv_idle_water_wave_loop(); - - return 1; -} - -int smlua_func_bhv_init_changing_water_level_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_init_changing_water_level_loop", 0, top); - return 0; - } - - - bhv_init_changing_water_level_loop(); - - return 1; -} - -int smlua_func_bhv_intro_lakitu_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_intro_lakitu_loop", 0, top); - return 0; - } - - - bhv_intro_lakitu_loop(); - - return 1; -} - -int smlua_func_bhv_intro_peach_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_intro_peach_loop", 0, top); - return 0; - } - - - bhv_intro_peach_loop(); - - return 1; -} - -int smlua_func_bhv_intro_scene_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_intro_scene_loop", 0, top); - return 0; - } - - - bhv_intro_scene_loop(); + bhv_bowser_key_course_exit_loop(); return 1; } @@ -4422,402 +3153,130 @@ int smlua_func_bhv_invisible_objects_under_bridge_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_bhv_jet_stream_loop(UNUSED lua_State* L) { +int smlua_func_bhv_water_level_pillar_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_jet_stream_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_water_level_pillar_init", 0, top); return 0; } - bhv_jet_stream_loop(); + bhv_water_level_pillar_init(); return 1; } -int smlua_func_bhv_jet_stream_ring_spawner_loop(UNUSED lua_State* L) { +int smlua_func_bhv_water_level_pillar_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_jet_stream_ring_spawner_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_water_level_pillar_loop", 0, top); return 0; } - bhv_jet_stream_ring_spawner_loop(); + bhv_water_level_pillar_loop(); return 1; } -int smlua_func_bhv_jet_stream_water_ring_init(UNUSED lua_State* L) { +int smlua_func_bhv_ddd_warp_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_jet_stream_water_ring_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ddd_warp_loop", 0, top); return 0; } - bhv_jet_stream_water_ring_init(); + bhv_ddd_warp_loop(); return 1; } -int smlua_func_bhv_jet_stream_water_ring_loop(UNUSED lua_State* L) { +int smlua_func_bhv_moat_grills_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_jet_stream_water_ring_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_moat_grills_loop", 0, top); return 0; } - bhv_jet_stream_water_ring_loop(); + bhv_moat_grills_loop(); return 1; } -int smlua_func_bhv_jrb_floating_box_loop(UNUSED lua_State* L) { +int smlua_func_bhv_rotating_clock_arm_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_jrb_floating_box_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_rotating_clock_arm_loop", 0, top); return 0; } - bhv_jrb_floating_box_loop(); + bhv_rotating_clock_arm_loop(); return 1; } -int smlua_func_bhv_jrb_sliding_box_loop(UNUSED lua_State* L) { +int smlua_func_bhv_ukiki_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_jrb_sliding_box_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ukiki_init", 0, top); return 0; } - bhv_jrb_sliding_box_loop(); + bhv_ukiki_init(); return 1; } -int smlua_func_bhv_jumping_box_loop(UNUSED lua_State* L) { +int smlua_func_bhv_ukiki_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_jumping_box_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ukiki_loop", 0, top); return 0; } - bhv_jumping_box_loop(); + bhv_ukiki_loop(); return 1; } -int smlua_func_bhv_kickable_board_loop(UNUSED lua_State* L) { +int smlua_func_bhv_lll_sinking_rock_block_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_kickable_board_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_lll_sinking_rock_block_loop", 0, top); return 0; } - bhv_kickable_board_loop(); - - return 1; -} - -int smlua_func_bhv_king_bobomb_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_king_bobomb_loop", 0, top); - return 0; - } - - - bhv_king_bobomb_loop(); - - return 1; -} - -int smlua_func_bhv_klepto_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_klepto_init", 0, top); - return 0; - } - - - bhv_klepto_init(); - - return 1; -} - -int smlua_func_bhv_klepto_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_klepto_update", 0, top); - return 0; - } - - - bhv_klepto_update(); - - return 1; -} - -int smlua_func_bhv_koopa_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_koopa_init", 0, top); - return 0; - } - - - bhv_koopa_init(); - - return 1; -} - -int smlua_func_bhv_koopa_race_endpoint_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_koopa_race_endpoint_update", 0, top); - return 0; - } - - - bhv_koopa_race_endpoint_update(); - - return 1; -} - -int smlua_func_bhv_koopa_shell_flame_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_koopa_shell_flame_loop", 0, top); - return 0; - } - - - bhv_koopa_shell_flame_loop(); - - return 1; -} - -int smlua_func_bhv_koopa_shell_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_koopa_shell_loop", 0, top); - return 0; - } - - - bhv_koopa_shell_loop(); - - return 1; -} - -int smlua_func_bhv_koopa_shell_underwater_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_koopa_shell_underwater_loop", 0, top); - return 0; - } - - - bhv_koopa_shell_underwater_loop(); - - return 1; -} - -int smlua_func_bhv_koopa_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_koopa_update", 0, top); - return 0; - } - - - bhv_koopa_update(); - - return 1; -} - -int smlua_func_bhv_large_bomp_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_large_bomp_init", 0, top); - return 0; - } - - - bhv_large_bomp_init(); - - return 1; -} - -int smlua_func_bhv_large_bomp_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_large_bomp_loop", 0, top); - return 0; - } - - - bhv_large_bomp_loop(); - - return 1; -} - -int smlua_func_bhv_lll_bowser_puzzle_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_lll_bowser_puzzle_loop", 0, top); - return 0; - } - - - bhv_lll_bowser_puzzle_loop(); - - return 1; -} - -int smlua_func_bhv_lll_bowser_puzzle_piece_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_lll_bowser_puzzle_piece_loop", 0, top); - return 0; - } - - - bhv_lll_bowser_puzzle_piece_loop(); - - return 1; -} - -int smlua_func_bhv_lll_drawbridge_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_lll_drawbridge_loop", 0, top); - return 0; - } - - - bhv_lll_drawbridge_loop(); - - return 1; -} - -int smlua_func_bhv_lll_drawbridge_spawner_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_lll_drawbridge_spawner_init", 0, top); - return 0; - } - - - bhv_lll_drawbridge_spawner_init(); - - return 1; -} - -int smlua_func_bhv_lll_drawbridge_spawner_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_lll_drawbridge_spawner_loop", 0, top); - return 0; - } - - - bhv_lll_drawbridge_spawner_loop(); - - return 1; -} - -int smlua_func_bhv_lll_floating_wood_bridge_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_lll_floating_wood_bridge_loop", 0, top); - return 0; - } - - - bhv_lll_floating_wood_bridge_loop(); + bhv_lll_sinking_rock_block_loop(); return 1; } @@ -4838,22 +3297,6 @@ int smlua_func_bhv_lll_moving_octagonal_mesh_platform_loop(UNUSED lua_State* L) return 1; } -int smlua_func_bhv_lll_rolling_log_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_lll_rolling_log_init", 0, top); - return 0; - } - - - bhv_lll_rolling_log_init(); - - return 1; -} - int smlua_func_bhv_lll_rotating_block_fire_bars_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } if (L == NULL) { return 0; } @@ -4886,6 +3329,54 @@ int smlua_func_bhv_lll_rotating_hex_flame_loop(UNUSED lua_State* L) { return 1; } +int smlua_func_bhv_lll_wood_piece_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_lll_wood_piece_loop", 0, top); + return 0; + } + + + bhv_lll_wood_piece_loop(); + + return 1; +} + +int smlua_func_bhv_lll_floating_wood_bridge_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_lll_floating_wood_bridge_loop", 0, top); + return 0; + } + + + bhv_lll_floating_wood_bridge_loop(); + + return 1; +} + +int smlua_func_bhv_volcano_flames_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_volcano_flames_loop", 0, top); + return 0; + } + + + bhv_volcano_flames_loop(); + + return 1; +} + int smlua_func_bhv_lll_rotating_hexagonal_ring_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } if (L == NULL) { return 0; } @@ -4918,22 +3409,6 @@ int smlua_func_bhv_lll_sinking_rectangular_platform_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_bhv_lll_sinking_rock_block_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_lll_sinking_rock_block_loop", 0, top); - return 0; - } - - - bhv_lll_sinking_rock_block_loop(); - - return 1; -} - int smlua_func_bhv_lll_sinking_square_platforms_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } if (L == NULL) { return 0; } @@ -4950,98 +3425,1122 @@ int smlua_func_bhv_lll_sinking_square_platforms_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_bhv_lll_wood_piece_loop(UNUSED lua_State* L) { +int smlua_func_bhv_koopa_shell_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_lll_wood_piece_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_koopa_shell_loop", 0, top); return 0; } - bhv_lll_wood_piece_loop(); + bhv_koopa_shell_loop(); return 1; } -int smlua_func_bhv_mad_piano_update(UNUSED lua_State* L) { +int smlua_func_bhv_koopa_shell_flame_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_mad_piano_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_koopa_shell_flame_loop", 0, top); return 0; } - bhv_mad_piano_update(); + bhv_koopa_shell_flame_loop(); return 1; } -int smlua_func_bhv_manta_ray_init(UNUSED lua_State* L) { +int smlua_func_bhv_tox_box_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_manta_ray_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_tox_box_loop", 0, top); return 0; } - bhv_manta_ray_init(); + bhv_tox_box_loop(); return 1; } -int smlua_func_bhv_manta_ray_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } +int smlua_func_mario_moving_fast_enough_to_make_piranha_plant_bite(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", "bhv_manta_ray_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mario_moving_fast_enough_to_make_piranha_plant_bite", 0, top); return 0; } - bhv_manta_ray_loop(); + lua_pushinteger(L, mario_moving_fast_enough_to_make_piranha_plant_bite()); return 1; } -int smlua_func_bhv_manta_ray_water_ring_init(UNUSED lua_State* L) { +int smlua_func_bhv_piranha_plant_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_manta_ray_water_ring_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_piranha_plant_loop", 0, top); return 0; } - bhv_manta_ray_water_ring_init(); + bhv_piranha_plant_loop(); return 1; } -int smlua_func_bhv_manta_ray_water_ring_loop(UNUSED lua_State* L) { +int smlua_func_bhv_lll_bowser_puzzle_piece_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_manta_ray_water_ring_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_lll_bowser_puzzle_piece_loop", 0, top); return 0; } - bhv_manta_ray_water_ring_loop(); + bhv_lll_bowser_puzzle_piece_loop(); + + return 1; +} + +int smlua_func_bhv_lll_bowser_puzzle_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_lll_bowser_puzzle_loop", 0, top); + return 0; + } + + + bhv_lll_bowser_puzzle_loop(); + + return 1; +} + +int smlua_func_bhv_tuxies_mother_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_tuxies_mother_loop", 0, top); + return 0; + } + + + bhv_tuxies_mother_loop(); + + return 1; +} + +int smlua_func_bhv_small_penguin_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_small_penguin_loop", 0, top); + return 0; + } + + + bhv_small_penguin_loop(); + + return 1; +} + +int smlua_func_bhv_fish_spawner_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_fish_spawner_loop", 0, top); + return 0; + } + + + bhv_fish_spawner_loop(); + + return 1; +} + +int smlua_func_bhv_fish_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_fish_loop", 0, top); + return 0; + } + + + bhv_fish_loop(); + + return 1; +} + +int smlua_func_bhv_wdw_express_elevator_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_wdw_express_elevator_loop", 0, top); + return 0; + } + + + bhv_wdw_express_elevator_loop(); + + return 1; +} + +int smlua_func_bhv_bub_spawner_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bub_spawner_loop", 0, top); + return 0; + } + + + bhv_bub_spawner_loop(); + + return 1; +} + +int smlua_func_bhv_bub_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bub_loop", 0, top); + return 0; + } + + + bhv_bub_loop(); + + return 1; +} + +int smlua_func_bhv_exclamation_box_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_exclamation_box_init", 0, top); + return 0; + } + + + bhv_exclamation_box_init(); + + return 1; +} + +int smlua_func_bhv_exclamation_box_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_exclamation_box_loop", 0, top); + return 0; + } + + + bhv_exclamation_box_loop(); + + return 1; +} + +int smlua_func_bhv_rotating_exclamation_box_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_rotating_exclamation_box_loop", 0, top); + return 0; + } + + + bhv_rotating_exclamation_box_loop(); + + return 1; +} + +int smlua_func_bhv_sound_spawner_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_sound_spawner_init", 0, top); + return 0; + } + + + bhv_sound_spawner_init(); + + return 1; +} + +int smlua_func_bhv_bowsers_sub_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bowsers_sub_loop", 0, top); + return 0; + } + + + bhv_bowsers_sub_loop(); + + return 1; +} + +int smlua_func_bhv_sushi_shark_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_sushi_shark_loop", 0, top); + return 0; + } + + + bhv_sushi_shark_loop(); + + return 1; +} + +int smlua_func_bhv_sushi_shark_collision_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_sushi_shark_collision_loop", 0, top); + return 0; + } + + + bhv_sushi_shark_collision_loop(); + + return 1; +} + +int smlua_func_bhv_jrb_sliding_box_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_jrb_sliding_box_loop", 0, top); + return 0; + } + + + bhv_jrb_sliding_box_loop(); + + return 1; +} + +int smlua_func_bhv_ship_part_3_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_ship_part_3_loop", 0, top); + return 0; + } + + + bhv_ship_part_3_loop(); + + return 1; +} + +int smlua_func_bhv_sunken_ship_part_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_sunken_ship_part_loop", 0, top); + return 0; + } + + + bhv_sunken_ship_part_loop(); + + return 1; +} + +int smlua_func_bhv_white_puff_1_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_white_puff_1_loop", 0, top); + return 0; + } + + + bhv_white_puff_1_loop(); + + return 1; +} + +int smlua_func_bhv_white_puff_2_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_white_puff_2_loop", 0, top); + return 0; + } + + + bhv_white_puff_2_loop(); + + return 1; +} + +int smlua_func_bhv_blue_coin_number_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_blue_coin_number_loop", 0, top); + return 0; + } + + + bhv_blue_coin_number_loop(); + + return 1; +} + +int smlua_func_bhv_blue_coin_switch_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_blue_coin_switch_init", 0, top); + return 0; + } + + + bhv_blue_coin_switch_init(); + + return 1; +} + +int smlua_func_bhv_blue_coin_switch_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_blue_coin_switch_loop", 0, top); + return 0; + } + + + bhv_blue_coin_switch_loop(); + + return 1; +} + +int smlua_func_bhv_hidden_blue_coin_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_hidden_blue_coin_loop", 0, top); + return 0; + } + + + bhv_hidden_blue_coin_loop(); + + return 1; +} + +int smlua_func_bhv_openable_cage_door_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_openable_cage_door_loop", 0, top); + return 0; + } + + + bhv_openable_cage_door_loop(); + + return 1; +} + +int smlua_func_bhv_openable_grill_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_openable_grill_loop", 0, top); + return 0; + } + + + bhv_openable_grill_loop(); + + return 1; +} + +int smlua_func_bhv_water_level_diamond_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_water_level_diamond_loop", 0, top); + return 0; + } + + + bhv_water_level_diamond_loop(); + + return 1; +} + +int smlua_func_bhv_init_changing_water_level_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_init_changing_water_level_loop", 0, top); + return 0; + } + + + bhv_init_changing_water_level_loop(); + + return 1; +} + +int smlua_func_bhv_tweester_sand_particle_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_tweester_sand_particle_loop", 0, top); + return 0; + } + + + bhv_tweester_sand_particle_loop(); + + return 1; +} + +int smlua_func_bhv_tweester_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_tweester_loop", 0, top); + return 0; + } + + + bhv_tweester_loop(); + + return 1; +} + +int smlua_func_bhv_merry_go_round_boo_manager_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_merry_go_round_boo_manager_loop", 0, top); + return 0; + } + + + bhv_merry_go_round_boo_manager_loop(); + + return 1; +} + +int smlua_func_bhv_animated_texture_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_animated_texture_loop", 0, top); + return 0; + } + + + bhv_animated_texture_loop(); + + return 1; +} + +int smlua_func_bhv_boo_in_castle_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_boo_in_castle_loop", 0, top); + return 0; + } + + + bhv_boo_in_castle_loop(); + + return 1; +} + +int smlua_func_bhv_boo_with_cage_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_boo_with_cage_init", 0, top); + return 0; + } + + + bhv_boo_with_cage_init(); + + return 1; +} + +int smlua_func_bhv_boo_with_cage_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_boo_with_cage_loop", 0, top); + return 0; + } + + + bhv_boo_with_cage_loop(); + + return 1; +} + +int smlua_func_bhv_boo_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_boo_init", 0, top); + return 0; + } + + + bhv_boo_init(); + + return 1; +} + +int smlua_func_bhv_big_boo_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_big_boo_loop", 0, top); + return 0; + } + + + bhv_big_boo_loop(); + + return 1; +} + +int smlua_func_bhv_courtyard_boo_triplet_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_courtyard_boo_triplet_init", 0, top); + return 0; + } + + + bhv_courtyard_boo_triplet_init(); + + return 1; +} + +int smlua_func_obj_set_secondary_camera_focus(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", "obj_set_secondary_camera_focus", 0, top); + return 0; + } + + + obj_set_secondary_camera_focus(); + + return 1; +} + +int smlua_func_bhv_boo_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_boo_loop", 0, top); + return 0; + } + + + bhv_boo_loop(); + + return 1; +} + +int smlua_func_bhv_boo_boss_spawned_bridge_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_boo_boss_spawned_bridge_loop", 0, top); + return 0; + } + + + bhv_boo_boss_spawned_bridge_loop(); + + return 1; +} + +int smlua_func_bhv_bbh_tilting_trap_platform_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bbh_tilting_trap_platform_loop", 0, top); + return 0; + } + + + bhv_bbh_tilting_trap_platform_loop(); + + return 1; +} + +int smlua_func_bhv_haunted_bookshelf_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_haunted_bookshelf_loop", 0, top); + return 0; + } + + + bhv_haunted_bookshelf_loop(); + + return 1; +} + +int smlua_func_bhv_merry_go_round_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_merry_go_round_loop", 0, top); + return 0; + } + + + bhv_merry_go_round_loop(); + + return 1; +} + +#ifndef VERSION_JP +int smlua_func_bhv_play_music_track_when_touched_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_play_music_track_when_touched_loop", 0, top); + return 0; + } + + + bhv_play_music_track_when_touched_loop(); + + return 1; +} +#endif + +int smlua_func_bhv_beta_bowser_anchor_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_beta_bowser_anchor_loop", 0, top); + return 0; + } + + + bhv_beta_bowser_anchor_loop(); + + return 1; +} + +int smlua_func_bhv_static_checkered_platform_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_static_checkered_platform_loop", 0, top); + return 0; + } + + + bhv_static_checkered_platform_loop(); + + return 1; +} + +int smlua_func_bhv_castle_floor_trap_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_castle_floor_trap_init", 0, top); + return 0; + } + + + bhv_castle_floor_trap_init(); + + return 1; +} + +int smlua_func_bhv_castle_floor_trap_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_castle_floor_trap_loop", 0, top); + return 0; + } + + + bhv_castle_floor_trap_loop(); + + return 1; +} + +int smlua_func_bhv_floor_trap_in_castle_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_floor_trap_in_castle_loop", 0, top); + return 0; + } + + + bhv_floor_trap_in_castle_loop(); + + return 1; +} + +int smlua_func_bhv_sparkle_spawn_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_sparkle_spawn_loop", 0, top); + return 0; + } + + + bhv_sparkle_spawn_loop(); + + return 1; +} + +int smlua_func_bhv_scuttlebug_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_scuttlebug_loop", 0, top); + return 0; + } + + + bhv_scuttlebug_loop(); + + return 1; +} + +int smlua_func_bhv_scuttlebug_spawn_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_scuttlebug_spawn_loop", 0, top); + return 0; + } + + + bhv_scuttlebug_spawn_loop(); + + return 1; +} + +int smlua_func_bhv_whomp_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_whomp_loop", 0, top); + return 0; + } + + + bhv_whomp_loop(); + + return 1; +} + +int smlua_func_bhv_water_splash_spawn_droplets(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_water_splash_spawn_droplets", 0, top); + return 0; + } + + + bhv_water_splash_spawn_droplets(); + + return 1; +} + +int smlua_func_bhv_water_droplet_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_water_droplet_loop", 0, top); + return 0; + } + + + bhv_water_droplet_loop(); + + return 1; +} + +int smlua_func_bhv_water_droplet_splash_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_water_droplet_splash_init", 0, top); + return 0; + } + + + bhv_water_droplet_splash_init(); + + return 1; +} + +int smlua_func_bhv_bubble_splash_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bubble_splash_init", 0, top); + return 0; + } + + + bhv_bubble_splash_init(); + + return 1; +} + +int smlua_func_bhv_idle_water_wave_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_idle_water_wave_loop", 0, top); + return 0; + } + + + bhv_idle_water_wave_loop(); + + return 1; +} + +int smlua_func_bhv_shallow_water_splash_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_shallow_water_splash_init", 0, top); + return 0; + } + + + bhv_shallow_water_splash_init(); + + return 1; +} + +int smlua_func_bhv_wave_trail_shrink(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_wave_trail_shrink", 0, top); + return 0; + } + + + bhv_wave_trail_shrink(); + + return 1; +} + +int smlua_func_bhv_strong_wind_particle_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_strong_wind_particle_loop", 0, top); + return 0; + } + + + bhv_strong_wind_particle_loop(); + + return 1; +} + +int smlua_func_bhv_sl_snowman_wind_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_sl_snowman_wind_loop", 0, top); + return 0; + } + + + bhv_sl_snowman_wind_loop(); + + return 1; +} + +int smlua_func_bhv_sl_walking_penguin_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_sl_walking_penguin_loop", 0, top); + return 0; + } + + + bhv_sl_walking_penguin_loop(); return 1; } @@ -5110,258 +4609,50 @@ int smlua_func_bhv_menu_button_manager_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_bhv_merry_go_round_boo_manager_loop(UNUSED lua_State* L) { +int smlua_func_bhv_act_selector_star_type_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_merry_go_round_boo_manager_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_act_selector_star_type_loop", 0, top); return 0; } - bhv_merry_go_round_boo_manager_loop(); + bhv_act_selector_star_type_loop(); return 1; } -int smlua_func_bhv_merry_go_round_loop(UNUSED lua_State* L) { +int smlua_func_bhv_act_selector_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_merry_go_round_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_act_selector_init", 0, top); return 0; } - bhv_merry_go_round_loop(); + bhv_act_selector_init(); return 1; } -int smlua_func_bhv_metal_cap_init(UNUSED lua_State* L) { +int smlua_func_bhv_act_selector_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_metal_cap_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_act_selector_loop", 0, top); return 0; } - bhv_metal_cap_init(); - - return 1; -} - -int smlua_func_bhv_metal_cap_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_metal_cap_loop", 0, top); - return 0; - } - - - bhv_metal_cap_loop(); - - return 1; -} - -int smlua_func_bhv_mips_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_mips_init", 0, top); - return 0; - } - - - bhv_mips_init(); - - return 1; -} - -int smlua_func_bhv_mips_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_mips_loop", 0, top); - return 0; - } - - - bhv_mips_loop(); - - return 1; -} - -int smlua_func_bhv_moat_grills_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_moat_grills_loop", 0, top); - return 0; - } - - - bhv_moat_grills_loop(); - - return 1; -} - -int smlua_func_bhv_moneybag_hidden_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_moneybag_hidden_loop", 0, top); - return 0; - } - - - bhv_moneybag_hidden_loop(); - - return 1; -} - -int smlua_func_bhv_moneybag_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_moneybag_init", 0, top); - return 0; - } - - - bhv_moneybag_init(); - - return 1; -} - -int smlua_func_bhv_moneybag_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_moneybag_loop", 0, top); - return 0; - } - - - bhv_moneybag_loop(); - - return 1; -} - -int smlua_func_bhv_monty_mole_hole_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_monty_mole_hole_update", 0, top); - return 0; - } - - - bhv_monty_mole_hole_update(); - - return 1; -} - -int smlua_func_bhv_monty_mole_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_monty_mole_init", 0, top); - return 0; - } - - - bhv_monty_mole_init(); - - return 1; -} - -int smlua_func_bhv_monty_mole_rock_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_monty_mole_rock_update", 0, top); - return 0; - } - - - bhv_monty_mole_rock_update(); - - return 1; -} - -int smlua_func_bhv_monty_mole_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_monty_mole_update", 0, top); - return 0; - } - - - bhv_monty_mole_update(); - - return 1; -} - -int smlua_func_bhv_moving_blue_coin_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_moving_blue_coin_init", 0, top); - return 0; - } - - - bhv_moving_blue_coin_init(); - - return 1; -} - -int smlua_func_bhv_moving_blue_coin_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_moving_blue_coin_loop", 0, top); - return 0; - } - - - bhv_moving_blue_coin_loop(); + bhv_act_selector_loop(); return 1; } @@ -5398,130 +4689,434 @@ int smlua_func_bhv_moving_yellow_coin_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_bhv_mr_blizzard_init(UNUSED lua_State* L) { +int smlua_func_bhv_moving_blue_coin_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_mr_blizzard_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_moving_blue_coin_init", 0, top); return 0; } - bhv_mr_blizzard_init(); + bhv_moving_blue_coin_init(); return 1; } -int smlua_func_bhv_mr_blizzard_snowball(UNUSED lua_State* L) { +int smlua_func_bhv_moving_blue_coin_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_mr_blizzard_snowball", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_moving_blue_coin_loop", 0, top); return 0; } - bhv_mr_blizzard_snowball(); + bhv_moving_blue_coin_loop(); return 1; } -int smlua_func_bhv_mr_blizzard_update(UNUSED lua_State* L) { +int smlua_func_bhv_blue_coin_sliding_jumping_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_mr_blizzard_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_blue_coin_sliding_jumping_init", 0, top); return 0; } - bhv_mr_blizzard_update(); + bhv_blue_coin_sliding_jumping_init(); return 1; } -int smlua_func_bhv_mr_i_body_loop(UNUSED lua_State* L) { +int smlua_func_bhv_blue_coin_sliding_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_mr_i_body_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_blue_coin_sliding_loop", 0, top); return 0; } - bhv_mr_i_body_loop(); + bhv_blue_coin_sliding_loop(); return 1; } -int smlua_func_bhv_mr_i_loop(UNUSED lua_State* L) { +int smlua_func_bhv_blue_coin_jumping_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_mr_i_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_blue_coin_jumping_loop", 0, top); return 0; } - bhv_mr_i_loop(); + bhv_blue_coin_jumping_loop(); return 1; } -int smlua_func_bhv_mr_i_particle_loop(UNUSED lua_State* L) { +int smlua_func_bhv_seaweed_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_mr_i_particle_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_seaweed_init", 0, top); return 0; } - bhv_mr_i_particle_loop(); + bhv_seaweed_init(); return 1; } -int smlua_func_bhv_normal_cap_init(UNUSED lua_State* L) { +int smlua_func_bhv_seaweed_bundle_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_normal_cap_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_seaweed_bundle_init", 0, top); return 0; } - bhv_normal_cap_init(); + bhv_seaweed_bundle_init(); return 1; } -int smlua_func_bhv_normal_cap_loop(UNUSED lua_State* L) { +int smlua_func_bhv_bobomb_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_normal_cap_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bobomb_init", 0, top); return 0; } - bhv_normal_cap_loop(); + bhv_bobomb_init(); + + return 1; +} + +int smlua_func_bhv_bobomb_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bobomb_loop", 0, top); + return 0; + } + + + bhv_bobomb_loop(); + + return 1; +} + +int smlua_func_bhv_bobomb_fuse_smoke_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bobomb_fuse_smoke_init", 0, top); + return 0; + } + + + bhv_bobomb_fuse_smoke_init(); + + return 1; +} + +int smlua_func_bhv_bobomb_buddy_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bobomb_buddy_init", 0, top); + return 0; + } + + + bhv_bobomb_buddy_init(); + + return 1; +} + +int smlua_func_bhv_bobomb_buddy_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bobomb_buddy_loop", 0, top); + return 0; + } + + + bhv_bobomb_buddy_loop(); + + return 1; +} + +int smlua_func_bhv_cannon_closed_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_cannon_closed_init", 0, top); + return 0; + } + + + bhv_cannon_closed_init(); + + return 1; +} + +int smlua_func_bhv_cannon_closed_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_cannon_closed_loop", 0, top); + return 0; + } + + + bhv_cannon_closed_loop(); + + return 1; +} + +int smlua_func_bhv_whirlpool_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_whirlpool_init", 0, top); + return 0; + } + + + bhv_whirlpool_init(); + + return 1; +} + +int smlua_func_bhv_whirlpool_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_whirlpool_loop", 0, top); + return 0; + } + + + bhv_whirlpool_loop(); + + return 1; +} + +int smlua_func_bhv_jet_stream_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_jet_stream_loop", 0, top); + return 0; + } + + + bhv_jet_stream_loop(); + + return 1; +} + +int smlua_func_bhv_homing_amp_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_homing_amp_init", 0, top); + return 0; + } + + + bhv_homing_amp_init(); + + return 1; +} + +int smlua_func_bhv_homing_amp_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_homing_amp_loop", 0, top); + return 0; + } + + + bhv_homing_amp_loop(); + + return 1; +} + +int smlua_func_bhv_circling_amp_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_circling_amp_init", 0, top); + return 0; + } + + + bhv_circling_amp_init(); + + return 1; +} + +int smlua_func_bhv_circling_amp_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_circling_amp_loop", 0, top); + return 0; + } + + + bhv_circling_amp_loop(); + + return 1; +} + +int smlua_func_bhv_butterfly_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_butterfly_init", 0, top); + return 0; + } + + + bhv_butterfly_init(); + + return 1; +} + +int smlua_func_bhv_butterfly_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_butterfly_loop", 0, top); + return 0; + } + + + bhv_butterfly_loop(); + + return 1; +} + +int smlua_func_bhv_hoot_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_hoot_init", 0, top); + return 0; + } + + + bhv_hoot_init(); + + return 1; +} + +int smlua_func_bhv_hoot_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_hoot_loop", 0, top); + return 0; + } + + + bhv_hoot_loop(); + + return 1; +} + +int smlua_func_bhv_beta_holdable_object_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_beta_holdable_object_init", 0, top); + return 0; + } + + + bhv_beta_holdable_object_init(); + + return 1; +} + +int smlua_func_bhv_beta_holdable_object_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_beta_holdable_object_loop", 0, top); + return 0; + } + + + bhv_beta_holdable_object_loop(); return 1; } @@ -5590,468 +5185,802 @@ int smlua_func_bhv_object_water_wave_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_bhv_openable_cage_door_loop(UNUSED lua_State* L) { +int smlua_func_bhv_explosion_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_openable_cage_door_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_explosion_init", 0, top); return 0; } - bhv_openable_cage_door_loop(); + bhv_explosion_init(); return 1; } -int smlua_func_bhv_openable_grill_loop(UNUSED lua_State* L) { +int smlua_func_bhv_explosion_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_openable_grill_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_explosion_loop", 0, top); return 0; } - bhv_openable_grill_loop(); + bhv_explosion_loop(); return 1; } -int smlua_func_bhv_orange_number_init(UNUSED lua_State* L) { +int smlua_func_bhv_bobomb_bully_death_smoke_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_orange_number_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bobomb_bully_death_smoke_init", 0, top); return 0; } - bhv_orange_number_init(); + bhv_bobomb_bully_death_smoke_init(); return 1; } -int smlua_func_bhv_orange_number_loop(UNUSED lua_State* L) { +int smlua_func_bhv_bobomb_explosion_bubble_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_orange_number_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bobomb_explosion_bubble_init", 0, top); return 0; } - bhv_orange_number_loop(); + bhv_bobomb_explosion_bubble_init(); return 1; } -int smlua_func_bhv_particle_init(UNUSED lua_State* L) { +int smlua_func_bhv_bobomb_explosion_bubble_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_particle_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bobomb_explosion_bubble_loop", 0, top); return 0; } - bhv_particle_init(); + bhv_bobomb_explosion_bubble_loop(); return 1; } -int smlua_func_bhv_particle_loop(UNUSED lua_State* L) { +int smlua_func_bhv_respawner_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_particle_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_respawner_loop", 0, top); return 0; } - bhv_particle_loop(); + bhv_respawner_loop(); return 1; } -int smlua_func_bhv_penguin_race_finish_line_update(UNUSED lua_State* L) { +int smlua_func_bhv_small_bully_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_penguin_race_finish_line_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_small_bully_init", 0, top); return 0; } - bhv_penguin_race_finish_line_update(); + bhv_small_bully_init(); return 1; } -int smlua_func_bhv_penguin_race_shortcut_check_update(UNUSED lua_State* L) { +int smlua_func_bhv_bully_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_penguin_race_shortcut_check_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bully_loop", 0, top); return 0; } - bhv_penguin_race_shortcut_check_update(); + bhv_bully_loop(); return 1; } -int smlua_func_bhv_piranha_particle_loop(UNUSED lua_State* L) { +int smlua_func_bhv_big_bully_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_piranha_particle_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_big_bully_init", 0, top); return 0; } - bhv_piranha_particle_loop(); + bhv_big_bully_init(); return 1; } -int smlua_func_bhv_piranha_plant_bubble_loop(UNUSED lua_State* L) { +int smlua_func_bhv_big_bully_with_minions_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_piranha_plant_bubble_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_big_bully_with_minions_init", 0, top); return 0; } - bhv_piranha_plant_bubble_loop(); + bhv_big_bully_with_minions_init(); return 1; } -int smlua_func_bhv_piranha_plant_loop(UNUSED lua_State* L) { +int smlua_func_bhv_big_bully_with_minions_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_piranha_plant_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_big_bully_with_minions_loop", 0, top); return 0; } - bhv_piranha_plant_loop(); + bhv_big_bully_with_minions_loop(); return 1; } -int smlua_func_bhv_piranha_plant_waking_bubbles_loop(UNUSED lua_State* L) { +int smlua_func_bhv_jet_stream_ring_spawner_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_piranha_plant_waking_bubbles_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_jet_stream_ring_spawner_loop", 0, top); return 0; } - bhv_piranha_plant_waking_bubbles_loop(); + bhv_jet_stream_ring_spawner_loop(); return 1; } -int smlua_func_bhv_platform_normals_init(UNUSED lua_State* L) { +int smlua_func_bhv_jet_stream_water_ring_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_platform_normals_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_jet_stream_water_ring_init", 0, top); return 0; } - bhv_platform_normals_init(); + bhv_jet_stream_water_ring_init(); return 1; } -int smlua_func_bhv_platform_on_track_init(UNUSED lua_State* L) { +int smlua_func_bhv_jet_stream_water_ring_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_platform_on_track_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_jet_stream_water_ring_loop", 0, top); return 0; } - bhv_platform_on_track_init(); + bhv_jet_stream_water_ring_loop(); return 1; } -int smlua_func_bhv_platform_on_track_update(UNUSED lua_State* L) { +int smlua_func_bhv_manta_ray_water_ring_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_platform_on_track_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_manta_ray_water_ring_init", 0, top); return 0; } - bhv_platform_on_track_update(); + bhv_manta_ray_water_ring_init(); return 1; } -#ifndef VERSION_JP -int smlua_func_bhv_play_music_track_when_touched_loop(UNUSED lua_State* L) { +int smlua_func_bhv_manta_ray_water_ring_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_play_music_track_when_touched_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_manta_ray_water_ring_loop", 0, top); return 0; } - bhv_play_music_track_when_touched_loop(); - - return 1; -} -#endif - -int smlua_func_bhv_point_light_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_point_light_init", 0, top); - return 0; - } - - - bhv_point_light_init(); + bhv_manta_ray_water_ring_loop(); return 1; } -int smlua_func_bhv_point_light_loop(UNUSED lua_State* L) { +int smlua_func_bhv_bowser_bomb_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_point_light_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bowser_bomb_loop", 0, top); return 0; } - bhv_point_light_loop(); + bhv_bowser_bomb_loop(); return 1; } -int smlua_func_bhv_pokey_body_part_update(UNUSED lua_State* L) { +int smlua_func_bhv_bowser_bomb_explosion_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_pokey_body_part_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bowser_bomb_explosion_loop", 0, top); return 0; } - bhv_pokey_body_part_update(); + bhv_bowser_bomb_explosion_loop(); return 1; } -int smlua_func_bhv_pokey_update(UNUSED lua_State* L) { +int smlua_func_bhv_bowser_bomb_smoke_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_pokey_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bowser_bomb_smoke_loop", 0, top); return 0; } - bhv_pokey_update(); + bhv_bowser_bomb_smoke_loop(); return 1; } -int smlua_func_bhv_pole_base_loop(UNUSED lua_State* L) { +int smlua_func_bhv_celebration_star_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_pole_base_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_celebration_star_init", 0, top); return 0; } - bhv_pole_base_loop(); + bhv_celebration_star_init(); return 1; } -int smlua_func_bhv_pole_init(UNUSED lua_State* L) { +int smlua_func_bhv_celebration_star_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_pole_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_celebration_star_loop", 0, top); return 0; } - bhv_pole_init(); + bhv_celebration_star_loop(); return 1; } -int smlua_func_bhv_pound_tiny_star_particle_init(UNUSED lua_State* L) { +int smlua_func_bhv_celebration_star_sparkle_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_pound_tiny_star_particle_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_celebration_star_sparkle_loop", 0, top); return 0; } - bhv_pound_tiny_star_particle_init(); + bhv_celebration_star_sparkle_loop(); return 1; } -int smlua_func_bhv_pound_tiny_star_particle_loop(UNUSED lua_State* L) { +int smlua_func_bhv_star_key_collection_puff_spawner_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_pound_tiny_star_particle_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_star_key_collection_puff_spawner_loop", 0, top); return 0; } - bhv_pound_tiny_star_particle_loop(); + bhv_star_key_collection_puff_spawner_loop(); return 1; } -int smlua_func_bhv_pound_white_puffs_init(UNUSED lua_State* L) { +int smlua_func_bhv_lll_drawbridge_spawner_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_pound_white_puffs_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_lll_drawbridge_spawner_init", 0, top); return 0; } - bhv_pound_white_puffs_init(); + bhv_lll_drawbridge_spawner_init(); return 1; } -int smlua_func_bhv_punch_tiny_triangle_init(UNUSED lua_State* L) { +int smlua_func_bhv_lll_drawbridge_spawner_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_punch_tiny_triangle_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_lll_drawbridge_spawner_loop", 0, top); return 0; } - bhv_punch_tiny_triangle_init(); + bhv_lll_drawbridge_spawner_loop(); return 1; } -int smlua_func_bhv_punch_tiny_triangle_loop(UNUSED lua_State* L) { +int smlua_func_bhv_lll_drawbridge_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_punch_tiny_triangle_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_lll_drawbridge_loop", 0, top); return 0; } - bhv_punch_tiny_triangle_loop(); + bhv_lll_drawbridge_loop(); return 1; } -int smlua_func_bhv_purple_switch_loop(UNUSED lua_State* L) { +int smlua_func_bhv_small_bomp_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_purple_switch_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_small_bomp_init", 0, top); return 0; } - bhv_purple_switch_loop(); + bhv_small_bomp_init(); return 1; } -int smlua_func_bhv_pushable_loop(UNUSED lua_State* L) { +int smlua_func_bhv_small_bomp_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_pushable_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_small_bomp_loop", 0, top); return 0; } - bhv_pushable_loop(); + bhv_small_bomp_loop(); + + return 1; +} + +int smlua_func_bhv_large_bomp_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_large_bomp_init", 0, top); + return 0; + } + + + bhv_large_bomp_init(); + + return 1; +} + +int smlua_func_bhv_large_bomp_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_large_bomp_loop", 0, top); + return 0; + } + + + bhv_large_bomp_loop(); + + return 1; +} + +int smlua_func_bhv_wf_sliding_platform_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_wf_sliding_platform_init", 0, top); + return 0; + } + + + bhv_wf_sliding_platform_init(); + + return 1; +} + +int smlua_func_bhv_wf_sliding_platform_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_wf_sliding_platform_loop", 0, top); + return 0; + } + + + bhv_wf_sliding_platform_loop(); + + return 1; +} + +int smlua_func_bhv_moneybag_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_moneybag_init", 0, top); + return 0; + } + + + bhv_moneybag_init(); + + return 1; +} + +int smlua_func_bhv_moneybag_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_moneybag_loop", 0, top); + return 0; + } + + + bhv_moneybag_loop(); + + return 1; +} + +int smlua_func_bhv_moneybag_hidden_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_moneybag_hidden_loop", 0, top); + return 0; + } + + + bhv_moneybag_hidden_loop(); + + return 1; +} + +int smlua_func_bhv_bob_pit_bowling_ball_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bob_pit_bowling_ball_init", 0, top); + return 0; + } + + + bhv_bob_pit_bowling_ball_init(); + + return 1; +} + +int smlua_func_bhv_bob_pit_bowling_ball_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bob_pit_bowling_ball_loop", 0, top); + return 0; + } + + + bhv_bob_pit_bowling_ball_loop(); + + return 1; +} + +int smlua_func_bhv_free_bowling_ball_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_free_bowling_ball_init", 0, top); + return 0; + } + + + bhv_free_bowling_ball_init(); + + return 1; +} + +int smlua_func_bhv_free_bowling_ball_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_free_bowling_ball_loop", 0, top); + return 0; + } + + + bhv_free_bowling_ball_loop(); + + return 1; +} + +int smlua_func_bhv_bowling_ball_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bowling_ball_init", 0, top); + return 0; + } + + + bhv_bowling_ball_init(); + + return 1; +} + +int smlua_func_bhv_bowling_ball_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bowling_ball_loop", 0, top); + return 0; + } + + + bhv_bowling_ball_loop(); + + return 1; +} + +int smlua_func_bhv_generic_bowling_ball_spawner_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_generic_bowling_ball_spawner_init", 0, top); + return 0; + } + + + bhv_generic_bowling_ball_spawner_init(); + + return 1; +} + +int smlua_func_bhv_generic_bowling_ball_spawner_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_generic_bowling_ball_spawner_loop", 0, top); + return 0; + } + + + bhv_generic_bowling_ball_spawner_loop(); + + return 1; +} + +int smlua_func_bhv_thi_bowling_ball_spawner_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_thi_bowling_ball_spawner_loop", 0, top); + return 0; + } + + + bhv_thi_bowling_ball_spawner_loop(); + + return 1; +} + +int smlua_func_bhv_rr_cruiser_wing_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_rr_cruiser_wing_init", 0, top); + return 0; + } + + + bhv_rr_cruiser_wing_init(); + + return 1; +} + +int smlua_func_bhv_rr_cruiser_wing_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_rr_cruiser_wing_loop", 0, top); + return 0; + } + + + bhv_rr_cruiser_wing_loop(); + + return 1; +} + +int smlua_func_bhv_spindel_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_spindel_init", 0, top); + return 0; + } + + + bhv_spindel_init(); + + return 1; +} + +int smlua_func_bhv_spindel_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_spindel_loop", 0, top); + return 0; + } + + + bhv_spindel_loop(); + + return 1; +} + +int smlua_func_bhv_ssl_moving_pyramid_wall_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_ssl_moving_pyramid_wall_init", 0, top); + return 0; + } + + + bhv_ssl_moving_pyramid_wall_init(); + + return 1; +} + +int smlua_func_bhv_ssl_moving_pyramid_wall_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_ssl_moving_pyramid_wall_loop", 0, top); + return 0; + } + + + bhv_ssl_moving_pyramid_wall_loop(); return 1; } @@ -6104,18 +6033,34 @@ int smlua_func_bhv_pyramid_elevator_trajectory_marker_ball_loop(UNUSED lua_State return 1; } -int smlua_func_bhv_pyramid_pillar_touch_detector_loop(UNUSED lua_State* L) { +int smlua_func_bhv_pyramid_top_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_pyramid_pillar_touch_detector_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_pyramid_top_init", 0, top); return 0; } - bhv_pyramid_pillar_touch_detector_loop(); + bhv_pyramid_top_init(); + + return 1; +} + +int smlua_func_bhv_pyramid_top_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_pyramid_top_loop", 0, top); + return 0; + } + + + bhv_pyramid_top_loop(); return 1; } @@ -6152,290 +6097,98 @@ int smlua_func_bhv_pyramid_top_fragment_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_bhv_pyramid_top_init(UNUSED lua_State* L) { +int smlua_func_bhv_pyramid_pillar_touch_detector_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_pyramid_top_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_pyramid_pillar_touch_detector_loop", 0, top); return 0; } - bhv_pyramid_top_init(); + bhv_pyramid_pillar_touch_detector_loop(); return 1; } -int smlua_func_bhv_pyramid_top_loop(UNUSED lua_State* L) { +int smlua_func_bhv_waterfall_sound_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_pyramid_top_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_waterfall_sound_loop", 0, top); return 0; } - bhv_pyramid_top_loop(); + bhv_waterfall_sound_loop(); return 1; } -int smlua_func_bhv_racing_penguin_init(UNUSED lua_State* L) { +int smlua_func_bhv_volcano_sound_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_racing_penguin_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_volcano_sound_loop", 0, top); return 0; } - bhv_racing_penguin_init(); + bhv_volcano_sound_loop(); return 1; } -int smlua_func_bhv_racing_penguin_update(UNUSED lua_State* L) { +int smlua_func_bhv_castle_flag_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_racing_penguin_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_castle_flag_init", 0, top); return 0; } - bhv_racing_penguin_update(); + bhv_castle_flag_init(); return 1; } -int smlua_func_bhv_recovery_heart_loop(UNUSED lua_State* L) { +int smlua_func_bhv_birds_sound_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_recovery_heart_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_birds_sound_loop", 0, top); return 0; } - bhv_recovery_heart_loop(); + bhv_birds_sound_loop(); return 1; } -int smlua_func_bhv_red_coin_init(UNUSED lua_State* L) { +int smlua_func_bhv_ambient_sounds_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_red_coin_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ambient_sounds_init", 0, top); return 0; } - bhv_red_coin_init(); - - return 1; -} - -int smlua_func_bhv_red_coin_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_red_coin_loop", 0, top); - return 0; - } - - - bhv_red_coin_loop(); - - return 1; -} - -int smlua_func_bhv_red_coin_star_marker_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_red_coin_star_marker_init", 0, top); - return 0; - } - - - bhv_red_coin_star_marker_init(); - - return 1; -} - -int smlua_func_bhv_respawner_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_respawner_loop", 0, top); - return 0; - } - - - bhv_respawner_loop(); - - return 1; -} - -int smlua_func_bhv_rolling_log_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_rolling_log_loop", 0, top); - return 0; - } - - - bhv_rolling_log_loop(); - - return 1; -} - -int smlua_func_bhv_rotating_clock_arm_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_rotating_clock_arm_loop", 0, top); - return 0; - } - - - bhv_rotating_clock_arm_loop(); - - return 1; -} - -int smlua_func_bhv_rotating_exclamation_box_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_rotating_exclamation_box_loop", 0, top); - return 0; - } - - - bhv_rotating_exclamation_box_loop(); - - return 1; -} - -int smlua_func_bhv_rotating_octagonal_plat_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_rotating_octagonal_plat_init", 0, top); - return 0; - } - - - bhv_rotating_octagonal_plat_init(); - - return 1; -} - -int smlua_func_bhv_rotating_octagonal_plat_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_rotating_octagonal_plat_loop", 0, top); - return 0; - } - - - bhv_rotating_octagonal_plat_loop(); - - return 1; -} - -int smlua_func_bhv_rotating_platform_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_rotating_platform_loop", 0, top); - return 0; - } - - - bhv_rotating_platform_loop(); - - return 1; -} - -int smlua_func_bhv_rr_cruiser_wing_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_rr_cruiser_wing_init", 0, top); - return 0; - } - - - bhv_rr_cruiser_wing_init(); - - return 1; -} - -int smlua_func_bhv_rr_cruiser_wing_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_rr_cruiser_wing_loop", 0, top); - return 0; - } - - - bhv_rr_cruiser_wing_loop(); - - return 1; -} - -int smlua_func_bhv_rr_rotating_bridge_platform_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_rr_rotating_bridge_platform_loop", 0, top); - return 0; - } - - - bhv_rr_rotating_bridge_platform_loop(); + bhv_ambient_sounds_init(); return 1; } @@ -6456,402 +6209,18 @@ int smlua_func_bhv_sand_sound_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_bhv_scuttlebug_loop(UNUSED lua_State* L) { +int smlua_func_bhv_castle_cannon_grate_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_scuttlebug_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_castle_cannon_grate_init", 0, top); return 0; } - bhv_scuttlebug_loop(); - - return 1; -} - -int smlua_func_bhv_scuttlebug_spawn_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_scuttlebug_spawn_loop", 0, top); - return 0; - } - - - bhv_scuttlebug_spawn_loop(); - - return 1; -} - -int smlua_func_bhv_seaweed_bundle_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_seaweed_bundle_init", 0, top); - return 0; - } - - - bhv_seaweed_bundle_init(); - - return 1; -} - -int smlua_func_bhv_seaweed_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_seaweed_init", 0, top); - return 0; - } - - - bhv_seaweed_init(); - - return 1; -} - -int smlua_func_bhv_seesaw_platform_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_seesaw_platform_init", 0, top); - return 0; - } - - - bhv_seesaw_platform_init(); - - return 1; -} - -int smlua_func_bhv_seesaw_platform_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_seesaw_platform_update", 0, top); - return 0; - } - - - bhv_seesaw_platform_update(); - - return 1; -} - -int smlua_func_bhv_shallow_water_splash_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_shallow_water_splash_init", 0, top); - return 0; - } - - - bhv_shallow_water_splash_init(); - - return 1; -} - -int smlua_func_bhv_ship_part_3_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_ship_part_3_loop", 0, top); - return 0; - } - - - bhv_ship_part_3_loop(); - - return 1; -} - -int smlua_func_bhv_skeeter_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_skeeter_update", 0, top); - return 0; - } - - - bhv_skeeter_update(); - - return 1; -} - -int smlua_func_bhv_skeeter_wave_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_skeeter_wave_update", 0, top); - return 0; - } - - - bhv_skeeter_wave_update(); - - return 1; -} - -int smlua_func_bhv_sl_snowman_wind_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_sl_snowman_wind_loop", 0, top); - return 0; - } - - - bhv_sl_snowman_wind_loop(); - - return 1; -} - -int smlua_func_bhv_sl_walking_penguin_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_sl_walking_penguin_loop", 0, top); - return 0; - } - - - bhv_sl_walking_penguin_loop(); - - return 1; -} - -int smlua_func_bhv_sliding_plat_2_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_sliding_plat_2_init", 0, top); - return 0; - } - - - bhv_sliding_plat_2_init(); - - return 1; -} - -int smlua_func_bhv_sliding_plat_2_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_sliding_plat_2_loop", 0, top); - return 0; - } - - - bhv_sliding_plat_2_loop(); - - return 1; -} - -int smlua_func_bhv_sliding_snow_mound_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_sliding_snow_mound_loop", 0, top); - return 0; - } - - - bhv_sliding_snow_mound_loop(); - - return 1; -} - -int smlua_func_bhv_small_bomp_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_small_bomp_init", 0, top); - return 0; - } - - - bhv_small_bomp_init(); - - return 1; -} - -int smlua_func_bhv_small_bomp_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_small_bomp_loop", 0, top); - return 0; - } - - - bhv_small_bomp_loop(); - - return 1; -} - -int smlua_func_bhv_small_bubbles_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_small_bubbles_loop", 0, top); - return 0; - } - - - bhv_small_bubbles_loop(); - - return 1; -} - -int smlua_func_bhv_small_bully_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_small_bully_init", 0, top); - return 0; - } - - - bhv_small_bully_init(); - - return 1; -} - -int smlua_func_bhv_small_penguin_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_small_penguin_loop", 0, top); - return 0; - } - - - bhv_small_penguin_loop(); - - return 1; -} - -int smlua_func_bhv_small_piranha_flame_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_small_piranha_flame_loop", 0, top); - return 0; - } - - - bhv_small_piranha_flame_loop(); - - return 1; -} - -int smlua_func_bhv_small_water_wave_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_small_water_wave_loop", 0, top); - return 0; - } - - - bhv_small_water_wave_loop(); - - return 1; -} - -int smlua_func_bhv_snow_leaf_particle_spawn_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_snow_leaf_particle_spawn_init", 0, top); - return 0; - } - - - bhv_snow_leaf_particle_spawn_init(); - - return 1; -} - -int smlua_func_bhv_snow_mound_spawn_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_snow_mound_spawn_loop", 0, top); - return 0; - } - - - bhv_snow_mound_spawn_loop(); - - return 1; -} - -int smlua_func_bhv_snowmans_body_checkpoint_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_snowmans_body_checkpoint_loop", 0, top); - return 0; - } - - - bhv_snowmans_body_checkpoint_loop(); + bhv_castle_cannon_grate_init(); return 1; } @@ -6920,329 +6289,178 @@ int smlua_func_bhv_snowmans_head_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_bhv_snufit_balls_loop(UNUSED lua_State* L) { +int smlua_func_bhv_snowmans_body_checkpoint_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_snufit_balls_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_snowmans_body_checkpoint_loop", 0, top); return 0; } - bhv_snufit_balls_loop(); + bhv_snowmans_body_checkpoint_loop(); return 1; } -int smlua_func_bhv_snufit_loop(UNUSED lua_State* L) { +int smlua_func_bhv_big_boulder_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_snufit_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_big_boulder_init", 0, top); return 0; } - bhv_snufit_loop(); + bhv_big_boulder_init(); return 1; } -int smlua_func_bhv_sound_spawner_init(UNUSED lua_State* L) { +int smlua_func_bhv_big_boulder_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_sound_spawner_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_big_boulder_loop", 0, top); return 0; } - bhv_sound_spawner_init(); + bhv_big_boulder_loop(); return 1; } -int smlua_func_bhv_sparkle_spawn_loop(UNUSED lua_State* L) { +int smlua_func_bhv_big_boulder_generator_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_sparkle_spawn_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_big_boulder_generator_loop", 0, top); return 0; } - bhv_sparkle_spawn_loop(); + bhv_big_boulder_generator_loop(); return 1; } -int smlua_func_bhv_spawn_star_no_level_exit(lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_spawn_star_no_level_exit", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* object = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "bhv_spawn_star_no_level_exit"); return 0; } - u32 params = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "bhv_spawn_star_no_level_exit"); return 0; } - u8 networkSendEvent = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "bhv_spawn_star_no_level_exit"); return 0; } - - bhv_spawn_star_no_level_exit(object, params, networkSendEvent); - - return 1; -} - -int smlua_func_bhv_spawned_star_init(UNUSED lua_State* L) { +int smlua_func_bhv_wing_cap_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_spawned_star_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_wing_cap_init", 0, top); return 0; } - bhv_spawned_star_init(); + bhv_wing_cap_init(); return 1; } -int smlua_func_bhv_spawned_star_loop(UNUSED lua_State* L) { +int smlua_func_bhv_wing_vanish_cap_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_spawned_star_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_wing_vanish_cap_loop", 0, top); return 0; } - bhv_spawned_star_loop(); + bhv_wing_vanish_cap_loop(); return 1; } -int smlua_func_bhv_spindel_init(UNUSED lua_State* L) { +int smlua_func_bhv_metal_cap_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_spindel_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_metal_cap_init", 0, top); return 0; } - bhv_spindel_init(); + bhv_metal_cap_init(); return 1; } -int smlua_func_bhv_spindel_loop(UNUSED lua_State* L) { +int smlua_func_bhv_metal_cap_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_spindel_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_metal_cap_loop", 0, top); return 0; } - bhv_spindel_loop(); + bhv_metal_cap_loop(); return 1; } -int smlua_func_bhv_spindrift_loop(UNUSED lua_State* L) { +int smlua_func_bhv_normal_cap_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_spindrift_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_normal_cap_init", 0, top); return 0; } - bhv_spindrift_loop(); + bhv_normal_cap_init(); return 1; } -int smlua_func_bhv_spiny_update(UNUSED lua_State* L) { +int smlua_func_bhv_normal_cap_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_spiny_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_normal_cap_loop", 0, top); return 0; } - bhv_spiny_update(); + bhv_normal_cap_loop(); return 1; } -int smlua_func_bhv_squarish_path_moving_loop(UNUSED lua_State* L) { +int smlua_func_bhv_vanish_cap_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_squarish_path_moving_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_vanish_cap_init", 0, top); return 0; } - bhv_squarish_path_moving_loop(); - - return 1; -} - -int smlua_func_bhv_squarish_path_parent_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_squarish_path_parent_init", 0, top); - return 0; - } - - - bhv_squarish_path_parent_init(); - - return 1; -} - -int smlua_func_bhv_squarish_path_parent_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_squarish_path_parent_loop", 0, top); - return 0; - } - - - bhv_squarish_path_parent_loop(); - - return 1; -} - -int smlua_func_bhv_squishable_platform_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_squishable_platform_loop", 0, top); - return 0; - } - - - bhv_squishable_platform_loop(); - - return 1; -} - -int smlua_func_bhv_ssl_moving_pyramid_wall_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_ssl_moving_pyramid_wall_init", 0, top); - return 0; - } - - - bhv_ssl_moving_pyramid_wall_init(); - - return 1; -} - -int smlua_func_bhv_ssl_moving_pyramid_wall_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_ssl_moving_pyramid_wall_loop", 0, top); - return 0; - } - - - bhv_ssl_moving_pyramid_wall_loop(); - - return 1; -} - -int smlua_func_bhv_star_door_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_star_door_loop", 0, top); - return 0; - } - - - bhv_star_door_loop(); - - return 1; -} - -int smlua_func_bhv_star_door_loop_2(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_star_door_loop_2", 0, top); - return 0; - } - - - bhv_star_door_loop_2(); - - return 1; -} - -int smlua_func_bhv_star_key_collection_puff_spawner_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_star_key_collection_puff_spawner_loop", 0, top); - return 0; - } - - - bhv_star_key_collection_puff_spawner_loop(); + bhv_vanish_cap_init(); return 1; } @@ -7263,6 +6481,53 @@ int smlua_func_bhv_star_number_loop(UNUSED lua_State* L) { return 1; } +int smlua_func_spawn_star_number(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", "spawn_star_number", 0, top); + return 0; + } + + + spawn_star_number(); + + return 1; +} + +int smlua_func_bhv_collect_star_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_collect_star_init", 0, top); + return 0; + } + + + bhv_collect_star_init(); + + return 1; +} + +int smlua_func_bhv_collect_star_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_collect_star_loop", 0, top); + return 0; + } + + + bhv_collect_star_loop(); + + return 1; +} + int smlua_func_bhv_star_spawn_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } if (L == NULL) { return 0; } @@ -7295,434 +6560,690 @@ int smlua_func_bhv_star_spawn_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_bhv_static_checkered_platform_loop(UNUSED lua_State* L) { +int smlua_func_bhv_hidden_red_coin_star_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_static_checkered_platform_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_hidden_red_coin_star_init", 0, top); return 0; } - bhv_static_checkered_platform_loop(); + bhv_hidden_red_coin_star_init(); return 1; } -int smlua_func_bhv_strong_wind_particle_loop(UNUSED lua_State* L) { +int smlua_func_bhv_hidden_red_coin_star_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_strong_wind_particle_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_hidden_red_coin_star_loop", 0, top); return 0; } - bhv_strong_wind_particle_loop(); + bhv_hidden_red_coin_star_loop(); return 1; } -int smlua_func_bhv_sunken_ship_part_loop(UNUSED lua_State* L) { +int smlua_func_bhv_red_coin_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_sunken_ship_part_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_red_coin_init", 0, top); return 0; } - bhv_sunken_ship_part_loop(); + bhv_red_coin_init(); return 1; } -int smlua_func_bhv_sushi_shark_collision_loop(UNUSED lua_State* L) { +int smlua_func_bhv_red_coin_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_sushi_shark_collision_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_red_coin_loop", 0, top); return 0; } - bhv_sushi_shark_collision_loop(); + bhv_red_coin_loop(); return 1; } -int smlua_func_bhv_sushi_shark_loop(UNUSED lua_State* L) { +int smlua_func_bhv_bowser_course_red_coin_star_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_sushi_shark_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bowser_course_red_coin_star_loop", 0, top); return 0; } - bhv_sushi_shark_loop(); + bhv_bowser_course_red_coin_star_loop(); return 1; } -int smlua_func_bhv_swing_platform_init(UNUSED lua_State* L) { +int smlua_func_bhv_hidden_star_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_swing_platform_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_hidden_star_init", 0, top); return 0; } - bhv_swing_platform_init(); + bhv_hidden_star_init(); return 1; } -int smlua_func_bhv_swing_platform_update(UNUSED lua_State* L) { +int smlua_func_bhv_hidden_star_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_swing_platform_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_hidden_star_loop", 0, top); return 0; } - bhv_swing_platform_update(); + bhv_hidden_star_loop(); return 1; } -int smlua_func_bhv_swoop_update(UNUSED lua_State* L) { +int smlua_func_bhv_hidden_star_trigger_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_swoop_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_hidden_star_trigger_loop", 0, top); return 0; } - bhv_swoop_update(); + bhv_hidden_star_trigger_loop(); return 1; } -int smlua_func_bhv_tank_fish_group_loop(UNUSED lua_State* L) { +int smlua_func_bhv_ttm_rolling_log_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_tank_fish_group_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ttm_rolling_log_init", 0, top); return 0; } - bhv_tank_fish_group_loop(); + bhv_ttm_rolling_log_init(); return 1; } -int smlua_func_bhv_temp_coin_loop(UNUSED lua_State* L) { +int smlua_func_bhv_rolling_log_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_temp_coin_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_rolling_log_loop", 0, top); return 0; } - bhv_temp_coin_loop(); + bhv_rolling_log_loop(); return 1; } -int smlua_func_bhv_thi_bowling_ball_spawner_loop(UNUSED lua_State* L) { +int smlua_func_bhv_lll_rolling_log_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_thi_bowling_ball_spawner_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_lll_rolling_log_init", 0, top); return 0; } - bhv_thi_bowling_ball_spawner_loop(); + bhv_lll_rolling_log_init(); return 1; } -int smlua_func_bhv_thi_huge_island_top_loop(UNUSED lua_State* L) { +int smlua_func_bhv_1up_trigger_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_thi_huge_island_top_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_1up_trigger_init", 0, top); return 0; } - bhv_thi_huge_island_top_loop(); + bhv_1up_trigger_init(); return 1; } -int smlua_func_bhv_thi_tiny_island_top_loop(UNUSED lua_State* L) { +int smlua_func_bhv_1up_common_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_thi_tiny_island_top_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_1up_common_init", 0, top); return 0; } - bhv_thi_tiny_island_top_loop(); + bhv_1up_common_init(); return 1; } -int smlua_func_bhv_tilting_bowser_lava_platform_init(UNUSED lua_State* L) { +int smlua_func_bhv_1up_walking_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_tilting_bowser_lava_platform_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_1up_walking_loop", 0, top); return 0; } - bhv_tilting_bowser_lava_platform_init(); + bhv_1up_walking_loop(); return 1; } -int smlua_func_bhv_tilting_inverted_pyramid_loop(UNUSED lua_State* L) { +int smlua_func_bhv_1up_running_away_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_tilting_inverted_pyramid_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_1up_running_away_loop", 0, top); return 0; } - bhv_tilting_inverted_pyramid_loop(); + bhv_1up_running_away_loop(); return 1; } -int smlua_func_bhv_tiny_star_particles_init(UNUSED lua_State* L) { +int smlua_func_bhv_1up_sliding_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_tiny_star_particles_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_1up_sliding_loop", 0, top); return 0; } - bhv_tiny_star_particles_init(); + bhv_1up_sliding_loop(); return 1; } -int smlua_func_bhv_tower_door_loop(UNUSED lua_State* L) { +int smlua_func_bhv_1up_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_tower_door_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_1up_init", 0, top); return 0; } - bhv_tower_door_loop(); + bhv_1up_init(); return 1; } -int smlua_func_bhv_tower_platform_group_init(UNUSED lua_State* L) { +int smlua_func_bhv_1up_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_tower_platform_group_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_1up_loop", 0, top); return 0; } - bhv_tower_platform_group_init(); + bhv_1up_loop(); return 1; } -int smlua_func_bhv_tower_platform_group_loop(UNUSED lua_State* L) { +int smlua_func_bhv_1up_jump_on_approach_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_tower_platform_group_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_1up_jump_on_approach_loop", 0, top); return 0; } - bhv_tower_platform_group_loop(); + bhv_1up_jump_on_approach_loop(); return 1; } -int smlua_func_bhv_tox_box_loop(UNUSED lua_State* L) { +int smlua_func_bhv_1up_hidden_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_tox_box_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_1up_hidden_loop", 0, top); return 0; } - bhv_tox_box_loop(); + bhv_1up_hidden_loop(); return 1; } -int smlua_func_bhv_track_ball_update(UNUSED lua_State* L) { +int smlua_func_bhv_1up_hidden_trigger_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_track_ball_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_1up_hidden_trigger_loop", 0, top); return 0; } - bhv_track_ball_update(); + bhv_1up_hidden_trigger_loop(); return 1; } -int smlua_func_bhv_treasure_chest_bottom_init(UNUSED lua_State* L) { +int smlua_func_bhv_1up_hidden_in_pole_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_treasure_chest_bottom_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_1up_hidden_in_pole_loop", 0, top); return 0; } - bhv_treasure_chest_bottom_init(); + bhv_1up_hidden_in_pole_loop(); return 1; } -int smlua_func_bhv_treasure_chest_bottom_loop(UNUSED lua_State* L) { +int smlua_func_bhv_1up_hidden_in_pole_trigger_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_treasure_chest_bottom_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_1up_hidden_in_pole_trigger_loop", 0, top); return 0; } - bhv_treasure_chest_bottom_loop(); + bhv_1up_hidden_in_pole_trigger_loop(); return 1; } -int smlua_func_bhv_treasure_chest_init(UNUSED lua_State* L) { +int smlua_func_bhv_1up_hidden_in_pole_spawner_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_treasure_chest_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_1up_hidden_in_pole_spawner_loop", 0, top); return 0; } - bhv_treasure_chest_init(); + bhv_1up_hidden_in_pole_spawner_loop(); return 1; } -int smlua_func_bhv_treasure_chest_jrb_init(UNUSED lua_State* L) { +int smlua_func_bhv_controllable_platform_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_treasure_chest_jrb_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_controllable_platform_init", 0, top); return 0; } - bhv_treasure_chest_jrb_init(); + bhv_controllable_platform_init(); return 1; } -int smlua_func_bhv_treasure_chest_jrb_loop(UNUSED lua_State* L) { +int smlua_func_bhv_controllable_platform_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_treasure_chest_jrb_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_controllable_platform_loop", 0, top); return 0; } - bhv_treasure_chest_jrb_loop(); + bhv_controllable_platform_loop(); return 1; } -int smlua_func_bhv_treasure_chest_loop(UNUSED lua_State* L) { +int smlua_func_bhv_controllable_platform_sub_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_treasure_chest_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_controllable_platform_sub_loop", 0, top); return 0; } - bhv_treasure_chest_loop(); + bhv_controllable_platform_sub_loop(); + + return 1; +} + +int smlua_func_bhv_breakable_box_small_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_breakable_box_small_init", 0, top); + return 0; + } + + + bhv_breakable_box_small_init(); + + return 1; +} + +int smlua_func_bhv_breakable_box_small_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_breakable_box_small_loop", 0, top); + return 0; + } + + + bhv_breakable_box_small_loop(); + + return 1; +} + +int smlua_func_bhv_sliding_snow_mound_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_sliding_snow_mound_loop", 0, top); + return 0; + } + + + bhv_sliding_snow_mound_loop(); + + return 1; +} + +int smlua_func_bhv_snow_mound_spawn_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_snow_mound_spawn_loop", 0, top); + return 0; + } + + + bhv_snow_mound_spawn_loop(); + + return 1; +} + +int smlua_func_bhv_floating_platform_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_floating_platform_loop", 0, top); + return 0; + } + + + bhv_floating_platform_loop(); + + return 1; +} + +int smlua_func_bhv_arrow_lift_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_arrow_lift_loop", 0, top); + return 0; + } + + + bhv_arrow_lift_loop(); + + return 1; +} + +int smlua_func_bhv_orange_number_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_orange_number_init", 0, top); + return 0; + } + + + bhv_orange_number_init(); + + return 1; +} + +int smlua_func_bhv_orange_number_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_orange_number_loop", 0, top); + return 0; + } + + + bhv_orange_number_loop(); + + return 1; +} + +int smlua_func_bhv_manta_ray_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_manta_ray_init", 0, top); + return 0; + } + + + bhv_manta_ray_init(); + + return 1; +} + +int smlua_func_bhv_manta_ray_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_manta_ray_loop", 0, top); + return 0; + } + + + bhv_manta_ray_loop(); + + return 1; +} + +int smlua_func_bhv_falling_pillar_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_falling_pillar_init", 0, top); + return 0; + } + + + bhv_falling_pillar_init(); + + return 1; +} + +int smlua_func_bhv_falling_pillar_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_falling_pillar_loop", 0, top); + return 0; + } + + + bhv_falling_pillar_loop(); + + return 1; +} + +int smlua_func_bhv_falling_pillar_hitbox_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_falling_pillar_hitbox_loop", 0, top); + return 0; + } + + + bhv_falling_pillar_hitbox_loop(); + + return 1; +} + +int smlua_func_bhv_jrb_floating_box_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_jrb_floating_box_loop", 0, top); + return 0; + } + + + bhv_jrb_floating_box_loop(); + + return 1; +} + +int smlua_func_bhv_decorative_pendulum_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_decorative_pendulum_init", 0, top); + return 0; + } + + + bhv_decorative_pendulum_init(); + + return 1; +} + +int smlua_func_bhv_decorative_pendulum_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_decorative_pendulum_loop", 0, top); + return 0; + } + + + bhv_decorative_pendulum_loop(); return 1; } @@ -7759,6 +7280,102 @@ int smlua_func_bhv_treasure_chest_ship_loop(UNUSED lua_State* L) { return 1; } +int smlua_func_bhv_treasure_chest_jrb_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_treasure_chest_jrb_init", 0, top); + return 0; + } + + + bhv_treasure_chest_jrb_init(); + + return 1; +} + +int smlua_func_bhv_treasure_chest_jrb_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_treasure_chest_jrb_loop", 0, top); + return 0; + } + + + bhv_treasure_chest_jrb_loop(); + + return 1; +} + +int smlua_func_bhv_treasure_chest_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_treasure_chest_init", 0, top); + return 0; + } + + + bhv_treasure_chest_init(); + + return 1; +} + +int smlua_func_bhv_treasure_chest_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_treasure_chest_loop", 0, top); + return 0; + } + + + bhv_treasure_chest_loop(); + + return 1; +} + +int smlua_func_bhv_treasure_chest_bottom_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_treasure_chest_bottom_init", 0, top); + return 0; + } + + + bhv_treasure_chest_bottom_init(); + + return 1; +} + +int smlua_func_bhv_treasure_chest_bottom_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_treasure_chest_bottom_loop", 0, top); + return 0; + } + + + bhv_treasure_chest_bottom_loop(); + + return 1; +} + int smlua_func_bhv_treasure_chest_top_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } if (L == NULL) { return 0; } @@ -7775,226 +7392,658 @@ int smlua_func_bhv_treasure_chest_top_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_bhv_tree_snow_or_leaf_loop(UNUSED lua_State* L) { +int smlua_func_bhv_mips_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_tree_snow_or_leaf_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_mips_init", 0, top); return 0; } - bhv_tree_snow_or_leaf_loop(); + bhv_mips_init(); return 1; } -int smlua_func_bhv_triplet_butterfly_update(UNUSED lua_State* L) { +int smlua_func_bhv_mips_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_triplet_butterfly_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_mips_loop", 0, top); return 0; } - bhv_triplet_butterfly_update(); + bhv_mips_loop(); return 1; } -int smlua_func_bhv_ttc_2d_rotator_init(UNUSED lua_State* L) { +int smlua_func_bhv_yoshi_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ttc_2d_rotator_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_yoshi_init", 0, top); return 0; } - bhv_ttc_2d_rotator_init(); + bhv_yoshi_init(); return 1; } -int smlua_func_bhv_ttc_2d_rotator_update(UNUSED lua_State* L) { +int smlua_func_bhv_koopa_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ttc_2d_rotator_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_koopa_init", 0, top); return 0; } - bhv_ttc_2d_rotator_update(); + bhv_koopa_init(); return 1; } -int smlua_func_bhv_ttc_cog_init(UNUSED lua_State* L) { +int smlua_func_bhv_koopa_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ttc_cog_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_koopa_update", 0, top); return 0; } - bhv_ttc_cog_init(); + bhv_koopa_update(); return 1; } -int smlua_func_bhv_ttc_cog_update(UNUSED lua_State* L) { +int smlua_func_bhv_koopa_race_endpoint_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ttc_cog_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_koopa_race_endpoint_update", 0, top); return 0; } - bhv_ttc_cog_update(); + bhv_koopa_race_endpoint_update(); return 1; } -int smlua_func_bhv_ttc_elevator_init(UNUSED lua_State* L) { +int smlua_func_bhv_pokey_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ttc_elevator_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_pokey_update", 0, top); return 0; } - bhv_ttc_elevator_init(); + bhv_pokey_update(); return 1; } -int smlua_func_bhv_ttc_elevator_update(UNUSED lua_State* L) { +int smlua_func_bhv_pokey_body_part_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ttc_elevator_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_pokey_body_part_update", 0, top); return 0; } - bhv_ttc_elevator_update(); + bhv_pokey_body_part_update(); return 1; } -int smlua_func_bhv_ttc_moving_bar_init(UNUSED lua_State* L) { +int smlua_func_bhv_swoop_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ttc_moving_bar_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_swoop_update", 0, top); return 0; } - bhv_ttc_moving_bar_init(); + bhv_swoop_update(); return 1; } -int smlua_func_bhv_ttc_moving_bar_update(UNUSED lua_State* L) { +int smlua_func_bhv_fly_guy_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ttc_moving_bar_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_fly_guy_update", 0, top); return 0; } - bhv_ttc_moving_bar_update(); + bhv_fly_guy_update(); return 1; } -int smlua_func_bhv_ttc_pendulum_init(UNUSED lua_State* L) { +int smlua_func_bhv_goomba_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ttc_pendulum_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_goomba_init", 0, top); return 0; } - bhv_ttc_pendulum_init(); + bhv_goomba_init(); return 1; } -int smlua_func_bhv_ttc_pendulum_update(UNUSED lua_State* L) { +int smlua_func_bhv_goomba_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ttc_pendulum_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_goomba_update", 0, top); return 0; } - bhv_ttc_pendulum_update(); + bhv_goomba_update(); return 1; } -int smlua_func_bhv_ttc_pit_block_init(UNUSED lua_State* L) { +int smlua_func_bhv_goomba_triplet_spawner_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ttc_pit_block_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_goomba_triplet_spawner_update", 0, top); return 0; } - bhv_ttc_pit_block_init(); + bhv_goomba_triplet_spawner_update(); return 1; } -int smlua_func_bhv_ttc_pit_block_update(UNUSED lua_State* L) { +int smlua_func_bhv_chain_chomp_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ttc_pit_block_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_chain_chomp_update", 0, top); return 0; } - bhv_ttc_pit_block_update(); + bhv_chain_chomp_update(); + + return 1; +} + +int smlua_func_bhv_chain_chomp_chain_part_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_chain_chomp_chain_part_update", 0, top); + return 0; + } + + + bhv_chain_chomp_chain_part_update(); + + return 1; +} + +int smlua_func_bhv_wooden_post_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_wooden_post_update", 0, top); + return 0; + } + + + bhv_wooden_post_update(); + + return 1; +} + +int smlua_func_bhv_chain_chomp_gate_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_chain_chomp_gate_init", 0, top); + return 0; + } + + + bhv_chain_chomp_gate_init(); + + return 1; +} + +int smlua_func_bhv_chain_chomp_gate_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_chain_chomp_gate_update", 0, top); + return 0; + } + + + bhv_chain_chomp_gate_update(); + + return 1; +} + +int smlua_func_bhv_wiggler_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_wiggler_update", 0, top); + return 0; + } + + + bhv_wiggler_update(); + + return 1; +} + +int smlua_func_bhv_wiggler_body_part_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_wiggler_body_part_update", 0, top); + return 0; + } + + + bhv_wiggler_body_part_update(); + + return 1; +} + +int smlua_func_bhv_enemy_lakitu_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_enemy_lakitu_update", 0, top); + return 0; + } + + + bhv_enemy_lakitu_update(); + + return 1; +} + +int smlua_func_bhv_camera_lakitu_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_camera_lakitu_init", 0, top); + return 0; + } + + + bhv_camera_lakitu_init(); + + return 1; +} + +int smlua_func_bhv_camera_lakitu_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_camera_lakitu_update", 0, top); + return 0; + } + + + bhv_camera_lakitu_update(); + + return 1; +} + +int smlua_func_bhv_cloud_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_cloud_update", 0, top); + return 0; + } + + + bhv_cloud_update(); + + return 1; +} + +int smlua_func_bhv_cloud_part_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_cloud_part_update", 0, top); + return 0; + } + + + bhv_cloud_part_update(); + + return 1; +} + +int smlua_func_bhv_spiny_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_spiny_update", 0, top); + return 0; + } + + + bhv_spiny_update(); + + return 1; +} + +int smlua_func_bhv_monty_mole_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_monty_mole_init", 0, top); + return 0; + } + + + bhv_monty_mole_init(); + + return 1; +} + +int smlua_func_bhv_monty_mole_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_monty_mole_update", 0, top); + return 0; + } + + + bhv_monty_mole_update(); + + return 1; +} + +int smlua_func_bhv_monty_mole_hole_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_monty_mole_hole_update", 0, top); + return 0; + } + + + bhv_monty_mole_hole_update(); + + return 1; +} + +int smlua_func_bhv_monty_mole_rock_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_monty_mole_rock_update", 0, top); + return 0; + } + + + bhv_monty_mole_rock_update(); + + return 1; +} + +int smlua_func_bhv_platform_on_track_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_platform_on_track_init", 0, top); + return 0; + } + + + bhv_platform_on_track_init(); + + return 1; +} + +int smlua_func_bhv_platform_on_track_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_platform_on_track_update", 0, top); + return 0; + } + + + bhv_platform_on_track_update(); + + return 1; +} + +int smlua_func_bhv_track_ball_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_track_ball_update", 0, top); + return 0; + } + + + bhv_track_ball_update(); + + return 1; +} + +int smlua_func_bhv_seesaw_platform_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_seesaw_platform_init", 0, top); + return 0; + } + + + bhv_seesaw_platform_init(); + + return 1; +} + +int smlua_func_bhv_seesaw_platform_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_seesaw_platform_update", 0, top); + return 0; + } + + + bhv_seesaw_platform_update(); + + return 1; +} + +int smlua_func_bhv_ferris_wheel_axle_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_ferris_wheel_axle_init", 0, top); + return 0; + } + + + bhv_ferris_wheel_axle_init(); + + return 1; +} + +int smlua_func_bhv_ferris_wheel_platform_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_ferris_wheel_platform_init", 0, top); + return 0; + } + + + bhv_ferris_wheel_platform_init(); + + return 1; +} + +int smlua_func_bhv_ferris_wheel_platform_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_ferris_wheel_platform_update", 0, top); + return 0; + } + + + bhv_ferris_wheel_platform_update(); + + return 1; +} + +int smlua_func_bhv_water_bomb_spawner_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_water_bomb_spawner_update", 0, top); + return 0; + } + + + bhv_water_bomb_spawner_update(); + + return 1; +} + +int smlua_func_bhv_water_bomb_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_water_bomb_update", 0, top); + return 0; + } + + + bhv_water_bomb_update(); + + return 1; +} + +int smlua_func_bhv_water_bomb_shadow_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_water_bomb_shadow_update", 0, top); + return 0; + } + + + bhv_water_bomb_shadow_update(); return 1; } @@ -8031,18 +8080,34 @@ int smlua_func_bhv_ttc_rotating_solid_update(UNUSED lua_State* L) { return 1; } -int smlua_func_bhv_ttc_spinner_update(UNUSED lua_State* L) { +int smlua_func_bhv_ttc_pendulum_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ttc_spinner_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ttc_pendulum_init", 0, top); return 0; } - bhv_ttc_spinner_update(); + bhv_ttc_pendulum_init(); + + return 1; +} + +int smlua_func_bhv_ttc_pendulum_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_ttc_pendulum_update", 0, top); + return 0; + } + + + bhv_ttc_pendulum_update(); return 1; } @@ -8079,162 +8144,402 @@ int smlua_func_bhv_ttc_treadmill_update(UNUSED lua_State* L) { return 1; } -int smlua_func_bhv_ttm_rolling_log_init(UNUSED lua_State* L) { +int smlua_func_bhv_ttc_moving_bar_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ttm_rolling_log_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ttc_moving_bar_init", 0, top); return 0; } - bhv_ttm_rolling_log_init(); + bhv_ttc_moving_bar_init(); return 1; } -int smlua_func_bhv_tumbling_bridge_loop(UNUSED lua_State* L) { +int smlua_func_bhv_ttc_moving_bar_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_tumbling_bridge_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ttc_moving_bar_update", 0, top); return 0; } - bhv_tumbling_bridge_loop(); + bhv_ttc_moving_bar_update(); return 1; } -int smlua_func_bhv_tumbling_bridge_platform_loop(UNUSED lua_State* L) { +int smlua_func_bhv_ttc_cog_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_tumbling_bridge_platform_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ttc_cog_init", 0, top); return 0; } - bhv_tumbling_bridge_platform_loop(); + bhv_ttc_cog_init(); return 1; } -int smlua_func_bhv_tuxies_mother_loop(UNUSED lua_State* L) { +int smlua_func_bhv_ttc_cog_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_tuxies_mother_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ttc_cog_update", 0, top); return 0; } - bhv_tuxies_mother_loop(); + bhv_ttc_cog_update(); return 1; } -int smlua_func_bhv_tweester_loop(UNUSED lua_State* L) { +int smlua_func_bhv_ttc_pit_block_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_tweester_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ttc_pit_block_init", 0, top); return 0; } - bhv_tweester_loop(); + bhv_ttc_pit_block_init(); return 1; } -int smlua_func_bhv_tweester_sand_particle_loop(UNUSED lua_State* L) { +int smlua_func_bhv_ttc_pit_block_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_tweester_sand_particle_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ttc_pit_block_update", 0, top); return 0; } - bhv_tweester_sand_particle_loop(); + bhv_ttc_pit_block_update(); return 1; } -int smlua_func_bhv_ukiki_cage_loop(UNUSED lua_State* L) { +int smlua_func_bhv_ttc_elevator_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ukiki_cage_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ttc_elevator_init", 0, top); return 0; } - bhv_ukiki_cage_loop(); + bhv_ttc_elevator_init(); return 1; } -int smlua_func_bhv_ukiki_cage_star_loop(UNUSED lua_State* L) { +int smlua_func_bhv_ttc_elevator_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ukiki_cage_star_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ttc_elevator_update", 0, top); return 0; } - bhv_ukiki_cage_star_loop(); + bhv_ttc_elevator_update(); return 1; } -int smlua_func_bhv_ukiki_init(UNUSED lua_State* L) { +int smlua_func_bhv_ttc_2d_rotator_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ukiki_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ttc_2d_rotator_init", 0, top); return 0; } - bhv_ukiki_init(); + bhv_ttc_2d_rotator_init(); return 1; } -int smlua_func_bhv_ukiki_loop(UNUSED lua_State* L) { +int smlua_func_bhv_ttc_2d_rotator_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_ukiki_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ttc_2d_rotator_update", 0, top); return 0; } - bhv_ukiki_loop(); + bhv_ttc_2d_rotator_update(); + + return 1; +} + +int smlua_func_bhv_ttc_spinner_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_ttc_spinner_update", 0, top); + return 0; + } + + + bhv_ttc_spinner_update(); + + return 1; +} + +int smlua_func_bhv_mr_blizzard_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_mr_blizzard_init", 0, top); + return 0; + } + + + bhv_mr_blizzard_init(); + + return 1; +} + +int smlua_func_bhv_mr_blizzard_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_mr_blizzard_update", 0, top); + return 0; + } + + + bhv_mr_blizzard_update(); + + return 1; +} + +int smlua_func_bhv_mr_blizzard_snowball(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_mr_blizzard_snowball", 0, top); + return 0; + } + + + bhv_mr_blizzard_snowball(); + + return 1; +} + +int smlua_func_bhv_sliding_plat_2_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_sliding_plat_2_init", 0, top); + return 0; + } + + + bhv_sliding_plat_2_init(); + + return 1; +} + +int smlua_func_bhv_sliding_plat_2_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_sliding_plat_2_loop", 0, top); + return 0; + } + + + bhv_sliding_plat_2_loop(); + + return 1; +} + +int smlua_func_bhv_rotating_octagonal_plat_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_rotating_octagonal_plat_init", 0, top); + return 0; + } + + + bhv_rotating_octagonal_plat_init(); + + return 1; +} + +int smlua_func_bhv_rotating_octagonal_plat_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_rotating_octagonal_plat_loop", 0, top); + return 0; + } + + + bhv_rotating_octagonal_plat_loop(); + + return 1; +} + +int smlua_func_bhv_animates_on_floor_switch_press_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_animates_on_floor_switch_press_init", 0, top); + return 0; + } + + + bhv_animates_on_floor_switch_press_init(); + + return 1; +} + +int smlua_func_bhv_animates_on_floor_switch_press_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_animates_on_floor_switch_press_loop", 0, top); + return 0; + } + + + bhv_animates_on_floor_switch_press_loop(); + + return 1; +} + +int smlua_func_bhv_activated_back_and_forth_platform_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_activated_back_and_forth_platform_init", 0, top); + return 0; + } + + + bhv_activated_back_and_forth_platform_init(); + + return 1; +} + +int smlua_func_bhv_activated_back_and_forth_platform_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_activated_back_and_forth_platform_update", 0, top); + return 0; + } + + + bhv_activated_back_and_forth_platform_update(); + + return 1; +} + +int smlua_func_bhv_recovery_heart_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_recovery_heart_loop", 0, top); + return 0; + } + + + bhv_recovery_heart_loop(); + + return 1; +} + +int smlua_func_bhv_water_bomb_cannon_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_water_bomb_cannon_loop", 0, top); + return 0; + } + + + bhv_water_bomb_cannon_loop(); + + return 1; +} + +int smlua_func_bhv_bubble_cannon_barrel_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_bubble_cannon_barrel_loop", 0, top); + return 0; + } + + + bhv_bubble_cannon_barrel_loop(); return 1; } @@ -8287,818 +8592,738 @@ int smlua_func_bhv_unagi_subobject_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_bhv_unused_particle_spawn_loop(UNUSED lua_State* L) { +int smlua_func_bhv_dorrie_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_unused_particle_spawn_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_dorrie_update", 0, top); return 0; } - bhv_unused_particle_spawn_loop(); + bhv_dorrie_update(); return 1; } -int smlua_func_bhv_unused_poundable_platform(UNUSED lua_State* L) { +int smlua_func_bhv_haunted_chair_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_unused_poundable_platform", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_haunted_chair_init", 0, top); return 0; } - bhv_unused_poundable_platform(); + bhv_haunted_chair_init(); return 1; } -int smlua_func_bhv_vanish_cap_init(UNUSED lua_State* L) { +int smlua_func_bhv_haunted_chair_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_vanish_cap_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_haunted_chair_loop", 0, top); return 0; } - bhv_vanish_cap_init(); + bhv_haunted_chair_loop(); return 1; } -int smlua_func_bhv_volcano_flames_loop(UNUSED lua_State* L) { +int smlua_func_bhv_mad_piano_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_volcano_flames_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_mad_piano_update", 0, top); return 0; } - bhv_volcano_flames_loop(); + bhv_mad_piano_update(); return 1; } -int smlua_func_bhv_volcano_sound_loop(UNUSED lua_State* L) { +int smlua_func_bhv_flying_bookend_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_volcano_sound_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_flying_bookend_loop", 0, top); return 0; } - bhv_volcano_sound_loop(); + bhv_flying_bookend_loop(); return 1; } -int smlua_func_bhv_volcano_trap_loop(UNUSED lua_State* L) { +int smlua_func_bhv_bookend_spawn_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_volcano_trap_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bookend_spawn_loop", 0, top); return 0; } - bhv_volcano_trap_loop(); + bhv_bookend_spawn_loop(); return 1; } -int smlua_func_bhv_wall_tiny_star_particle_loop(UNUSED lua_State* L) { +int smlua_func_bhv_haunted_bookshelf_manager_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_wall_tiny_star_particle_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_haunted_bookshelf_manager_loop", 0, top); return 0; } - bhv_wall_tiny_star_particle_loop(); + bhv_haunted_bookshelf_manager_loop(); return 1; } -int smlua_func_bhv_warp_loop(UNUSED lua_State* L) { +int smlua_func_bhv_book_switch_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_warp_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_book_switch_loop", 0, top); return 0; } - bhv_warp_loop(); + bhv_book_switch_loop(); return 1; } -int smlua_func_bhv_water_air_bubble_init(UNUSED lua_State* L) { +int smlua_func_bhv_fire_piranha_plant_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_water_air_bubble_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_fire_piranha_plant_init", 0, top); return 0; } - bhv_water_air_bubble_init(); + bhv_fire_piranha_plant_init(); return 1; } -int smlua_func_bhv_water_air_bubble_loop(UNUSED lua_State* L) { +int smlua_func_bhv_fire_piranha_plant_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_water_air_bubble_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_fire_piranha_plant_update", 0, top); return 0; } - bhv_water_air_bubble_loop(); + bhv_fire_piranha_plant_update(); return 1; } -int smlua_func_bhv_water_bomb_cannon_loop(UNUSED lua_State* L) { +int smlua_func_bhv_small_piranha_flame_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_water_bomb_cannon_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_small_piranha_flame_loop", 0, top); return 0; } - bhv_water_bomb_cannon_loop(); + bhv_small_piranha_flame_loop(); return 1; } -int smlua_func_bhv_water_bomb_shadow_update(UNUSED lua_State* L) { +int smlua_func_bhv_fire_spitter_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_water_bomb_shadow_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_fire_spitter_update", 0, top); return 0; } - bhv_water_bomb_shadow_update(); + bhv_fire_spitter_update(); return 1; } -int smlua_func_bhv_water_bomb_spawner_update(UNUSED lua_State* L) { +int smlua_func_bhv_fly_guy_flame_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_water_bomb_spawner_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_fly_guy_flame_loop", 0, top); return 0; } - bhv_water_bomb_spawner_update(); + bhv_fly_guy_flame_loop(); return 1; } -int smlua_func_bhv_water_bomb_update(UNUSED lua_State* L) { +int smlua_func_bhv_snufit_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_water_bomb_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_snufit_loop", 0, top); return 0; } - bhv_water_bomb_update(); + bhv_snufit_loop(); return 1; } -int smlua_func_bhv_water_droplet_loop(UNUSED lua_State* L) { +int smlua_func_bhv_snufit_balls_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_water_droplet_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_snufit_balls_loop", 0, top); return 0; } - bhv_water_droplet_loop(); + bhv_snufit_balls_loop(); return 1; } -int smlua_func_bhv_water_droplet_splash_init(UNUSED lua_State* L) { +int smlua_func_bhv_horizontal_grindel_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_water_droplet_splash_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_horizontal_grindel_init", 0, top); return 0; } - bhv_water_droplet_splash_init(); + bhv_horizontal_grindel_init(); return 1; } -int smlua_func_bhv_water_level_diamond_loop(UNUSED lua_State* L) { +int smlua_func_bhv_horizontal_grindel_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_water_level_diamond_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_horizontal_grindel_update", 0, top); return 0; } - bhv_water_level_diamond_loop(); + bhv_horizontal_grindel_update(); return 1; } -int smlua_func_bhv_water_level_pillar_init(UNUSED lua_State* L) { +int smlua_func_bhv_eyerok_boss_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_water_level_pillar_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_eyerok_boss_init", 0, top); return 0; } - bhv_water_level_pillar_init(); + bhv_eyerok_boss_init(); return 1; } -int smlua_func_bhv_water_level_pillar_loop(UNUSED lua_State* L) { +int smlua_func_bhv_eyerok_boss_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_water_level_pillar_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_eyerok_boss_loop", 0, top); return 0; } - bhv_water_level_pillar_loop(); + bhv_eyerok_boss_loop(); return 1; } -int smlua_func_bhv_water_mist_2_loop(UNUSED lua_State* L) { +int smlua_func_bhv_eyerok_hand_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_water_mist_2_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_eyerok_hand_loop", 0, top); return 0; } - bhv_water_mist_2_loop(); + bhv_eyerok_hand_loop(); return 1; } -int smlua_func_bhv_water_mist_loop(UNUSED lua_State* L) { +int smlua_func_bhv_klepto_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_water_mist_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_klepto_init", 0, top); return 0; } - bhv_water_mist_loop(); + bhv_klepto_init(); return 1; } -int smlua_func_bhv_water_mist_spawn_loop(UNUSED lua_State* L) { +int smlua_func_bhv_klepto_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_water_mist_spawn_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_klepto_update", 0, top); return 0; } - bhv_water_mist_spawn_loop(); + bhv_klepto_update(); return 1; } -int smlua_func_bhv_water_splash_spawn_droplets(UNUSED lua_State* L) { +int smlua_func_bhv_bird_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_water_splash_spawn_droplets", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bird_update", 0, top); return 0; } - bhv_water_splash_spawn_droplets(); + bhv_bird_update(); return 1; } -int smlua_func_bhv_water_waves_init(UNUSED lua_State* L) { +int smlua_func_bhv_racing_penguin_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_water_waves_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_racing_penguin_init", 0, top); return 0; } - bhv_water_waves_init(); + bhv_racing_penguin_init(); return 1; } -int smlua_func_bhv_waterfall_sound_loop(UNUSED lua_State* L) { +int smlua_func_bhv_racing_penguin_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_waterfall_sound_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_racing_penguin_update", 0, top); return 0; } - bhv_waterfall_sound_loop(); + bhv_racing_penguin_update(); return 1; } -int smlua_func_bhv_wave_trail_shrink(UNUSED lua_State* L) { +int smlua_func_bhv_penguin_race_finish_line_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_wave_trail_shrink", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_penguin_race_finish_line_update", 0, top); return 0; } - bhv_wave_trail_shrink(); + bhv_penguin_race_finish_line_update(); return 1; } -int smlua_func_bhv_wdw_express_elevator_loop(UNUSED lua_State* L) { +int smlua_func_bhv_penguin_race_shortcut_check_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_wdw_express_elevator_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_penguin_race_shortcut_check_update", 0, top); return 0; } - bhv_wdw_express_elevator_loop(); + bhv_penguin_race_shortcut_check_update(); return 1; } -int smlua_func_bhv_wf_breakable_wall_loop(UNUSED lua_State* L) { +int smlua_func_bhv_coffin_spawner_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_wf_breakable_wall_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_coffin_spawner_loop", 0, top); return 0; } - bhv_wf_breakable_wall_loop(); + bhv_coffin_spawner_loop(); return 1; } -int smlua_func_bhv_wf_elevator_tower_platform_loop(UNUSED lua_State* L) { +int smlua_func_bhv_coffin_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_wf_elevator_tower_platform_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_coffin_loop", 0, top); return 0; } - bhv_wf_elevator_tower_platform_loop(); + bhv_coffin_loop(); return 1; } -int smlua_func_bhv_wf_rotating_wooden_platform_init(UNUSED lua_State* L) { +int smlua_func_bhv_clam_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_wf_rotating_wooden_platform_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_clam_loop", 0, top); return 0; } - bhv_wf_rotating_wooden_platform_init(); + bhv_clam_loop(); return 1; } -int smlua_func_bhv_wf_rotating_wooden_platform_loop(UNUSED lua_State* L) { +int smlua_func_bhv_skeeter_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_wf_rotating_wooden_platform_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_skeeter_update", 0, top); return 0; } - bhv_wf_rotating_wooden_platform_loop(); + bhv_skeeter_update(); return 1; } -int smlua_func_bhv_wf_sliding_platform_init(UNUSED lua_State* L) { +int smlua_func_bhv_skeeter_wave_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_wf_sliding_platform_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_skeeter_wave_update", 0, top); return 0; } - bhv_wf_sliding_platform_init(); + bhv_skeeter_wave_update(); return 1; } -int smlua_func_bhv_wf_sliding_platform_loop(UNUSED lua_State* L) { +int smlua_func_bhv_swing_platform_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_wf_sliding_platform_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_swing_platform_init", 0, top); return 0; } - bhv_wf_sliding_platform_loop(); + bhv_swing_platform_init(); return 1; } -int smlua_func_bhv_wf_sliding_tower_platform_loop(UNUSED lua_State* L) { +int smlua_func_bhv_swing_platform_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_wf_sliding_tower_platform_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_swing_platform_update", 0, top); return 0; } - bhv_wf_sliding_tower_platform_loop(); + bhv_swing_platform_update(); return 1; } -int smlua_func_bhv_wf_solid_tower_platform_loop(UNUSED lua_State* L) { +int smlua_func_bhv_donut_platform_spawner_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_wf_solid_tower_platform_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_donut_platform_spawner_update", 0, top); return 0; } - bhv_wf_solid_tower_platform_loop(); + bhv_donut_platform_spawner_update(); return 1; } -int smlua_func_bhv_whirlpool_init(UNUSED lua_State* L) { +int smlua_func_bhv_donut_platform_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_whirlpool_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_donut_platform_update", 0, top); return 0; } - bhv_whirlpool_init(); + bhv_donut_platform_update(); return 1; } -int smlua_func_bhv_whirlpool_loop(UNUSED lua_State* L) { +int smlua_func_bhv_ddd_pole_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_whirlpool_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ddd_pole_init", 0, top); return 0; } - bhv_whirlpool_loop(); + bhv_ddd_pole_init(); return 1; } -int smlua_func_bhv_white_puff_1_loop(UNUSED lua_State* L) { +int smlua_func_bhv_ddd_pole_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_white_puff_1_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ddd_pole_update", 0, top); return 0; } - bhv_white_puff_1_loop(); + bhv_ddd_pole_update(); return 1; } -int smlua_func_bhv_white_puff_2_loop(UNUSED lua_State* L) { +int smlua_func_bhv_red_coin_star_marker_init(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_white_puff_2_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_red_coin_star_marker_init", 0, top); return 0; } - bhv_white_puff_2_loop(); + bhv_red_coin_star_marker_init(); return 1; } -int smlua_func_bhv_white_puff_exploding_loop(UNUSED lua_State* L) { +int smlua_func_bhv_triplet_butterfly_update(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_white_puff_exploding_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_triplet_butterfly_update", 0, top); return 0; } - bhv_white_puff_exploding_loop(); + bhv_triplet_butterfly_update(); return 1; } -int smlua_func_bhv_white_puff_smoke_init(UNUSED lua_State* L) { +int smlua_func_bhv_bubba_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_white_puff_smoke_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_bubba_loop", 0, top); return 0; } - bhv_white_puff_smoke_init(); + bhv_bubba_loop(); return 1; } -int smlua_func_bhv_whomp_loop(UNUSED lua_State* L) { +int smlua_func_bhv_intro_lakitu_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_whomp_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_intro_lakitu_loop", 0, top); return 0; } - bhv_whomp_loop(); + bhv_intro_lakitu_loop(); return 1; } -int smlua_func_bhv_wiggler_body_part_update(UNUSED lua_State* L) { +int smlua_func_bhv_intro_peach_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_wiggler_body_part_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_intro_peach_loop", 0, top); return 0; } - bhv_wiggler_body_part_update(); + bhv_intro_peach_loop(); return 1; } -int smlua_func_bhv_wiggler_update(UNUSED lua_State* L) { +int smlua_func_bhv_end_birds_1_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_wiggler_update", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_end_birds_1_loop", 0, top); return 0; } - bhv_wiggler_update(); + bhv_end_birds_1_loop(); return 1; } -int smlua_func_bhv_wind_loop(UNUSED lua_State* L) { +int smlua_func_bhv_end_birds_2_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_wind_loop", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_end_birds_2_loop", 0, top); return 0; } - bhv_wind_loop(); + bhv_end_birds_2_loop(); return 1; } -int smlua_func_bhv_wing_cap_init(UNUSED lua_State* L) { +int smlua_func_bhv_intro_scene_loop(UNUSED lua_State* L) { if (!gCurrentObject) { return 0; } 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", "bhv_wing_cap_init", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_intro_scene_loop", 0, top); return 0; } - bhv_wing_cap_init(); - - return 1; -} - -int smlua_func_bhv_wing_vanish_cap_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_wing_vanish_cap_loop", 0, top); - return 0; - } - - - bhv_wing_vanish_cap_loop(); - - return 1; -} - -int smlua_func_bhv_wooden_post_update(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_wooden_post_update", 0, top); - return 0; - } - - - bhv_wooden_post_update(); - - return 1; -} - -int smlua_func_bhv_yellow_coin_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_yellow_coin_init", 0, top); - return 0; - } - - - bhv_yellow_coin_init(); - - return 1; -} - -int smlua_func_bhv_yellow_coin_loop(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_yellow_coin_loop", 0, top); - return 0; - } - - - bhv_yellow_coin_loop(); - - return 1; -} - -int smlua_func_bhv_yoshi_init(UNUSED lua_State* L) { - if (!gCurrentObject) { return 0; } - 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", "bhv_yoshi_init", 0, top); - return 0; - } - - - bhv_yoshi_init(); + bhv_intro_scene_loop(); return 1; } @@ -9119,111 +9344,140 @@ int smlua_func_bhv_yoshi_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_check_if_moving_over_floor(lua_State* L) { +int smlua_func_bhv_volcano_trap_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } 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", "check_if_moving_over_floor", 2, top); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_volcano_trap_loop", 0, top); return 0; } - f32 a0 = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_if_moving_over_floor"); return 0; } - f32 a1 = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "check_if_moving_over_floor"); return 0; } - lua_pushinteger(L, check_if_moving_over_floor(a0, a1)); + bhv_volcano_trap_loop(); return 1; } -int smlua_func_clear_particle_flags(lua_State* L) { +int smlua_func_uv_update_scroll(UNUSED 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", "clear_particle_flags", 1, top); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "uv_update_scroll", 0, top); return 0; } - u32 flags = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "clear_particle_flags"); return 0; } - clear_particle_flags(flags); + uv_update_scroll(); return 1; } -int smlua_func_common_anchor_mario_behavior(lua_State* L) { +int smlua_func_spawn_ambient_light(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", "common_anchor_mario_behavior", 3, top); + if (top != 6) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "spawn_ambient_light", 6, top); return 0; } - f32 sp28 = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "common_anchor_mario_behavior"); return 0; } - f32 sp2C = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "common_anchor_mario_behavior"); return 0; } - s32 sp30 = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "common_anchor_mario_behavior"); return 0; } + f32 x = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_ambient_light"); return 0; } + f32 y = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_ambient_light"); return 0; } + f32 z = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "spawn_ambient_light"); return 0; } + u8 r = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "spawn_ambient_light"); return 0; } + u8 g = smlua_to_integer(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "spawn_ambient_light"); return 0; } + u8 b = smlua_to_integer(L, 6); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "spawn_ambient_light"); return 0; } - common_anchor_mario_behavior(sp28, sp2C, sp30); + smlua_push_object(L, LOT_OBJECT, spawn_ambient_light(x, y, z, r, g, b), NULL); return 1; } -int smlua_func_cur_obj_spawn_strong_wind_particles(lua_State* L) { +int smlua_func_spawn_point_light(lua_State* L) { if (L == NULL) { return 0; } int top = lua_gettop(L); - if (top != 5) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_spawn_strong_wind_particles", 5, top); + if (top != 7) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "spawn_point_light", 7, top); return 0; } - s32 windSpread = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_spawn_strong_wind_particles"); return 0; } - f32 scale = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_spawn_strong_wind_particles"); return 0; } - f32 relPosX = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_spawn_strong_wind_particles"); return 0; } - f32 relPosY = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "cur_obj_spawn_strong_wind_particles"); return 0; } - f32 relPosZ = smlua_to_number(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "cur_obj_spawn_strong_wind_particles"); return 0; } + f32 x = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_point_light"); return 0; } + f32 y = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_point_light"); return 0; } + f32 z = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "spawn_point_light"); return 0; } + u8 r = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "spawn_point_light"); return 0; } + u8 g = smlua_to_integer(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "spawn_point_light"); return 0; } + u8 b = smlua_to_integer(L, 6); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "spawn_point_light"); return 0; } + f32 radius = smlua_to_number(L, 7); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "spawn_point_light"); return 0; } - cur_obj_spawn_strong_wind_particles(windSpread, scale, relPosX, relPosY, relPosZ); + smlua_push_object(L, LOT_OBJECT, spawn_point_light(x, y, z, r, g, b, radius), NULL); return 1; } -/* -int smlua_func_geo_bits_bowser_coloring(lua_State* L) { +int smlua_func_bhv_ambient_light_update(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } 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); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "bhv_ambient_light_update", 0, 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; } - if (lua_isnil(L, 2)) { 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); + bhv_ambient_light_update(); + + return 1; +} + +int smlua_func_bhv_point_light_init(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_point_light_init", 0, top); + return 0; + } + + + bhv_point_light_init(); + + return 1; +} + +int smlua_func_bhv_point_light_loop(UNUSED lua_State* L) { + if (!gCurrentObject) { return 0; } + 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", "bhv_point_light_loop", 0, top); + return 0; + } + + + bhv_point_light_loop(); return 1; } -*/ /* int smlua_func_geo_move_mario_part_from_parent(lua_State* L) { @@ -9254,74 +9508,52 @@ int smlua_func_geo_move_mario_part_from_parent(lua_State* L) { */ /* -int smlua_func_geo_scale_bowser_key(lua_State* L) { +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_scale_bowser_key", 3, top); + 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_scale_bowser_key"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "geo_bits_bowser_coloring"); return 0; } if (lua_isnil(L, 2)) { 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; } + 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_scale_bowser_key(run, node, mtx[4][4]), NULL); + smlua_push_object(L, LOT_GFX, geo_bits_bowser_coloring(run, node, a2), NULL); return 1; } */ /* -int smlua_func_geo_snufit_move_mask(lua_State* L) { +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_snufit_move_mask", 3, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "geo_update_body_rot_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_snufit_move_mask"); 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; } if (lua_isnil(L, 2)) { 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; } - if (lua_isnil(L, 3)) { 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; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "geo_update_body_rot_from_parent"); return 0; } - smlua_push_object(L, LOT_GFX, geo_snufit_move_mask(callContext, node, c), NULL); + 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; } - return 1; -} -*/ + smlua_push_object(L, LOT_GFX, geo_update_body_rot_from_parent(run, node, mtx), NULL); -/* -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; } - if (lua_isnil(L, 2)) { 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; } - if (lua_isnil(L, 3)) { 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); + smlua_push_mat4(mtx, 3); return 1; } @@ -9377,34 +9609,6 @@ int smlua_func_geo_switch_tuxie_mother_eyes(lua_State* L) { } */ -/* -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; } - if (lua_isnil(L, 2)) { 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); - - smlua_push_mat4(mtx, 3); - - return 1; -} -*/ - /* int smlua_func_geo_update_held_mario_pos(lua_State* L) { if (L == NULL) { return 0; } @@ -9433,79 +9637,79 @@ int smlua_func_geo_update_held_mario_pos(lua_State* L) { } */ -int smlua_func_mario_moving_fast_enough_to_make_piranha_plant_bite(UNUSED lua_State* L) { +/* +int smlua_func_geo_snufit_move_mask(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", "mario_moving_fast_enough_to_make_piranha_plant_bite", 0, top); + 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; } + if (lua_isnil(L, 2)) { 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; } + if (lua_isnil(L, 3)) { 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; } - lua_pushinteger(L, mario_moving_fast_enough_to_make_piranha_plant_bite()); + smlua_push_object(L, LOT_GFX, geo_snufit_move_mask(callContext, node, c), NULL); return 1; } +*/ -int smlua_func_obj_set_secondary_camera_focus(UNUSED lua_State* L) { +/* +int smlua_func_geo_snufit_scale_body(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", "obj_set_secondary_camera_focus", 0, top); + 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; } + if (lua_isnil(L, 2)) { 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; } + if (lua_isnil(L, 3)) { 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; } - obj_set_secondary_camera_focus(); + smlua_push_object(L, LOT_GFX, geo_snufit_scale_body(callContext, node, c), NULL); return 1; } +*/ -int smlua_func_play_penguin_walking_sound(lua_State* L) { +/* +int smlua_func_geo_scale_bowser_key(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", "play_penguin_walking_sound", 1, top); + if (top != 3) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "geo_scale_bowser_key", 3, top); return 0; } - s32 walk = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_penguin_walking_sound"); 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; } + if (lua_isnil(L, 2)) { 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; } - play_penguin_walking_sound(walk); - - return 1; -} - -int smlua_func_spawn_ambient_light(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 6) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "spawn_ambient_light", 6, top); - return 0; - } - - f32 x = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_ambient_light"); return 0; } - f32 y = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_ambient_light"); return 0; } - f32 z = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "spawn_ambient_light"); return 0; } - u8 r = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "spawn_ambient_light"); return 0; } - u8 g = smlua_to_integer(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "spawn_ambient_light"); return 0; } - u8 b = smlua_to_integer(L, 6); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "spawn_ambient_light"); return 0; } - - smlua_push_object(L, LOT_OBJECT, spawn_ambient_light(x, y, z, r, g, b), NULL); + 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; } @@ -9528,92 +9732,6 @@ int smlua_func_spawn_default_star(lua_State* L) { return 1; } -int smlua_func_spawn_mist_from_global(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", "spawn_mist_from_global", 0, top); - return 0; - } - - - spawn_mist_from_global(); - - return 1; -} - -int smlua_func_spawn_mist_particles_variable(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", "spawn_mist_particles_variable", 3, top); - return 0; - } - - s32 count = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_mist_particles_variable"); return 0; } - s32 offsetY = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_mist_particles_variable"); return 0; } - f32 size = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "spawn_mist_particles_variable"); return 0; } - - spawn_mist_particles_variable(count, offsetY, size); - - return 1; -} - -int smlua_func_spawn_no_exit_star(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", "spawn_no_exit_star", 3, top); - return 0; - } - - f32 x = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_no_exit_star"); return 0; } - f32 y = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_no_exit_star"); return 0; } - f32 z = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "spawn_no_exit_star"); return 0; } - - smlua_push_object(L, LOT_OBJECT, spawn_no_exit_star(x, y, z), NULL); - - return 1; -} - -int smlua_func_spawn_point_light(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 7) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "spawn_point_light", 7, top); - return 0; - } - - f32 x = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_point_light"); return 0; } - f32 y = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_point_light"); return 0; } - f32 z = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "spawn_point_light"); return 0; } - u8 r = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "spawn_point_light"); return 0; } - u8 g = smlua_to_integer(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "spawn_point_light"); return 0; } - u8 b = smlua_to_integer(L, 6); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "spawn_point_light"); return 0; } - f32 radius = smlua_to_number(L, 7); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "spawn_point_light"); return 0; } - - smlua_push_object(L, LOT_OBJECT, spawn_point_light(x, y, z, r, g, b, radius), NULL); - - return 1; -} - int smlua_func_spawn_red_coin_cutscene_star(lua_State* L) { if (L == NULL) { return 0; } @@ -9635,141 +9753,23 @@ int smlua_func_spawn_red_coin_cutscene_star(lua_State* L) { return 1; } -int smlua_func_spawn_star_number(UNUSED lua_State* L) { +int smlua_func_spawn_no_exit_star(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", "spawn_star_number", 0, top); + if (top != 3) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "spawn_no_exit_star", 3, top); return 0; } + f32 x = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_no_exit_star"); return 0; } + f32 y = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_no_exit_star"); return 0; } + f32 z = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "spawn_no_exit_star"); return 0; } - spawn_star_number(); - - return 1; -} - -int smlua_func_spawn_triangle_break_particles(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "spawn_triangle_break_particles", 4, top); - return 0; - } - - s16 numTris = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_triangle_break_particles"); return 0; } - s16 triModel = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_triangle_break_particles"); return 0; } - f32 triSize = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "spawn_triangle_break_particles"); return 0; } - s16 triAnimState = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "spawn_triangle_break_particles"); return 0; } - - spawn_triangle_break_particles(numTris, triModel, triSize, triAnimState); - - return 1; -} - -int smlua_func_spawn_wind_particles(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", "spawn_wind_particles", 2, top); - return 0; - } - - s16 pitch = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_wind_particles"); return 0; } - s16 yaw = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_wind_particles"); return 0; } - - spawn_wind_particles(pitch, yaw); - - return 1; -} - -int smlua_func_tox_box_move(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "tox_box_move", 4, top); - return 0; - } - - f32 forwardVel = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "tox_box_move"); return 0; } - f32 a1 = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "tox_box_move"); return 0; } - s16 deltaPitch = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "tox_box_move"); return 0; } - s16 deltaRoll = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "tox_box_move"); return 0; } - - tox_box_move(forwardVel, a1, deltaPitch, deltaRoll); - - return 1; -} - -int smlua_func_update_angle_from_move_flags(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", "update_angle_from_move_flags", 1, top); - return 0; - } - - s32 * angle = (s32 *)smlua_to_cpointer(L, 1, LVT_S32_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_angle_from_move_flags"); return 0; } - - lua_pushinteger(L, update_angle_from_move_flags(angle)); - - return 1; -} - -int smlua_func_uv_update_scroll(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", "uv_update_scroll", 0, top); - return 0; - } - - - uv_update_scroll(); - - return 1; -} - -int smlua_func_vec3f_copy_2(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", "vec3f_copy_2", 2, top); - return 0; - } - - - Vec3f dest; - smlua_get_vec3f(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_copy_2"); return 0; } - - Vec3f src; - smlua_get_vec3f(src, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_copy_2"); return 0; } - - vec3f_copy_2(dest, src); - - smlua_push_vec3f(dest, 1); - - smlua_push_vec3f(src, 2); + smlua_push_object(L, LOT_OBJECT, spawn_no_exit_star(x, y, z), NULL); return 1; } @@ -9778,65 +9778,17 @@ int smlua_func_vec3f_copy_2(lua_State* L) { // behavior_script.h // /////////////////////// -int smlua_func_draw_distance_scalar(UNUSED lua_State* L) { +int smlua_func_random_u16(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", "draw_distance_scalar", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "random_u16", 0, top); return 0; } - lua_pushnumber(L, draw_distance_scalar()); - - return 1; -} - -int smlua_func_obj_update_gfx_pos_and_angle(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_update_gfx_pos_and_angle", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_update_gfx_pos_and_angle"); return 0; } - - obj_update_gfx_pos_and_angle(obj); - - return 1; -} - -int smlua_func_position_based_random_float_position(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", "position_based_random_float_position", 0, top); - return 0; - } - - - lua_pushnumber(L, position_based_random_float_position()); - - return 1; -} - -int smlua_func_position_based_random_u16(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", "position_based_random_u16", 0, top); - return 0; - } - - - lua_pushinteger(L, position_based_random_u16()); + lua_pushinteger(L, random_u16()); return 1; } @@ -9871,17 +9823,65 @@ int smlua_func_random_sign(UNUSED lua_State* L) { return 1; } -int smlua_func_random_u16(UNUSED lua_State* L) { +int smlua_func_obj_update_gfx_pos_and_angle(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_update_gfx_pos_and_angle", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_update_gfx_pos_and_angle"); return 0; } + + obj_update_gfx_pos_and_angle(obj); + + return 1; +} + +int smlua_func_position_based_random_u16(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", "random_u16", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "position_based_random_u16", 0, top); return 0; } - lua_pushinteger(L, random_u16()); + lua_pushinteger(L, position_based_random_u16()); + + return 1; +} + +int smlua_func_position_based_random_float_position(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", "position_based_random_float_position", 0, top); + return 0; + } + + + lua_pushnumber(L, position_based_random_float_position()); + + return 1; +} + +int smlua_func_draw_distance_scalar(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", "draw_distance_scalar", 0, top); + return 0; + } + + + lua_pushnumber(L, draw_distance_scalar()); return 1; } @@ -9890,6 +9890,40 @@ int smlua_func_random_u16(UNUSED lua_State* L) { // behavior_table.h // ////////////////////// +int smlua_func_get_id_from_behavior(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", "get_id_from_behavior", 1, top); + return 0; + } + + BehaviorScript* behavior = (BehaviorScript*)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_id_from_behavior"); return 0; } + + lua_pushinteger(L, get_id_from_behavior(behavior)); + + return 1; +} + +int smlua_func_get_id_from_vanilla_behavior(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", "get_id_from_vanilla_behavior", 1, top); + return 0; + } + + BehaviorScript* behavior = (BehaviorScript*)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_id_from_vanilla_behavior"); return 0; } + + lua_pushinteger(L, get_id_from_vanilla_behavior(behavior)); + + return 1; +} + int smlua_func_get_behavior_from_id(lua_State* L) { if (L == NULL) { return 0; } @@ -9924,23 +9958,6 @@ int smlua_func_get_behavior_name_from_id(lua_State* L) { return 1; } -int smlua_func_get_id_from_behavior(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", "get_id_from_behavior", 1, top); - return 0; - } - - BehaviorScript* behavior = (BehaviorScript*)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_id_from_behavior"); return 0; } - - lua_pushinteger(L, get_id_from_behavior(behavior)); - - return 1; -} - int smlua_func_get_id_from_behavior_name(lua_State* L) { if (L == NULL) { return 0; } @@ -9958,66 +9975,486 @@ int smlua_func_get_id_from_behavior_name(lua_State* L) { return 1; } -int smlua_func_get_id_from_vanilla_behavior(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", "get_id_from_vanilla_behavior", 1, top); - return 0; - } - - BehaviorScript* behavior = (BehaviorScript*)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_id_from_vanilla_behavior"); return 0; } - - lua_pushinteger(L, get_id_from_vanilla_behavior(behavior)); - - return 1; -} - ////////////// // camera.h // ////////////// -int smlua_func_approach_camera_height(lua_State* L) { +int smlua_func_skip_camera_interpolation(UNUSED 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", "approach_camera_height", 3, top); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "skip_camera_interpolation", 0, top); + return 0; + } + + + skip_camera_interpolation(); + + return 1; +} + +int smlua_func_set_camera_shake_from_hit(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", "set_camera_shake_from_hit", 1, top); + return 0; + } + + s16 shake = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_camera_shake_from_hit"); return 0; } + + set_camera_shake_from_hit(shake); + + return 1; +} + +int smlua_func_set_environmental_camera_shake(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", "set_environmental_camera_shake", 1, top); + return 0; + } + + s16 shake = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_environmental_camera_shake"); return 0; } + + set_environmental_camera_shake(shake); + + return 1; +} + +int smlua_func_set_camera_shake_from_point(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_camera_shake_from_point", 4, top); + return 0; + } + + s16 shake = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_camera_shake_from_point"); return 0; } + f32 posX = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_camera_shake_from_point"); return 0; } + f32 posY = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_camera_shake_from_point"); return 0; } + f32 posZ = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "set_camera_shake_from_point"); return 0; } + + set_camera_shake_from_point(shake, posX, posY, posZ); + + return 1; +} + +int smlua_func_move_mario_head_c_up(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", "move_mario_head_c_up", 1, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "approach_camera_height"); return 0; } - f32 goal = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "approach_camera_height"); return 0; } - f32 inc = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "approach_camera_height"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "move_mario_head_c_up"); return 0; } - approach_camera_height(c, goal, inc); + move_mario_head_c_up(c); return 1; } -int smlua_func_approach_f32_asymptotic(lua_State* L) { +int smlua_func_transition_next_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", "transition_next_state", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "transition_next_state"); return 0; } + s16 frames = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "transition_next_state"); return 0; } + + transition_next_state(c, frames); + + return 1; +} + +int smlua_func_set_camera_mode(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", "approach_f32_asymptotic", 3, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_camera_mode", 3, top); return 0; } - f32 current = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "approach_f32_asymptotic"); return 0; } - f32 target = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "approach_f32_asymptotic"); return 0; } - f32 multiplier = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "approach_f32_asymptotic"); return 0; } + if (lua_isnil(L, 1)) { return 0; } + struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_camera_mode"); return 0; } + s16 mode = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_camera_mode"); return 0; } + s16 frames = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_camera_mode"); return 0; } - lua_pushnumber(L, approach_f32_asymptotic(current, target, multiplier)); + set_camera_mode(c, mode, frames); + + return 1; +} + +int smlua_func_soft_reset_camera(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", "soft_reset_camera", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "soft_reset_camera"); return 0; } + + soft_reset_camera(c); + + return 1; +} + +int smlua_func_reset_camera(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", "reset_camera", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "reset_camera"); return 0; } + + reset_camera(c); + + return 1; +} + +int smlua_func_select_mario_cam_mode(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", "select_mario_cam_mode", 0, top); + return 0; + } + + + select_mario_cam_mode(); + + 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; } + if (lua_isnil(L, 2)) { 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; } + if (lua_isnil(L, 3)) { 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_vec3f_sub(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", "vec3f_sub", 2, top); + return 0; + } + + + Vec3f dst; + smlua_get_vec3f(dst, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_sub"); return 0; } + + Vec3f src; + smlua_get_vec3f(src, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_sub"); return 0; } + + vec3f_sub(dst, src); + + smlua_push_vec3f(dst, 1); + + smlua_push_vec3f(src, 2); + + return 1; +} + +int smlua_func_object_pos_to_vec3f(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", "object_pos_to_vec3f", 2, top); + return 0; + } + + + Vec3f dst; + smlua_get_vec3f(dst, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "object_pos_to_vec3f"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "object_pos_to_vec3f"); return 0; } + + object_pos_to_vec3f(dst, o); + + smlua_push_vec3f(dst, 1); + + return 1; +} + +int smlua_func_vec3f_to_object_pos(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", "vec3f_to_object_pos", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { 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, "vec3f_to_object_pos"); return 0; } + + Vec3f src; + smlua_get_vec3f(src, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_to_object_pos"); return 0; } + + vec3f_to_object_pos(o, src); + + smlua_push_vec3f(src, 2); + + return 1; +} + +int smlua_func_cam_select_alt_mode(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", "cam_select_alt_mode", 1, top); + return 0; + } + + s32 angle = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cam_select_alt_mode"); return 0; } + + lua_pushinteger(L, cam_select_alt_mode(angle)); + + return 1; +} + +int smlua_func_set_cam_angle(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", "set_cam_angle", 1, top); + return 0; + } + + s32 mode = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_cam_angle"); return 0; } + + lua_pushinteger(L, set_cam_angle(mode)); + + return 1; +} + +int smlua_func_set_handheld_shake(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", "set_handheld_shake", 1, top); + return 0; + } + + u8 mode = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_handheld_shake"); return 0; } + + set_handheld_shake(mode); + + return 1; +} + +int smlua_func_shake_camera_handheld(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", "shake_camera_handheld", 2, top); + return 0; + } + + + Vec3f pos; + smlua_get_vec3f(pos, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "shake_camera_handheld"); return 0; } + + Vec3f focus; + smlua_get_vec3f(focus, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "shake_camera_handheld"); return 0; } + + shake_camera_handheld(pos, focus); + + smlua_push_vec3f(pos, 1); + + smlua_push_vec3f(focus, 2); + + return 1; +} + +int smlua_func_find_c_buttons_pressed(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", "find_c_buttons_pressed", 3, top); + return 0; + } + + u16 currentState = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_c_buttons_pressed"); return 0; } + u16 buttonsPressed = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "find_c_buttons_pressed"); return 0; } + u16 buttonsDown = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "find_c_buttons_pressed"); return 0; } + + lua_pushinteger(L, find_c_buttons_pressed(currentState, buttonsPressed, buttonsDown)); + + return 1; +} + +int smlua_func_collide_with_walls(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", "collide_with_walls", 3, top); + return 0; + } + + + Vec3f pos; + smlua_get_vec3f(pos, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "collide_with_walls"); return 0; } + f32 offsetY = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "collide_with_walls"); return 0; } + f32 radius = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "collide_with_walls"); return 0; } + + lua_pushinteger(L, collide_with_walls(pos, offsetY, radius)); + + smlua_push_vec3f(pos, 1); + + return 1; +} + +int smlua_func_clamp_pitch(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "clamp_pitch", 4, top); + return 0; + } + + + Vec3f from; + smlua_get_vec3f(from, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "clamp_pitch"); return 0; } + + Vec3f to; + smlua_get_vec3f(to, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "clamp_pitch"); return 0; } + s16 maxPitch = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "clamp_pitch"); return 0; } + s16 minPitch = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "clamp_pitch"); return 0; } + + lua_pushinteger(L, clamp_pitch(from, to, maxPitch, minPitch)); + + smlua_push_vec3f(from, 1); + + smlua_push_vec3f(to, 2); + + return 1; +} + +int smlua_func_is_within_100_units_of_mario(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", "is_within_100_units_of_mario", 3, top); + return 0; + } + + f32 posX = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_within_100_units_of_mario"); return 0; } + f32 posY = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "is_within_100_units_of_mario"); return 0; } + f32 posZ = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "is_within_100_units_of_mario"); return 0; } + + lua_pushinteger(L, is_within_100_units_of_mario(posX, posY, posZ)); + + return 1; +} + +int smlua_func_set_or_approach_f32_asymptotic(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", "set_or_approach_f32_asymptotic", 3, top); + return 0; + } + + f32 * dst = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_or_approach_f32_asymptotic"); return 0; } + f32 goal = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_or_approach_f32_asymptotic"); return 0; } + f32 scale = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_or_approach_f32_asymptotic"); return 0; } + + lua_pushinteger(L, set_or_approach_f32_asymptotic(dst, goal, scale)); return 1; } @@ -10043,23 +10480,23 @@ int smlua_func_approach_f32_asymptotic_bool(lua_State* L) { return 1; } -int smlua_func_approach_s16_asymptotic(lua_State* L) { +int smlua_func_approach_f32_asymptotic(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", "approach_s16_asymptotic", 3, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "approach_f32_asymptotic", 3, top); return 0; } - s16 current = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "approach_s16_asymptotic"); return 0; } - s16 target = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "approach_s16_asymptotic"); return 0; } - s16 divisor = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "approach_s16_asymptotic"); return 0; } + f32 current = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "approach_f32_asymptotic"); return 0; } + f32 target = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "approach_f32_asymptotic"); return 0; } + f32 multiplier = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "approach_f32_asymptotic"); return 0; } - lua_pushinteger(L, approach_s16_asymptotic(current, target, divisor)); + lua_pushnumber(L, approach_f32_asymptotic(current, target, multiplier)); return 1; } @@ -10085,6 +10522,27 @@ int smlua_func_approach_s16_asymptotic_bool(lua_State* L) { return 1; } +int smlua_func_approach_s16_asymptotic(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", "approach_s16_asymptotic", 3, top); + return 0; + } + + s16 current = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "approach_s16_asymptotic"); return 0; } + s16 target = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "approach_s16_asymptotic"); return 0; } + s16 divisor = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "approach_s16_asymptotic"); return 0; } + + lua_pushinteger(L, approach_s16_asymptotic(current, target, divisor)); + + return 1; +} + int smlua_func_approach_vec3f_asymptotic(lua_State* L) { if (L == NULL) { return 0; } @@ -10118,83 +10576,211 @@ int smlua_func_approach_vec3f_asymptotic(lua_State* L) { return 1; } -int smlua_func_calc_abs_dist(lua_State* L) { +int smlua_func_set_or_approach_vec3f_asymptotic(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", "calc_abs_dist", 2, top); + if (top != 5) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_or_approach_vec3f_asymptotic", 5, top); return 0; } - Vec3f a; - smlua_get_vec3f(a, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "calc_abs_dist"); return 0; } + Vec3f dst; + smlua_get_vec3f(dst, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_or_approach_vec3f_asymptotic"); return 0; } - Vec3f b; - smlua_get_vec3f(b, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "calc_abs_dist"); return 0; } + Vec3f goal; + smlua_get_vec3f(goal, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_or_approach_vec3f_asymptotic"); return 0; } + f32 xMul = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_or_approach_vec3f_asymptotic"); return 0; } + f32 yMul = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "set_or_approach_vec3f_asymptotic"); return 0; } + f32 zMul = smlua_to_number(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "set_or_approach_vec3f_asymptotic"); return 0; } - lua_pushnumber(L, calc_abs_dist(a, b)); + set_or_approach_vec3f_asymptotic(dst, goal, xMul, yMul, zMul); - smlua_push_vec3f(a, 1); + smlua_push_vec3f(dst, 1); - smlua_push_vec3f(b, 2); + smlua_push_vec3f(goal, 2); return 1; } -int smlua_func_calc_hor_dist(lua_State* L) { +int smlua_func_camera_approach_s16_symmetric_bool(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", "calc_hor_dist", 2, top); + if (top != 3) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_approach_s16_symmetric_bool", 3, top); return 0; } + s16 * current = (s16 *)smlua_to_cpointer(L, 1, LVT_S16_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_approach_s16_symmetric_bool"); return 0; } + s16 target = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "camera_approach_s16_symmetric_bool"); return 0; } + s16 increment = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "camera_approach_s16_symmetric_bool"); return 0; } - Vec3f a; - smlua_get_vec3f(a, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "calc_hor_dist"); return 0; } - - Vec3f b; - smlua_get_vec3f(b, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "calc_hor_dist"); return 0; } - - lua_pushnumber(L, calc_hor_dist(a, b)); - - smlua_push_vec3f(a, 1); - - smlua_push_vec3f(b, 2); + lua_pushinteger(L, camera_approach_s16_symmetric_bool(current, target, increment)); return 1; } -int smlua_func_calculate_angles(lua_State* L) { +int smlua_func_set_or_approach_s16_symmetric(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", "set_or_approach_s16_symmetric", 3, top); + return 0; + } + + s16 * current = (s16 *)smlua_to_cpointer(L, 1, LVT_S16_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_or_approach_s16_symmetric"); return 0; } + s16 target = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_or_approach_s16_symmetric"); return 0; } + s16 increment = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_or_approach_s16_symmetric"); return 0; } + + lua_pushinteger(L, set_or_approach_s16_symmetric(current, target, increment)); + + return 1; +} + +int smlua_func_camera_approach_f32_symmetric_bool(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", "camera_approach_f32_symmetric_bool", 3, top); + return 0; + } + + f32 * current = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_approach_f32_symmetric_bool"); return 0; } + f32 target = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "camera_approach_f32_symmetric_bool"); return 0; } + f32 increment = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "camera_approach_f32_symmetric_bool"); return 0; } + + lua_pushinteger(L, camera_approach_f32_symmetric_bool(current, target, increment)); + + return 1; +} + +int smlua_func_camera_approach_f32_symmetric(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", "camera_approach_f32_symmetric", 3, top); + return 0; + } + + f32 value = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_approach_f32_symmetric"); return 0; } + f32 target = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "camera_approach_f32_symmetric"); return 0; } + f32 increment = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "camera_approach_f32_symmetric"); return 0; } + + lua_pushnumber(L, camera_approach_f32_symmetric(value, target, increment)); + + return 1; +} + +int smlua_func_random_vec3s(lua_State* L) { if (L == NULL) { return 0; } int top = lua_gettop(L); if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "calculate_angles", 4, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "random_vec3s", 4, top); + return 0; + } + + + Vec3s dst; + smlua_get_vec3s(dst, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "random_vec3s"); return 0; } + s16 xRange = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "random_vec3s"); return 0; } + s16 yRange = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "random_vec3s"); return 0; } + s16 zRange = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "random_vec3s"); return 0; } + + random_vec3s(dst, xRange, yRange, zRange); + + smlua_push_vec3s(dst, 1); + + return 1; +} + +int smlua_func_clamp_positions_and_find_yaw(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 6) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "clamp_positions_and_find_yaw", 6, top); + return 0; + } + + + Vec3f pos; + smlua_get_vec3f(pos, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "clamp_positions_and_find_yaw"); return 0; } + + Vec3f origin; + smlua_get_vec3f(origin, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "clamp_positions_and_find_yaw"); return 0; } + f32 xMax = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "clamp_positions_and_find_yaw"); return 0; } + f32 xMin = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "clamp_positions_and_find_yaw"); return 0; } + f32 zMax = smlua_to_number(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "clamp_positions_and_find_yaw"); return 0; } + f32 zMin = smlua_to_number(L, 6); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "clamp_positions_and_find_yaw"); return 0; } + + lua_pushinteger(L, clamp_positions_and_find_yaw(pos, origin, xMax, xMin, zMax, zMin)); + + smlua_push_vec3f(pos, 1); + + smlua_push_vec3f(origin, 2); + + return 1; +} + +int smlua_func_is_range_behind_surface(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 5) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "is_range_behind_surface", 5, top); return 0; } Vec3f from; smlua_get_vec3f(from, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "calculate_angles"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_range_behind_surface"); return 0; } Vec3f to; smlua_get_vec3f(to, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "calculate_angles"); return 0; } - s16 * pitch = (s16 *)smlua_to_cpointer(L, 3, LVT_S16_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "calculate_angles"); return 0; } - s16 * yaw = (s16 *)smlua_to_cpointer(L, 4, LVT_S16_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "calculate_angles"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "is_range_behind_surface"); return 0; } + if (lua_isnil(L, 3)) { return 0; } + struct Surface* surf = (struct Surface*)smlua_to_cobject(L, 3, LOT_SURFACE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "is_range_behind_surface"); return 0; } + s16 range = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "is_range_behind_surface"); return 0; } + s16 surfType = smlua_to_integer(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "is_range_behind_surface"); return 0; } - calculate_angles(from, to, pitch, yaw); + lua_pushinteger(L, is_range_behind_surface(from, to, surf, range, surfType)); smlua_push_vec3f(from, 1); @@ -10203,6 +10789,41 @@ int smlua_func_calculate_angles(lua_State* L) { return 1; } +int smlua_func_scale_along_line(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "scale_along_line", 4, top); + return 0; + } + + + Vec3f dest; + smlua_get_vec3f(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "scale_along_line"); return 0; } + + Vec3f from; + smlua_get_vec3f(from, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "scale_along_line"); return 0; } + + Vec3f to; + smlua_get_vec3f(to, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "scale_along_line"); return 0; } + f32 scale = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "scale_along_line"); return 0; } + + scale_along_line(dest, from, to, scale); + + smlua_push_vec3f(dest, 1); + + smlua_push_vec3f(from, 2); + + smlua_push_vec3f(to, 3); + + return 1; +} + int smlua_func_calculate_pitch(lua_State* L) { if (L == NULL) { return 0; } @@ -10257,159 +10878,29 @@ int smlua_func_calculate_yaw(lua_State* L) { return 1; } -int smlua_func_cam_select_alt_mode(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", "cam_select_alt_mode", 1, top); - return 0; - } - - s32 angle = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cam_select_alt_mode"); return 0; } - - lua_pushinteger(L, cam_select_alt_mode(angle)); - - return 1; -} - -int smlua_func_camera_approach_f32_symmetric(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", "camera_approach_f32_symmetric", 3, top); - return 0; - } - - f32 value = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_approach_f32_symmetric"); return 0; } - f32 target = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "camera_approach_f32_symmetric"); return 0; } - f32 increment = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "camera_approach_f32_symmetric"); return 0; } - - lua_pushnumber(L, camera_approach_f32_symmetric(value, target, increment)); - - return 1; -} - -int smlua_func_camera_approach_f32_symmetric_bool(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", "camera_approach_f32_symmetric_bool", 3, top); - return 0; - } - - f32 * current = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_approach_f32_symmetric_bool"); return 0; } - f32 target = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "camera_approach_f32_symmetric_bool"); return 0; } - f32 increment = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "camera_approach_f32_symmetric_bool"); return 0; } - - lua_pushinteger(L, camera_approach_f32_symmetric_bool(current, target, increment)); - - return 1; -} - -int smlua_func_camera_approach_s16_symmetric_bool(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", "camera_approach_s16_symmetric_bool", 3, top); - return 0; - } - - s16 * current = (s16 *)smlua_to_cpointer(L, 1, LVT_S16_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_approach_s16_symmetric_bool"); return 0; } - s16 target = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "camera_approach_s16_symmetric_bool"); return 0; } - s16 increment = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "camera_approach_s16_symmetric_bool"); return 0; } - - lua_pushinteger(L, camera_approach_s16_symmetric_bool(current, target, increment)); - - return 1; -} - -int smlua_func_camera_course_processing(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", "camera_course_processing", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_course_processing"); return 0; } - - lua_pushinteger(L, camera_course_processing(c)); - - return 1; -} - -int smlua_func_camera_set_use_course_specific_settings(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", "camera_set_use_course_specific_settings", 1, top); - return 0; - } - - u8 enable = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_set_use_course_specific_settings"); return 0; } - - camera_set_use_course_specific_settings(enable); - - return 1; -} - -int smlua_func_center_rom_hack_camera(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", "center_rom_hack_camera", 0, top); - return 0; - } - - - center_rom_hack_camera(); - - return 1; -} - -int smlua_func_clamp_pitch(lua_State* L) { +int smlua_func_calculate_angles(lua_State* L) { if (L == NULL) { return 0; } int top = lua_gettop(L); if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "clamp_pitch", 4, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "calculate_angles", 4, top); return 0; } Vec3f from; smlua_get_vec3f(from, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "clamp_pitch"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "calculate_angles"); return 0; } Vec3f to; smlua_get_vec3f(to, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "clamp_pitch"); return 0; } - s16 maxPitch = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "clamp_pitch"); return 0; } - s16 minPitch = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "clamp_pitch"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "calculate_angles"); return 0; } + s16 * pitch = (s16 *)smlua_to_cpointer(L, 3, LVT_S16_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "calculate_angles"); return 0; } + s16 * yaw = (s16 *)smlua_to_cpointer(L, 4, LVT_S16_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "calculate_angles"); return 0; } - lua_pushinteger(L, clamp_pitch(from, to, maxPitch, minPitch)); + calculate_angles(from, to, pitch, yaw); smlua_push_vec3f(from, 1); @@ -10418,826 +10909,56 @@ int smlua_func_clamp_pitch(lua_State* L) { return 1; } -int smlua_func_clamp_positions_and_find_yaw(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 6) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "clamp_positions_and_find_yaw", 6, top); - return 0; - } - - - Vec3f pos; - smlua_get_vec3f(pos, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "clamp_positions_and_find_yaw"); return 0; } - - Vec3f origin; - smlua_get_vec3f(origin, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "clamp_positions_and_find_yaw"); return 0; } - f32 xMax = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "clamp_positions_and_find_yaw"); return 0; } - f32 xMin = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "clamp_positions_and_find_yaw"); return 0; } - f32 zMax = smlua_to_number(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "clamp_positions_and_find_yaw"); return 0; } - f32 zMin = smlua_to_number(L, 6); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "clamp_positions_and_find_yaw"); return 0; } - - lua_pushinteger(L, clamp_positions_and_find_yaw(pos, origin, xMax, xMin, zMax, zMin)); - - smlua_push_vec3f(pos, 1); - - smlua_push_vec3f(origin, 2); - - return 1; -} - -int smlua_func_collide_with_walls(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", "collide_with_walls", 3, top); - return 0; - } - - - Vec3f pos; - smlua_get_vec3f(pos, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "collide_with_walls"); return 0; } - f32 offsetY = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "collide_with_walls"); return 0; } - f32 radius = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "collide_with_walls"); return 0; } - - lua_pushinteger(L, collide_with_walls(pos, offsetY, radius)); - - smlua_push_vec3f(pos, 1); - - return 1; -} - -/* -int smlua_func_cutscene_event(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cutscene_event", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } -// CameraEvent event = (CameraEvent)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_event"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Camera* c = (struct Camera*)smlua_to_cobject(L, 2, LOT_CAMERA); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cutscene_event"); return 0; } - s16 start = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cutscene_event"); return 0; } - s16 end = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "cutscene_event"); return 0; } - - lua_pushinteger(L, cutscene_event(event, c, start, end)); - - return 1; -} -*/ - -int smlua_func_cutscene_object(lua_State* L) { +int smlua_func_calc_abs_dist(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", "cutscene_object", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "calc_abs_dist", 2, top); return 0; } - u8 cutscene = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_object"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cutscene_object"); return 0; } - lua_pushinteger(L, cutscene_object(cutscene, o)); + Vec3f a; + smlua_get_vec3f(a, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "calc_abs_dist"); return 0; } + + Vec3f b; + smlua_get_vec3f(b, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "calc_abs_dist"); return 0; } + + lua_pushnumber(L, calc_abs_dist(a, b)); + + smlua_push_vec3f(a, 1); + + smlua_push_vec3f(b, 2); return 1; } -int smlua_func_cutscene_object_with_dialog(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", "cutscene_object_with_dialog", 3, top); - return 0; - } - - u8 cutscene = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_object_with_dialog"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cutscene_object_with_dialog"); return 0; } - s16 dialogID = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cutscene_object_with_dialog"); return 0; } - - lua_pushinteger(L, cutscene_object_with_dialog(cutscene, o, dialogID)); - - return 1; -} - -int smlua_func_cutscene_object_without_dialog(lua_State* L) { +int smlua_func_calc_hor_dist(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", "cutscene_object_without_dialog", 2, top); - return 0; - } - - u8 cutscene = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_object_without_dialog"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cutscene_object_without_dialog"); return 0; } - - lua_pushinteger(L, cutscene_object_without_dialog(cutscene, o)); - - return 1; -} - -int smlua_func_cutscene_set_fov_shake_preset(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", "cutscene_set_fov_shake_preset", 1, top); - return 0; - } - - u8 preset = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_set_fov_shake_preset"); return 0; } - - cutscene_set_fov_shake_preset(preset); - - return 1; -} - -int smlua_func_cutscene_spawn_obj(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", "cutscene_spawn_obj", 2, top); - return 0; - } - - u32 obj = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_spawn_obj"); return 0; } - s16 frame = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cutscene_spawn_obj"); return 0; } - - lua_pushinteger(L, cutscene_spawn_obj(obj, frame)); - - return 1; -} - -int smlua_func_find_c_buttons_pressed(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", "find_c_buttons_pressed", 3, top); - return 0; - } - - u16 currentState = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_c_buttons_pressed"); return 0; } - u16 buttonsPressed = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "find_c_buttons_pressed"); return 0; } - u16 buttonsDown = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "find_c_buttons_pressed"); return 0; } - - lua_pushinteger(L, find_c_buttons_pressed(currentState, buttonsPressed, buttonsDown)); - - return 1; -} - -int smlua_func_find_mario_floor_and_ceil(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", "find_mario_floor_and_ceil", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct PlayerGeometry* pg = (struct PlayerGeometry*)smlua_to_cobject(L, 1, LOT_PLAYERGEOMETRY); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_mario_floor_and_ceil"); return 0; } - - find_mario_floor_and_ceil(pg); - - 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; } - if (lua_isnil(L, 2)) { 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; } - if (lua_isnil(L, 3)) { 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_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; } - if (lua_isnil(L, 2)) { 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; } - if (lua_isnil(L, 3)) { 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_get_cutscene_from_mario_status(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", "get_cutscene_from_mario_status", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_cutscene_from_mario_status"); return 0; } - - lua_pushinteger(L, get_cutscene_from_mario_status(c)); - - return 1; -} - -int smlua_func_handle_c_button_movement(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", "handle_c_button_movement", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "handle_c_button_movement"); return 0; } - - handle_c_button_movement(c); - - return 1; -} - -int smlua_func_is_range_behind_surface(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 5) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "is_range_behind_surface", 5, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "calc_hor_dist", 2, top); return 0; } - Vec3f from; - smlua_get_vec3f(from, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_range_behind_surface"); return 0; } + Vec3f a; + smlua_get_vec3f(a, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "calc_hor_dist"); return 0; } - Vec3f to; - smlua_get_vec3f(to, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "is_range_behind_surface"); return 0; } - if (lua_isnil(L, 3)) { return 0; } - struct Surface* surf = (struct Surface*)smlua_to_cobject(L, 3, LOT_SURFACE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "is_range_behind_surface"); return 0; } - s16 range = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "is_range_behind_surface"); return 0; } - s16 surfType = smlua_to_integer(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "is_range_behind_surface"); return 0; } + Vec3f b; + smlua_get_vec3f(b, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "calc_hor_dist"); return 0; } - lua_pushinteger(L, is_range_behind_surface(from, to, surf, range, surfType)); + lua_pushnumber(L, calc_hor_dist(a, b)); - smlua_push_vec3f(from, 1); + smlua_push_vec3f(a, 1); - smlua_push_vec3f(to, 2); - - return 1; -} - -int smlua_func_is_within_100_units_of_mario(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", "is_within_100_units_of_mario", 3, top); - return 0; - } - - f32 posX = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_within_100_units_of_mario"); return 0; } - f32 posY = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "is_within_100_units_of_mario"); return 0; } - f32 posZ = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "is_within_100_units_of_mario"); return 0; } - - lua_pushinteger(L, is_within_100_units_of_mario(posX, posY, posZ)); - - return 1; -} - -int smlua_func_move_mario_head_c_up(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", "move_mario_head_c_up", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "move_mario_head_c_up"); return 0; } - - move_mario_head_c_up(c); - - return 1; -} - -int smlua_func_next_lakitu_state(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 7) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "next_lakitu_state", 7, top); - return 0; - } - - - Vec3f newPos; - smlua_get_vec3f(newPos, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "next_lakitu_state"); return 0; } - - Vec3f newFoc; - smlua_get_vec3f(newFoc, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "next_lakitu_state"); return 0; } - - Vec3f curPos; - smlua_get_vec3f(curPos, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "next_lakitu_state"); return 0; } - - Vec3f curFoc; - smlua_get_vec3f(curFoc, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "next_lakitu_state"); return 0; } - - Vec3f oldPos; - smlua_get_vec3f(oldPos, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "next_lakitu_state"); return 0; } - - Vec3f oldFoc; - smlua_get_vec3f(oldFoc, 6); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "next_lakitu_state"); return 0; } - s16 yaw = smlua_to_integer(L, 7); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "next_lakitu_state"); return 0; } - - lua_pushinteger(L, next_lakitu_state(newPos, newFoc, curPos, curFoc, oldPos, oldFoc, yaw)); - - smlua_push_vec3f(newPos, 1); - - smlua_push_vec3f(newFoc, 2); - - smlua_push_vec3f(curPos, 3); - - smlua_push_vec3f(curFoc, 4); - - smlua_push_vec3f(oldPos, 5); - - smlua_push_vec3f(oldFoc, 6); - - return 1; -} - -int smlua_func_obj_rotate_towards_point(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 6) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_rotate_towards_point", 6, top); - return 0; - } - - if (lua_isnil(L, 1)) { 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_rotate_towards_point"); return 0; } - - Vec3f point; - smlua_get_vec3f(point, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_rotate_towards_point"); return 0; } - s16 pitchOff = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_rotate_towards_point"); return 0; } - s16 yawOff = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_rotate_towards_point"); return 0; } - s16 pitchDiv = smlua_to_integer(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "obj_rotate_towards_point"); return 0; } - s16 yawDiv = smlua_to_integer(L, 6); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "obj_rotate_towards_point"); return 0; } - - obj_rotate_towards_point(o, point, pitchOff, yawOff, pitchDiv, yawDiv); - - smlua_push_vec3f(point, 2); - - return 1; -} - -int smlua_func_object_pos_to_vec3f(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", "object_pos_to_vec3f", 2, top); - return 0; - } - - - Vec3f dst; - smlua_get_vec3f(dst, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "object_pos_to_vec3f"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "object_pos_to_vec3f"); return 0; } - - object_pos_to_vec3f(dst, o); - - smlua_push_vec3f(dst, 1); - - return 1; -} - -int smlua_func_offset_rotated(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "offset_rotated", 4, top); - return 0; - } - - - Vec3f dst; - smlua_get_vec3f(dst, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "offset_rotated"); return 0; } - - Vec3f from; - smlua_get_vec3f(from, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "offset_rotated"); return 0; } - - Vec3f to; - smlua_get_vec3f(to, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "offset_rotated"); return 0; } - - Vec3s rotation; - smlua_get_vec3s(rotation, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "offset_rotated"); return 0; } - - offset_rotated(dst, from, to, rotation); - - smlua_push_vec3f(dst, 1); - - smlua_push_vec3f(from, 2); - - smlua_push_vec3f(to, 3); - - smlua_push_vec3s(rotation, 4); - - return 1; -} - -int smlua_func_offset_yaw_outward_radial(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", "offset_yaw_outward_radial", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "offset_yaw_outward_radial"); return 0; } - s16 areaYaw = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "offset_yaw_outward_radial"); return 0; } - - lua_pushinteger(L, offset_yaw_outward_radial(c, areaYaw)); - - return 1; -} - -int smlua_func_play_camera_buzz_if_c_sideways(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", "play_camera_buzz_if_c_sideways", 0, top); - return 0; - } - - - play_camera_buzz_if_c_sideways(); - - return 1; -} - -int smlua_func_play_camera_buzz_if_cbutton(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", "play_camera_buzz_if_cbutton", 0, top); - return 0; - } - - - play_camera_buzz_if_cbutton(); - - return 1; -} - -int smlua_func_play_camera_buzz_if_cdown(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", "play_camera_buzz_if_cdown", 0, top); - return 0; - } - - - play_camera_buzz_if_cdown(); - - return 1; -} - -int smlua_func_play_cutscene(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", "play_cutscene", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_cutscene"); return 0; } - - play_cutscene(c); - - return 1; -} - -int smlua_func_play_sound_button_change_blocked(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", "play_sound_button_change_blocked", 0, top); - return 0; - } - - - play_sound_button_change_blocked(); - - return 1; -} - -int smlua_func_play_sound_cbutton_down(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", "play_sound_cbutton_down", 0, top); - return 0; - } - - - play_sound_cbutton_down(); - - return 1; -} - -int smlua_func_play_sound_cbutton_side(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", "play_sound_cbutton_side", 0, top); - return 0; - } - - - play_sound_cbutton_side(); - - return 1; -} - -int smlua_func_play_sound_cbutton_up(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", "play_sound_cbutton_up", 0, top); - return 0; - } - - - play_sound_cbutton_up(); - - return 1; -} - -int smlua_func_play_sound_if_cam_switched_to_lakitu_or_mario(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", "play_sound_if_cam_switched_to_lakitu_or_mario", 0, top); - return 0; - } - - - play_sound_if_cam_switched_to_lakitu_or_mario(); - - return 1; -} - -int smlua_func_play_sound_rbutton_changed(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", "play_sound_rbutton_changed", 0, top); - return 0; - } - - - play_sound_rbutton_changed(); - - return 1; -} - -int smlua_func_radial_camera_input(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", "radial_camera_input", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "radial_camera_input"); return 0; } - f32 unused = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "radial_camera_input"); return 0; } - - lua_pushinteger(L, radial_camera_input(c, unused)); - - return 1; -} - -int smlua_func_random_vec3s(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "random_vec3s", 4, top); - return 0; - } - - - Vec3s dst; - smlua_get_vec3s(dst, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "random_vec3s"); return 0; } - s16 xRange = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "random_vec3s"); return 0; } - s16 yRange = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "random_vec3s"); return 0; } - s16 zRange = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "random_vec3s"); return 0; } - - random_vec3s(dst, xRange, yRange, zRange); - - smlua_push_vec3s(dst, 1); - - return 1; -} - -int smlua_func_reset_camera(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", "reset_camera", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "reset_camera"); return 0; } - - reset_camera(c); - - return 1; -} - -int smlua_func_resolve_geometry_collisions(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", "resolve_geometry_collisions", 2, top); - return 0; - } - - - Vec3f pos; - smlua_get_vec3f(pos, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "resolve_geometry_collisions"); return 0; } - - Vec3f lastGood; - smlua_get_vec3f(lastGood, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "resolve_geometry_collisions"); return 0; } - - resolve_geometry_collisions(pos, lastGood); - - smlua_push_vec3f(pos, 1); - - smlua_push_vec3f(lastGood, 2); - - return 1; -} - -int smlua_func_rotate_camera_around_walls(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "rotate_camera_around_walls", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "rotate_camera_around_walls"); return 0; } - - Vec3f cPos; - smlua_get_vec3f(cPos, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "rotate_camera_around_walls"); return 0; } - s16 * avoidYaw = (s16 *)smlua_to_cpointer(L, 3, LVT_S16_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "rotate_camera_around_walls"); return 0; } - s16 yawRange = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "rotate_camera_around_walls"); return 0; } - - lua_pushinteger(L, rotate_camera_around_walls(c, cPos, avoidYaw, yawRange)); - - smlua_push_vec3f(cPos, 2); + smlua_push_vec3f(b, 2); return 1; } @@ -11300,119 +11021,6 @@ int smlua_func_rotate_in_yz(lua_State* L) { return 1; } -int smlua_func_scale_along_line(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "scale_along_line", 4, top); - return 0; - } - - - Vec3f dest; - smlua_get_vec3f(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "scale_along_line"); return 0; } - - Vec3f from; - smlua_get_vec3f(from, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "scale_along_line"); return 0; } - - Vec3f to; - smlua_get_vec3f(to, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "scale_along_line"); return 0; } - f32 scale = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "scale_along_line"); return 0; } - - scale_along_line(dest, from, to, scale); - - smlua_push_vec3f(dest, 1); - - smlua_push_vec3f(from, 2); - - smlua_push_vec3f(to, 3); - - return 1; -} - -int smlua_func_select_mario_cam_mode(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", "select_mario_cam_mode", 0, top); - return 0; - } - - - select_mario_cam_mode(); - - return 1; -} - -int smlua_func_set_cam_angle(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", "set_cam_angle", 1, top); - return 0; - } - - s32 mode = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_cam_angle"); return 0; } - - lua_pushinteger(L, set_cam_angle(mode)); - - return 1; -} - -int smlua_func_set_camera_mode(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", "set_camera_mode", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_camera_mode"); return 0; } - s16 mode = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_camera_mode"); return 0; } - s16 frames = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_camera_mode"); return 0; } - - set_camera_mode(c, mode, frames); - - return 1; -} - -int smlua_func_set_camera_mode_fixed(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_camera_mode_fixed", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_camera_mode_fixed"); return 0; } - s16 x = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_camera_mode_fixed"); return 0; } - s16 y = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_camera_mode_fixed"); return 0; } - s16 z = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "set_camera_mode_fixed"); return 0; } - - lua_pushinteger(L, set_camera_mode_fixed(c, x, y, z)); - - return 1; -} - int smlua_func_set_camera_pitch_shake(lua_State* L) { if (L == NULL) { return 0; } @@ -11434,67 +11042,6 @@ int smlua_func_set_camera_pitch_shake(lua_State* L) { return 1; } -int smlua_func_set_camera_roll_shake(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", "set_camera_roll_shake", 3, top); - return 0; - } - - s16 mag = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_camera_roll_shake"); return 0; } - s16 decay = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_camera_roll_shake"); return 0; } - s16 inc = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_camera_roll_shake"); return 0; } - - set_camera_roll_shake(mag, decay, inc); - - return 1; -} - -int smlua_func_set_camera_shake_from_hit(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", "set_camera_shake_from_hit", 1, top); - return 0; - } - - s16 shake = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_camera_shake_from_hit"); return 0; } - - set_camera_shake_from_hit(shake); - - return 1; -} - -int smlua_func_set_camera_shake_from_point(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_camera_shake_from_point", 4, top); - return 0; - } - - s16 shake = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_camera_shake_from_point"); return 0; } - f32 posX = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_camera_shake_from_point"); return 0; } - f32 posY = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_camera_shake_from_point"); return 0; } - f32 posZ = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "set_camera_shake_from_point"); return 0; } - - set_camera_shake_from_point(shake, posX, posY, posZ); - - return 1; -} - int smlua_func_set_camera_yaw_shake(lua_State* L) { if (L == NULL) { return 0; } @@ -11516,189 +11063,23 @@ int smlua_func_set_camera_yaw_shake(lua_State* L) { return 1; } -int smlua_func_set_environmental_camera_shake(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", "set_environmental_camera_shake", 1, top); - return 0; - } - - s16 shake = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_environmental_camera_shake"); return 0; } - - set_environmental_camera_shake(shake); - - return 1; -} - -int smlua_func_set_fixed_cam_axis_sa_lobby(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", "set_fixed_cam_axis_sa_lobby", 1, top); - return 0; - } - - s16 preset = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_fixed_cam_axis_sa_lobby"); return 0; } - - set_fixed_cam_axis_sa_lobby(preset); - - return 1; -} - -int smlua_func_set_fov_function(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", "set_fov_function", 1, top); - return 0; - } - - u8 func = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_fov_function"); return 0; } - - set_fov_function(func); - - return 1; -} - -int smlua_func_set_fov_shake(lua_State* L) { +int smlua_func_set_camera_roll_shake(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", "set_fov_shake", 3, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_camera_roll_shake", 3, top); return 0; } - s16 amplitude = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_fov_shake"); return 0; } + s16 mag = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_camera_roll_shake"); return 0; } s16 decay = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_fov_shake"); return 0; } - s16 shakeSpeed = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_fov_shake"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_camera_roll_shake"); return 0; } + s16 inc = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_camera_roll_shake"); return 0; } - set_fov_shake(amplitude, decay, shakeSpeed); - - return 1; -} - -int smlua_func_set_fov_shake_from_point_preset(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_fov_shake_from_point_preset", 4, top); - return 0; - } - - u8 preset = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_fov_shake_from_point_preset"); return 0; } - f32 posX = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_fov_shake_from_point_preset"); return 0; } - f32 posY = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_fov_shake_from_point_preset"); return 0; } - f32 posZ = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "set_fov_shake_from_point_preset"); return 0; } - - set_fov_shake_from_point_preset(preset, posX, posY, posZ); - - return 1; -} - -int smlua_func_set_handheld_shake(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", "set_handheld_shake", 1, top); - return 0; - } - - u8 mode = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_handheld_shake"); return 0; } - - set_handheld_shake(mode); - - return 1; -} - -int smlua_func_set_or_approach_f32_asymptotic(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", "set_or_approach_f32_asymptotic", 3, top); - return 0; - } - - f32 * dst = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_or_approach_f32_asymptotic"); return 0; } - f32 goal = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_or_approach_f32_asymptotic"); return 0; } - f32 scale = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_or_approach_f32_asymptotic"); return 0; } - - lua_pushinteger(L, set_or_approach_f32_asymptotic(dst, goal, scale)); - - return 1; -} - -int smlua_func_set_or_approach_s16_symmetric(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", "set_or_approach_s16_symmetric", 3, top); - return 0; - } - - s16 * current = (s16 *)smlua_to_cpointer(L, 1, LVT_S16_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_or_approach_s16_symmetric"); return 0; } - s16 target = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_or_approach_s16_symmetric"); return 0; } - s16 increment = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_or_approach_s16_symmetric"); return 0; } - - lua_pushinteger(L, set_or_approach_s16_symmetric(current, target, increment)); - - return 1; -} - -int smlua_func_set_or_approach_vec3f_asymptotic(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 5) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_or_approach_vec3f_asymptotic", 5, top); - return 0; - } - - - Vec3f dst; - smlua_get_vec3f(dst, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_or_approach_vec3f_asymptotic"); return 0; } - - Vec3f goal; - smlua_get_vec3f(goal, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_or_approach_vec3f_asymptotic"); return 0; } - f32 xMul = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_or_approach_vec3f_asymptotic"); return 0; } - f32 yMul = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "set_or_approach_vec3f_asymptotic"); return 0; } - f32 zMul = smlua_to_number(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "set_or_approach_vec3f_asymptotic"); return 0; } - - set_or_approach_vec3f_asymptotic(dst, goal, xMul, yMul, zMul); - - smlua_push_vec3f(dst, 1); - - smlua_push_vec3f(goal, 2); + set_camera_roll_shake(mag, decay, inc); return 1; } @@ -11732,33 +11113,6 @@ int smlua_func_set_pitch_shake_from_point(lua_State* L) { return 1; } -int smlua_func_shake_camera_handheld(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", "shake_camera_handheld", 2, top); - return 0; - } - - - Vec3f pos; - smlua_get_vec3f(pos, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "shake_camera_handheld"); return 0; } - - Vec3f focus; - smlua_get_vec3f(focus, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "shake_camera_handheld"); return 0; } - - shake_camera_handheld(pos, focus); - - smlua_push_vec3f(pos, 1); - - smlua_push_vec3f(focus, 2); - - return 1; -} - int smlua_func_shake_camera_pitch(lua_State* L) { if (L == NULL) { return 0; } @@ -11786,23 +11140,6 @@ int smlua_func_shake_camera_pitch(lua_State* L) { return 1; } -int smlua_func_shake_camera_roll(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", "shake_camera_roll", 1, top); - return 0; - } - - s16 * roll = (s16 *)smlua_to_cpointer(L, 1, LVT_S16_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "shake_camera_roll"); return 0; } - - shake_camera_roll(roll); - - return 1; -} - int smlua_func_shake_camera_yaw(lua_State* L) { if (L == NULL) { return 0; } @@ -11830,52 +11167,229 @@ int smlua_func_shake_camera_yaw(lua_State* L) { return 1; } -int smlua_func_skip_camera_interpolation(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", "skip_camera_interpolation", 0, top); - return 0; - } - - - skip_camera_interpolation(); - - return 1; -} - -int smlua_func_snap_to_45_degrees(lua_State* L) { +int smlua_func_shake_camera_roll(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", "snap_to_45_degrees", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "shake_camera_roll", 1, top); return 0; } - s16 angle = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "snap_to_45_degrees"); return 0; } + s16 * roll = (s16 *)smlua_to_cpointer(L, 1, LVT_S16_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "shake_camera_roll"); return 0; } - lua_pushinteger(L, snap_to_45_degrees(angle)); + shake_camera_roll(roll); return 1; } -int smlua_func_soft_reset_camera(lua_State* L) { +int smlua_func_offset_yaw_outward_radial(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", "soft_reset_camera", 1, top); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "offset_yaw_outward_radial", 2, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "soft_reset_camera"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "offset_yaw_outward_radial"); return 0; } + s16 areaYaw = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "offset_yaw_outward_radial"); return 0; } - soft_reset_camera(c); + lua_pushinteger(L, offset_yaw_outward_radial(c, areaYaw)); + + return 1; +} + +int smlua_func_play_camera_buzz_if_cdown(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", "play_camera_buzz_if_cdown", 0, top); + return 0; + } + + + play_camera_buzz_if_cdown(); + + return 1; +} + +int smlua_func_play_camera_buzz_if_cbutton(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", "play_camera_buzz_if_cbutton", 0, top); + return 0; + } + + + play_camera_buzz_if_cbutton(); + + return 1; +} + +int smlua_func_play_camera_buzz_if_c_sideways(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", "play_camera_buzz_if_c_sideways", 0, top); + return 0; + } + + + play_camera_buzz_if_c_sideways(); + + return 1; +} + +int smlua_func_play_sound_cbutton_up(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", "play_sound_cbutton_up", 0, top); + return 0; + } + + + play_sound_cbutton_up(); + + return 1; +} + +int smlua_func_play_sound_cbutton_down(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", "play_sound_cbutton_down", 0, top); + return 0; + } + + + play_sound_cbutton_down(); + + return 1; +} + +int smlua_func_play_sound_cbutton_side(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", "play_sound_cbutton_side", 0, top); + return 0; + } + + + play_sound_cbutton_side(); + + return 1; +} + +int smlua_func_play_sound_button_change_blocked(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", "play_sound_button_change_blocked", 0, top); + return 0; + } + + + play_sound_button_change_blocked(); + + return 1; +} + +int smlua_func_play_sound_rbutton_changed(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", "play_sound_rbutton_changed", 0, top); + return 0; + } + + + play_sound_rbutton_changed(); + + return 1; +} + +int smlua_func_play_sound_if_cam_switched_to_lakitu_or_mario(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", "play_sound_if_cam_switched_to_lakitu_or_mario", 0, top); + return 0; + } + + + play_sound_if_cam_switched_to_lakitu_or_mario(); + + return 1; +} + +int smlua_func_radial_camera_input(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", "radial_camera_input", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "radial_camera_input"); return 0; } + f32 unused = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "radial_camera_input"); return 0; } + + lua_pushinteger(L, radial_camera_input(c, unused)); + + return 1; +} + +int smlua_func_trigger_cutscene_dialog(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", "trigger_cutscene_dialog", 1, top); + return 0; + } + + s32 trigger = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "trigger_cutscene_dialog"); return 0; } + + lua_pushinteger(L, trigger_cutscene_dialog(trigger)); + + return 1; +} + +int smlua_func_handle_c_button_movement(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", "handle_c_button_movement", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "handle_c_button_movement"); return 0; } + + handle_c_button_movement(c); return 1; } @@ -11900,107 +11414,20 @@ int smlua_func_start_cutscene(lua_State* L) { return 1; } -int smlua_func_start_object_cutscene_without_focus(lua_State* L) { +int smlua_func_get_cutscene_from_mario_status(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", "start_object_cutscene_without_focus", 1, top); - return 0; - } - - u8 cutscene = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "start_object_cutscene_without_focus"); return 0; } - - lua_pushinteger(L, start_object_cutscene_without_focus(cutscene)); - - return 1; -} - -int smlua_func_transition_next_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", "transition_next_state", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "get_cutscene_from_mario_status", 1, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "transition_next_state"); return 0; } - s16 frames = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "transition_next_state"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_cutscene_from_mario_status"); return 0; } - transition_next_state(c, frames); - - return 1; -} - -int smlua_func_trigger_cutscene_dialog(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", "trigger_cutscene_dialog", 1, top); - return 0; - } - - s32 trigger = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "trigger_cutscene_dialog"); return 0; } - - lua_pushinteger(L, trigger_cutscene_dialog(trigger)); - - return 1; -} - -int smlua_func_vec3f_sub(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", "vec3f_sub", 2, top); - return 0; - } - - - Vec3f dst; - smlua_get_vec3f(dst, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_sub"); return 0; } - - Vec3f src; - smlua_get_vec3f(src, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_sub"); return 0; } - - vec3f_sub(dst, src); - - smlua_push_vec3f(dst, 1); - - smlua_push_vec3f(src, 2); - - return 1; -} - -int smlua_func_vec3f_to_object_pos(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", "vec3f_to_object_pos", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { 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, "vec3f_to_object_pos"); return 0; } - - Vec3f src; - smlua_get_vec3f(src, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_to_object_pos"); return 0; } - - vec3f_to_object_pos(o, src); - - smlua_push_vec3f(src, 2); + lua_pushinteger(L, get_cutscene_from_mario_status(c)); return 1; } @@ -12026,6 +11453,579 @@ int smlua_func_warp_camera(lua_State* L) { return 1; } +int smlua_func_approach_camera_height(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", "approach_camera_height", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "approach_camera_height"); return 0; } + f32 goal = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "approach_camera_height"); return 0; } + f32 inc = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "approach_camera_height"); return 0; } + + approach_camera_height(c, goal, inc); + + return 1; +} + +int smlua_func_offset_rotated(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "offset_rotated", 4, top); + return 0; + } + + + Vec3f dst; + smlua_get_vec3f(dst, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "offset_rotated"); return 0; } + + Vec3f from; + smlua_get_vec3f(from, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "offset_rotated"); return 0; } + + Vec3f to; + smlua_get_vec3f(to, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "offset_rotated"); return 0; } + + Vec3s rotation; + smlua_get_vec3s(rotation, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "offset_rotated"); return 0; } + + offset_rotated(dst, from, to, rotation); + + smlua_push_vec3f(dst, 1); + + smlua_push_vec3f(from, 2); + + smlua_push_vec3f(to, 3); + + smlua_push_vec3s(rotation, 4); + + return 1; +} + +int smlua_func_next_lakitu_state(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 7) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "next_lakitu_state", 7, top); + return 0; + } + + + Vec3f newPos; + smlua_get_vec3f(newPos, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "next_lakitu_state"); return 0; } + + Vec3f newFoc; + smlua_get_vec3f(newFoc, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "next_lakitu_state"); return 0; } + + Vec3f curPos; + smlua_get_vec3f(curPos, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "next_lakitu_state"); return 0; } + + Vec3f curFoc; + smlua_get_vec3f(curFoc, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "next_lakitu_state"); return 0; } + + Vec3f oldPos; + smlua_get_vec3f(oldPos, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "next_lakitu_state"); return 0; } + + Vec3f oldFoc; + smlua_get_vec3f(oldFoc, 6); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "next_lakitu_state"); return 0; } + s16 yaw = smlua_to_integer(L, 7); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "next_lakitu_state"); return 0; } + + lua_pushinteger(L, next_lakitu_state(newPos, newFoc, curPos, curFoc, oldPos, oldFoc, yaw)); + + smlua_push_vec3f(newPos, 1); + + smlua_push_vec3f(newFoc, 2); + + smlua_push_vec3f(curPos, 3); + + smlua_push_vec3f(curFoc, 4); + + smlua_push_vec3f(oldPos, 5); + + smlua_push_vec3f(oldFoc, 6); + + return 1; +} + +int smlua_func_set_fixed_cam_axis_sa_lobby(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", "set_fixed_cam_axis_sa_lobby", 1, top); + return 0; + } + + s16 preset = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_fixed_cam_axis_sa_lobby"); return 0; } + + set_fixed_cam_axis_sa_lobby(preset); + + return 1; +} + +int smlua_func_camera_course_processing(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", "camera_course_processing", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_course_processing"); return 0; } + + lua_pushinteger(L, camera_course_processing(c)); + + return 1; +} + +int smlua_func_resolve_geometry_collisions(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", "resolve_geometry_collisions", 2, top); + return 0; + } + + + Vec3f pos; + smlua_get_vec3f(pos, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "resolve_geometry_collisions"); return 0; } + + Vec3f lastGood; + smlua_get_vec3f(lastGood, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "resolve_geometry_collisions"); return 0; } + + resolve_geometry_collisions(pos, lastGood); + + smlua_push_vec3f(pos, 1); + + smlua_push_vec3f(lastGood, 2); + + return 1; +} + +int smlua_func_rotate_camera_around_walls(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "rotate_camera_around_walls", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "rotate_camera_around_walls"); return 0; } + + Vec3f cPos; + smlua_get_vec3f(cPos, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "rotate_camera_around_walls"); return 0; } + s16 * avoidYaw = (s16 *)smlua_to_cpointer(L, 3, LVT_S16_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "rotate_camera_around_walls"); return 0; } + s16 yawRange = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "rotate_camera_around_walls"); return 0; } + + lua_pushinteger(L, rotate_camera_around_walls(c, cPos, avoidYaw, yawRange)); + + smlua_push_vec3f(cPos, 2); + + return 1; +} + +int smlua_func_find_mario_floor_and_ceil(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", "find_mario_floor_and_ceil", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct PlayerGeometry* pg = (struct PlayerGeometry*)smlua_to_cobject(L, 1, LOT_PLAYERGEOMETRY); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_mario_floor_and_ceil"); return 0; } + + find_mario_floor_and_ceil(pg); + + return 1; +} + +int smlua_func_start_object_cutscene_without_focus(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", "start_object_cutscene_without_focus", 1, top); + return 0; + } + + u8 cutscene = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "start_object_cutscene_without_focus"); return 0; } + + lua_pushinteger(L, start_object_cutscene_without_focus(cutscene)); + + return 1; +} + +int smlua_func_cutscene_object_with_dialog(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", "cutscene_object_with_dialog", 3, top); + return 0; + } + + u8 cutscene = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_object_with_dialog"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cutscene_object_with_dialog"); return 0; } + s16 dialogID = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cutscene_object_with_dialog"); return 0; } + + lua_pushinteger(L, cutscene_object_with_dialog(cutscene, o, dialogID)); + + return 1; +} + +int smlua_func_cutscene_object_without_dialog(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", "cutscene_object_without_dialog", 2, top); + return 0; + } + + u8 cutscene = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_object_without_dialog"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cutscene_object_without_dialog"); return 0; } + + lua_pushinteger(L, cutscene_object_without_dialog(cutscene, o)); + + return 1; +} + +int smlua_func_cutscene_object(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", "cutscene_object", 2, top); + return 0; + } + + u8 cutscene = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_object"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cutscene_object"); return 0; } + + lua_pushinteger(L, cutscene_object(cutscene, o)); + + return 1; +} + +int smlua_func_play_cutscene(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", "play_cutscene", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_cutscene"); return 0; } + + play_cutscene(c); + + return 1; +} + +/* +int smlua_func_cutscene_event(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cutscene_event", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } +// CameraEvent event = (CameraEvent)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_event"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Camera* c = (struct Camera*)smlua_to_cobject(L, 2, LOT_CAMERA); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cutscene_event"); return 0; } + s16 start = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cutscene_event"); return 0; } + s16 end = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "cutscene_event"); return 0; } + + lua_pushinteger(L, cutscene_event(event, c, start, end)); + + return 1; +} +*/ + +int smlua_func_cutscene_spawn_obj(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", "cutscene_spawn_obj", 2, top); + return 0; + } + + u32 obj = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_spawn_obj"); return 0; } + s16 frame = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cutscene_spawn_obj"); return 0; } + + lua_pushinteger(L, cutscene_spawn_obj(obj, frame)); + + return 1; +} + +int smlua_func_set_fov_shake(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", "set_fov_shake", 3, top); + return 0; + } + + s16 amplitude = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_fov_shake"); return 0; } + s16 decay = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_fov_shake"); return 0; } + s16 shakeSpeed = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_fov_shake"); return 0; } + + set_fov_shake(amplitude, decay, shakeSpeed); + + return 1; +} + +int smlua_func_set_fov_function(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", "set_fov_function", 1, top); + return 0; + } + + u8 func = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_fov_function"); return 0; } + + set_fov_function(func); + + return 1; +} + +int smlua_func_cutscene_set_fov_shake_preset(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", "cutscene_set_fov_shake_preset", 1, top); + return 0; + } + + u8 preset = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_set_fov_shake_preset"); return 0; } + + cutscene_set_fov_shake_preset(preset); + + return 1; +} + +int smlua_func_set_fov_shake_from_point_preset(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_fov_shake_from_point_preset", 4, top); + return 0; + } + + u8 preset = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_fov_shake_from_point_preset"); return 0; } + f32 posX = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_fov_shake_from_point_preset"); return 0; } + f32 posY = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_fov_shake_from_point_preset"); return 0; } + f32 posZ = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "set_fov_shake_from_point_preset"); return 0; } + + set_fov_shake_from_point_preset(preset, posX, posY, posZ); + + return 1; +} + +int smlua_func_obj_rotate_towards_point(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 6) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_rotate_towards_point", 6, top); + return 0; + } + + if (lua_isnil(L, 1)) { 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_rotate_towards_point"); return 0; } + + Vec3f point; + smlua_get_vec3f(point, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_rotate_towards_point"); return 0; } + s16 pitchOff = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_rotate_towards_point"); return 0; } + s16 yawOff = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_rotate_towards_point"); return 0; } + s16 pitchDiv = smlua_to_integer(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "obj_rotate_towards_point"); return 0; } + s16 yawDiv = smlua_to_integer(L, 6); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "obj_rotate_towards_point"); return 0; } + + obj_rotate_towards_point(o, point, pitchOff, yawOff, pitchDiv, yawDiv); + + smlua_push_vec3f(point, 2); + + 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; } + if (lua_isnil(L, 2)) { 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; } + if (lua_isnil(L, 3)) { 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; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_camera_mode_fixed", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Camera* c = (struct Camera*)smlua_to_cobject(L, 1, LOT_CAMERA); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_camera_mode_fixed"); return 0; } + s16 x = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_camera_mode_fixed"); return 0; } + s16 y = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_camera_mode_fixed"); return 0; } + s16 z = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "set_camera_mode_fixed"); return 0; } + + lua_pushinteger(L, set_camera_mode_fixed(c, x, y, z)); + + return 1; +} + +int smlua_func_snap_to_45_degrees(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", "snap_to_45_degrees", 1, top); + return 0; + } + + s16 angle = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "snap_to_45_degrees"); return 0; } + + lua_pushinteger(L, snap_to_45_degrees(angle)); + + return 1; +} + +int smlua_func_camera_set_use_course_specific_settings(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", "camera_set_use_course_specific_settings", 1, top); + return 0; + } + + u8 enable = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_set_use_course_specific_settings"); return 0; } + + camera_set_use_course_specific_settings(enable); + + return 1; +} + +int smlua_func_center_rom_hack_camera(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", "center_rom_hack_camera", 0, top); + return 0; + } + + + center_rom_hack_camera(); + + return 1; +} + ////////////////// // characters.h // ////////////////// @@ -12048,44 +12048,6 @@ int smlua_func_get_character(lua_State* L) { return 1; } -int smlua_func_get_character_anim(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", "get_character_anim", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_character_anim"); return 0; } - int characterAnim = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "get_character_anim"); return 0; } - - lua_pushinteger(L, get_character_anim(m, characterAnim)); - - return 1; -} - -int smlua_func_get_character_anim_offset(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", "get_character_anim_offset", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_character_anim_offset"); return 0; } - - lua_pushnumber(L, get_character_anim_offset(m)); - - return 1; -} - int smlua_func_play_character_sound(lua_State* L) { if (L == NULL) { return 0; } @@ -12106,6 +12068,28 @@ int smlua_func_play_character_sound(lua_State* L) { return 1; } +int smlua_func_play_character_sound_offset(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", "play_character_sound_offset", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_character_sound_offset"); return 0; } + int characterSound = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_character_sound_offset"); return 0; } + u32 offset = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_character_sound_offset"); return 0; } + + play_character_sound_offset(m, characterSound, offset); + + return 1; +} + int smlua_func_play_character_sound_if_no_flag(lua_State* L) { if (L == NULL) { return 0; } @@ -12128,24 +12112,40 @@ int smlua_func_play_character_sound_if_no_flag(lua_State* L) { return 1; } -int smlua_func_play_character_sound_offset(lua_State* L) { +int smlua_func_get_character_anim_offset(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", "play_character_sound_offset", 3, top); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "get_character_anim_offset", 1, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_character_sound_offset"); return 0; } - int characterSound = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_character_sound_offset"); return 0; } - u32 offset = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_character_sound_offset"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_character_anim_offset"); return 0; } - play_character_sound_offset(m, characterSound, offset); + lua_pushnumber(L, get_character_anim_offset(m)); + + return 1; +} + +int smlua_func_get_character_anim(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", "get_character_anim", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_character_anim"); return 0; } + int characterAnim = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "get_character_anim"); return 0; } + + lua_pushinteger(L, get_character_anim(m, characterAnim)); return 1; } @@ -12212,17 +12212,34 @@ int smlua_func_djui_console_toggle(UNUSED lua_State* L) { // djui_hud_utils.h // ////////////////////// -int smlua_func_djui_hud_get_color(UNUSED lua_State* L) { +int smlua_func_djui_hud_get_resolution(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", "djui_hud_get_color", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "djui_hud_get_resolution", 0, top); return 0; } - smlua_push_object(L, LOT_DJUICOLOR, djui_hud_get_color(), NULL); + lua_pushinteger(L, djui_hud_get_resolution()); + + return 1; +} + +int smlua_func_djui_hud_set_resolution(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", "djui_hud_set_resolution", 1, top); + return 0; + } + + int resolutionType = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_hud_set_resolution"); return 0; } + + djui_hud_set_resolution(resolutionType); return 1; } @@ -12242,6 +12259,23 @@ int smlua_func_djui_hud_get_filter(UNUSED lua_State* L) { return 1; } +int smlua_func_djui_hud_set_filter(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", "djui_hud_set_filter", 1, top); + return 0; + } + + int filterType = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_hud_set_filter"); return 0; } + + djui_hud_set_filter(filterType); + + return 1; +} + int smlua_func_djui_hud_get_font(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -12257,17 +12291,165 @@ int smlua_func_djui_hud_get_font(UNUSED lua_State* L) { return 1; } -int smlua_func_djui_hud_get_fov_coeff(UNUSED lua_State* L) { +int smlua_func_djui_hud_set_font(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", "djui_hud_set_font", 1, top); + return 0; + } + + s8 fontType = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_hud_set_font"); return 0; } + + djui_hud_set_font(fontType); + + return 1; +} + +int smlua_func_djui_hud_get_color(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", "djui_hud_get_fov_coeff", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "djui_hud_get_color", 0, top); return 0; } - lua_pushnumber(L, djui_hud_get_fov_coeff()); + smlua_push_object(L, LOT_DJUICOLOR, djui_hud_get_color(), NULL); + + return 1; +} + +int smlua_func_djui_hud_set_color(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "djui_hud_set_color", 4, top); + return 0; + } + + u8 r = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_hud_set_color"); return 0; } + u8 g = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "djui_hud_set_color"); return 0; } + u8 b = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "djui_hud_set_color"); return 0; } + u8 a = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "djui_hud_set_color"); return 0; } + + djui_hud_set_color(r, g, b, a); + + return 1; +} + +int smlua_func_djui_hud_reset_color(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", "djui_hud_reset_color", 0, top); + return 0; + } + + + djui_hud_reset_color(); + + return 1; +} + +int smlua_func_djui_hud_get_rotation(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", "djui_hud_get_rotation", 0, top); + return 0; + } + + + smlua_push_object(L, LOT_HUDUTILSROTATION, djui_hud_get_rotation(), NULL); + + return 1; +} + +int smlua_func_djui_hud_set_rotation(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", "djui_hud_set_rotation", 3, top); + return 0; + } + + s16 rotation = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_hud_set_rotation"); return 0; } + f32 pivotX = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "djui_hud_set_rotation"); return 0; } + f32 pivotY = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "djui_hud_set_rotation"); return 0; } + + djui_hud_set_rotation(rotation, pivotX, pivotY); + + return 1; +} + +int smlua_func_djui_hud_set_rotation_interpolated(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 6) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "djui_hud_set_rotation_interpolated", 6, top); + return 0; + } + + s32 prevRotation = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_hud_set_rotation_interpolated"); return 0; } + f32 prevPivotX = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "djui_hud_set_rotation_interpolated"); return 0; } + f32 prevPivotY = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "djui_hud_set_rotation_interpolated"); return 0; } + s32 rotation = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "djui_hud_set_rotation_interpolated"); return 0; } + f32 pivotX = smlua_to_number(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "djui_hud_set_rotation_interpolated"); return 0; } + f32 pivotY = smlua_to_number(L, 6); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "djui_hud_set_rotation_interpolated"); return 0; } + + djui_hud_set_rotation_interpolated(prevRotation, prevPivotX, prevPivotY, rotation, pivotX, pivotY); + + return 1; +} + +int smlua_func_djui_hud_get_screen_width(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", "djui_hud_get_screen_width", 0, top); + return 0; + } + + + lua_pushinteger(L, djui_hud_get_screen_width()); + + return 1; +} + +int smlua_func_djui_hud_get_screen_height(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", "djui_hud_get_screen_height", 0, top); + return 0; + } + + + lua_pushinteger(L, djui_hud_get_screen_height()); return 1; } @@ -12332,77 +12514,94 @@ int smlua_func_djui_hud_get_raw_mouse_y(UNUSED lua_State* L) { return 1; } -int smlua_func_djui_hud_get_resolution(UNUSED lua_State* L) { +int smlua_func_djui_hud_set_mouse_locked(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", "djui_hud_get_resolution", 0, top); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "djui_hud_set_mouse_locked", 1, top); return 0; } + bool locked = smlua_to_boolean(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_hud_set_mouse_locked"); return 0; } - lua_pushinteger(L, djui_hud_get_resolution()); + djui_hud_set_mouse_locked(locked); return 1; } -int smlua_func_djui_hud_get_rotation(UNUSED lua_State* L) { +int smlua_func_djui_hud_get_mouse_buttons_down(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", "djui_hud_get_rotation", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "djui_hud_get_mouse_buttons_down", 0, top); return 0; } - smlua_push_object(L, LOT_HUDUTILSROTATION, djui_hud_get_rotation(), NULL); + lua_pushinteger(L, djui_hud_get_mouse_buttons_down()); return 1; } -int smlua_func_djui_hud_get_screen_height(UNUSED lua_State* L) { +int smlua_func_djui_hud_get_mouse_buttons_pressed(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", "djui_hud_get_screen_height", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "djui_hud_get_mouse_buttons_pressed", 0, top); return 0; } - lua_pushinteger(L, djui_hud_get_screen_height()); + lua_pushinteger(L, djui_hud_get_mouse_buttons_pressed()); return 1; } -int smlua_func_djui_hud_get_screen_width(UNUSED lua_State* L) { +int smlua_func_djui_hud_get_mouse_buttons_released(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", "djui_hud_get_screen_width", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "djui_hud_get_mouse_buttons_released", 0, top); return 0; } - lua_pushinteger(L, djui_hud_get_screen_width()); + lua_pushinteger(L, djui_hud_get_mouse_buttons_released()); return 1; } -int smlua_func_djui_hud_is_pause_menu_created(UNUSED lua_State* L) { +int smlua_func_djui_hud_get_mouse_scroll_x(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", "djui_hud_is_pause_menu_created", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "djui_hud_get_mouse_scroll_x", 0, top); return 0; } - lua_pushboolean(L, djui_hud_is_pause_menu_created()); + lua_pushnumber(L, djui_hud_get_mouse_scroll_x()); + + return 1; +} + +int smlua_func_djui_hud_get_mouse_scroll_y(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", "djui_hud_get_mouse_scroll_y", 0, top); + return 0; + } + + + lua_pushnumber(L, djui_hud_get_mouse_scroll_y()); return 1; } @@ -12530,156 +12729,32 @@ int smlua_func_djui_hud_render_rect_interpolated(lua_State* L) { return 1; } -int smlua_func_djui_hud_reset_color(UNUSED lua_State* L) { +int smlua_func_get_current_fov(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", "djui_hud_reset_color", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "get_current_fov", 0, top); return 0; } - djui_hud_reset_color(); + lua_pushnumber(L, get_current_fov()); return 1; } -int smlua_func_djui_hud_set_color(lua_State* L) { +int smlua_func_djui_hud_get_fov_coeff(UNUSED lua_State* L) { if (L == NULL) { return 0; } int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "djui_hud_set_color", 4, top); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "djui_hud_get_fov_coeff", 0, top); return 0; } - u8 r = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_hud_set_color"); return 0; } - u8 g = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "djui_hud_set_color"); return 0; } - u8 b = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "djui_hud_set_color"); return 0; } - u8 a = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "djui_hud_set_color"); return 0; } - djui_hud_set_color(r, g, b, a); - - return 1; -} - -int smlua_func_djui_hud_set_filter(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", "djui_hud_set_filter", 1, top); - return 0; - } - - int filterType = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_hud_set_filter"); return 0; } - - djui_hud_set_filter(filterType); - - return 1; -} - -int smlua_func_djui_hud_set_font(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", "djui_hud_set_font", 1, top); - return 0; - } - - s8 fontType = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_hud_set_font"); return 0; } - - djui_hud_set_font(fontType); - - return 1; -} - -int smlua_func_djui_hud_set_mouse_locked(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", "djui_hud_set_mouse_locked", 1, top); - return 0; - } - - bool locked = smlua_to_boolean(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_hud_set_mouse_locked"); return 0; } - - djui_hud_set_mouse_locked(locked); - - return 1; -} - -int smlua_func_djui_hud_set_resolution(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", "djui_hud_set_resolution", 1, top); - return 0; - } - - int resolutionType = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_hud_set_resolution"); return 0; } - - djui_hud_set_resolution(resolutionType); - - return 1; -} - -int smlua_func_djui_hud_set_rotation(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", "djui_hud_set_rotation", 3, top); - return 0; - } - - s16 rotation = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_hud_set_rotation"); return 0; } - f32 pivotX = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "djui_hud_set_rotation"); return 0; } - f32 pivotY = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "djui_hud_set_rotation"); return 0; } - - djui_hud_set_rotation(rotation, pivotX, pivotY); - - return 1; -} - -int smlua_func_djui_hud_set_rotation_interpolated(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 6) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "djui_hud_set_rotation_interpolated", 6, top); - return 0; - } - - s32 prevRotation = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_hud_set_rotation_interpolated"); return 0; } - f32 prevPivotX = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "djui_hud_set_rotation_interpolated"); return 0; } - f32 prevPivotY = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "djui_hud_set_rotation_interpolated"); return 0; } - s32 rotation = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "djui_hud_set_rotation_interpolated"); return 0; } - f32 pivotX = smlua_to_number(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "djui_hud_set_rotation_interpolated"); return 0; } - f32 pivotY = smlua_to_number(L, 6); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "djui_hud_set_rotation_interpolated"); return 0; } - - djui_hud_set_rotation_interpolated(prevRotation, prevPivotX, prevPivotY, rotation, pivotX, pivotY); + lua_pushnumber(L, djui_hud_get_fov_coeff()); return 1; } @@ -12711,6 +12786,21 @@ int smlua_func_djui_hud_world_pos_to_screen_pos(lua_State* L) { return 1; } +int smlua_func_djui_hud_is_pause_menu_created(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", "djui_hud_is_pause_menu_created", 0, top); + return 0; + } + + + lua_pushboolean(L, djui_hud_is_pause_menu_created()); + + return 1; +} + int smlua_func_djui_open_pause_menu(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -12726,21 +12816,6 @@ int smlua_func_djui_open_pause_menu(UNUSED lua_State* L) { return 1; } -int smlua_func_get_current_fov(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_current_fov", 0, top); - return 0; - } - - - lua_pushnumber(L, get_current_fov()); - - return 1; -} - ///////////////////// // djui_language.h // ///////////////////// @@ -12812,293 +12887,6 @@ int smlua_func_djui_popup_create(lua_State* L) { // external.h // //////////////// -int smlua_func_drop_queued_background_music(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", "drop_queued_background_music", 0, top); - return 0; - } - - - drop_queued_background_music(); - - return 1; -} - -int smlua_func_fade_volume_scale(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", "fade_volume_scale", 3, top); - return 0; - } - - u8 player = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "fade_volume_scale"); return 0; } - u8 targetScale = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "fade_volume_scale"); return 0; } - u16 fadeDuration = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "fade_volume_scale"); return 0; } - - fade_volume_scale(player, targetScale, fadeDuration); - - return 1; -} - -int smlua_func_fadeout_background_music(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", "fadeout_background_music", 2, top); - return 0; - } - - u16 seqId = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "fadeout_background_music"); return 0; } - u16 fadeOut = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "fadeout_background_music"); return 0; } - - fadeout_background_music(seqId, fadeOut); - - return 1; -} - -int smlua_func_get_current_background_music(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_current_background_music", 0, top); - return 0; - } - - - lua_pushinteger(L, get_current_background_music()); - - return 1; -} - -int smlua_func_get_current_background_music_default_volume(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_current_background_music_default_volume", 0, top); - return 0; - } - - - lua_pushinteger(L, get_current_background_music_default_volume()); - - return 1; -} - -int smlua_func_get_current_background_music_max_target_volume(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_current_background_music_max_target_volume", 0, top); - return 0; - } - - - lua_pushinteger(L, get_current_background_music_max_target_volume()); - - return 1; -} - -int smlua_func_get_current_background_music_target_volume(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_current_background_music_target_volume", 0, top); - return 0; - } - - - lua_pushinteger(L, get_current_background_music_target_volume()); - - return 1; -} - -int smlua_func_get_sound_pan(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", "get_sound_pan", 2, top); - return 0; - } - - f32 x = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_sound_pan"); return 0; } - f32 z = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "get_sound_pan"); return 0; } - - lua_pushnumber(L, get_sound_pan(x, z)); - - return 1; -} - -int smlua_func_is_current_background_music_volume_lowered(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", "is_current_background_music_volume_lowered", 0, top); - return 0; - } - - - lua_pushinteger(L, is_current_background_music_volume_lowered()); - - return 1; -} - -int smlua_func_play_course_clear(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", "play_course_clear", 0, top); - return 0; - } - - - play_course_clear(); - - return 1; -} - -int smlua_func_play_dialog_sound(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", "play_dialog_sound", 1, top); - return 0; - } - - u8 dialogID = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_dialog_sound"); return 0; } - - play_dialog_sound(dialogID); - - return 1; -} - -int smlua_func_play_music(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", "play_music", 3, top); - return 0; - } - - u8 player = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_music"); return 0; } - u16 seqArgs = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_music"); return 0; } - u16 fadeTimer = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_music"); return 0; } - - play_music(player, seqArgs, fadeTimer); - - return 1; -} - -int smlua_func_play_peachs_jingle(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", "play_peachs_jingle", 0, top); - return 0; - } - - - play_peachs_jingle(); - - return 1; -} - -int smlua_func_play_power_star_jingle(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", "play_power_star_jingle", 1, top); - return 0; - } - - u8 keepBackgroundMusic = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_power_star_jingle"); return 0; } - - play_power_star_jingle(keepBackgroundMusic); - - return 1; -} - -int smlua_func_play_puzzle_jingle(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", "play_puzzle_jingle", 0, top); - return 0; - } - - - play_puzzle_jingle(); - - return 1; -} - -int smlua_func_play_race_fanfare(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", "play_race_fanfare", 0, top); - return 0; - } - - - play_race_fanfare(); - - return 1; -} - -int smlua_func_play_secondary_music(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "play_secondary_music", 4, top); - return 0; - } - - u8 seqId = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_secondary_music"); return 0; } - u8 bgMusicVolume = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_secondary_music"); return 0; } - u8 volume = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_secondary_music"); return 0; } - u16 fadeTimer = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "play_secondary_music"); return 0; } - - play_secondary_music(seqId, bgMusicVolume, volume, fadeTimer); - - return 1; -} - int smlua_func_play_sound(lua_State* L) { if (L == NULL) { return 0; } @@ -13147,36 +12935,6 @@ int smlua_func_play_sound_with_freq_scale(lua_State* L) { return 1; } -int smlua_func_play_star_fanfare(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", "play_star_fanfare", 0, top); - return 0; - } - - - play_star_fanfare(); - - return 1; -} - -int smlua_func_play_toads_jingle(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", "play_toads_jingle", 0, top); - return 0; - } - - - play_toads_jingle(); - - return 1; -} - int smlua_func_seq_player_fade_out(lua_State* L) { if (L == NULL) { return 0; } @@ -13196,6 +12954,27 @@ int smlua_func_seq_player_fade_out(lua_State* L) { return 1; } +int smlua_func_fade_volume_scale(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", "fade_volume_scale", 3, top); + return 0; + } + + u8 player = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "fade_volume_scale"); return 0; } + u8 targetScale = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "fade_volume_scale"); return 0; } + u16 fadeDuration = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "fade_volume_scale"); return 0; } + + fade_volume_scale(player, targetScale, fadeDuration); + + return 1; +} + int smlua_func_seq_player_lower_volume(lua_State* L) { if (L == NULL) { return 0; } @@ -13236,23 +13015,6 @@ int smlua_func_seq_player_unlower_volume(lua_State* L) { return 1; } -int smlua_func_set_audio_fadeout(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", "set_audio_fadeout", 1, top); - return 0; - } - - u16 fadeOutTime = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_audio_fadeout"); return 0; } - - set_audio_fadeout(fadeOutTime); - - return 1; -} - int smlua_func_set_audio_muted(lua_State* L) { if (L == NULL) { return 0; } @@ -13270,150 +13032,6 @@ int smlua_func_set_audio_muted(lua_State* L) { return 1; } -int smlua_func_set_sound_moving_speed(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", "set_sound_moving_speed", 2, top); - return 0; - } - - u8 bank = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_sound_moving_speed"); return 0; } - u8 speed = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_sound_moving_speed"); return 0; } - - set_sound_moving_speed(bank, speed); - - return 1; -} - -int smlua_func_sound_banks_disable(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", "sound_banks_disable", 2, top); - return 0; - } - - u8 player = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sound_banks_disable"); return 0; } - u16 bankMask = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "sound_banks_disable"); return 0; } - - sound_banks_disable(player, bankMask); - - return 1; -} - -int smlua_func_sound_banks_enable(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", "sound_banks_enable", 2, top); - return 0; - } - - u8 player = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sound_banks_enable"); return 0; } - u16 bankMask = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "sound_banks_enable"); return 0; } - - sound_banks_enable(player, bankMask); - - return 1; -} - -int smlua_func_sound_get_level_intensity(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", "sound_get_level_intensity", 1, top); - return 0; - } - - f32 distance = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sound_get_level_intensity"); return 0; } - - lua_pushnumber(L, sound_get_level_intensity(distance)); - - return 1; -} - -int smlua_func_sound_reset_background_music_default_volume(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", "sound_reset_background_music_default_volume", 1, top); - return 0; - } - - u8 seqId = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sound_reset_background_music_default_volume"); return 0; } - - sound_reset_background_music_default_volume(seqId); - - return 1; -} - -int smlua_func_sound_set_background_music_default_volume(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", "sound_set_background_music_default_volume", 2, top); - return 0; - } - - u8 seqId = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sound_set_background_music_default_volume"); return 0; } - u8 volume = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "sound_set_background_music_default_volume"); return 0; } - - sound_set_background_music_default_volume(seqId, volume); - - return 1; -} - -int smlua_func_stop_background_music(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", "stop_background_music", 1, top); - return 0; - } - - u16 seqId = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "stop_background_music"); return 0; } - - stop_background_music(seqId); - - return 1; -} - -int smlua_func_stop_secondary_music(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", "stop_secondary_music", 1, top); - return 0; - } - - u16 fadeTimer = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "stop_secondary_music"); return 0; } - - stop_secondary_music(fadeTimer); - - return 1; -} - int smlua_func_stop_sound(lua_State* L) { if (L == NULL) { return 0; } @@ -13473,6 +13091,463 @@ int smlua_func_stop_sounds_in_continuous_banks(UNUSED lua_State* L) { return 1; } +int smlua_func_sound_banks_disable(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", "sound_banks_disable", 2, top); + return 0; + } + + u8 player = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sound_banks_disable"); return 0; } + u16 bankMask = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "sound_banks_disable"); return 0; } + + sound_banks_disable(player, bankMask); + + return 1; +} + +int smlua_func_sound_banks_enable(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", "sound_banks_enable", 2, top); + return 0; + } + + u8 player = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sound_banks_enable"); return 0; } + u16 bankMask = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "sound_banks_enable"); return 0; } + + sound_banks_enable(player, bankMask); + + return 1; +} + +int smlua_func_set_sound_moving_speed(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", "set_sound_moving_speed", 2, top); + return 0; + } + + u8 bank = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_sound_moving_speed"); return 0; } + u8 speed = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_sound_moving_speed"); return 0; } + + set_sound_moving_speed(bank, speed); + + return 1; +} + +int smlua_func_play_dialog_sound(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", "play_dialog_sound", 1, top); + return 0; + } + + u8 dialogID = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_dialog_sound"); return 0; } + + play_dialog_sound(dialogID); + + return 1; +} + +int smlua_func_play_music(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", "play_music", 3, top); + return 0; + } + + u8 player = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_music"); return 0; } + u16 seqArgs = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_music"); return 0; } + u16 fadeTimer = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_music"); return 0; } + + play_music(player, seqArgs, fadeTimer); + + return 1; +} + +int smlua_func_stop_background_music(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", "stop_background_music", 1, top); + return 0; + } + + u16 seqId = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "stop_background_music"); return 0; } + + stop_background_music(seqId); + + return 1; +} + +int smlua_func_fadeout_background_music(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", "fadeout_background_music", 2, top); + return 0; + } + + u16 seqId = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "fadeout_background_music"); return 0; } + u16 fadeOut = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "fadeout_background_music"); return 0; } + + fadeout_background_music(seqId, fadeOut); + + return 1; +} + +int smlua_func_drop_queued_background_music(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", "drop_queued_background_music", 0, top); + return 0; + } + + + drop_queued_background_music(); + + return 1; +} + +int smlua_func_get_current_background_music(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_current_background_music", 0, top); + return 0; + } + + + lua_pushinteger(L, get_current_background_music()); + + return 1; +} + +int smlua_func_get_current_background_music_default_volume(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_current_background_music_default_volume", 0, top); + return 0; + } + + + lua_pushinteger(L, get_current_background_music_default_volume()); + + return 1; +} + +int smlua_func_get_current_background_music_target_volume(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_current_background_music_target_volume", 0, top); + return 0; + } + + + lua_pushinteger(L, get_current_background_music_target_volume()); + + return 1; +} + +int smlua_func_get_current_background_music_max_target_volume(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_current_background_music_max_target_volume", 0, top); + return 0; + } + + + lua_pushinteger(L, get_current_background_music_max_target_volume()); + + return 1; +} + +int smlua_func_is_current_background_music_volume_lowered(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", "is_current_background_music_volume_lowered", 0, top); + return 0; + } + + + lua_pushinteger(L, is_current_background_music_volume_lowered()); + + return 1; +} + +int smlua_func_play_secondary_music(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "play_secondary_music", 4, top); + return 0; + } + + u8 seqId = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_secondary_music"); return 0; } + u8 bgMusicVolume = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_secondary_music"); return 0; } + u8 volume = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_secondary_music"); return 0; } + u16 fadeTimer = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "play_secondary_music"); return 0; } + + play_secondary_music(seqId, bgMusicVolume, volume, fadeTimer); + + return 1; +} + +int smlua_func_stop_secondary_music(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", "stop_secondary_music", 1, top); + return 0; + } + + u16 fadeTimer = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "stop_secondary_music"); return 0; } + + stop_secondary_music(fadeTimer); + + return 1; +} + +int smlua_func_set_audio_fadeout(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", "set_audio_fadeout", 1, top); + return 0; + } + + u16 fadeOutTime = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_audio_fadeout"); return 0; } + + set_audio_fadeout(fadeOutTime); + + return 1; +} + +int smlua_func_play_course_clear(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", "play_course_clear", 0, top); + return 0; + } + + + play_course_clear(); + + return 1; +} + +int smlua_func_play_peachs_jingle(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", "play_peachs_jingle", 0, top); + return 0; + } + + + play_peachs_jingle(); + + return 1; +} + +int smlua_func_play_puzzle_jingle(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", "play_puzzle_jingle", 0, top); + return 0; + } + + + play_puzzle_jingle(); + + return 1; +} + +int smlua_func_play_star_fanfare(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", "play_star_fanfare", 0, top); + return 0; + } + + + play_star_fanfare(); + + return 1; +} + +int smlua_func_play_power_star_jingle(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", "play_power_star_jingle", 1, top); + return 0; + } + + u8 keepBackgroundMusic = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_power_star_jingle"); return 0; } + + play_power_star_jingle(keepBackgroundMusic); + + return 1; +} + +int smlua_func_play_race_fanfare(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", "play_race_fanfare", 0, top); + return 0; + } + + + play_race_fanfare(); + + return 1; +} + +int smlua_func_play_toads_jingle(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", "play_toads_jingle", 0, top); + return 0; + } + + + play_toads_jingle(); + + return 1; +} + +int smlua_func_sound_reset_background_music_default_volume(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", "sound_reset_background_music_default_volume", 1, top); + return 0; + } + + u8 seqId = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sound_reset_background_music_default_volume"); return 0; } + + sound_reset_background_music_default_volume(seqId); + + return 1; +} + +int smlua_func_sound_set_background_music_default_volume(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", "sound_set_background_music_default_volume", 2, top); + return 0; + } + + u8 seqId = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sound_set_background_music_default_volume"); return 0; } + u8 volume = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "sound_set_background_music_default_volume"); return 0; } + + sound_set_background_music_default_volume(seqId, volume); + + return 1; +} + +int smlua_func_get_sound_pan(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", "get_sound_pan", 2, top); + return 0; + } + + f32 x = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_sound_pan"); return 0; } + f32 z = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "get_sound_pan"); return 0; } + + lua_pushnumber(L, get_sound_pan(x, z)); + + return 1; +} + +int smlua_func_sound_get_level_intensity(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", "sound_get_level_intensity", 1, top); + return 0; + } + + f32 distance = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sound_get_level_intensity"); return 0; } + + lua_pushnumber(L, sound_get_level_intensity(distance)); + + return 1; +} + //////////////////////// // first_person_cam.h // //////////////////////// @@ -13495,21 +13570,6 @@ int smlua_func_first_person_check_cancels(lua_State* L) { return 1; } -int smlua_func_first_person_reset(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", "first_person_reset", 0, top); - return 0; - } - - - first_person_reset(); - - return 1; -} - int smlua_func_get_first_person_enabled(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -13542,6 +13602,21 @@ int smlua_func_set_first_person_enabled(lua_State* L) { return 1; } +int smlua_func_first_person_reset(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", "first_person_reset", 0, top); + return 0; + } + + + first_person_reset(); + + return 1; +} + /////////////////// // ingame_menu.h // /////////////////// @@ -13563,23 +13638,6 @@ int smlua_func_create_dialog_box(lua_State* L) { return 1; } -int smlua_func_create_dialog_box_with_response(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", "create_dialog_box_with_response", 1, top); - return 0; - } - - s16 dialog = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "create_dialog_box_with_response"); return 0; } - - create_dialog_box_with_response(dialog); - - return 1; -} - int smlua_func_create_dialog_box_with_var(lua_State* L) { if (L == NULL) { return 0; } @@ -13616,32 +13674,19 @@ int smlua_func_create_dialog_inverted_box(lua_State* L) { return 1; } -int smlua_func_reset_dialog_override_color(UNUSED lua_State* L) { +int smlua_func_create_dialog_box_with_response(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", "reset_dialog_override_color", 0, top); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "create_dialog_box_with_response", 1, top); return 0; } + s16 dialog = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "create_dialog_box_with_response"); return 0; } - reset_dialog_override_color(); - - return 1; -} - -int smlua_func_reset_dialog_override_pos(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", "reset_dialog_override_pos", 0, top); - return 0; - } - - - reset_dialog_override_pos(); + create_dialog_box_with_response(dialog); return 1; } @@ -13661,73 +13706,6 @@ int smlua_func_reset_dialog_render_state(UNUSED lua_State* L) { return 1; } -int smlua_func_set_dialog_box_state(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", "set_dialog_box_state", 1, top); - return 0; - } - - u8 state = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_dialog_box_state"); return 0; } - - set_dialog_box_state(state); - - return 1; -} - -int smlua_func_set_dialog_override_color(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 8) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_dialog_override_color", 8, top); - return 0; - } - - u8 bgR = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_dialog_override_color"); return 0; } - u8 bgG = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_dialog_override_color"); return 0; } - u8 bgB = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_dialog_override_color"); return 0; } - u8 bgA = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "set_dialog_override_color"); return 0; } - u8 textR = smlua_to_integer(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "set_dialog_override_color"); return 0; } - u8 textG = smlua_to_integer(L, 6); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "set_dialog_override_color"); return 0; } - u8 textB = smlua_to_integer(L, 7); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "set_dialog_override_color"); return 0; } - u8 textA = smlua_to_integer(L, 8); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 8, "set_dialog_override_color"); return 0; } - - set_dialog_override_color(bgR, bgG, bgB, bgA, textR, textG, textB, textA); - - return 1; -} - -int smlua_func_set_dialog_override_pos(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", "set_dialog_override_pos", 2, top); - return 0; - } - - s16 x = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_dialog_override_pos"); return 0; } - s16 y = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_dialog_override_pos"); return 0; } - - set_dialog_override_pos(x, y); - - return 1; -} - int smlua_func_set_menu_mode(lua_State* L) { if (L == NULL) { return 0; } @@ -13762,238 +13740,106 @@ int smlua_func_set_min_dialog_width(lua_State* L) { return 1; } - /////////////////// - // interaction.h // -/////////////////// - -int smlua_func_determine_interaction(lua_State* L) { +int smlua_func_set_dialog_override_pos(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", "determine_interaction", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_dialog_override_pos", 2, top); return 0; } - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "determine_interaction"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "determine_interaction"); return 0; } + s16 x = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_dialog_override_pos"); return 0; } + s16 y = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_dialog_override_pos"); return 0; } - lua_pushinteger(L, determine_interaction(m, o)); + set_dialog_override_pos(x, y); return 1; } -int smlua_func_does_mario_have_normal_cap_on_head(lua_State* L) { +int smlua_func_reset_dialog_override_pos(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", "reset_dialog_override_pos", 0, top); + return 0; + } + + + reset_dialog_override_pos(); + + return 1; +} + +int smlua_func_set_dialog_override_color(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 8) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_dialog_override_color", 8, top); + return 0; + } + + u8 bgR = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_dialog_override_color"); return 0; } + u8 bgG = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_dialog_override_color"); return 0; } + u8 bgB = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_dialog_override_color"); return 0; } + u8 bgA = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "set_dialog_override_color"); return 0; } + u8 textR = smlua_to_integer(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "set_dialog_override_color"); return 0; } + u8 textG = smlua_to_integer(L, 6); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "set_dialog_override_color"); return 0; } + u8 textB = smlua_to_integer(L, 7); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "set_dialog_override_color"); return 0; } + u8 textA = smlua_to_integer(L, 8); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 8, "set_dialog_override_color"); return 0; } + + set_dialog_override_color(bgR, bgG, bgB, bgA, textR, textG, textB, textA); + + return 1; +} + +int smlua_func_reset_dialog_override_color(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", "reset_dialog_override_color", 0, top); + return 0; + } + + + reset_dialog_override_color(); + + return 1; +} + +int smlua_func_set_dialog_box_state(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", "does_mario_have_normal_cap_on_head", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_dialog_box_state", 1, top); return 0; } - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "does_mario_have_normal_cap_on_head"); return 0; } + u8 state = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_dialog_box_state"); return 0; } - lua_pushinteger(L, does_mario_have_normal_cap_on_head(m)); + set_dialog_box_state(state); return 1; } -int smlua_func_get_door_save_file_flag(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", "get_door_save_file_flag", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* door = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_door_save_file_flag"); return 0; } - - lua_pushinteger(L, get_door_save_file_flag(door)); - - return 1; -} - -int smlua_func_get_mario_cap_flag(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", "get_mario_cap_flag", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* capObject = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_mario_cap_flag"); return 0; } - - lua_pushinteger(L, get_mario_cap_flag(capObject)); - - return 1; -} - -int smlua_func_interact_bbh_entrance(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", "interact_bbh_entrance", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_bbh_entrance"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_bbh_entrance"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_BBH_ENTRANCE, o, interact_bbh_entrance)); - - return 1; -} - -int smlua_func_interact_bounce_top(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", "interact_bounce_top", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_bounce_top"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_bounce_top"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_BOUNCE_TOP, o, interact_bounce_top)); - - return 1; -} - -int smlua_func_interact_breakable(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", "interact_breakable", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_breakable"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_breakable"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_BREAKABLE, o, interact_breakable)); - - return 1; -} - -int smlua_func_interact_bully(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", "interact_bully", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_bully"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_bully"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_BULLY, o, interact_bully)); - - return 1; -} - -int smlua_func_interact_cannon_base(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", "interact_cannon_base", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_cannon_base"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_cannon_base"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_CANNON_BASE, o, interact_cannon_base)); - - return 1; -} - -int smlua_func_interact_cap(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", "interact_cap", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_cap"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_cap"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_CAP, o, interact_cap)); - - return 1; -} - -int smlua_func_interact_clam_or_bubba(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", "interact_clam_or_bubba", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_clam_or_bubba"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_clam_or_bubba"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_CLAM_OR_BUBBA, o, interact_clam_or_bubba)); - - return 1; -} + /////////////////// + // interaction.h // +/////////////////// int smlua_func_interact_coin(lua_State* L) { if (L == NULL) { return 0; } @@ -14017,310 +13863,24 @@ int smlua_func_interact_coin(lua_State* L) { return 1; } -int smlua_func_interact_damage(lua_State* L) { +int smlua_func_interact_water_ring(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", "interact_damage", 3, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_water_ring", 3, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_damage"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_water_ring"); return 0; } // interactType skipped so mods can't lie about what interaction it is if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_damage"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_water_ring"); return 0; } - lua_pushinteger(L, process_interaction(m, INTERACT_DAMAGE, o, interact_damage)); - - return 1; -} - -int smlua_func_interact_door(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", "interact_door", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_door"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_door"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_DOOR, o, interact_door)); - - return 1; -} - -int smlua_func_interact_flame(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", "interact_flame", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_flame"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_flame"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_FLAME, o, interact_flame)); - - return 1; -} - -int smlua_func_interact_grabbable(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", "interact_grabbable", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_grabbable"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_grabbable"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_GRABBABLE, o, interact_grabbable)); - - return 1; -} - -int smlua_func_interact_hit_from_below(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", "interact_hit_from_below", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_hit_from_below"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_hit_from_below"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_HIT_FROM_BELOW, o, interact_hit_from_below)); - - return 1; -} - -int smlua_func_interact_hoot(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", "interact_hoot", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_hoot"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_hoot"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_HOOT, o, interact_hoot)); - - return 1; -} - -int smlua_func_interact_igloo_barrier(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", "interact_igloo_barrier", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_igloo_barrier"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_igloo_barrier"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_IGLOO_BARRIER, o, interact_igloo_barrier)); - - return 1; -} - -int smlua_func_interact_koopa_shell(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", "interact_koopa_shell", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_koopa_shell"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_koopa_shell"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_KOOPA_SHELL, o, interact_koopa_shell)); - - return 1; -} - -int smlua_func_interact_mr_blizzard(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", "interact_mr_blizzard", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_mr_blizzard"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_mr_blizzard"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_MR_BLIZZARD, o, interact_mr_blizzard)); - - return 1; -} - -int smlua_func_interact_player(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", "interact_player", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_player"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_player"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_PLAYER, o, interact_player)); - - return 1; -} - -int smlua_func_interact_pole(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", "interact_pole", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_pole"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_pole"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_POLE, o, interact_pole)); - - return 1; -} - -int smlua_func_interact_shock(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", "interact_shock", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_shock"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_shock"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_SHOCK, o, interact_shock)); - - return 1; -} - -int smlua_func_interact_snufit_bullet(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", "interact_snufit_bullet", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_snufit_bullet"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_snufit_bullet"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_SNUFIT_BULLET, o, interact_snufit_bullet)); - - return 1; -} - -int smlua_func_interact_spiny_walking(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", "interact_spiny_walking", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_spiny_walking"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_spiny_walking"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_SPINY_WALKING, o, interact_spiny_walking)); + lua_pushinteger(L, process_interaction(m, INTERACT_WATER_RING, o, interact_water_ring)); return 1; } @@ -14347,68 +13907,24 @@ int smlua_func_interact_star_or_key(lua_State* L) { return 1; } -int smlua_func_interact_strong_wind(lua_State* L) { +int smlua_func_interact_bbh_entrance(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", "interact_strong_wind", 3, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_bbh_entrance", 3, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_strong_wind"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_bbh_entrance"); return 0; } // interactType skipped so mods can't lie about what interaction it is if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_strong_wind"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_bbh_entrance"); return 0; } - lua_pushinteger(L, process_interaction(m, INTERACT_STRONG_WIND, o, interact_strong_wind)); - - return 1; -} - -int smlua_func_interact_text(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", "interact_text", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_text"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_text"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_TEXT, o, interact_text)); - - return 1; -} - -int smlua_func_interact_tornado(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", "interact_tornado", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_tornado"); return 0; } - // interactType skipped so mods can't lie about what interaction it is - if (lua_isnil(L, 3)) { return 0; } - struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_tornado"); return 0; } - - lua_pushinteger(L, process_interaction(m, INTERACT_TORNADO, o, interact_tornado)); + lua_pushinteger(L, process_interaction(m, INTERACT_BBH_ENTRANCE, o, interact_bbh_entrance)); return 1; } @@ -14457,24 +13973,112 @@ int smlua_func_interact_warp_door(lua_State* L) { return 1; } -int smlua_func_interact_water_ring(lua_State* L) { +int smlua_func_interact_door(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", "interact_water_ring", 3, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_door", 3, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_water_ring"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_door"); return 0; } // interactType skipped so mods can't lie about what interaction it is if (lua_isnil(L, 3)) { return 0; } struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_water_ring"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_door"); return 0; } - lua_pushinteger(L, process_interaction(m, INTERACT_WATER_RING, o, interact_water_ring)); + lua_pushinteger(L, process_interaction(m, INTERACT_DOOR, o, interact_door)); + + return 1; +} + +int smlua_func_interact_cannon_base(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", "interact_cannon_base", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_cannon_base"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_cannon_base"); return 0; } + + lua_pushinteger(L, process_interaction(m, INTERACT_CANNON_BASE, o, interact_cannon_base)); + + return 1; +} + +int smlua_func_interact_player(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", "interact_player", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_player"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_player"); return 0; } + + lua_pushinteger(L, process_interaction(m, INTERACT_PLAYER, o, interact_player)); + + return 1; +} + +int smlua_func_interact_igloo_barrier(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", "interact_igloo_barrier", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_igloo_barrier"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_igloo_barrier"); return 0; } + + lua_pushinteger(L, process_interaction(m, INTERACT_IGLOO_BARRIER, o, interact_igloo_barrier)); + + return 1; +} + +int smlua_func_interact_tornado(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", "interact_tornado", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_tornado"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_tornado"); return 0; } + + lua_pushinteger(L, process_interaction(m, INTERACT_TORNADO, o, interact_tornado)); return 1; } @@ -14501,116 +14105,398 @@ int smlua_func_interact_whirlpool(lua_State* L) { return 1; } -int smlua_func_mario_blow_off_cap(lua_State* L) { +int smlua_func_interact_strong_wind(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", "mario_blow_off_cap", 2, top); + if (top != 3) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_strong_wind", 3, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_blow_off_cap"); return 0; } - f32 capSpeed = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mario_blow_off_cap"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_strong_wind"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_strong_wind"); return 0; } - mario_blow_off_cap(m, capSpeed); + lua_pushinteger(L, process_interaction(m, INTERACT_STRONG_WIND, o, interact_strong_wind)); return 1; } -int smlua_func_mario_check_object_grab(lua_State* L) { +int smlua_func_interact_flame(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", "mario_check_object_grab", 1, top); + if (top != 3) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_flame", 3, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_check_object_grab"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_flame"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_flame"); return 0; } - lua_pushinteger(L, mario_check_object_grab(m)); + lua_pushinteger(L, process_interaction(m, INTERACT_FLAME, o, interact_flame)); return 1; } -int smlua_func_mario_drop_held_object(lua_State* L) { +int smlua_func_interact_snufit_bullet(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", "mario_drop_held_object", 1, top); + if (top != 3) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_snufit_bullet", 3, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_drop_held_object"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_snufit_bullet"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_snufit_bullet"); return 0; } - mario_drop_held_object(m); + lua_pushinteger(L, process_interaction(m, INTERACT_SNUFIT_BULLET, o, interact_snufit_bullet)); return 1; } -int smlua_func_mario_get_collided_object(lua_State* L) { +int smlua_func_interact_clam_or_bubba(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", "mario_get_collided_object", 2, top); + if (top != 3) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_clam_or_bubba", 3, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_get_collided_object"); return 0; } - u32 interactType = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mario_get_collided_object"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_clam_or_bubba"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_clam_or_bubba"); return 0; } - smlua_push_object(L, LOT_OBJECT, mario_get_collided_object(m, interactType), NULL); + lua_pushinteger(L, process_interaction(m, INTERACT_CLAM_OR_BUBBA, o, interact_clam_or_bubba)); return 1; } -int smlua_func_mario_grab_used_object(lua_State* L) { +int smlua_func_interact_bully(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", "mario_grab_used_object", 1, top); + if (top != 3) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_bully", 3, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_grab_used_object"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_bully"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_bully"); return 0; } - mario_grab_used_object(m); + lua_pushinteger(L, process_interaction(m, INTERACT_BULLY, o, interact_bully)); return 1; } -int smlua_func_mario_lose_cap_to_enemy(lua_State* L) { +int smlua_func_interact_shock(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", "mario_lose_cap_to_enemy", 2, top); + if (top != 3) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "interact_shock", 3, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_lose_cap_to_enemy"); return 0; } - u32 arg = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mario_lose_cap_to_enemy"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_shock"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_shock"); return 0; } - lua_pushinteger(L, mario_lose_cap_to_enemy(m, arg)); + lua_pushinteger(L, process_interaction(m, INTERACT_SHOCK, o, interact_shock)); + + return 1; +} + +int smlua_func_interact_mr_blizzard(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", "interact_mr_blizzard", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_mr_blizzard"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_mr_blizzard"); return 0; } + + lua_pushinteger(L, process_interaction(m, INTERACT_MR_BLIZZARD, o, interact_mr_blizzard)); + + return 1; +} + +int smlua_func_interact_hit_from_below(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", "interact_hit_from_below", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_hit_from_below"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_hit_from_below"); return 0; } + + lua_pushinteger(L, process_interaction(m, INTERACT_HIT_FROM_BELOW, o, interact_hit_from_below)); + + return 1; +} + +int smlua_func_interact_bounce_top(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", "interact_bounce_top", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_bounce_top"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_bounce_top"); return 0; } + + lua_pushinteger(L, process_interaction(m, INTERACT_BOUNCE_TOP, o, interact_bounce_top)); + + return 1; +} + +int smlua_func_interact_spiny_walking(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", "interact_spiny_walking", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_spiny_walking"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_spiny_walking"); return 0; } + + lua_pushinteger(L, process_interaction(m, INTERACT_SPINY_WALKING, o, interact_spiny_walking)); + + return 1; +} + +int smlua_func_interact_damage(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", "interact_damage", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_damage"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_damage"); return 0; } + + lua_pushinteger(L, process_interaction(m, INTERACT_DAMAGE, o, interact_damage)); + + return 1; +} + +int smlua_func_interact_breakable(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", "interact_breakable", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_breakable"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_breakable"); return 0; } + + lua_pushinteger(L, process_interaction(m, INTERACT_BREAKABLE, o, interact_breakable)); + + return 1; +} + +int smlua_func_interact_koopa_shell(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", "interact_koopa_shell", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_koopa_shell"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_koopa_shell"); return 0; } + + lua_pushinteger(L, process_interaction(m, INTERACT_KOOPA_SHELL, o, interact_koopa_shell)); + + return 1; +} + +int smlua_func_interact_pole(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", "interact_pole", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_pole"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_pole"); return 0; } + + lua_pushinteger(L, process_interaction(m, INTERACT_POLE, o, interact_pole)); + + return 1; +} + +int smlua_func_interact_hoot(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", "interact_hoot", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_hoot"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_hoot"); return 0; } + + lua_pushinteger(L, process_interaction(m, INTERACT_HOOT, o, interact_hoot)); + + return 1; +} + +int smlua_func_interact_cap(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", "interact_cap", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_cap"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_cap"); return 0; } + + lua_pushinteger(L, process_interaction(m, INTERACT_CAP, o, interact_cap)); + + return 1; +} + +int smlua_func_interact_grabbable(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", "interact_grabbable", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_grabbable"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_grabbable"); return 0; } + + lua_pushinteger(L, process_interaction(m, INTERACT_GRABBABLE, o, interact_grabbable)); + + return 1; +} + +int smlua_func_interact_text(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", "interact_text", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "interact_text"); return 0; } + // interactType skipped so mods can't lie about what interaction it is + if (lua_isnil(L, 3)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 3, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "interact_text"); return 0; } + + lua_pushinteger(L, process_interaction(m, INTERACT_TEXT, o, interact_text)); return 1; } @@ -14636,20 +14522,74 @@ int smlua_func_mario_obj_angle_to_object(lua_State* L) { return 1; } -int smlua_func_mario_retrieve_cap(lua_State* L) { +int smlua_func_mario_stop_riding_object(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", "mario_retrieve_cap", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mario_stop_riding_object", 1, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_retrieve_cap"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_stop_riding_object"); return 0; } - mario_retrieve_cap(m); + mario_stop_riding_object(m); + + return 1; +} + +int smlua_func_mario_grab_used_object(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", "mario_grab_used_object", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_grab_used_object"); return 0; } + + mario_grab_used_object(m); + + return 1; +} + +int smlua_func_mario_drop_held_object(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", "mario_drop_held_object", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_drop_held_object"); return 0; } + + mario_drop_held_object(m); + + return 1; +} + +int smlua_func_mario_throw_held_object(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", "mario_throw_held_object", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_throw_held_object"); return 0; } + + mario_throw_held_object(m); return 1; } @@ -14672,38 +14612,134 @@ int smlua_func_mario_stop_riding_and_holding(lua_State* L) { return 1; } -int smlua_func_mario_stop_riding_object(lua_State* L) { +int smlua_func_does_mario_have_normal_cap_on_head(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", "mario_stop_riding_object", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "does_mario_have_normal_cap_on_head", 1, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_stop_riding_object"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "does_mario_have_normal_cap_on_head"); return 0; } - mario_stop_riding_object(m); + lua_pushinteger(L, does_mario_have_normal_cap_on_head(m)); return 1; } -int smlua_func_mario_throw_held_object(lua_State* L) { +int smlua_func_mario_blow_off_cap(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", "mario_throw_held_object", 1, top); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mario_blow_off_cap", 2, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_throw_held_object"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_blow_off_cap"); return 0; } + f32 capSpeed = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mario_blow_off_cap"); return 0; } - mario_throw_held_object(m); + mario_blow_off_cap(m, capSpeed); + + return 1; +} + +int smlua_func_mario_lose_cap_to_enemy(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", "mario_lose_cap_to_enemy", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_lose_cap_to_enemy"); return 0; } + u32 arg = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mario_lose_cap_to_enemy"); return 0; } + + lua_pushinteger(L, mario_lose_cap_to_enemy(m, arg)); + + return 1; +} + +int smlua_func_mario_retrieve_cap(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", "mario_retrieve_cap", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_retrieve_cap"); return 0; } + + mario_retrieve_cap(m); + + return 1; +} + +int smlua_func_mario_get_collided_object(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", "mario_get_collided_object", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_get_collided_object"); return 0; } + u32 interactType = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mario_get_collided_object"); return 0; } + + smlua_push_object(L, LOT_OBJECT, mario_get_collided_object(m, interactType), NULL); + + return 1; +} + +int smlua_func_mario_check_object_grab(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", "mario_check_object_grab", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_check_object_grab"); return 0; } + + lua_pushinteger(L, mario_check_object_grab(m)); + + return 1; +} + +int smlua_func_get_door_save_file_flag(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", "get_door_save_file_flag", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* door = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_door_save_file_flag"); return 0; } + + lua_pushinteger(L, get_door_save_file_flag(door)); return 1; } @@ -14771,10 +14807,64 @@ int smlua_func_take_damage_and_knock_back(lua_State* L) { return 1; } +int smlua_func_get_mario_cap_flag(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", "get_mario_cap_flag", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* capObject = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_mario_cap_flag"); return 0; } + + lua_pushinteger(L, get_mario_cap_flag(capObject)); + + return 1; +} + +int smlua_func_determine_interaction(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", "determine_interaction", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "determine_interaction"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* o = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "determine_interaction"); return 0; } + + lua_pushinteger(L, determine_interaction(m, o)); + + return 1; +} + //////////////////////// // lag_compensation.h // //////////////////////// +int smlua_func_lag_compensation_store(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", "lag_compensation_store", 0, top); + return 0; + } + + + lag_compensation_store(); + + return 1; +} + int smlua_func_lag_compensation_get_local_state(lua_State* L) { if (L == NULL) { return 0; } @@ -14793,21 +14883,6 @@ int smlua_func_lag_compensation_get_local_state(lua_State* L) { return 1; } -int smlua_func_lag_compensation_get_local_state_index(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", "lag_compensation_get_local_state_index", 0, top); - return 0; - } - - - lua_pushinteger(L, lag_compensation_get_local_state_index()); - - return 1; -} - int smlua_func_lag_compensation_get_local_state_ready(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -14823,17 +14898,17 @@ int smlua_func_lag_compensation_get_local_state_ready(UNUSED lua_State* L) { return 1; } -int smlua_func_lag_compensation_store(UNUSED lua_State* L) { +int smlua_func_lag_compensation_get_local_state_index(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", "lag_compensation_store", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "lag_compensation_get_local_state_index", 0, top); return 0; } - lag_compensation_store(); + lua_pushinteger(L, lag_compensation_get_local_state_index()); return 1; } @@ -14842,27 +14917,6 @@ int smlua_func_lag_compensation_store(UNUSED lua_State* L) { // level_info.h // ////////////////// -int smlua_func_get_level_name(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", "get_level_name", 3, top); - return 0; - } - - s16 courseNum = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_level_name"); return 0; } - s16 levelNum = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "get_level_name"); return 0; } - s16 areaIndex = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "get_level_name"); return 0; } - - lua_pushstring(L, get_level_name(courseNum, levelNum, areaIndex)); - - return 1; -} - int smlua_func_get_level_name_ascii(lua_State* L) { if (L == NULL) { return 0; } @@ -14909,21 +14963,23 @@ int smlua_func_get_level_name_sm64(lua_State* L) { return 1; } -int smlua_func_get_star_name(lua_State* L) { +int smlua_func_get_level_name(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", "get_star_name", 2, top); + if (top != 3) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "get_level_name", 3, top); return 0; } s16 courseNum = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_star_name"); return 0; } - s16 starNum = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "get_star_name"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_level_name"); return 0; } + s16 levelNum = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "get_level_name"); return 0; } + s16 areaIndex = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "get_level_name"); return 0; } - lua_pushstring(L, get_star_name(courseNum, starNum)); + lua_pushstring(L, get_level_name(courseNum, levelNum, areaIndex)); return 1; } @@ -14970,6 +15026,25 @@ int smlua_func_get_star_name_sm64(lua_State* L) { return 1; } +int smlua_func_get_star_name(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", "get_star_name", 2, top); + return 0; + } + + s16 courseNum = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_star_name"); return 0; } + s16 starNum = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "get_star_name"); return 0; } + + lua_pushstring(L, get_star_name(courseNum, starNum)); + + return 1; +} + //////////////////// // level_script.h // //////////////////// @@ -15006,6 +15081,21 @@ int smlua_func_area_create_warp_node(lua_State* L) { // level_update.h // //////////////////// +int smlua_func_level_control_timer_running(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", "level_control_timer_running", 0, top); + return 0; + } + + + lua_pushinteger(L, level_control_timer_running()); + + return 1; +} + int smlua_func_fade_into_special_warp(lua_State* L) { if (L == NULL) { return 0; } @@ -15074,21 +15164,6 @@ int smlua_func_initiate_painting_warp(lua_State* L) { return 1; } -int smlua_func_level_control_timer_running(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", "level_control_timer_running", 0, top); - return 0; - } - - - lua_pushinteger(L, level_control_timer_running()); - - return 1; -} - int smlua_func_level_trigger_warp(lua_State* L) { if (L == NULL) { return 0; } @@ -15109,6 +15184,23 @@ int smlua_func_level_trigger_warp(lua_State* L) { return 1; } +int smlua_func_warp_special(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", "warp_special", 1, top); + return 0; + } + + s32 arg = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "warp_special"); return 0; } + + warp_special(arg); + + return 1; +} + int smlua_func_lvl_set_current_level(lua_State* L) { if (L == NULL) { return 0; } @@ -15128,58 +15220,10 @@ int smlua_func_lvl_set_current_level(lua_State* L) { return 1; } -int smlua_func_warp_special(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", "warp_special", 1, top); - return 0; - } - - s32 arg = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "warp_special"); return 0; } - - warp_special(arg); - - return 1; -} - /////////////////////// // lighting_engine.h // /////////////////////// -int smlua_func_le_add_light(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 8) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "le_add_light", 8, top); - return 0; - } - - f32 x = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "le_add_light"); return 0; } - f32 y = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "le_add_light"); return 0; } - f32 z = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "le_add_light"); return 0; } - u8 r = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "le_add_light"); return 0; } - u8 g = smlua_to_integer(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "le_add_light"); return 0; } - u8 b = smlua_to_integer(L, 6); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "le_add_light"); return 0; } - f32 radius = smlua_to_number(L, 7); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "le_add_light"); return 0; } - f32 intensity = smlua_to_number(L, 8); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 8, "le_add_light"); return 0; } - - lua_pushinteger(L, le_add_light(x, y, z, r, g, b, radius, intensity)); - - return 1; -} - int smlua_func_le_calculate_lighting_color(lua_State* L) { if (L == NULL) { return 0; } @@ -15236,17 +15280,33 @@ int smlua_func_le_calculate_lighting_dir(lua_State* L) { return 1; } -int smlua_func_le_get_light_count(UNUSED lua_State* L) { +int smlua_func_le_add_light(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", "le_get_light_count", 0, top); + if (top != 8) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "le_add_light", 8, top); return 0; } + f32 x = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "le_add_light"); return 0; } + f32 y = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "le_add_light"); return 0; } + f32 z = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "le_add_light"); return 0; } + u8 r = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "le_add_light"); return 0; } + u8 g = smlua_to_integer(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "le_add_light"); return 0; } + u8 b = smlua_to_integer(L, 6); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "le_add_light"); return 0; } + f32 radius = smlua_to_number(L, 7); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "le_add_light"); return 0; } + f32 intensity = smlua_to_number(L, 8); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 8, "le_add_light"); return 0; } - lua_pushinteger(L, le_get_light_count()); + lua_pushinteger(L, le_add_light(x, y, z, r, g, b, radius, intensity)); return 1; } @@ -15268,6 +15328,21 @@ int smlua_func_le_remove_light(lua_State* L) { return 1; } +int smlua_func_le_get_light_count(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", "le_get_light_count", 0, top); + return 0; + } + + + lua_pushinteger(L, le_get_light_count()); + + return 1; +} + int smlua_func_le_set_ambient_color(lua_State* L) { if (L == NULL) { return 0; } @@ -15289,48 +15364,6 @@ int smlua_func_le_set_ambient_color(lua_State* L) { return 1; } -int smlua_func_le_set_light_color(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "le_set_light_color", 4, top); - return 0; - } - - s32 id = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "le_set_light_color"); return 0; } - u8 r = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "le_set_light_color"); return 0; } - u8 g = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "le_set_light_color"); return 0; } - u8 b = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "le_set_light_color"); return 0; } - - le_set_light_color(id, r, g, b); - - return 1; -} - -int smlua_func_le_set_light_intensity(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", "le_set_light_intensity", 2, top); - return 0; - } - - s32 id = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "le_set_light_intensity"); return 0; } - f32 intensity = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "le_set_light_intensity"); return 0; } - - le_set_light_intensity(id, intensity); - - return 1; -} - int smlua_func_le_set_light_pos(lua_State* L) { if (L == NULL) { return 0; } @@ -15354,6 +15387,29 @@ int smlua_func_le_set_light_pos(lua_State* L) { return 1; } +int smlua_func_le_set_light_color(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "le_set_light_color", 4, top); + return 0; + } + + s32 id = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "le_set_light_color"); return 0; } + u8 r = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "le_set_light_color"); return 0; } + u8 g = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "le_set_light_color"); return 0; } + u8 b = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "le_set_light_color"); return 0; } + + le_set_light_color(id, r, g, b); + + return 1; +} + int smlua_func_le_set_light_radius(lua_State* L) { if (L == NULL) { return 0; } @@ -15373,231 +15429,28 @@ int smlua_func_le_set_light_radius(lua_State* L) { return 1; } - ///////////// - // mario.h // -///////////// - -int smlua_func_adjust_sound_for_speed(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", "adjust_sound_for_speed", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "adjust_sound_for_speed"); return 0; } - - adjust_sound_for_speed(m); - - return 1; -} - -int smlua_func_check_common_action_exits(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", "check_common_action_exits", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_action_exits"); return 0; } - - lua_pushinteger(L, check_common_action_exits(m)); - - return 1; -} - -int smlua_func_check_common_hold_action_exits(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", "check_common_hold_action_exits", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_hold_action_exits"); return 0; } - - lua_pushinteger(L, check_common_hold_action_exits(m)); - - return 1; -} - -int smlua_func_drop_and_set_mario_action(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", "drop_and_set_mario_action", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "drop_and_set_mario_action"); return 0; } - u32 action = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "drop_and_set_mario_action"); return 0; } - u32 actionArg = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "drop_and_set_mario_action"); return 0; } - - lua_pushinteger(L, drop_and_set_mario_action(m, action, actionArg)); - - return 1; -} - -int smlua_func_execute_mario_action(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", "execute_mario_action", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { 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, "execute_mario_action"); return 0; } - - lua_pushinteger(L, execute_mario_action(o)); - - return 1; -} - -int smlua_func_find_floor_height_relative_polar(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", "find_floor_height_relative_polar", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_floor_height_relative_polar"); return 0; } - s16 angleFromMario = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "find_floor_height_relative_polar"); return 0; } - f32 distFromMario = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "find_floor_height_relative_polar"); return 0; } - - lua_pushnumber(L, find_floor_height_relative_polar(m, angleFromMario, distFromMario)); - - return 1; -} - -int smlua_func_find_floor_slope(lua_State* L) { +int smlua_func_le_set_light_intensity(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", "find_floor_slope", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "le_set_light_intensity", 2, top); return 0; } - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_floor_slope"); return 0; } - s16 yawOffset = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "find_floor_slope"); return 0; } + s32 id = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "le_set_light_intensity"); return 0; } + f32 intensity = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "le_set_light_intensity"); return 0; } - lua_pushinteger(L, find_floor_slope(m, yawOffset)); + le_set_light_intensity(id, intensity); return 1; } -int smlua_func_find_mario_anim_flags_and_translation(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", "find_mario_anim_flags_and_translation", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { 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, "find_mario_anim_flags_and_translation"); return 0; } - s32 yaw = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "find_mario_anim_flags_and_translation"); return 0; } - - Vec3s translation; - smlua_get_vec3s(translation, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "find_mario_anim_flags_and_translation"); return 0; } - - lua_pushinteger(L, find_mario_anim_flags_and_translation(o, yaw, translation)); - - smlua_push_vec3s(translation, 3); - - return 1; -} - -int smlua_func_force_idle_state(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", "force_idle_state", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "force_idle_state"); return 0; } - - lua_pushinteger(L, force_idle_state(m)); - - return 1; -} - -int smlua_func_hurt_and_set_mario_action(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "hurt_and_set_mario_action", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "hurt_and_set_mario_action"); return 0; } - u32 action = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "hurt_and_set_mario_action"); return 0; } - u32 actionArg = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "hurt_and_set_mario_action"); return 0; } - s16 hurtCounter = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "hurt_and_set_mario_action"); return 0; } - - lua_pushinteger(L, hurt_and_set_mario_action(m, action, actionArg, hurtCounter)); - - return 1; -} - -int smlua_func_init_single_mario(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", "init_single_mario", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "init_single_mario"); return 0; } - - init_single_mario(m); - - return 1; -} + ///////////// + // mario.h // +///////////// int smlua_func_is_anim_at_end(lua_State* L) { if (L == NULL) { return 0; } @@ -15635,6 +15488,110 @@ int smlua_func_is_anim_past_end(lua_State* L) { return 1; } +int smlua_func_set_mario_animation(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", "set_mario_animation", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_mario_animation"); return 0; } + s32 targetAnimID = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_mario_animation"); return 0; } + + lua_pushinteger(L, set_mario_animation(m, targetAnimID)); + + return 1; +} + +int smlua_func_set_mario_anim_with_accel(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", "set_mario_anim_with_accel", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_mario_anim_with_accel"); return 0; } + s32 targetAnimID = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_mario_anim_with_accel"); return 0; } + s32 accel = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_mario_anim_with_accel"); return 0; } + + lua_pushinteger(L, set_mario_anim_with_accel(m, targetAnimID, accel)); + + return 1; +} + +int smlua_func_set_character_animation(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", "set_character_animation", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_character_animation"); return 0; } + int targetAnimID = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_character_animation"); return 0; } + + lua_pushinteger(L, set_character_animation(m, targetAnimID)); + + return 1; +} + +int smlua_func_set_character_anim_with_accel(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", "set_character_anim_with_accel", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_character_anim_with_accel"); return 0; } + int targetAnimID = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_character_anim_with_accel"); return 0; } + s32 accel = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_character_anim_with_accel"); return 0; } + + lua_pushinteger(L, set_character_anim_with_accel(m, targetAnimID, accel)); + + return 1; +} + +int smlua_func_set_anim_to_frame(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", "set_anim_to_frame", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_anim_to_frame"); return 0; } + s16 animFrame = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_anim_to_frame"); return 0; } + + set_anim_to_frame(m, animFrame); + + return 1; +} + int smlua_func_is_anim_past_frame(lua_State* L) { if (L == NULL) { return 0; } @@ -15655,6 +15612,290 @@ int smlua_func_is_anim_past_frame(lua_State* L) { return 1; } +int smlua_func_find_mario_anim_flags_and_translation(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", "find_mario_anim_flags_and_translation", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { 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, "find_mario_anim_flags_and_translation"); return 0; } + s32 yaw = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "find_mario_anim_flags_and_translation"); return 0; } + + Vec3s translation; + smlua_get_vec3s(translation, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "find_mario_anim_flags_and_translation"); return 0; } + + lua_pushinteger(L, find_mario_anim_flags_and_translation(o, yaw, translation)); + + smlua_push_vec3s(translation, 3); + + return 1; +} + +int smlua_func_update_mario_pos_for_anim(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", "update_mario_pos_for_anim", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_mario_pos_for_anim"); return 0; } + + update_mario_pos_for_anim(m); + + return 1; +} + +int smlua_func_return_mario_anim_y_translation(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", "return_mario_anim_y_translation", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "return_mario_anim_y_translation"); return 0; } + + lua_pushinteger(L, return_mario_anim_y_translation(m)); + + return 1; +} + +int smlua_func_play_sound_if_no_flag(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", "play_sound_if_no_flag", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_sound_if_no_flag"); return 0; } + u32 soundBits = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_sound_if_no_flag"); return 0; } + u32 flags = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_sound_if_no_flag"); return 0; } + + play_sound_if_no_flag(m, soundBits, flags); + + return 1; +} + +int smlua_func_play_mario_jump_sound(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", "play_mario_jump_sound", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_jump_sound"); return 0; } + + play_mario_jump_sound(m); + + return 1; +} + +int smlua_func_adjust_sound_for_speed(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", "adjust_sound_for_speed", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "adjust_sound_for_speed"); return 0; } + + adjust_sound_for_speed(m); + + return 1; +} + +int smlua_func_play_sound_and_spawn_particles(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", "play_sound_and_spawn_particles", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_sound_and_spawn_particles"); return 0; } + u32 soundBits = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_sound_and_spawn_particles"); return 0; } + u32 waveParticleType = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_sound_and_spawn_particles"); return 0; } + + play_sound_and_spawn_particles(m, soundBits, waveParticleType); + + return 1; +} + +int smlua_func_play_mario_action_sound(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", "play_mario_action_sound", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_action_sound"); return 0; } + u32 soundBits = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_mario_action_sound"); return 0; } + u32 waveParticleType = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_mario_action_sound"); return 0; } + + play_mario_action_sound(m, soundBits, waveParticleType); + + return 1; +} + +int smlua_func_play_mario_landing_sound(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", "play_mario_landing_sound", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_landing_sound"); return 0; } + u32 soundBits = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_mario_landing_sound"); return 0; } + + play_mario_landing_sound(m, soundBits); + + return 1; +} + +int smlua_func_play_mario_landing_sound_once(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", "play_mario_landing_sound_once", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_landing_sound_once"); return 0; } + u32 soundBits = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_mario_landing_sound_once"); return 0; } + + play_mario_landing_sound_once(m, soundBits); + + return 1; +} + +int smlua_func_play_mario_heavy_landing_sound(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", "play_mario_heavy_landing_sound", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_heavy_landing_sound"); return 0; } + u32 soundBits = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_mario_heavy_landing_sound"); return 0; } + + play_mario_heavy_landing_sound(m, soundBits); + + return 1; +} + +int smlua_func_play_mario_heavy_landing_sound_once(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", "play_mario_heavy_landing_sound_once", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_heavy_landing_sound_once"); return 0; } + u32 soundBits = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_mario_heavy_landing_sound_once"); return 0; } + + play_mario_heavy_landing_sound_once(m, soundBits); + + return 1; +} + +int smlua_func_play_mario_sound(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", "play_mario_sound", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_sound"); return 0; } + s32 primarySoundBits = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_mario_sound"); return 0; } + s32 scondarySoundBits = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_mario_sound"); return 0; } + + play_mario_sound(m, primarySoundBits, scondarySoundBits); + + return 1; +} + +int smlua_func_mario_is_crouching(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", "mario_is_crouching", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_is_crouching"); return 0; } + + lua_pushboolean(L, mario_is_crouching(m)); + + return 1; +} + int smlua_func_mario_can_bubble(lua_State* L) { if (L == NULL) { return 0; } @@ -15673,6 +15914,189 @@ int smlua_func_mario_can_bubble(lua_State* L) { return 1; } +int smlua_func_mario_set_bubbled(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", "mario_set_bubbled", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_set_bubbled"); return 0; } + + mario_set_bubbled(m); + + return 1; +} + +int smlua_func_mario_set_forward_vel(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", "mario_set_forward_vel", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_set_forward_vel"); return 0; } + f32 speed = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mario_set_forward_vel"); return 0; } + + mario_set_forward_vel(m, speed); + + return 1; +} + +int smlua_func_mario_get_floor_class(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", "mario_get_floor_class", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_get_floor_class"); return 0; } + + lua_pushinteger(L, mario_get_floor_class(m)); + + return 1; +} + +int smlua_func_mario_get_terrain_sound_addend(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", "mario_get_terrain_sound_addend", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_get_terrain_sound_addend"); return 0; } + + lua_pushinteger(L, mario_get_terrain_sound_addend(m)); + + return 1; +} + +int smlua_func_resolve_and_return_wall_collisions(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", "resolve_and_return_wall_collisions", 3, top); + return 0; + } + + + Vec3f pos; + smlua_get_vec3f(pos, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "resolve_and_return_wall_collisions"); return 0; } + f32 offset = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "resolve_and_return_wall_collisions"); return 0; } + f32 radius = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "resolve_and_return_wall_collisions"); return 0; } + + smlua_push_object(L, LOT_SURFACE, resolve_and_return_wall_collisions(pos, offset, radius), NULL); + + smlua_push_vec3f(pos, 1); + + return 1; +} + +int smlua_func_resolve_and_return_wall_collisions_data(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "resolve_and_return_wall_collisions_data", 4, top); + return 0; + } + + + Vec3f pos; + smlua_get_vec3f(pos, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "resolve_and_return_wall_collisions_data"); return 0; } + f32 offset = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "resolve_and_return_wall_collisions_data"); return 0; } + f32 radius = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "resolve_and_return_wall_collisions_data"); return 0; } + if (lua_isnil(L, 4)) { return 0; } + struct WallCollisionData* collisionData = (struct WallCollisionData*)smlua_to_cobject(L, 4, LOT_WALLCOLLISIONDATA); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "resolve_and_return_wall_collisions_data"); return 0; } + + resolve_and_return_wall_collisions_data(pos, offset, radius, collisionData); + + smlua_push_vec3f(pos, 1); + + return 1; +} + +/* +int smlua_func_vec3f_find_ceil(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", "vec3f_find_ceil", 3, top); + return 0; + } + + + Vec3f pos; + smlua_get_vec3f(pos, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_find_ceil"); return 0; } + f32 height = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_find_ceil"); return 0; } + if (lua_isnil(L, 3)) { return 0; } +// struct Surface** ceil = (struct Surface**)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3f_find_ceil"); return 0; } + + lua_pushnumber(L, vec3f_find_ceil(pos, height, ceil)); + + smlua_push_vec3f(pos, 1); + + return 1; +} +*/ + +/* +int smlua_func_vec3f_mario_ceil(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", "vec3f_mario_ceil", 3, top); + return 0; + } + + + Vec3f pos; + smlua_get_vec3f(pos, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_mario_ceil"); return 0; } + f32 height = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_mario_ceil"); return 0; } + if (lua_isnil(L, 3)) { return 0; } +// struct Surface** ceil = (struct Surface**)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3f_mario_ceil"); return 0; } + + lua_pushnumber(L, vec3f_mario_ceil(pos, height, ceil)); + + smlua_push_vec3f(pos, 1); + + return 1; +} +*/ + int smlua_func_mario_facing_downhill(lua_State* L) { if (L == NULL) { return 0; } @@ -15747,434 +16171,124 @@ int smlua_func_mario_floor_is_steep(lua_State* L) { return 1; } -int smlua_func_mario_get_floor_class(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", "mario_get_floor_class", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_get_floor_class"); return 0; } - - lua_pushinteger(L, mario_get_floor_class(m)); - - return 1; -} - -int smlua_func_mario_get_terrain_sound_addend(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", "mario_get_terrain_sound_addend", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_get_terrain_sound_addend"); return 0; } - - lua_pushinteger(L, mario_get_terrain_sound_addend(m)); - - return 1; -} - -int smlua_func_mario_is_crouching(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", "mario_is_crouching", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_is_crouching"); return 0; } - - lua_pushboolean(L, mario_is_crouching(m)); - - return 1; -} - -int smlua_func_mario_set_bubbled(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", "mario_set_bubbled", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_set_bubbled"); return 0; } - - mario_set_bubbled(m); - - return 1; -} - -int smlua_func_mario_set_forward_vel(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", "mario_set_forward_vel", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_set_forward_vel"); return 0; } - f32 speed = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mario_set_forward_vel"); return 0; } - - mario_set_forward_vel(m, speed); - - return 1; -} - -int smlua_func_mario_update_wall(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", "mario_update_wall", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_update_wall"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct WallCollisionData* wcd = (struct WallCollisionData*)smlua_to_cobject(L, 2, LOT_WALLCOLLISIONDATA); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mario_update_wall"); return 0; } - - mario_update_wall(m, wcd); - - return 1; -} - -int smlua_func_play_mario_action_sound(lua_State* L) { +int smlua_func_find_floor_height_relative_polar(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", "play_mario_action_sound", 3, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "find_floor_height_relative_polar", 3, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_action_sound"); return 0; } - u32 soundBits = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_mario_action_sound"); return 0; } - u32 waveParticleType = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_mario_action_sound"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_floor_height_relative_polar"); return 0; } + s16 angleFromMario = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "find_floor_height_relative_polar"); return 0; } + f32 distFromMario = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "find_floor_height_relative_polar"); return 0; } - play_mario_action_sound(m, soundBits, waveParticleType); + lua_pushnumber(L, find_floor_height_relative_polar(m, angleFromMario, distFromMario)); return 1; } -int smlua_func_play_mario_heavy_landing_sound(lua_State* L) { +int smlua_func_find_floor_slope(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", "play_mario_heavy_landing_sound", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "find_floor_slope", 2, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_heavy_landing_sound"); return 0; } - u32 soundBits = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_mario_heavy_landing_sound"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_floor_slope"); return 0; } + s16 yawOffset = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "find_floor_slope"); return 0; } - play_mario_heavy_landing_sound(m, soundBits); + lua_pushinteger(L, find_floor_slope(m, yawOffset)); return 1; } -int smlua_func_play_mario_heavy_landing_sound_once(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", "play_mario_heavy_landing_sound_once", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_heavy_landing_sound_once"); return 0; } - u32 soundBits = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_mario_heavy_landing_sound_once"); return 0; } - - play_mario_heavy_landing_sound_once(m, soundBits); - - return 1; -} - -int smlua_func_play_mario_jump_sound(lua_State* L) { +int smlua_func_update_mario_sound_and_camera(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", "play_mario_jump_sound", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "update_mario_sound_and_camera", 1, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_jump_sound"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_mario_sound_and_camera"); return 0; } - play_mario_jump_sound(m); + update_mario_sound_and_camera(m); return 1; } -int smlua_func_play_mario_landing_sound(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", "play_mario_landing_sound", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_landing_sound"); return 0; } - u32 soundBits = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_mario_landing_sound"); return 0; } - - play_mario_landing_sound(m, soundBits); - - return 1; -} - -int smlua_func_play_mario_landing_sound_once(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", "play_mario_landing_sound_once", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_landing_sound_once"); return 0; } - u32 soundBits = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_mario_landing_sound_once"); return 0; } - - play_mario_landing_sound_once(m, soundBits); - - return 1; -} - -int smlua_func_play_mario_sound(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", "play_mario_sound", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_mario_sound"); return 0; } - s32 primarySoundBits = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_mario_sound"); return 0; } - s32 scondarySoundBits = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_mario_sound"); return 0; } - - play_mario_sound(m, primarySoundBits, scondarySoundBits); - - return 1; -} - -int smlua_func_play_sound_and_spawn_particles(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", "play_sound_and_spawn_particles", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_sound_and_spawn_particles"); return 0; } - u32 soundBits = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_sound_and_spawn_particles"); return 0; } - u32 waveParticleType = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_sound_and_spawn_particles"); return 0; } - - play_sound_and_spawn_particles(m, soundBits, waveParticleType); - - return 1; -} - -int smlua_func_play_sound_if_no_flag(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", "play_sound_if_no_flag", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_sound_if_no_flag"); return 0; } - u32 soundBits = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_sound_if_no_flag"); return 0; } - u32 flags = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_sound_if_no_flag"); return 0; } - - play_sound_if_no_flag(m, soundBits, flags); - - return 1; -} - -int smlua_func_resolve_and_return_wall_collisions(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", "resolve_and_return_wall_collisions", 3, top); - return 0; - } - - - Vec3f pos; - smlua_get_vec3f(pos, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "resolve_and_return_wall_collisions"); return 0; } - f32 offset = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "resolve_and_return_wall_collisions"); return 0; } - f32 radius = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "resolve_and_return_wall_collisions"); return 0; } - - smlua_push_object(L, LOT_SURFACE, resolve_and_return_wall_collisions(pos, offset, radius), NULL); - - smlua_push_vec3f(pos, 1); - - return 1; -} - -int smlua_func_resolve_and_return_wall_collisions_data(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "resolve_and_return_wall_collisions_data", 4, top); - return 0; - } - - - Vec3f pos; - smlua_get_vec3f(pos, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "resolve_and_return_wall_collisions_data"); return 0; } - f32 offset = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "resolve_and_return_wall_collisions_data"); return 0; } - f32 radius = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "resolve_and_return_wall_collisions_data"); return 0; } - if (lua_isnil(L, 4)) { return 0; } - struct WallCollisionData* collisionData = (struct WallCollisionData*)smlua_to_cobject(L, 4, LOT_WALLCOLLISIONDATA); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "resolve_and_return_wall_collisions_data"); return 0; } - - resolve_and_return_wall_collisions_data(pos, offset, radius, collisionData); - - smlua_push_vec3f(pos, 1); - - return 1; -} - -int smlua_func_return_mario_anim_y_translation(lua_State* L) { +int smlua_func_set_steep_jump_action(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", "return_mario_anim_y_translation", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_steep_jump_action", 1, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "return_mario_anim_y_translation"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_steep_jump_action"); return 0; } - lua_pushinteger(L, return_mario_anim_y_translation(m)); + set_steep_jump_action(m); return 1; } -int smlua_func_set_anim_to_frame(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", "set_anim_to_frame", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_anim_to_frame"); return 0; } - s16 animFrame = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_anim_to_frame"); return 0; } - - set_anim_to_frame(m, animFrame); - - return 1; -} - -int smlua_func_set_character_anim_with_accel(lua_State* L) { +int smlua_func_set_mario_y_vel_based_on_fspeed(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", "set_character_anim_with_accel", 3, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_mario_y_vel_based_on_fspeed", 3, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_character_anim_with_accel"); return 0; } - int targetAnimID = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_character_anim_with_accel"); return 0; } - s32 accel = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_character_anim_with_accel"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_mario_y_vel_based_on_fspeed"); return 0; } + f32 initialVelY = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_mario_y_vel_based_on_fspeed"); return 0; } + f32 multiplier = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_mario_y_vel_based_on_fspeed"); return 0; } - lua_pushinteger(L, set_character_anim_with_accel(m, targetAnimID, accel)); + set_mario_y_vel_based_on_fspeed(m, initialVelY, multiplier); return 1; } -int smlua_func_set_character_animation(lua_State* L) { +int smlua_func_set_mario_action(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", "set_character_animation", 2, top); + if (top != 3) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_mario_action", 3, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_character_animation"); return 0; } - int targetAnimID = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_character_animation"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_mario_action"); return 0; } + u32 action = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_mario_action"); return 0; } + u32 actionArg = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_mario_action"); return 0; } - lua_pushinteger(L, set_character_animation(m, targetAnimID)); + lua_pushinteger(L, set_mario_action(m, action, actionArg)); return 1; } @@ -16219,66 +16333,174 @@ int smlua_func_set_jumping_action(lua_State* L) { return 1; } -int smlua_func_set_mario_action(lua_State* L) { +int smlua_func_drop_and_set_mario_action(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", "set_mario_action", 3, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "drop_and_set_mario_action", 3, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_mario_action"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "drop_and_set_mario_action"); return 0; } u32 action = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_mario_action"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "drop_and_set_mario_action"); return 0; } u32 actionArg = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_mario_action"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "drop_and_set_mario_action"); return 0; } - lua_pushinteger(L, set_mario_action(m, action, actionArg)); + lua_pushinteger(L, drop_and_set_mario_action(m, action, actionArg)); return 1; } -int smlua_func_set_mario_anim_with_accel(lua_State* L) { +int smlua_func_hurt_and_set_mario_action(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", "set_mario_anim_with_accel", 3, top); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "hurt_and_set_mario_action", 4, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_mario_anim_with_accel"); return 0; } - s32 targetAnimID = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_mario_anim_with_accel"); return 0; } - s32 accel = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_mario_anim_with_accel"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "hurt_and_set_mario_action"); return 0; } + u32 action = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "hurt_and_set_mario_action"); return 0; } + u32 actionArg = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "hurt_and_set_mario_action"); return 0; } + s16 hurtCounter = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "hurt_and_set_mario_action"); return 0; } - lua_pushinteger(L, set_mario_anim_with_accel(m, targetAnimID, accel)); + lua_pushinteger(L, hurt_and_set_mario_action(m, action, actionArg, hurtCounter)); return 1; } -int smlua_func_set_mario_animation(lua_State* L) { +int smlua_func_check_common_action_exits(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", "set_mario_animation", 2, top); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "check_common_action_exits", 1, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_mario_animation"); return 0; } - s32 targetAnimID = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_mario_animation"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_action_exits"); return 0; } - lua_pushinteger(L, set_mario_animation(m, targetAnimID)); + lua_pushinteger(L, check_common_action_exits(m)); + + return 1; +} + +int smlua_func_check_common_hold_action_exits(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", "check_common_hold_action_exits", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_hold_action_exits"); return 0; } + + lua_pushinteger(L, check_common_hold_action_exits(m)); + + return 1; +} + +int smlua_func_transition_submerged_to_walking(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", "transition_submerged_to_walking", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "transition_submerged_to_walking"); return 0; } + + lua_pushinteger(L, transition_submerged_to_walking(m)); + + return 1; +} + +int smlua_func_set_water_plunge_action(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", "set_water_plunge_action", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_water_plunge_action"); return 0; } + + lua_pushinteger(L, set_water_plunge_action(m)); + + return 1; +} + +int smlua_func_execute_mario_action(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", "execute_mario_action", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { 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, "execute_mario_action"); return 0; } + + lua_pushinteger(L, execute_mario_action(o)); + + return 1; +} + +int smlua_func_force_idle_state(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", "force_idle_state", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "force_idle_state"); return 0; } + + lua_pushinteger(L, force_idle_state(m)); + + return 1; +} + +int smlua_func_init_single_mario(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", "init_single_mario", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "init_single_mario"); return 0; } + + init_single_mario(m); return 1; } @@ -16305,193 +16527,111 @@ int smlua_func_set_mario_particle_flags(lua_State* L) { return 1; } -int smlua_func_set_mario_y_vel_based_on_fspeed(lua_State* L) { +int smlua_func_mario_update_wall(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", "set_mario_y_vel_based_on_fspeed", 3, top); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mario_update_wall", 2, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_mario_y_vel_based_on_fspeed"); return 0; } - f32 initialVelY = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_mario_y_vel_based_on_fspeed"); return 0; } - f32 multiplier = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_mario_y_vel_based_on_fspeed"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_update_wall"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct WallCollisionData* wcd = (struct WallCollisionData*)smlua_to_cobject(L, 2, LOT_WALLCOLLISIONDATA); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mario_update_wall"); return 0; } - set_mario_y_vel_based_on_fspeed(m, initialVelY, multiplier); + mario_update_wall(m, wcd); return 1; } -int smlua_func_set_steep_jump_action(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", "set_steep_jump_action", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_steep_jump_action"); return 0; } - - set_steep_jump_action(m); - - return 1; -} - -int smlua_func_set_water_plunge_action(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", "set_water_plunge_action", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_water_plunge_action"); return 0; } - - lua_pushinteger(L, set_water_plunge_action(m)); - - return 1; -} - -int smlua_func_transition_submerged_to_walking(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", "transition_submerged_to_walking", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "transition_submerged_to_walking"); return 0; } - - lua_pushinteger(L, transition_submerged_to_walking(m)); - - return 1; -} - -int smlua_func_update_mario_pos_for_anim(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", "update_mario_pos_for_anim", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_mario_pos_for_anim"); return 0; } - - update_mario_pos_for_anim(m); - - return 1; -} - -int smlua_func_update_mario_sound_and_camera(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", "update_mario_sound_and_camera", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_mario_sound_and_camera"); return 0; } - - update_mario_sound_and_camera(m); - - return 1; -} - -/* -int smlua_func_vec3f_find_ceil(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", "vec3f_find_ceil", 3, top); - return 0; - } - - - Vec3f pos; - smlua_get_vec3f(pos, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_find_ceil"); return 0; } - f32 height = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_find_ceil"); return 0; } - if (lua_isnil(L, 3)) { return 0; } -// struct Surface** ceil = (struct Surface**)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3f_find_ceil"); return 0; } - - lua_pushnumber(L, vec3f_find_ceil(pos, height, ceil)); - - smlua_push_vec3f(pos, 1); - - return 1; -} -*/ - -/* -int smlua_func_vec3f_mario_ceil(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", "vec3f_mario_ceil", 3, top); - return 0; - } - - - Vec3f pos; - smlua_get_vec3f(pos, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_mario_ceil"); return 0; } - f32 height = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_mario_ceil"); return 0; } - if (lua_isnil(L, 3)) { return 0; } -// struct Surface** ceil = (struct Surface**)smlua_to_cobject(L, 3, LOT_???); <--- UNIMPLEMENTED - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3f_mario_ceil"); return 0; } - - lua_pushnumber(L, vec3f_mario_ceil(pos, height, ceil)); - - smlua_push_vec3f(pos, 1); - - return 1; -} -*/ - ////////////////////////////// // mario_actions_airborne.c // ////////////////////////////// -int smlua_func_check_common_airborne_cancels(lua_State* L) { +int smlua_func_play_flip_sounds(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", "check_common_airborne_cancels", 1, top); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "play_flip_sounds", 4, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_airborne_cancels"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_flip_sounds"); return 0; } + s16 frame1 = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_flip_sounds"); return 0; } + s16 frame2 = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_flip_sounds"); return 0; } + s16 frame3 = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "play_flip_sounds"); return 0; } - extern s32 check_common_airborne_cancels(struct MarioState *m); - lua_pushinteger(L, check_common_airborne_cancels(m)); + extern void play_flip_sounds(struct MarioState *m, s16 frame1, s16 frame2, s16 frame3); + play_flip_sounds(m, frame1, frame2, frame3); + + return 1; +} + +int smlua_func_play_far_fall_sound(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", "play_far_fall_sound", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_far_fall_sound"); return 0; } + + extern void play_far_fall_sound(struct MarioState *m); + play_far_fall_sound(m); + + return 1; +} + +#ifndef VERSION_JP +int smlua_func_play_knockback_sound(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", "play_knockback_sound", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_knockback_sound"); return 0; } + + extern void play_knockback_sound(struct MarioState *m); + play_knockback_sound(m); + + return 1; +} +#endif + +int smlua_func_lava_boost_on_wall(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", "lava_boost_on_wall", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "lava_boost_on_wall"); return 0; } + + extern s32 lava_boost_on_wall(struct MarioState *m); + lua_pushinteger(L, lava_boost_on_wall(m)); return 1; } @@ -16517,6 +16657,44 @@ int smlua_func_check_fall_damage(lua_State* L) { return 1; } +int smlua_func_check_kick_or_dive_in_air(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", "check_kick_or_dive_in_air", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_kick_or_dive_in_air"); return 0; } + + extern s32 check_kick_or_dive_in_air(struct MarioState *m); + lua_pushinteger(L, check_kick_or_dive_in_air(m)); + + return 1; +} + +int smlua_func_should_get_stuck_in_ground(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", "should_get_stuck_in_ground", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "should_get_stuck_in_ground"); return 0; } + + extern s32 should_get_stuck_in_ground(struct MarioState *m); + lua_pushinteger(L, should_get_stuck_in_ground(m)); + + return 1; +} + int smlua_func_check_fall_damage_or_get_stuck(lua_State* L) { if (L == NULL) { return 0; } @@ -16557,40 +16735,116 @@ int smlua_func_check_horizontal_wind(lua_State* L) { return 1; } -int smlua_func_check_kick_or_dive_in_air(lua_State* L) { +int smlua_func_update_air_with_turn(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", "check_kick_or_dive_in_air", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "update_air_with_turn", 1, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_kick_or_dive_in_air"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_air_with_turn"); return 0; } - extern s32 check_kick_or_dive_in_air(struct MarioState *m); - lua_pushinteger(L, check_kick_or_dive_in_air(m)); + extern void update_air_with_turn(struct MarioState *m); + update_air_with_turn(m); return 1; } -int smlua_func_check_wall_kick(lua_State* L) { +int smlua_func_update_air_without_turn(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", "check_wall_kick", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "update_air_without_turn", 1, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_wall_kick"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_air_without_turn"); return 0; } - extern s32 check_wall_kick(struct MarioState *m); - lua_pushinteger(L, check_wall_kick(m)); + extern void update_air_without_turn(struct MarioState *m); + update_air_without_turn(m); + + return 1; +} + +int smlua_func_update_lava_boost_or_twirling(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", "update_lava_boost_or_twirling", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_lava_boost_or_twirling"); return 0; } + + extern void update_lava_boost_or_twirling(struct MarioState *m); + update_lava_boost_or_twirling(m); + + return 1; +} + +int smlua_func_update_flying_yaw(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", "update_flying_yaw", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_flying_yaw"); return 0; } + + extern void update_flying_yaw(struct MarioState *m); + update_flying_yaw(m); + + return 1; +} + +int smlua_func_update_flying_pitch(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", "update_flying_pitch", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_flying_pitch"); return 0; } + + extern void update_flying_pitch(struct MarioState *m); + update_flying_pitch(m); + + return 1; +} + +int smlua_func_update_flying(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", "update_flying", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_flying"); return 0; } + + extern void update_flying(struct MarioState *m); + update_flying(m); return 1; } @@ -16647,21 +16901,40 @@ int smlua_func_common_air_knockback_step(lua_State* L) { return 1; } -int smlua_func_lava_boost_on_wall(lua_State* L) { +int smlua_func_check_wall_kick(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", "lava_boost_on_wall", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "check_wall_kick", 1, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "lava_boost_on_wall"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_wall_kick"); return 0; } - extern s32 lava_boost_on_wall(struct MarioState *m); - lua_pushinteger(L, lava_boost_on_wall(m)); + extern s32 check_wall_kick(struct MarioState *m); + lua_pushinteger(L, check_wall_kick(m)); + + return 1; +} + +int smlua_func_check_common_airborne_cancels(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", "check_common_airborne_cancels", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_airborne_cancels"); return 0; } + + extern s32 check_common_airborne_cancels(struct MarioState *m); + lua_pushinteger(L, check_common_airborne_cancels(m)); return 1; } @@ -16685,204 +16958,6 @@ int smlua_func_mario_execute_airborne_action(lua_State* L) { return 1; } -int smlua_func_play_far_fall_sound(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", "play_far_fall_sound", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_far_fall_sound"); return 0; } - - extern void play_far_fall_sound(struct MarioState *m); - play_far_fall_sound(m); - - return 1; -} - -int smlua_func_play_flip_sounds(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "play_flip_sounds", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_flip_sounds"); return 0; } - s16 frame1 = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_flip_sounds"); return 0; } - s16 frame2 = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_flip_sounds"); return 0; } - s16 frame3 = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "play_flip_sounds"); return 0; } - - extern void play_flip_sounds(struct MarioState *m, s16 frame1, s16 frame2, s16 frame3); - play_flip_sounds(m, frame1, frame2, frame3); - - return 1; -} - -#ifndef VERSION_JP -int smlua_func_play_knockback_sound(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", "play_knockback_sound", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_knockback_sound"); return 0; } - - extern void play_knockback_sound(struct MarioState *m); - play_knockback_sound(m); - - return 1; -} -#endif - -int smlua_func_should_get_stuck_in_ground(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", "should_get_stuck_in_ground", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "should_get_stuck_in_ground"); return 0; } - - extern s32 should_get_stuck_in_ground(struct MarioState *m); - lua_pushinteger(L, should_get_stuck_in_ground(m)); - - return 1; -} - -int smlua_func_update_air_with_turn(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", "update_air_with_turn", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_air_with_turn"); return 0; } - - extern void update_air_with_turn(struct MarioState *m); - update_air_with_turn(m); - - return 1; -} - -int smlua_func_update_air_without_turn(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", "update_air_without_turn", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_air_without_turn"); return 0; } - - extern void update_air_without_turn(struct MarioState *m); - update_air_without_turn(m); - - return 1; -} - -int smlua_func_update_flying(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", "update_flying", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_flying"); return 0; } - - extern void update_flying(struct MarioState *m); - update_flying(m); - - return 1; -} - -int smlua_func_update_flying_pitch(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", "update_flying_pitch", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_flying_pitch"); return 0; } - - extern void update_flying_pitch(struct MarioState *m); - update_flying_pitch(m); - - return 1; -} - -int smlua_func_update_flying_yaw(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", "update_flying_yaw", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_flying_yaw"); return 0; } - - extern void update_flying_yaw(struct MarioState *m); - update_flying_yaw(m); - - return 1; -} - -int smlua_func_update_lava_boost_or_twirling(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", "update_lava_boost_or_twirling", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_lava_boost_or_twirling"); return 0; } - - extern void update_lava_boost_or_twirling(struct MarioState *m); - update_lava_boost_or_twirling(m); - - return 1; -} - /////////////////////////////// // mario_actions_automatic.c // /////////////////////////////// @@ -16906,107 +16981,6 @@ int smlua_func_add_tree_leaf_particles(lua_State* L) { return 1; } -int smlua_func_check_common_automatic_cancels(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", "check_common_automatic_cancels", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_automatic_cancels"); return 0; } - - extern s32 check_common_automatic_cancels(struct MarioState *m); - lua_pushinteger(L, check_common_automatic_cancels(m)); - - return 1; -} - -int smlua_func_climb_up_ledge(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", "climb_up_ledge", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "climb_up_ledge"); return 0; } - - extern void climb_up_ledge(struct MarioState *m); - climb_up_ledge(m); - - return 1; -} - -int smlua_func_let_go_of_ledge(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", "let_go_of_ledge", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "let_go_of_ledge"); return 0; } - - extern s32 let_go_of_ledge(struct MarioState *m); - lua_pushinteger(L, let_go_of_ledge(m)); - - return 1; -} - -int smlua_func_mario_execute_automatic_action(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", "mario_execute_automatic_action", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_execute_automatic_action"); return 0; } - - extern s32 mario_execute_automatic_action(struct MarioState *m); - lua_pushinteger(L, mario_execute_automatic_action(m)); - - return 1; -} - -int smlua_func_perform_hanging_step(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", "perform_hanging_step", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "perform_hanging_step"); return 0; } - - Vec3f nextPos; - smlua_get_vec3f(nextPos, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "perform_hanging_step"); return 0; } - - extern s32 perform_hanging_step(struct MarioState *m, Vec3f nextPos); - lua_pushinteger(L, perform_hanging_step(m, nextPos)); - - smlua_push_vec3f(nextPos, 2); - - return 1; -} - int smlua_func_play_climbing_sounds(lua_State* L) { if (L == NULL) { return 0; } @@ -17049,6 +17023,31 @@ int smlua_func_set_pole_position(lua_State* L) { return 1; } +int smlua_func_perform_hanging_step(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", "perform_hanging_step", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "perform_hanging_step"); return 0; } + + Vec3f nextPos; + smlua_get_vec3f(nextPos, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "perform_hanging_step"); return 0; } + + extern s32 perform_hanging_step(struct MarioState *m, Vec3f nextPos); + lua_pushinteger(L, perform_hanging_step(m, nextPos)); + + smlua_push_vec3f(nextPos, 2); + + return 1; +} + int smlua_func_update_hang_moving(lua_State* L) { if (L == NULL) { return 0; } @@ -17087,25 +17086,40 @@ int smlua_func_update_hang_stationary(lua_State* L) { return 1; } -int smlua_func_update_ledge_climb(lua_State* L) { +int smlua_func_let_go_of_ledge(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", "update_ledge_climb", 3, top); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "let_go_of_ledge", 1, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_ledge_climb"); return 0; } - s32 animation = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "update_ledge_climb"); return 0; } - u32 endAction = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "update_ledge_climb"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "let_go_of_ledge"); return 0; } - extern void update_ledge_climb(struct MarioState *m, s32 animation, u32 endAction); - update_ledge_climb(m, animation, endAction); + extern s32 let_go_of_ledge(struct MarioState *m); + lua_pushinteger(L, let_go_of_ledge(m)); + + return 1; +} + +int smlua_func_climb_up_ledge(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", "climb_up_ledge", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "climb_up_ledge"); return 0; } + + extern void climb_up_ledge(struct MarioState *m); + climb_up_ledge(m); return 1; } @@ -17129,10 +17143,89 @@ int smlua_func_update_ledge_climb_camera(lua_State* L) { return 1; } +int smlua_func_update_ledge_climb(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", "update_ledge_climb", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_ledge_climb"); return 0; } + s32 animation = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "update_ledge_climb"); return 0; } + u32 endAction = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "update_ledge_climb"); return 0; } + + extern void update_ledge_climb(struct MarioState *m, s32 animation, u32 endAction); + update_ledge_climb(m, animation, endAction); + + return 1; +} + +int smlua_func_check_common_automatic_cancels(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", "check_common_automatic_cancels", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_automatic_cancels"); return 0; } + + extern s32 check_common_automatic_cancels(struct MarioState *m); + lua_pushinteger(L, check_common_automatic_cancels(m)); + + return 1; +} + +int smlua_func_mario_execute_automatic_action(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", "mario_execute_automatic_action", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_execute_automatic_action"); return 0; } + + extern s32 mario_execute_automatic_action(struct MarioState *m); + lua_pushinteger(L, mario_execute_automatic_action(m)); + + return 1; +} + ////////////////////////////// // mario_actions_cutscene.c // ////////////////////////////// +int smlua_func_get_credits_str_width(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", "get_credits_str_width", 1, top); + return 0; + } + + char * str = (char *)smlua_to_cpointer(L, 1, LVT_STRING_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_credits_str_width"); return 0; } + + extern s32 get_credits_str_width(char *str); + lua_pushinteger(L, get_credits_str_width(str)); + + return 1; +} + int smlua_func_bhv_end_peach_loop(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -17165,130 +17258,6 @@ int smlua_func_bhv_end_toad_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_common_death_handler(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", "common_death_handler", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "common_death_handler"); return 0; } - s32 animation = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "common_death_handler"); return 0; } - s32 frameToDeathWarp = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "common_death_handler"); return 0; } - - extern s32 common_death_handler(struct MarioState *m, s32 animation, s32 frameToDeathWarp); - lua_pushinteger(L, common_death_handler(m, animation, frameToDeathWarp)); - - return 1; -} - -int smlua_func_cutscene_put_cap_on(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", "cutscene_put_cap_on", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_put_cap_on"); return 0; } - - extern void cutscene_put_cap_on(struct MarioState *m); - cutscene_put_cap_on(m); - - return 1; -} - -int smlua_func_cutscene_take_cap_off(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", "cutscene_take_cap_off", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_take_cap_off"); return 0; } - - extern void cutscene_take_cap_off(struct MarioState *m); - cutscene_take_cap_off(m); - - return 1; -} - -int smlua_func_general_star_dance_handler(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", "general_star_dance_handler", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "general_star_dance_handler"); return 0; } - s32 isInWater = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "general_star_dance_handler"); return 0; } - - extern void general_star_dance_handler(struct MarioState *m, s32 isInWater); - general_star_dance_handler(m, isInWater); - - return 1; -} - -int smlua_func_generate_yellow_sparkles(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "generate_yellow_sparkles", 4, top); - return 0; - } - - s16 x = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "generate_yellow_sparkles"); return 0; } - s16 y = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "generate_yellow_sparkles"); return 0; } - s16 z = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "generate_yellow_sparkles"); return 0; } - f32 radius = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "generate_yellow_sparkles"); return 0; } - - extern void generate_yellow_sparkles(s16 x, s16 y, s16 z, f32 radius); - generate_yellow_sparkles(x, y, z, radius); - - return 1; -} - -int smlua_func_get_credits_str_width(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", "get_credits_str_width", 1, top); - return 0; - } - - char * str = (char *)smlua_to_cpointer(L, 1, LVT_STRING_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_credits_str_width"); return 0; } - - extern s32 get_credits_str_width(char *str); - lua_pushinteger(L, get_credits_str_width(str)); - - return 1; -} - int smlua_func_get_star_collection_dialog(lua_State* L) { if (L == NULL) { return 0; } @@ -17327,46 +17296,40 @@ int smlua_func_handle_save_menu(lua_State* L) { return 1; } -int smlua_func_launch_mario_until_land(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "launch_mario_until_land", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "launch_mario_until_land"); return 0; } - s32 endAction = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "launch_mario_until_land"); return 0; } - s32 animation = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "launch_mario_until_land"); return 0; } - f32 forwardVel = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "launch_mario_until_land"); return 0; } - - extern s32 launch_mario_until_land(struct MarioState *m, s32 endAction, s32 animation, f32 forwardVel); - lua_pushinteger(L, launch_mario_until_land(m, endAction, animation, forwardVel)); - - return 1; -} - -int smlua_func_mario_execute_cutscene_action(lua_State* L) { +int smlua_func_cutscene_take_cap_off(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", "mario_execute_cutscene_action", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cutscene_take_cap_off", 1, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_execute_cutscene_action"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_take_cap_off"); return 0; } - extern s32 mario_execute_cutscene_action(struct MarioState *m); - lua_pushinteger(L, mario_execute_cutscene_action(m)); + extern void cutscene_take_cap_off(struct MarioState *m); + cutscene_take_cap_off(m); + + return 1; +} + +int smlua_func_cutscene_put_cap_on(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", "cutscene_put_cap_on", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cutscene_put_cap_on"); return 0; } + + extern void cutscene_put_cap_on(struct MarioState *m); + cutscene_put_cap_on(m); return 1; } @@ -17412,6 +17375,75 @@ int smlua_func_should_start_or_continue_dialog(lua_State* L) { return 1; } +int smlua_func_general_star_dance_handler(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", "general_star_dance_handler", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "general_star_dance_handler"); return 0; } + s32 isInWater = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "general_star_dance_handler"); return 0; } + + extern void general_star_dance_handler(struct MarioState *m, s32 isInWater); + general_star_dance_handler(m, isInWater); + + return 1; +} + +int smlua_func_common_death_handler(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", "common_death_handler", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "common_death_handler"); return 0; } + s32 animation = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "common_death_handler"); return 0; } + s32 frameToDeathWarp = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "common_death_handler"); return 0; } + + extern s32 common_death_handler(struct MarioState *m, s32 animation, s32 frameToDeathWarp); + lua_pushinteger(L, common_death_handler(m, animation, frameToDeathWarp)); + + return 1; +} + +int smlua_func_launch_mario_until_land(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "launch_mario_until_land", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "launch_mario_until_land"); return 0; } + s32 endAction = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "launch_mario_until_land"); return 0; } + s32 animation = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "launch_mario_until_land"); return 0; } + f32 forwardVel = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "launch_mario_until_land"); return 0; } + + extern s32 launch_mario_until_land(struct MarioState *m, s32 endAction, s32 animation, f32 forwardVel); + lua_pushinteger(L, launch_mario_until_land(m, endAction, animation, forwardVel)); + + return 1; +} + int smlua_func_stuck_in_ground_handler(lua_State* L) { if (L == NULL) { return 0; } @@ -17441,10 +17473,95 @@ int smlua_func_stuck_in_ground_handler(lua_State* L) { return 1; } +int smlua_func_generate_yellow_sparkles(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "generate_yellow_sparkles", 4, top); + return 0; + } + + s16 x = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "generate_yellow_sparkles"); return 0; } + s16 y = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "generate_yellow_sparkles"); return 0; } + s16 z = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "generate_yellow_sparkles"); return 0; } + f32 radius = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "generate_yellow_sparkles"); return 0; } + + extern void generate_yellow_sparkles(s16 x, s16 y, s16 z, f32 radius); + generate_yellow_sparkles(x, y, z, radius); + + return 1; +} + +int smlua_func_mario_execute_cutscene_action(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", "mario_execute_cutscene_action", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_execute_cutscene_action"); return 0; } + + extern s32 mario_execute_cutscene_action(struct MarioState *m); + lua_pushinteger(L, mario_execute_cutscene_action(m)); + + return 1; +} + //////////////////////////// // mario_actions_moving.c // //////////////////////////// +int smlua_func_tilt_body_running(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", "tilt_body_running", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "tilt_body_running"); return 0; } + + extern s16 tilt_body_running(struct MarioState *m); + lua_pushinteger(L, tilt_body_running(m)); + + return 1; +} + +int smlua_func_play_step_sound(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", "play_step_sound", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_step_sound"); return 0; } + s16 frame1 = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_step_sound"); return 0; } + s16 frame2 = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_step_sound"); return 0; } + + extern void play_step_sound(struct MarioState *m, s16 frame1, s16 frame2); + play_step_sound(m, frame1, frame2); + + return 1; +} + int smlua_func_align_with_floor(lua_State* L) { if (L == NULL) { return 0; } @@ -17464,162 +17581,6 @@ int smlua_func_align_with_floor(lua_State* L) { return 1; } -int smlua_func_analog_stick_held_back(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", "analog_stick_held_back", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "analog_stick_held_back"); return 0; } - - extern s32 analog_stick_held_back(struct MarioState *m); - lua_pushinteger(L, analog_stick_held_back(m)); - - return 1; -} - -int smlua_func_anim_and_audio_for_heavy_walk(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", "anim_and_audio_for_heavy_walk", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "anim_and_audio_for_heavy_walk"); return 0; } - - extern void anim_and_audio_for_heavy_walk(struct MarioState *m); - anim_and_audio_for_heavy_walk(m); - - return 1; -} - -int smlua_func_anim_and_audio_for_hold_walk(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", "anim_and_audio_for_hold_walk", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "anim_and_audio_for_hold_walk"); return 0; } - - extern void anim_and_audio_for_hold_walk(struct MarioState *m); - anim_and_audio_for_hold_walk(m); - - return 1; -} - -int smlua_func_anim_and_audio_for_walk(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", "anim_and_audio_for_walk", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "anim_and_audio_for_walk"); return 0; } - - extern void anim_and_audio_for_walk(struct MarioState *m); - anim_and_audio_for_walk(m); - - return 1; -} - -int smlua_func_apply_landing_accel(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", "apply_landing_accel", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "apply_landing_accel"); return 0; } - f32 frictionFactor = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "apply_landing_accel"); return 0; } - - extern s32 apply_landing_accel(struct MarioState *m, f32 frictionFactor); - lua_pushinteger(L, apply_landing_accel(m, frictionFactor)); - - return 1; -} - -int smlua_func_apply_slope_accel(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", "apply_slope_accel", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "apply_slope_accel"); return 0; } - - extern void apply_slope_accel(struct MarioState *m); - apply_slope_accel(m); - - return 1; -} - -int smlua_func_apply_slope_decel(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", "apply_slope_decel", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "apply_slope_decel"); return 0; } - f32 decelCoef = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "apply_slope_decel"); return 0; } - - extern s32 apply_slope_decel(struct MarioState *m, f32 decelCoef); - lua_pushinteger(L, apply_slope_decel(m, decelCoef)); - - return 1; -} - -int smlua_func_begin_braking_action(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", "begin_braking_action", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "begin_braking_action"); return 0; } - - extern s32 begin_braking_action(struct MarioState *m); - lua_pushinteger(L, begin_braking_action(m)); - - return 1; -} - int smlua_func_begin_walking_action(lua_State* L) { if (L == NULL) { return 0; } @@ -17645,21 +17606,267 @@ int smlua_func_begin_walking_action(lua_State* L) { return 1; } -int smlua_func_check_common_moving_cancels(lua_State* L) { +int smlua_func_check_ledge_climb_down(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", "check_common_moving_cancels", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "check_ledge_climb_down", 1, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_moving_cancels"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_ledge_climb_down"); return 0; } - extern s32 check_common_moving_cancels(struct MarioState *m); - lua_pushinteger(L, check_common_moving_cancels(m)); + extern void check_ledge_climb_down(struct MarioState *m); + check_ledge_climb_down(m); + + return 1; +} + +int smlua_func_slide_bonk(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", "slide_bonk", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "slide_bonk"); return 0; } + u32 fastAction = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "slide_bonk"); return 0; } + u32 slowAction = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "slide_bonk"); return 0; } + + extern void slide_bonk(struct MarioState *m, u32 fastAction, u32 slowAction); + slide_bonk(m, fastAction, slowAction); + + return 1; +} + +int smlua_func_set_triple_jump_action(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", "set_triple_jump_action", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_triple_jump_action"); return 0; } + u32 action = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_triple_jump_action"); return 0; } + u32 actionArg = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_triple_jump_action"); return 0; } + + extern s32 set_triple_jump_action(struct MarioState *m, UNUSED u32 action, UNUSED u32 actionArg); + lua_pushinteger(L, set_triple_jump_action(m, action, actionArg)); + + return 1; +} + +int smlua_func_update_sliding_angle(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", "update_sliding_angle", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_sliding_angle"); return 0; } + f32 accel = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "update_sliding_angle"); return 0; } + f32 lossFactor = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "update_sliding_angle"); return 0; } + + extern void update_sliding_angle(struct MarioState *m, f32 accel, f32 lossFactor); + update_sliding_angle(m, accel, lossFactor); + + return 1; +} + +int smlua_func_update_sliding(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", "update_sliding", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_sliding"); return 0; } + f32 stopSpeed = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "update_sliding"); return 0; } + + extern s32 update_sliding(struct MarioState *m, f32 stopSpeed); + lua_pushinteger(L, update_sliding(m, stopSpeed)); + + return 1; +} + +int smlua_func_apply_slope_accel(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", "apply_slope_accel", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "apply_slope_accel"); return 0; } + + extern void apply_slope_accel(struct MarioState *m); + apply_slope_accel(m); + + return 1; +} + +int smlua_func_apply_landing_accel(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", "apply_landing_accel", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "apply_landing_accel"); return 0; } + f32 frictionFactor = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "apply_landing_accel"); return 0; } + + extern s32 apply_landing_accel(struct MarioState *m, f32 frictionFactor); + lua_pushinteger(L, apply_landing_accel(m, frictionFactor)); + + return 1; +} + +int smlua_func_update_shell_speed(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", "update_shell_speed", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_shell_speed"); return 0; } + + extern void update_shell_speed(struct MarioState *m); + update_shell_speed(m); + + return 1; +} + +int smlua_func_apply_slope_decel(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", "apply_slope_decel", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "apply_slope_decel"); return 0; } + f32 decelCoef = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "apply_slope_decel"); return 0; } + + extern s32 apply_slope_decel(struct MarioState *m, f32 decelCoef); + lua_pushinteger(L, apply_slope_decel(m, decelCoef)); + + return 1; +} + +int smlua_func_update_decelerating_speed(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", "update_decelerating_speed", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_decelerating_speed"); return 0; } + + extern s32 update_decelerating_speed(struct MarioState *m); + lua_pushinteger(L, update_decelerating_speed(m)); + + return 1; +} + +int smlua_func_update_walking_speed(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", "update_walking_speed", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_walking_speed"); return 0; } + + extern void update_walking_speed(struct MarioState *m); + update_walking_speed(m); + + return 1; +} + +int smlua_func_should_begin_sliding(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", "should_begin_sliding", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "should_begin_sliding"); return 0; } + + extern s32 should_begin_sliding(struct MarioState *m); + lua_pushinteger(L, should_begin_sliding(m)); + + return 1; +} + +int smlua_func_analog_stick_held_back(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", "analog_stick_held_back", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "analog_stick_held_back"); return 0; } + + extern s32 analog_stick_held_back(struct MarioState *m); + lua_pushinteger(L, analog_stick_held_back(m)); return 1; } @@ -17683,21 +17890,241 @@ int smlua_func_check_ground_dive_or_punch(lua_State* L) { return 1; } -int smlua_func_check_ledge_climb_down(lua_State* L) { +int smlua_func_begin_braking_action(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", "check_ledge_climb_down", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "begin_braking_action", 1, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_ledge_climb_down"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "begin_braking_action"); return 0; } - extern void check_ledge_climb_down(struct MarioState *m); - check_ledge_climb_down(m); + extern s32 begin_braking_action(struct MarioState *m); + lua_pushinteger(L, begin_braking_action(m)); + + return 1; +} + +int smlua_func_anim_and_audio_for_walk(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", "anim_and_audio_for_walk", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "anim_and_audio_for_walk"); return 0; } + + extern void anim_and_audio_for_walk(struct MarioState *m); + anim_and_audio_for_walk(m); + + return 1; +} + +int smlua_func_anim_and_audio_for_hold_walk(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", "anim_and_audio_for_hold_walk", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "anim_and_audio_for_hold_walk"); return 0; } + + extern void anim_and_audio_for_hold_walk(struct MarioState *m); + anim_and_audio_for_hold_walk(m); + + return 1; +} + +int smlua_func_anim_and_audio_for_heavy_walk(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", "anim_and_audio_for_heavy_walk", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "anim_and_audio_for_heavy_walk"); return 0; } + + extern void anim_and_audio_for_heavy_walk(struct MarioState *m); + anim_and_audio_for_heavy_walk(m); + + return 1; +} + +int smlua_func_push_or_sidle_wall(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", "push_or_sidle_wall", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "push_or_sidle_wall"); return 0; } + + Vec3f startPos; + smlua_get_vec3f(startPos, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "push_or_sidle_wall"); return 0; } + + extern void push_or_sidle_wall(struct MarioState *m, Vec3f startPos); + push_or_sidle_wall(m, startPos); + + smlua_push_vec3f(startPos, 2); + + return 1; +} + +int smlua_func_tilt_body_walking(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", "tilt_body_walking", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "tilt_body_walking"); return 0; } + s16 startYaw = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "tilt_body_walking"); return 0; } + + extern void tilt_body_walking(struct MarioState *m, s16 startYaw); + tilt_body_walking(m, startYaw); + + return 1; +} + +int smlua_func_tilt_body_ground_shell(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", "tilt_body_ground_shell", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "tilt_body_ground_shell"); return 0; } + s16 startYaw = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "tilt_body_ground_shell"); return 0; } + + extern void tilt_body_ground_shell(struct MarioState *m, s16 startYaw); + tilt_body_ground_shell(m, startYaw); + + return 1; +} + +int smlua_func_tilt_body_butt_slide(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", "tilt_body_butt_slide", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "tilt_body_butt_slide"); return 0; } + + extern void tilt_body_butt_slide(struct MarioState *m); + tilt_body_butt_slide(m); + + return 1; +} + +int smlua_func_common_slide_action(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "common_slide_action", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "common_slide_action"); return 0; } + u32 endAction = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "common_slide_action"); return 0; } + u32 airAction = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "common_slide_action"); return 0; } + s32 animation = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "common_slide_action"); return 0; } + + extern void common_slide_action(struct MarioState *m, u32 endAction, u32 airAction, s32 animation); + common_slide_action(m, endAction, airAction, animation); + + return 1; +} + +int smlua_func_common_slide_action_with_jump(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 5) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "common_slide_action_with_jump", 5, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "common_slide_action_with_jump"); return 0; } + u32 stopAction = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "common_slide_action_with_jump"); return 0; } + u32 jumpAction = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "common_slide_action_with_jump"); return 0; } + u32 airAction = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "common_slide_action_with_jump"); return 0; } + s32 animation = smlua_to_integer(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "common_slide_action_with_jump"); return 0; } + + extern s32 common_slide_action_with_jump(struct MarioState *m, u32 stopAction, u32 jumpAction, u32 airAction, s32 animation); + lua_pushinteger(L, common_slide_action_with_jump(m, stopAction, jumpAction, airAction, animation)); + + return 1; +} + +int smlua_func_stomach_slide_action(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "stomach_slide_action", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "stomach_slide_action"); return 0; } + u32 stopAction = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "stomach_slide_action"); return 0; } + u32 airAction = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "stomach_slide_action"); return 0; } + s32 animation = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "stomach_slide_action"); return 0; } + + extern s32 stomach_slide_action(struct MarioState *m, u32 stopAction, u32 airAction, s32 animation); + lua_pushinteger(L, stomach_slide_action(m, stopAction, airAction, animation)); return 1; } @@ -17784,125 +18211,6 @@ int smlua_func_common_landing_cancels(lua_State* L) { } */ -int smlua_func_common_slide_action(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "common_slide_action", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "common_slide_action"); return 0; } - u32 endAction = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "common_slide_action"); return 0; } - u32 airAction = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "common_slide_action"); return 0; } - s32 animation = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "common_slide_action"); return 0; } - - extern void common_slide_action(struct MarioState *m, u32 endAction, u32 airAction, s32 animation); - common_slide_action(m, endAction, airAction, animation); - - return 1; -} - -int smlua_func_common_slide_action_with_jump(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 5) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "common_slide_action_with_jump", 5, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "common_slide_action_with_jump"); return 0; } - u32 stopAction = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "common_slide_action_with_jump"); return 0; } - u32 jumpAction = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "common_slide_action_with_jump"); return 0; } - u32 airAction = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "common_slide_action_with_jump"); return 0; } - s32 animation = smlua_to_integer(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "common_slide_action_with_jump"); return 0; } - - extern s32 common_slide_action_with_jump(struct MarioState *m, u32 stopAction, u32 jumpAction, u32 airAction, s32 animation); - lua_pushinteger(L, common_slide_action_with_jump(m, stopAction, jumpAction, airAction, animation)); - - return 1; -} - -int smlua_func_mario_execute_moving_action(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", "mario_execute_moving_action", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_execute_moving_action"); return 0; } - - extern s32 mario_execute_moving_action(struct MarioState *m); - lua_pushinteger(L, mario_execute_moving_action(m)); - - return 1; -} - -int smlua_func_play_step_sound(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", "play_step_sound", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_step_sound"); return 0; } - s16 frame1 = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_step_sound"); return 0; } - s16 frame2 = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_step_sound"); return 0; } - - extern void play_step_sound(struct MarioState *m, s16 frame1, s16 frame2); - play_step_sound(m, frame1, frame2); - - return 1; -} - -int smlua_func_push_or_sidle_wall(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", "push_or_sidle_wall", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "push_or_sidle_wall"); return 0; } - - Vec3f startPos; - smlua_get_vec3f(startPos, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "push_or_sidle_wall"); return 0; } - - extern void push_or_sidle_wall(struct MarioState *m, Vec3f startPos); - push_or_sidle_wall(m, startPos); - - smlua_push_vec3f(startPos, 2); - - return 1; -} - int smlua_func_quicksand_jump_land_action(lua_State* L) { if (L == NULL) { return 0; } @@ -17930,273 +18238,40 @@ int smlua_func_quicksand_jump_land_action(lua_State* L) { return 1; } -int smlua_func_set_triple_jump_action(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", "set_triple_jump_action", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_triple_jump_action"); return 0; } - u32 action = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_triple_jump_action"); return 0; } - u32 actionArg = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_triple_jump_action"); return 0; } - - extern s32 set_triple_jump_action(struct MarioState *m, UNUSED u32 action, UNUSED u32 actionArg); - lua_pushinteger(L, set_triple_jump_action(m, action, actionArg)); - - return 1; -} - -int smlua_func_should_begin_sliding(lua_State* L) { +int smlua_func_check_common_moving_cancels(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", "should_begin_sliding", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "check_common_moving_cancels", 1, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "should_begin_sliding"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_moving_cancels"); return 0; } - extern s32 should_begin_sliding(struct MarioState *m); - lua_pushinteger(L, should_begin_sliding(m)); + extern s32 check_common_moving_cancels(struct MarioState *m); + lua_pushinteger(L, check_common_moving_cancels(m)); return 1; } -int smlua_func_slide_bonk(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", "slide_bonk", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "slide_bonk"); return 0; } - u32 fastAction = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "slide_bonk"); return 0; } - u32 slowAction = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "slide_bonk"); return 0; } - - extern void slide_bonk(struct MarioState *m, u32 fastAction, u32 slowAction); - slide_bonk(m, fastAction, slowAction); - - return 1; -} - -int smlua_func_stomach_slide_action(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "stomach_slide_action", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "stomach_slide_action"); return 0; } - u32 stopAction = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "stomach_slide_action"); return 0; } - u32 airAction = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "stomach_slide_action"); return 0; } - s32 animation = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "stomach_slide_action"); return 0; } - - extern s32 stomach_slide_action(struct MarioState *m, u32 stopAction, u32 airAction, s32 animation); - lua_pushinteger(L, stomach_slide_action(m, stopAction, airAction, animation)); - - return 1; -} - -int smlua_func_tilt_body_butt_slide(lua_State* L) { +int smlua_func_mario_execute_moving_action(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", "tilt_body_butt_slide", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mario_execute_moving_action", 1, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "tilt_body_butt_slide"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_execute_moving_action"); return 0; } - extern void tilt_body_butt_slide(struct MarioState *m); - tilt_body_butt_slide(m); - - return 1; -} - -int smlua_func_tilt_body_ground_shell(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", "tilt_body_ground_shell", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "tilt_body_ground_shell"); return 0; } - s16 startYaw = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "tilt_body_ground_shell"); return 0; } - - extern void tilt_body_ground_shell(struct MarioState *m, s16 startYaw); - tilt_body_ground_shell(m, startYaw); - - return 1; -} - -int smlua_func_tilt_body_running(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", "tilt_body_running", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "tilt_body_running"); return 0; } - - extern s16 tilt_body_running(struct MarioState *m); - lua_pushinteger(L, tilt_body_running(m)); - - return 1; -} - -int smlua_func_tilt_body_walking(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", "tilt_body_walking", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "tilt_body_walking"); return 0; } - s16 startYaw = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "tilt_body_walking"); return 0; } - - extern void tilt_body_walking(struct MarioState *m, s16 startYaw); - tilt_body_walking(m, startYaw); - - return 1; -} - -int smlua_func_update_decelerating_speed(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", "update_decelerating_speed", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_decelerating_speed"); return 0; } - - extern s32 update_decelerating_speed(struct MarioState *m); - lua_pushinteger(L, update_decelerating_speed(m)); - - return 1; -} - -int smlua_func_update_shell_speed(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", "update_shell_speed", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_shell_speed"); return 0; } - - extern void update_shell_speed(struct MarioState *m); - update_shell_speed(m); - - return 1; -} - -int smlua_func_update_sliding(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", "update_sliding", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_sliding"); return 0; } - f32 stopSpeed = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "update_sliding"); return 0; } - - extern s32 update_sliding(struct MarioState *m, f32 stopSpeed); - lua_pushinteger(L, update_sliding(m, stopSpeed)); - - return 1; -} - -int smlua_func_update_sliding_angle(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", "update_sliding_angle", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_sliding_angle"); return 0; } - f32 accel = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "update_sliding_angle"); return 0; } - f32 lossFactor = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "update_sliding_angle"); return 0; } - - extern void update_sliding_angle(struct MarioState *m, f32 accel, f32 lossFactor); - update_sliding_angle(m, accel, lossFactor); - - return 1; -} - -int smlua_func_update_walking_speed(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", "update_walking_speed", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "update_walking_speed"); return 0; } - - extern void update_walking_speed(struct MarioState *m); - update_walking_speed(m); + extern s32 mario_execute_moving_action(struct MarioState *m); + lua_pushinteger(L, mario_execute_moving_action(m)); return 1; } @@ -18228,6 +18303,25 @@ int smlua_func_animated_stationary_ground_step(lua_State* L) { return 1; } +int smlua_func_mario_update_punch_sequence(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", "mario_update_punch_sequence", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_update_punch_sequence"); return 0; } + + extern s32 mario_update_punch_sequence(struct MarioState *m); + lua_pushinteger(L, mario_update_punch_sequence(m)); + + return 1; +} + int smlua_func_check_common_object_cancels(lua_State* L) { if (L == NULL) { return 0; } @@ -18266,48 +18360,10 @@ int smlua_func_mario_execute_object_action(lua_State* L) { return 1; } -int smlua_func_mario_update_punch_sequence(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", "mario_update_punch_sequence", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_update_punch_sequence"); return 0; } - - extern s32 mario_update_punch_sequence(struct MarioState *m); - lua_pushinteger(L, mario_update_punch_sequence(m)); - - return 1; -} - //////////////////////////////// // mario_actions_stationary.c // //////////////////////////////// -int smlua_func_check_common_hold_idle_cancels(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", "check_common_hold_idle_cancels", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_hold_idle_cancels"); return 0; } - - extern s32 check_common_hold_idle_cancels(struct MarioState *m); - lua_pushinteger(L, check_common_hold_idle_cancels(m)); - - return 1; -} - int smlua_func_check_common_idle_cancels(lua_State* L) { if (L == NULL) { return 0; } @@ -18327,84 +18383,21 @@ int smlua_func_check_common_idle_cancels(lua_State* L) { return 1; } -int smlua_func_check_common_landing_cancels(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", "check_common_landing_cancels", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_landing_cancels"); return 0; } - u32 action = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "check_common_landing_cancels"); return 0; } - - extern s32 check_common_landing_cancels(struct MarioState *m, u32 action); - lua_pushinteger(L, check_common_landing_cancels(m, action)); - - return 1; -} - -int smlua_func_check_common_stationary_cancels(lua_State* L) { +int smlua_func_check_common_hold_idle_cancels(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", "check_common_stationary_cancels", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "check_common_hold_idle_cancels", 1, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_stationary_cancels"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_hold_idle_cancels"); return 0; } - extern s32 check_common_stationary_cancels(struct MarioState *m); - lua_pushinteger(L, check_common_stationary_cancels(m)); - - return 1; -} - -int smlua_func_landing_step(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", "landing_step", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "landing_step"); return 0; } - s32 arg1 = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "landing_step"); return 0; } - u32 action = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "landing_step"); return 0; } - - extern s32 landing_step(struct MarioState *m, s32 arg1, u32 action); - lua_pushinteger(L, landing_step(m, arg1, action)); - - return 1; -} - -int smlua_func_mario_execute_stationary_action(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", "mario_execute_stationary_action", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_execute_stationary_action"); return 0; } - - extern s32 mario_execute_stationary_action(struct MarioState *m); - lua_pushinteger(L, mario_execute_stationary_action(m)); + extern s32 check_common_hold_idle_cancels(struct MarioState *m); + lua_pushinteger(L, check_common_hold_idle_cancels(m)); return 1; } @@ -18457,10 +18450,138 @@ int smlua_func_stopping_step(lua_State* L) { return 1; } +int smlua_func_landing_step(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", "landing_step", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "landing_step"); return 0; } + s32 arg1 = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "landing_step"); return 0; } + u32 action = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "landing_step"); return 0; } + + extern s32 landing_step(struct MarioState *m, s32 arg1, u32 action); + lua_pushinteger(L, landing_step(m, arg1, action)); + + return 1; +} + +int smlua_func_check_common_landing_cancels(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", "check_common_landing_cancels", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_landing_cancels"); return 0; } + u32 action = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "check_common_landing_cancels"); return 0; } + + extern s32 check_common_landing_cancels(struct MarioState *m, u32 action); + lua_pushinteger(L, check_common_landing_cancels(m, action)); + + return 1; +} + +int smlua_func_check_common_stationary_cancels(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", "check_common_stationary_cancels", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "check_common_stationary_cancels"); return 0; } + + extern s32 check_common_stationary_cancels(struct MarioState *m); + lua_pushinteger(L, check_common_stationary_cancels(m)); + + return 1; +} + +int smlua_func_mario_execute_stationary_action(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", "mario_execute_stationary_action", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_execute_stationary_action"); return 0; } + + extern s32 mario_execute_stationary_action(struct MarioState *m); + lua_pushinteger(L, mario_execute_stationary_action(m)); + + return 1; +} + /////////////////////////////// // mario_actions_submerged.c // /////////////////////////////// +int smlua_func_set_swimming_at_surface_particles(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", "set_swimming_at_surface_particles", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_swimming_at_surface_particles"); return 0; } + u32 particleFlag = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_swimming_at_surface_particles"); return 0; } + + extern void set_swimming_at_surface_particles(struct MarioState *m, u32 particleFlag); + set_swimming_at_surface_particles(m, particleFlag); + + return 1; +} + +int smlua_func_perform_water_full_step(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", "perform_water_full_step", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "perform_water_full_step"); return 0; } + + Vec3f nextPos; + smlua_get_vec3f(nextPos, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "perform_water_full_step"); return 0; } + + extern u32 perform_water_full_step(struct MarioState *m, Vec3f nextPos); + lua_pushinteger(L, perform_water_full_step(m, nextPos)); + + smlua_push_vec3f(nextPos, 2); + + return 1; +} + int smlua_func_apply_water_current(lua_State* L) { if (L == NULL) { return 0; } @@ -18486,6 +18607,25 @@ int smlua_func_apply_water_current(lua_State* L) { return 1; } +int smlua_func_perform_water_step(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", "perform_water_step", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "perform_water_step"); return 0; } + + extern u32 perform_water_step(struct MarioState *m); + lua_pushinteger(L, perform_water_step(m)); + + return 1; +} + int smlua_func_float_surface_gfx(lua_State* L) { if (L == NULL) { return 0; } @@ -18524,71 +18664,6 @@ int smlua_func_mario_execute_submerged_action(lua_State* L) { return 1; } -int smlua_func_perform_water_full_step(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", "perform_water_full_step", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "perform_water_full_step"); return 0; } - - Vec3f nextPos; - smlua_get_vec3f(nextPos, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "perform_water_full_step"); return 0; } - - extern u32 perform_water_full_step(struct MarioState *m, Vec3f nextPos); - lua_pushinteger(L, perform_water_full_step(m, nextPos)); - - smlua_push_vec3f(nextPos, 2); - - return 1; -} - -int smlua_func_perform_water_step(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", "perform_water_step", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "perform_water_step"); return 0; } - - extern u32 perform_water_step(struct MarioState *m); - lua_pushinteger(L, perform_water_step(m)); - - return 1; -} - -int smlua_func_set_swimming_at_surface_particles(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", "set_swimming_at_surface_particles", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_swimming_at_surface_particles"); return 0; } - u32 particleFlag = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_swimming_at_surface_particles"); return 0; } - - extern void set_swimming_at_surface_particles(struct MarioState *m, u32 particleFlag); - set_swimming_at_surface_particles(m, particleFlag); - - return 1; -} - ////////////////// // mario_misc.h // ////////////////// @@ -18653,21 +18728,6 @@ int smlua_func_bhv_unlock_door_star_loop(UNUSED lua_State* L) { return 1; } -int smlua_func_geo_get_body_state(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", "geo_get_body_state", 0, top); - return 0; - } - - - smlua_push_object(L, LOT_MARIOBODYSTATE, geo_get_body_state(), NULL); - - return 1; -} - int smlua_func_geo_get_mario_state(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -18683,6 +18743,21 @@ int smlua_func_geo_get_mario_state(UNUSED lua_State* L) { return 1; } +int smlua_func_geo_get_body_state(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", "geo_get_body_state", 0, top); + return 0; + } + + + smlua_push_object(L, LOT_MARIOBODYSTATE, geo_get_body_state(), NULL); + + return 1; +} + ////////////////// // mario_step.h // ////////////////// @@ -18702,6 +18777,26 @@ int smlua_func_get_additive_y_vel_for_jumps(UNUSED lua_State* L) { return 1; } +int smlua_func_mario_bonk_reflection(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", "mario_bonk_reflection", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_bonk_reflection"); return 0; } + u8 negateSpeed = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mario_bonk_reflection"); return 0; } + + mario_bonk_reflection(m, negateSpeed); + + return 1; +} + int smlua_func_init_bully_collision_data(lua_State* L) { if (L == NULL) { return 0; } @@ -18732,22 +18827,22 @@ int smlua_func_init_bully_collision_data(lua_State* L) { return 1; } -int smlua_func_mario_bonk_reflection(lua_State* L) { +int smlua_func_mario_update_quicksand(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", "mario_bonk_reflection", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mario_update_quicksand", 2, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_bonk_reflection"); return 0; } - u8 negateSpeed = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mario_bonk_reflection"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_update_quicksand"); return 0; } + f32 sinkingSpeed = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mario_update_quicksand"); return 0; } - mario_bonk_reflection(m, negateSpeed); + lua_pushinteger(L, mario_update_quicksand(m, sinkingSpeed)); return 1; } @@ -18792,26 +18887,6 @@ int smlua_func_mario_update_moving_sand(lua_State* L) { return 1; } -int smlua_func_mario_update_quicksand(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", "mario_update_quicksand", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_update_quicksand"); return 0; } - f32 sinkingSpeed = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mario_update_quicksand"); return 0; } - - lua_pushinteger(L, mario_update_quicksand(m, sinkingSpeed)); - - return 1; -} - int smlua_func_mario_update_windy_ground(lua_State* L) { if (L == NULL) { return 0; } @@ -18830,6 +18905,60 @@ int smlua_func_mario_update_windy_ground(lua_State* L) { return 1; } +int smlua_func_stop_and_set_height_to_floor(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", "stop_and_set_height_to_floor", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "stop_and_set_height_to_floor"); return 0; } + + stop_and_set_height_to_floor(m); + + return 1; +} + +int smlua_func_stationary_ground_step(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", "stationary_ground_step", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "stationary_ground_step"); return 0; } + + lua_pushinteger(L, stationary_ground_step(m)); + + return 1; +} + +int smlua_func_perform_ground_step(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", "perform_ground_step", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "perform_ground_step"); return 0; } + + lua_pushinteger(L, perform_ground_step(m)); + + return 1; +} + int smlua_func_perform_air_step(lua_State* L) { if (L == NULL) { return 0; } @@ -18850,24 +18979,6 @@ int smlua_func_perform_air_step(lua_State* L) { return 1; } -int smlua_func_perform_ground_step(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", "perform_ground_step", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "perform_ground_step"); return 0; } - - lua_pushinteger(L, perform_ground_step(m)); - - return 1; -} - int smlua_func_set_vel_from_pitch_and_yaw(lua_State* L) { if (L == NULL) { return 0; } @@ -18886,152 +18997,23 @@ int smlua_func_set_vel_from_pitch_and_yaw(lua_State* L) { return 1; } -int smlua_func_stationary_ground_step(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", "stationary_ground_step", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "stationary_ground_step"); return 0; } - - lua_pushinteger(L, stationary_ground_step(m)); - - return 1; -} - -int smlua_func_stop_and_set_height_to_floor(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", "stop_and_set_height_to_floor", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "stop_and_set_height_to_floor"); return 0; } - - stop_and_set_height_to_floor(m); - - return 1; -} - ///////////////// // math_util.h // ///////////////// -int smlua_func_anim_spline_init(lua_State* L) { +int smlua_func_sins(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", "anim_spline_init", 2, top); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "sins", 1, top); return 0; } - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "anim_spline_init"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - Vec4s * keyFrames = (Vec4s *)smlua_to_cobject(L, 2, LOT_VEC4S); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "anim_spline_init"); return 0; } + s16 sm64Angle = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sins"); return 0; } - anim_spline_init(m, keyFrames); - - return 1; -} - -int smlua_func_anim_spline_poll(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", "anim_spline_poll", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "anim_spline_poll"); return 0; } - - Vec3f result; - smlua_get_vec3f(result, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "anim_spline_poll"); return 0; } - - lua_pushinteger(L, anim_spline_poll(m, result)); - - smlua_push_vec3f(result, 2); - - return 1; -} - -int smlua_func_approach_f32(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "approach_f32", 4, top); - return 0; - } - - f32 current = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "approach_f32"); return 0; } - f32 target = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "approach_f32"); return 0; } - f32 inc = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "approach_f32"); return 0; } - f32 dec = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "approach_f32"); return 0; } - - lua_pushnumber(L, approach_f32(current, target, inc, dec)); - - return 1; -} - -int smlua_func_approach_s32(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "approach_s32", 4, top); - return 0; - } - - s32 current = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "approach_s32"); return 0; } - s32 target = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "approach_s32"); return 0; } - s32 inc = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "approach_s32"); return 0; } - s32 dec = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "approach_s32"); return 0; } - - lua_pushinteger(L, approach_s32(current, target, inc, dec)); - - return 1; -} - -int smlua_func_atan2s(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", "atan2s", 2, top); - return 0; - } - - f32 y = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "atan2s"); return 0; } - f32 x = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "atan2s"); return 0; } - - lua_pushinteger(L, atan2s(y, x)); + lua_pushnumber(L, sins(sm64Angle)); return 1; } @@ -19053,6 +19035,344 @@ int smlua_func_coss(lua_State* L) { return 1; } +int smlua_func_vec3f_copy(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", "vec3f_copy", 2, top); + return 0; + } + + + Vec3f dest; + smlua_get_vec3f(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_copy"); return 0; } + + Vec3f src; + smlua_get_vec3f(src, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_copy"); return 0; } + + vec3f_copy(dest, src); + + smlua_push_vec3f(dest, 1); + + smlua_push_vec3f(src, 2); + + return 1; +} + +int smlua_func_vec3f_set(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "vec3f_set", 4, top); + return 0; + } + + + Vec3f dest; + smlua_get_vec3f(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_set"); return 0; } + f32 x = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_set"); return 0; } + f32 y = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3f_set"); return 0; } + f32 z = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "vec3f_set"); return 0; } + + vec3f_set(dest, x, y, z); + + smlua_push_vec3f(dest, 1); + + return 1; +} + +int smlua_func_vec3f_add(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", "vec3f_add", 2, top); + return 0; + } + + + Vec3f dest; + smlua_get_vec3f(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_add"); return 0; } + + Vec3f a; + smlua_get_vec3f(a, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_add"); return 0; } + + vec3f_add(dest, a); + + smlua_push_vec3f(dest, 1); + + smlua_push_vec3f(a, 2); + + return 1; +} + +int smlua_func_vec3f_sum(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", "vec3f_sum", 3, top); + return 0; + } + + + Vec3f dest; + smlua_get_vec3f(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_sum"); return 0; } + + Vec3f a; + smlua_get_vec3f(a, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_sum"); return 0; } + + Vec3f b; + smlua_get_vec3f(b, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3f_sum"); return 0; } + + vec3f_sum(dest, a, b); + + smlua_push_vec3f(dest, 1); + + smlua_push_vec3f(a, 2); + + smlua_push_vec3f(b, 3); + + return 1; +} + +int smlua_func_vec3f_dif(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", "vec3f_dif", 3, top); + return 0; + } + + + Vec3f dest; + smlua_get_vec3f(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_dif"); return 0; } + + Vec3f a; + smlua_get_vec3f(a, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_dif"); return 0; } + + Vec3f b; + smlua_get_vec3f(b, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3f_dif"); return 0; } + + vec3f_dif(dest, a, b); + + smlua_push_vec3f(dest, 1); + + smlua_push_vec3f(a, 2); + + smlua_push_vec3f(b, 3); + + return 1; +} + +int smlua_func_vec3f_mul(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", "vec3f_mul", 2, top); + return 0; + } + + + Vec3f dest; + smlua_get_vec3f(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_mul"); return 0; } + f32 a = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_mul"); return 0; } + + vec3f_mul(dest, a); + + smlua_push_vec3f(dest, 1); + + return 1; +} + +int smlua_func_vec3s_copy(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", "vec3s_copy", 2, top); + return 0; + } + + + Vec3s dest; + smlua_get_vec3s(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3s_copy"); return 0; } + + Vec3s src; + smlua_get_vec3s(src, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3s_copy"); return 0; } + + vec3s_copy(dest, src); + + smlua_push_vec3s(dest, 1); + + smlua_push_vec3s(src, 2); + + return 1; +} + +int smlua_func_vec3s_set(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "vec3s_set", 4, top); + return 0; + } + + + Vec3s dest; + smlua_get_vec3s(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3s_set"); return 0; } + s16 x = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3s_set"); return 0; } + s16 y = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3s_set"); return 0; } + s16 z = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "vec3s_set"); return 0; } + + vec3s_set(dest, x, y, z); + + smlua_push_vec3s(dest, 1); + + return 1; +} + +int smlua_func_vec3s_add(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", "vec3s_add", 2, top); + return 0; + } + + + Vec3s dest; + smlua_get_vec3s(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3s_add"); return 0; } + + Vec3s a; + smlua_get_vec3s(a, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3s_add"); return 0; } + + vec3s_add(dest, a); + + smlua_push_vec3s(dest, 1); + + smlua_push_vec3s(a, 2); + + return 1; +} + +int smlua_func_vec3s_sum(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", "vec3s_sum", 3, top); + return 0; + } + + + Vec3s dest; + smlua_get_vec3s(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3s_sum"); return 0; } + + Vec3s a; + smlua_get_vec3s(a, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3s_sum"); return 0; } + + Vec3s b; + smlua_get_vec3s(b, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3s_sum"); return 0; } + + vec3s_sum(dest, a, b); + + smlua_push_vec3s(dest, 1); + + smlua_push_vec3s(a, 2); + + smlua_push_vec3s(b, 3); + + return 1; +} + +int smlua_func_vec3s_to_vec3f(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", "vec3s_to_vec3f", 2, top); + return 0; + } + + + Vec3f dest; + smlua_get_vec3f(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3s_to_vec3f"); return 0; } + + Vec3s a; + smlua_get_vec3s(a, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3s_to_vec3f"); return 0; } + + vec3s_to_vec3f(dest, a); + + smlua_push_vec3f(dest, 1); + + smlua_push_vec3s(a, 2); + + return 1; +} + +int smlua_func_vec3f_to_vec3s(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", "vec3f_to_vec3s", 2, top); + return 0; + } + + + Vec3s dest; + smlua_get_vec3s(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_to_vec3s"); return 0; } + + Vec3f a; + smlua_get_vec3f(a, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_to_vec3s"); return 0; } + + vec3f_to_vec3s(dest, a); + + smlua_push_vec3s(dest, 1); + + smlua_push_vec3f(a, 2); + + return 1; +} + int smlua_func_find_vector_perpendicular_to_plane(lua_State* L) { if (L == NULL) { return 0; } @@ -19092,35 +19412,414 @@ int smlua_func_find_vector_perpendicular_to_plane(lua_State* L) { return 1; } -int smlua_func_get_pos_from_transform_mtx(lua_State* L) { +int smlua_func_vec3f_cross(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", "get_pos_from_transform_mtx", 3, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "vec3f_cross", 3, top); return 0; } Vec3f dest; smlua_get_vec3f(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_pos_from_transform_mtx"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_cross"); return 0; } - Mat4 objMtx; - smlua_get_mat4(objMtx, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "get_pos_from_transform_mtx"); return 0; } + Vec3f a; + smlua_get_vec3f(a, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_cross"); return 0; } - Mat4 camMtx; - smlua_get_mat4(camMtx, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "get_pos_from_transform_mtx"); return 0; } + Vec3f b; + smlua_get_vec3f(b, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3f_cross"); return 0; } - get_pos_from_transform_mtx(dest, objMtx, camMtx); + vec3f_cross(dest, a, b); smlua_push_vec3f(dest, 1); - smlua_push_mat4(objMtx, 2); + smlua_push_vec3f(a, 2); - smlua_push_mat4(camMtx, 3); + smlua_push_vec3f(b, 3); + + return 1; +} + +int smlua_func_vec3f_normalize(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", "vec3f_normalize", 1, top); + return 0; + } + + + Vec3f dest; + smlua_get_vec3f(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_normalize"); return 0; } + + vec3f_normalize(dest); + + smlua_push_vec3f(dest, 1); + + return 1; +} + +int smlua_func_vec3f_length(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", "vec3f_length", 1, top); + return 0; + } + + + Vec3f a; + smlua_get_vec3f(a, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_length"); return 0; } + + lua_pushnumber(L, vec3f_length(a)); + + smlua_push_vec3f(a, 1); + + return 1; +} + +int smlua_func_vec3f_dot(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", "vec3f_dot", 2, top); + return 0; + } + + + Vec3f a; + smlua_get_vec3f(a, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_dot"); return 0; } + + Vec3f b; + smlua_get_vec3f(b, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_dot"); return 0; } + + lua_pushnumber(L, vec3f_dot(a, b)); + + smlua_push_vec3f(a, 1); + + smlua_push_vec3f(b, 2); + + return 1; +} + +int smlua_func_vec3f_combine(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 5) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "vec3f_combine", 5, top); + return 0; + } + + + Vec3f dest; + smlua_get_vec3f(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_combine"); return 0; } + + Vec3f vecA; + smlua_get_vec3f(vecA, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_combine"); return 0; } + + Vec3f vecB; + smlua_get_vec3f(vecB, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3f_combine"); return 0; } + f32 sclA = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "vec3f_combine"); return 0; } + f32 sclB = smlua_to_number(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "vec3f_combine"); return 0; } + + vec3f_combine(dest, vecA, vecB, sclA, sclB); + + smlua_push_vec3f(dest, 1); + + smlua_push_vec3f(vecA, 2); + + smlua_push_vec3f(vecB, 3); + + return 1; +} + +int smlua_func_vec3f_rotate_zxy(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", "vec3f_rotate_zxy", 2, top); + return 0; + } + + + Vec3f v; + smlua_get_vec3f(v, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_rotate_zxy"); return 0; } + + Vec3s rotate; + smlua_get_vec3s(rotate, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_rotate_zxy"); return 0; } + + vec3f_rotate_zxy(v, rotate); + + smlua_push_vec3f(v, 1); + + smlua_push_vec3s(rotate, 2); + + return 1; +} + +int smlua_func_mtxf_copy(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", "mtxf_copy", 2, top); + return 0; + } + + + Mat4 dest; + smlua_get_mat4(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_copy"); return 0; } + + Mat4 src; + smlua_get_mat4(src, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_copy"); return 0; } + + mtxf_copy(dest, src); + + smlua_push_mat4(dest, 1); + + smlua_push_mat4(src, 2); + + return 1; +} + +int smlua_func_mtxf_identity(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", "mtxf_identity", 1, top); + return 0; + } + + + Mat4 mtx; + smlua_get_mat4(mtx, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_identity"); return 0; } + + mtxf_identity(mtx); + + smlua_push_mat4(mtx, 1); + + return 1; +} + +int smlua_func_mtxf_translate(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", "mtxf_translate", 2, top); + return 0; + } + + + Mat4 dest; + smlua_get_mat4(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_translate"); return 0; } + + Vec3f b; + smlua_get_vec3f(b, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_translate"); return 0; } + + mtxf_translate(dest, b); + + smlua_push_mat4(dest, 1); + + smlua_push_vec3f(b, 2); + + return 1; +} + +int smlua_func_mtxf_lookat(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mtxf_lookat", 4, top); + return 0; + } + + + Mat4 mtx; + smlua_get_mat4(mtx, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_lookat"); return 0; } + + Vec3f from; + smlua_get_vec3f(from, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_lookat"); return 0; } + + Vec3f to; + smlua_get_vec3f(to, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "mtxf_lookat"); return 0; } + s16 roll = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "mtxf_lookat"); return 0; } + + mtxf_lookat(mtx, from, to, roll); + + smlua_push_mat4(mtx, 1); + + smlua_push_vec3f(from, 2); + + smlua_push_vec3f(to, 3); + + return 1; +} + +int smlua_func_mtxf_rotate_zxy_and_translate(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", "mtxf_rotate_zxy_and_translate", 3, top); + return 0; + } + + + Mat4 dest; + smlua_get_mat4(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_rotate_zxy_and_translate"); return 0; } + + Vec3f translate; + smlua_get_vec3f(translate, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_rotate_zxy_and_translate"); return 0; } + + Vec3s rotate; + smlua_get_vec3s(rotate, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "mtxf_rotate_zxy_and_translate"); return 0; } + + mtxf_rotate_zxy_and_translate(dest, translate, rotate); + + smlua_push_mat4(dest, 1); + + smlua_push_vec3f(translate, 2); + + smlua_push_vec3s(rotate, 3); + + return 1; +} + +int smlua_func_mtxf_rotate_xyz_and_translate(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", "mtxf_rotate_xyz_and_translate", 3, top); + return 0; + } + + + Mat4 dest; + smlua_get_mat4(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_rotate_xyz_and_translate"); return 0; } + + Vec3f b; + smlua_get_vec3f(b, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_rotate_xyz_and_translate"); return 0; } + + Vec3s c; + smlua_get_vec3s(c, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "mtxf_rotate_xyz_and_translate"); return 0; } + + mtxf_rotate_xyz_and_translate(dest, b, c); + + smlua_push_mat4(dest, 1); + + smlua_push_vec3f(b, 2); + + smlua_push_vec3s(c, 3); + + return 1; +} + +int smlua_func_mtxf_billboard(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mtxf_billboard", 4, top); + return 0; + } + + + Mat4 dest; + smlua_get_mat4(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_billboard"); return 0; } + + Mat4 mtx; + smlua_get_mat4(mtx, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_billboard"); return 0; } + + Vec3f position; + smlua_get_vec3f(position, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "mtxf_billboard"); return 0; } + s16 angle = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "mtxf_billboard"); return 0; } + + mtxf_billboard(dest, mtx, position, angle); + + smlua_push_mat4(dest, 1); + + smlua_push_mat4(mtx, 2); + + smlua_push_vec3f(position, 3); + + return 1; +} + +int smlua_func_mtxf_cylboard(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mtxf_cylboard", 4, top); + return 0; + } + + + Mat4 dest; + smlua_get_mat4(dest, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_cylboard"); return 0; } + + Mat4 mtx; + smlua_get_mat4(mtx, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_cylboard"); return 0; } + + Vec3f position; + smlua_get_vec3f(position, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "mtxf_cylboard"); return 0; } + s16 angle = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "mtxf_cylboard"); return 0; } + + mtxf_cylboard(dest, mtx, position, angle); + + smlua_push_mat4(dest, 1); + + smlua_push_mat4(mtx, 2); + + smlua_push_vec3f(position, 3); return 1; } @@ -19191,186 +19890,6 @@ int smlua_func_mtxf_align_terrain_triangle(lua_State* L) { return 1; } -int smlua_func_mtxf_billboard(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mtxf_billboard", 4, top); - return 0; - } - - - Mat4 dest; - smlua_get_mat4(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_billboard"); return 0; } - - Mat4 mtx; - smlua_get_mat4(mtx, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_billboard"); return 0; } - - Vec3f position; - smlua_get_vec3f(position, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "mtxf_billboard"); return 0; } - s16 angle = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "mtxf_billboard"); return 0; } - - mtxf_billboard(dest, mtx, position, angle); - - smlua_push_mat4(dest, 1); - - smlua_push_mat4(mtx, 2); - - smlua_push_vec3f(position, 3); - - return 1; -} - -int smlua_func_mtxf_copy(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", "mtxf_copy", 2, top); - return 0; - } - - - Mat4 dest; - smlua_get_mat4(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_copy"); return 0; } - - Mat4 src; - smlua_get_mat4(src, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_copy"); return 0; } - - mtxf_copy(dest, src); - - smlua_push_mat4(dest, 1); - - smlua_push_mat4(src, 2); - - return 1; -} - -int smlua_func_mtxf_cylboard(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mtxf_cylboard", 4, top); - return 0; - } - - - Mat4 dest; - smlua_get_mat4(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_cylboard"); return 0; } - - Mat4 mtx; - smlua_get_mat4(mtx, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_cylboard"); return 0; } - - Vec3f position; - smlua_get_vec3f(position, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "mtxf_cylboard"); return 0; } - s16 angle = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "mtxf_cylboard"); return 0; } - - mtxf_cylboard(dest, mtx, position, angle); - - smlua_push_mat4(dest, 1); - - smlua_push_mat4(mtx, 2); - - smlua_push_vec3f(position, 3); - - return 1; -} - -int smlua_func_mtxf_identity(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", "mtxf_identity", 1, top); - return 0; - } - - - Mat4 mtx; - smlua_get_mat4(mtx, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_identity"); return 0; } - - mtxf_identity(mtx); - - smlua_push_mat4(mtx, 1); - - return 1; -} - -int smlua_func_mtxf_inverse(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", "mtxf_inverse", 2, top); - return 0; - } - - - Mat4 dest; - smlua_get_mat4(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_inverse"); return 0; } - - Mat4 src; - smlua_get_mat4(src, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_inverse"); return 0; } - - mtxf_inverse(dest, src); - - smlua_push_mat4(dest, 1); - - smlua_push_mat4(src, 2); - - return 1; -} - -int smlua_func_mtxf_lookat(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mtxf_lookat", 4, top); - return 0; - } - - - Mat4 mtx; - smlua_get_mat4(mtx, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_lookat"); return 0; } - - Vec3f from; - smlua_get_vec3f(from, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_lookat"); return 0; } - - Vec3f to; - smlua_get_vec3f(to, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "mtxf_lookat"); return 0; } - s16 roll = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "mtxf_lookat"); return 0; } - - mtxf_lookat(mtx, from, to, roll); - - smlua_push_mat4(mtx, 1); - - smlua_push_vec3f(from, 2); - - smlua_push_vec3f(to, 3); - - return 1; -} - int smlua_func_mtxf_mul(lua_State* L) { if (L == NULL) { return 0; } @@ -19404,121 +19923,6 @@ int smlua_func_mtxf_mul(lua_State* L) { return 1; } -int smlua_func_mtxf_mul_vec3s(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", "mtxf_mul_vec3s", 2, top); - return 0; - } - - - Mat4 mtx; - smlua_get_mat4(mtx, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_mul_vec3s"); return 0; } - - Vec3s b; - smlua_get_vec3s(b, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_mul_vec3s"); return 0; } - - mtxf_mul_vec3s(mtx, b); - - smlua_push_mat4(mtx, 1); - - smlua_push_vec3s(b, 2); - - return 1; -} - -/* -int smlua_func_mtxf_rotate_xy(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", "mtxf_rotate_xy", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } -// Mtx * mtx = (Mtx *)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_rotate_xy"); return 0; } - s16 angle = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_rotate_xy"); return 0; } - - mtxf_rotate_xy(mtx, angle); - - return 1; -} -*/ - -int smlua_func_mtxf_rotate_xyz_and_translate(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", "mtxf_rotate_xyz_and_translate", 3, top); - return 0; - } - - - Mat4 dest; - smlua_get_mat4(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_rotate_xyz_and_translate"); return 0; } - - Vec3f b; - smlua_get_vec3f(b, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_rotate_xyz_and_translate"); return 0; } - - Vec3s c; - smlua_get_vec3s(c, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "mtxf_rotate_xyz_and_translate"); return 0; } - - mtxf_rotate_xyz_and_translate(dest, b, c); - - smlua_push_mat4(dest, 1); - - smlua_push_vec3f(b, 2); - - smlua_push_vec3s(c, 3); - - return 1; -} - -int smlua_func_mtxf_rotate_zxy_and_translate(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", "mtxf_rotate_zxy_and_translate", 3, top); - return 0; - } - - - Mat4 dest; - smlua_get_mat4(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_rotate_zxy_and_translate"); return 0; } - - Vec3f translate; - smlua_get_vec3f(translate, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_rotate_zxy_and_translate"); return 0; } - - Vec3s rotate; - smlua_get_vec3s(rotate, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "mtxf_rotate_zxy_and_translate"); return 0; } - - mtxf_rotate_zxy_and_translate(dest, translate, rotate); - - smlua_push_mat4(dest, 1); - - smlua_push_vec3f(translate, 2); - - smlua_push_vec3s(rotate, 3); - - return 1; -} - int smlua_func_mtxf_scale_vec3f(lua_State* L) { if (L == NULL) { return 0; } @@ -19552,6 +19956,33 @@ int smlua_func_mtxf_scale_vec3f(lua_State* L) { return 1; } +int smlua_func_mtxf_mul_vec3s(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", "mtxf_mul_vec3s", 2, top); + return 0; + } + + + Mat4 mtx; + smlua_get_mat4(mtx, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_mul_vec3s"); return 0; } + + Vec3s b; + smlua_get_vec3s(b, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_mul_vec3s"); return 0; } + + mtxf_mul_vec3s(mtx, b); + + smlua_push_mat4(mtx, 1); + + smlua_push_vec3s(b, 2); + + return 1; +} + /* int smlua_func_mtxf_to_mtx(lua_State* L) { if (L == NULL) { return 0; } @@ -19578,304 +20009,84 @@ int smlua_func_mtxf_to_mtx(lua_State* L) { } */ -int smlua_func_mtxf_translate(lua_State* L) { +/* +int smlua_func_mtxf_rotate_xy(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", "mtxf_translate", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mtxf_rotate_xy", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } +// Mtx * mtx = (Mtx *)smlua_to_cobject(L, 1, LOT_???); <--- UNIMPLEMENTED + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_rotate_xy"); return 0; } + s16 angle = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_rotate_xy"); return 0; } + + mtxf_rotate_xy(mtx, angle); + + return 1; +} +*/ + +int smlua_func_mtxf_inverse(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", "mtxf_inverse", 2, top); return 0; } Mat4 dest; smlua_get_mat4(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_translate"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mtxf_inverse"); return 0; } - Vec3f b; - smlua_get_vec3f(b, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_translate"); return 0; } + Mat4 src; + smlua_get_mat4(src, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mtxf_inverse"); return 0; } - mtxf_translate(dest, b); + mtxf_inverse(dest, src); smlua_push_mat4(dest, 1); - smlua_push_vec3f(b, 2); + smlua_push_mat4(src, 2); return 1; } -int smlua_func_not_zero(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", "not_zero", 2, top); - return 0; - } - - f32 value = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "not_zero"); return 0; } - f32 replacement = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "not_zero"); return 0; } - - lua_pushnumber(L, not_zero(value, replacement)); - - return 1; -} - -int smlua_func_sins(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", "sins", 1, top); - return 0; - } - - s16 sm64Angle = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sins"); return 0; } - - lua_pushnumber(L, sins(sm64Angle)); - - return 1; -} - -int smlua_func_spline_get_weights(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "spline_get_weights", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spline_get_weights"); return 0; } - - Vec4f result; - smlua_get_vec4f(result, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spline_get_weights"); return 0; } - f32 t = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "spline_get_weights"); return 0; } - s32 c = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "spline_get_weights"); return 0; } - - spline_get_weights(m, result, t, c); - - smlua_push_vec4f(result, 2); - - return 1; -} - -int smlua_func_vec3f_add(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", "vec3f_add", 2, top); - return 0; - } - - - Vec3f dest; - smlua_get_vec3f(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_add"); return 0; } - - Vec3f a; - smlua_get_vec3f(a, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_add"); return 0; } - - vec3f_add(dest, a); - - smlua_push_vec3f(dest, 1); - - smlua_push_vec3f(a, 2); - - return 1; -} - -int smlua_func_vec3f_combine(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 5) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "vec3f_combine", 5, top); - return 0; - } - - - Vec3f dest; - smlua_get_vec3f(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_combine"); return 0; } - - Vec3f vecA; - smlua_get_vec3f(vecA, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_combine"); return 0; } - - Vec3f vecB; - smlua_get_vec3f(vecB, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3f_combine"); return 0; } - f32 sclA = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "vec3f_combine"); return 0; } - f32 sclB = smlua_to_number(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "vec3f_combine"); return 0; } - - vec3f_combine(dest, vecA, vecB, sclA, sclB); - - smlua_push_vec3f(dest, 1); - - smlua_push_vec3f(vecA, 2); - - smlua_push_vec3f(vecB, 3); - - return 1; -} - -int smlua_func_vec3f_copy(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", "vec3f_copy", 2, top); - return 0; - } - - - Vec3f dest; - smlua_get_vec3f(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_copy"); return 0; } - - Vec3f src; - smlua_get_vec3f(src, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_copy"); return 0; } - - vec3f_copy(dest, src); - - smlua_push_vec3f(dest, 1); - - smlua_push_vec3f(src, 2); - - return 1; -} - -int smlua_func_vec3f_cross(lua_State* L) { +int smlua_func_get_pos_from_transform_mtx(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", "vec3f_cross", 3, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "get_pos_from_transform_mtx", 3, top); return 0; } Vec3f dest; smlua_get_vec3f(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_cross"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_pos_from_transform_mtx"); return 0; } - Vec3f a; - smlua_get_vec3f(a, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_cross"); return 0; } + Mat4 objMtx; + smlua_get_mat4(objMtx, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "get_pos_from_transform_mtx"); return 0; } - Vec3f b; - smlua_get_vec3f(b, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3f_cross"); return 0; } + Mat4 camMtx; + smlua_get_mat4(camMtx, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "get_pos_from_transform_mtx"); return 0; } - vec3f_cross(dest, a, b); + get_pos_from_transform_mtx(dest, objMtx, camMtx); smlua_push_vec3f(dest, 1); - smlua_push_vec3f(a, 2); + smlua_push_mat4(objMtx, 2); - smlua_push_vec3f(b, 3); - - return 1; -} - -int smlua_func_vec3f_dif(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", "vec3f_dif", 3, top); - return 0; - } - - - Vec3f dest; - smlua_get_vec3f(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_dif"); return 0; } - - Vec3f a; - smlua_get_vec3f(a, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_dif"); return 0; } - - Vec3f b; - smlua_get_vec3f(b, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3f_dif"); return 0; } - - vec3f_dif(dest, a, b); - - smlua_push_vec3f(dest, 1); - - smlua_push_vec3f(a, 2); - - smlua_push_vec3f(b, 3); - - return 1; -} - -int smlua_func_vec3f_dist(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", "vec3f_dist", 2, top); - return 0; - } - - - Vec3f v1; - smlua_get_vec3f(v1, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_dist"); return 0; } - - Vec3f v2; - smlua_get_vec3f(v2, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_dist"); return 0; } - - lua_pushnumber(L, vec3f_dist(v1, v2)); - - smlua_push_vec3f(v1, 1); - - smlua_push_vec3f(v2, 2); - - return 1; -} - -int smlua_func_vec3f_dot(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", "vec3f_dot", 2, top); - return 0; - } - - - Vec3f a; - smlua_get_vec3f(a, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_dot"); return 0; } - - Vec3f b; - smlua_get_vec3f(b, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_dot"); return 0; } - - lua_pushnumber(L, vec3f_dot(a, b)); - - smlua_push_vec3f(a, 1); - - smlua_push_vec3f(b, 2); + smlua_push_mat4(camMtx, 3); return 1; } @@ -19913,67 +20124,192 @@ int smlua_func_vec3f_get_dist_and_angle(lua_State* L) { return 1; } -int smlua_func_vec3f_length(lua_State* L) { +int smlua_func_vec3f_set_dist_and_angle(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", "vec3f_length", 1, top); + if (top != 5) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "vec3f_set_dist_and_angle", 5, top); return 0; } - Vec3f a; - smlua_get_vec3f(a, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_length"); return 0; } + Vec3f from; + smlua_get_vec3f(from, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_set_dist_and_angle"); return 0; } - lua_pushnumber(L, vec3f_length(a)); + Vec3f to; + smlua_get_vec3f(to, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_set_dist_and_angle"); return 0; } + f32 dist = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3f_set_dist_and_angle"); return 0; } + s16 pitch = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "vec3f_set_dist_and_angle"); return 0; } + s16 yaw = smlua_to_integer(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "vec3f_set_dist_and_angle"); return 0; } - smlua_push_vec3f(a, 1); + vec3f_set_dist_and_angle(from, to, dist, pitch, yaw); + + smlua_push_vec3f(from, 1); + + smlua_push_vec3f(to, 2); return 1; } -int smlua_func_vec3f_mul(lua_State* L) { +int smlua_func_approach_s32(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "approach_s32", 4, top); + return 0; + } + + s32 current = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "approach_s32"); return 0; } + s32 target = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "approach_s32"); return 0; } + s32 inc = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "approach_s32"); return 0; } + s32 dec = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "approach_s32"); return 0; } + + lua_pushinteger(L, approach_s32(current, target, inc, dec)); + + return 1; +} + +int smlua_func_approach_f32(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "approach_f32", 4, top); + return 0; + } + + f32 current = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "approach_f32"); return 0; } + f32 target = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "approach_f32"); return 0; } + f32 inc = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "approach_f32"); return 0; } + f32 dec = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "approach_f32"); return 0; } + + lua_pushnumber(L, approach_f32(current, target, inc, dec)); + + return 1; +} + +int smlua_func_atan2s(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", "vec3f_mul", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "atan2s", 2, top); return 0; } + f32 y = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "atan2s"); return 0; } + f32 x = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "atan2s"); return 0; } - Vec3f dest; - smlua_get_vec3f(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_mul"); return 0; } - f32 a = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_mul"); return 0; } - - vec3f_mul(dest, a); - - smlua_push_vec3f(dest, 1); + lua_pushinteger(L, atan2s(y, x)); return 1; } -int smlua_func_vec3f_normalize(lua_State* L) { +int smlua_func_spline_get_weights(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", "vec3f_normalize", 1, top); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "spline_get_weights", 4, top); return 0; } + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spline_get_weights"); return 0; } - Vec3f dest; - smlua_get_vec3f(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_normalize"); return 0; } + Vec4f result; + smlua_get_vec4f(result, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spline_get_weights"); return 0; } + f32 t = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "spline_get_weights"); return 0; } + s32 c = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "spline_get_weights"); return 0; } - vec3f_normalize(dest); + spline_get_weights(m, result, t, c); - smlua_push_vec3f(dest, 1); + smlua_push_vec4f(result, 2); + + return 1; +} + +int smlua_func_anim_spline_init(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", "anim_spline_init", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "anim_spline_init"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + Vec4s * keyFrames = (Vec4s *)smlua_to_cobject(L, 2, LOT_VEC4S); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "anim_spline_init"); return 0; } + + anim_spline_init(m, keyFrames); + + return 1; +} + +int smlua_func_anim_spline_poll(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", "anim_spline_poll", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "anim_spline_poll"); return 0; } + + Vec3f result; + smlua_get_vec3f(result, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "anim_spline_poll"); return 0; } + + lua_pushinteger(L, anim_spline_poll(m, result)); + + smlua_push_vec3f(result, 2); + + return 1; +} + +int smlua_func_not_zero(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", "not_zero", 2, top); + return 0; + } + + f32 value = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "not_zero"); return 0; } + f32 replacement = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "not_zero"); return 0; } + + lua_pushnumber(L, not_zero(value, replacement)); return 1; } @@ -20011,290 +20347,29 @@ int smlua_func_vec3f_project(lua_State* L) { return 1; } -int smlua_func_vec3f_rotate_zxy(lua_State* L) { +int smlua_func_vec3f_dist(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", "vec3f_rotate_zxy", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "vec3f_dist", 2, top); return 0; } - Vec3f v; - smlua_get_vec3f(v, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_rotate_zxy"); return 0; } + Vec3f v1; + smlua_get_vec3f(v1, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_dist"); return 0; } - Vec3s rotate; - smlua_get_vec3s(rotate, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_rotate_zxy"); return 0; } + Vec3f v2; + smlua_get_vec3f(v2, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_dist"); return 0; } - vec3f_rotate_zxy(v, rotate); + lua_pushnumber(L, vec3f_dist(v1, v2)); - smlua_push_vec3f(v, 1); + smlua_push_vec3f(v1, 1); - smlua_push_vec3s(rotate, 2); - - return 1; -} - -int smlua_func_vec3f_set(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "vec3f_set", 4, top); - return 0; - } - - - Vec3f dest; - smlua_get_vec3f(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_set"); return 0; } - f32 x = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_set"); return 0; } - f32 y = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3f_set"); return 0; } - f32 z = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "vec3f_set"); return 0; } - - vec3f_set(dest, x, y, z); - - smlua_push_vec3f(dest, 1); - - return 1; -} - -int smlua_func_vec3f_set_dist_and_angle(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 5) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "vec3f_set_dist_and_angle", 5, top); - return 0; - } - - - Vec3f from; - smlua_get_vec3f(from, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_set_dist_and_angle"); return 0; } - - Vec3f to; - smlua_get_vec3f(to, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_set_dist_and_angle"); return 0; } - f32 dist = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3f_set_dist_and_angle"); return 0; } - s16 pitch = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "vec3f_set_dist_and_angle"); return 0; } - s16 yaw = smlua_to_integer(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "vec3f_set_dist_and_angle"); return 0; } - - vec3f_set_dist_and_angle(from, to, dist, pitch, yaw); - - smlua_push_vec3f(from, 1); - - smlua_push_vec3f(to, 2); - - return 1; -} - -int smlua_func_vec3f_sum(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", "vec3f_sum", 3, top); - return 0; - } - - - Vec3f dest; - smlua_get_vec3f(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_sum"); return 0; } - - Vec3f a; - smlua_get_vec3f(a, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_sum"); return 0; } - - Vec3f b; - smlua_get_vec3f(b, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3f_sum"); return 0; } - - vec3f_sum(dest, a, b); - - smlua_push_vec3f(dest, 1); - - smlua_push_vec3f(a, 2); - - smlua_push_vec3f(b, 3); - - return 1; -} - -int smlua_func_vec3f_to_vec3s(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", "vec3f_to_vec3s", 2, top); - return 0; - } - - - Vec3s dest; - smlua_get_vec3s(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3f_to_vec3s"); return 0; } - - Vec3f a; - smlua_get_vec3f(a, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3f_to_vec3s"); return 0; } - - vec3f_to_vec3s(dest, a); - - smlua_push_vec3s(dest, 1); - - smlua_push_vec3f(a, 2); - - return 1; -} - -int smlua_func_vec3s_add(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", "vec3s_add", 2, top); - return 0; - } - - - Vec3s dest; - smlua_get_vec3s(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3s_add"); return 0; } - - Vec3s a; - smlua_get_vec3s(a, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3s_add"); return 0; } - - vec3s_add(dest, a); - - smlua_push_vec3s(dest, 1); - - smlua_push_vec3s(a, 2); - - return 1; -} - -int smlua_func_vec3s_copy(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", "vec3s_copy", 2, top); - return 0; - } - - - Vec3s dest; - smlua_get_vec3s(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3s_copy"); return 0; } - - Vec3s src; - smlua_get_vec3s(src, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3s_copy"); return 0; } - - vec3s_copy(dest, src); - - smlua_push_vec3s(dest, 1); - - smlua_push_vec3s(src, 2); - - return 1; -} - -int smlua_func_vec3s_set(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "vec3s_set", 4, top); - return 0; - } - - - Vec3s dest; - smlua_get_vec3s(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3s_set"); return 0; } - s16 x = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3s_set"); return 0; } - s16 y = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3s_set"); return 0; } - s16 z = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "vec3s_set"); return 0; } - - vec3s_set(dest, x, y, z); - - smlua_push_vec3s(dest, 1); - - return 1; -} - -int smlua_func_vec3s_sum(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", "vec3s_sum", 3, top); - return 0; - } - - - Vec3s dest; - smlua_get_vec3s(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3s_sum"); return 0; } - - Vec3s a; - smlua_get_vec3s(a, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3s_sum"); return 0; } - - Vec3s b; - smlua_get_vec3s(b, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "vec3s_sum"); return 0; } - - vec3s_sum(dest, a, b); - - smlua_push_vec3s(dest, 1); - - smlua_push_vec3s(a, 2); - - smlua_push_vec3s(b, 3); - - return 1; -} - -int smlua_func_vec3s_to_vec3f(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", "vec3s_to_vec3f", 2, top); - return 0; - } - - - Vec3f dest; - smlua_get_vec3f(dest, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "vec3s_to_vec3f"); return 0; } - - Vec3s a; - smlua_get_vec3s(a, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "vec3s_to_vec3f"); return 0; } - - vec3s_to_vec3f(dest, a); - - smlua_push_vec3f(dest, 1); - - smlua_push_vec3s(a, 2); + smlua_push_vec3f(v2, 2); return 1; } @@ -20303,6 +20378,42 @@ int smlua_func_vec3s_to_vec3f(lua_State* L) { // misc.h // //////////// +int smlua_func_smooth_step(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", "smooth_step", 3, top); + return 0; + } + + float edge0 = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smooth_step"); return 0; } + float edge1 = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "smooth_step"); return 0; } + float x = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "smooth_step"); return 0; } + + lua_pushnumber(L, smooth_step(edge0, edge1, x)); + + return 1; +} + +int smlua_func_update_all_mario_stars(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", "update_all_mario_stars", 0, top); + return 0; + } + + + update_all_mario_stars(); + + return 1; +} + int smlua_func_clock_elapsed(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -20479,146 +20590,10 @@ int smlua_func_delta_interpolate_vec3s(lua_State* L) { return 1; } -int smlua_func_smooth_step(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", "smooth_step", 3, top); - return 0; - } - - float edge0 = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smooth_step"); return 0; } - float edge1 = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "smooth_step"); return 0; } - float x = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "smooth_step"); return 0; } - - lua_pushnumber(L, smooth_step(edge0, edge1, x)); - - return 1; -} - -int smlua_func_update_all_mario_stars(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", "update_all_mario_stars", 0, top); - return 0; - } - - - update_all_mario_stars(); - - return 1; -} - /////////////////// // mod_storage.h // /////////////////// -int smlua_func_mod_storage_clear(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", "mod_storage_clear", 0, top); - return 0; - } - - - lua_pushboolean(L, mod_storage_clear()); - - return 1; -} - -int smlua_func_mod_storage_exists(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", "mod_storage_exists", 1, top); - return 0; - } - - const char* key = smlua_to_string(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_storage_exists"); return 0; } - - lua_pushboolean(L, mod_storage_exists(key)); - - return 1; -} - -int smlua_func_mod_storage_load(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", "mod_storage_load", 1, top); - return 0; - } - - const char* key = smlua_to_string(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_storage_load"); return 0; } - - lua_pushstring(L, mod_storage_load(key)); - - return 1; -} - -int smlua_func_mod_storage_load_bool(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", "mod_storage_load_bool", 1, top); - return 0; - } - - const char* key = smlua_to_string(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_storage_load_bool"); return 0; } - - lua_pushboolean(L, mod_storage_load_bool(key)); - - return 1; -} - -int smlua_func_mod_storage_load_number(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", "mod_storage_load_number", 1, top); - return 0; - } - - const char* key = smlua_to_string(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_storage_load_number"); return 0; } - - lua_pushnumber(L, mod_storage_load_number(key)); - - return 1; -} - -int smlua_func_mod_storage_remove(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", "mod_storage_remove", 1, top); - return 0; - } - - const char* key = smlua_to_string(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_storage_remove"); return 0; } - - lua_pushboolean(L, mod_storage_remove(key)); - - return 1; -} - int smlua_func_mod_storage_save(lua_State* L) { if (L == NULL) { return 0; } @@ -20638,25 +20613,6 @@ int smlua_func_mod_storage_save(lua_State* L) { return 1; } -int smlua_func_mod_storage_save_bool(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", "mod_storage_save_bool", 2, top); - return 0; - } - - const char* key = smlua_to_string(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_storage_save_bool"); return 0; } - bool value = smlua_to_boolean(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mod_storage_save_bool"); return 0; } - - lua_pushboolean(L, mod_storage_save_bool(key, value)); - - return 1; -} - int smlua_func_mod_storage_save_number(lua_State* L) { if (L == NULL) { return 0; } @@ -20676,69 +20632,129 @@ int smlua_func_mod_storage_save_number(lua_State* L) { return 1; } - ////////////////////// - // network_player.h // -////////////////////// - -int smlua_func_get_network_player_from_area(lua_State* L) { +int smlua_func_mod_storage_save_bool(lua_State* L) { if (L == NULL) { return 0; } int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "get_network_player_from_area", 4, top); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mod_storage_save_bool", 2, top); return 0; } - s16 courseNum = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_network_player_from_area"); return 0; } - s16 actNum = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "get_network_player_from_area"); return 0; } - s16 levelNum = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "get_network_player_from_area"); return 0; } - s16 areaIndex = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "get_network_player_from_area"); return 0; } + const char* key = smlua_to_string(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_storage_save_bool"); return 0; } + bool value = smlua_to_boolean(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mod_storage_save_bool"); return 0; } - smlua_push_object(L, LOT_NETWORKPLAYER, get_network_player_from_area(courseNum, actNum, levelNum, areaIndex), NULL); + lua_pushboolean(L, mod_storage_save_bool(key, value)); return 1; } -int smlua_func_get_network_player_from_level(lua_State* L) { +int smlua_func_mod_storage_load(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", "get_network_player_from_level", 3, top); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mod_storage_load", 1, top); return 0; } - s16 courseNum = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_network_player_from_level"); return 0; } - s16 actNum = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "get_network_player_from_level"); return 0; } - s16 levelNum = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "get_network_player_from_level"); return 0; } + const char* key = smlua_to_string(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_storage_load"); return 0; } - smlua_push_object(L, LOT_NETWORKPLAYER, get_network_player_from_level(courseNum, actNum, levelNum), NULL); + lua_pushstring(L, mod_storage_load(key)); return 1; } -int smlua_func_get_network_player_smallest_global(UNUSED lua_State* L) { +int smlua_func_mod_storage_load_number(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", "mod_storage_load_number", 1, top); + return 0; + } + + const char* key = smlua_to_string(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_storage_load_number"); return 0; } + + lua_pushnumber(L, mod_storage_load_number(key)); + + return 1; +} + +int smlua_func_mod_storage_load_bool(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", "mod_storage_load_bool", 1, top); + return 0; + } + + const char* key = smlua_to_string(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_storage_load_bool"); return 0; } + + lua_pushboolean(L, mod_storage_load_bool(key)); + + return 1; +} + +int smlua_func_mod_storage_exists(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", "mod_storage_exists", 1, top); + return 0; + } + + const char* key = smlua_to_string(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_storage_exists"); return 0; } + + lua_pushboolean(L, mod_storage_exists(key)); + + return 1; +} + +int smlua_func_mod_storage_remove(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", "mod_storage_remove", 1, top); + return 0; + } + + const char* key = smlua_to_string(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_storage_remove"); return 0; } + + lua_pushboolean(L, mod_storage_remove(key)); + + return 1; +} + +int smlua_func_mod_storage_clear(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_network_player_smallest_global", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mod_storage_clear", 0, top); return 0; } - smlua_push_object(L, LOT_NETWORKPLAYER, get_network_player_smallest_global(), NULL); + lua_pushboolean(L, mod_storage_clear()); return 1; } + ////////////////////// + // network_player.h // +////////////////////// + int smlua_func_network_player_connected_count(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -20754,103 +20770,6 @@ int smlua_func_network_player_connected_count(UNUSED lua_State* L) { return 1; } -int smlua_func_network_player_from_global_index(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", "network_player_from_global_index", 1, top); - return 0; - } - - u8 globalIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_from_global_index"); return 0; } - - smlua_push_object(L, LOT_NETWORKPLAYER, network_player_from_global_index(globalIndex), NULL); - - return 1; -} - -int smlua_func_network_player_get_override_palette_color_channel(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", "network_player_get_override_palette_color_channel", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct NetworkPlayer* np = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_get_override_palette_color_channel"); return 0; } - int part = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "network_player_get_override_palette_color_channel"); return 0; } - u8 index = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "network_player_get_override_palette_color_channel"); return 0; } - - lua_pushinteger(L, network_player_get_override_palette_color_channel(np, part, index)); - - return 1; -} - -int smlua_func_network_player_get_palette_color_channel(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", "network_player_get_palette_color_channel", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct NetworkPlayer* np = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_get_palette_color_channel"); return 0; } - int part = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "network_player_get_palette_color_channel"); return 0; } - u8 index = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "network_player_get_palette_color_channel"); return 0; } - - lua_pushinteger(L, network_player_get_palette_color_channel(np, part, index)); - - return 1; -} - -int smlua_func_network_player_is_override_palette_same(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", "network_player_is_override_palette_same", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct NetworkPlayer* np = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_is_override_palette_same"); return 0; } - - lua_pushboolean(L, network_player_is_override_palette_same(np)); - - return 1; -} - -int smlua_func_network_player_reset_override_palette(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", "network_player_reset_override_palette", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct NetworkPlayer* np = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_reset_override_palette"); return 0; } - - network_player_reset_override_palette(np); - - return 1; -} - int smlua_func_network_player_set_description(lua_State* L) { if (L == NULL) { return 0; } @@ -20899,6 +20818,126 @@ int smlua_func_network_player_set_override_location(lua_State* L) { return 1; } +int smlua_func_network_player_from_global_index(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", "network_player_from_global_index", 1, top); + return 0; + } + + u8 globalIndex = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_from_global_index"); return 0; } + + smlua_push_object(L, LOT_NETWORKPLAYER, network_player_from_global_index(globalIndex), NULL); + + return 1; +} + +int smlua_func_get_network_player_from_level(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", "get_network_player_from_level", 3, top); + return 0; + } + + s16 courseNum = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_network_player_from_level"); return 0; } + s16 actNum = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "get_network_player_from_level"); return 0; } + s16 levelNum = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "get_network_player_from_level"); return 0; } + + smlua_push_object(L, LOT_NETWORKPLAYER, get_network_player_from_level(courseNum, actNum, levelNum), NULL); + + return 1; +} + +int smlua_func_get_network_player_from_area(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "get_network_player_from_area", 4, top); + return 0; + } + + s16 courseNum = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_network_player_from_area"); return 0; } + s16 actNum = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "get_network_player_from_area"); return 0; } + s16 levelNum = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "get_network_player_from_area"); return 0; } + s16 areaIndex = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "get_network_player_from_area"); return 0; } + + smlua_push_object(L, LOT_NETWORKPLAYER, get_network_player_from_area(courseNum, actNum, levelNum, areaIndex), NULL); + + return 1; +} + +int smlua_func_get_network_player_smallest_global(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_network_player_smallest_global", 0, top); + return 0; + } + + + smlua_push_object(L, LOT_NETWORKPLAYER, get_network_player_smallest_global(), NULL); + + return 1; +} + +int smlua_func_network_player_get_palette_color_channel(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", "network_player_get_palette_color_channel", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct NetworkPlayer* np = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_get_palette_color_channel"); return 0; } + int part = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "network_player_get_palette_color_channel"); return 0; } + u8 index = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "network_player_get_palette_color_channel"); return 0; } + + lua_pushinteger(L, network_player_get_palette_color_channel(np, part, index)); + + return 1; +} + +int smlua_func_network_player_get_override_palette_color_channel(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", "network_player_get_override_palette_color_channel", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct NetworkPlayer* np = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_get_override_palette_color_channel"); return 0; } + int part = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "network_player_get_override_palette_color_channel"); return 0; } + u8 index = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "network_player_get_override_palette_color_channel"); return 0; } + + lua_pushinteger(L, network_player_get_override_palette_color_channel(np, part, index)); + + return 1; +} + int smlua_func_network_player_set_override_palette_color(lua_State* L) { if (L == NULL) { return 0; } @@ -20925,10 +20964,127 @@ int smlua_func_network_player_set_override_palette_color(lua_State* L) { return 1; } +int smlua_func_network_player_reset_override_palette(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", "network_player_reset_override_palette", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct NetworkPlayer* np = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_reset_override_palette"); return 0; } + + network_player_reset_override_palette(np); + + return 1; +} + +int smlua_func_network_player_is_override_palette_same(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", "network_player_is_override_palette_same", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct NetworkPlayer* np = (struct NetworkPlayer*)smlua_to_cobject(L, 1, LOT_NETWORKPLAYER); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_player_is_override_palette_same"); return 0; } + + lua_pushboolean(L, network_player_is_override_palette_same(np)); + + return 1; +} + ///////////////////// // network_utils.h // ///////////////////// +int smlua_func_network_global_index_from_local(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", "network_global_index_from_local", 1, top); + return 0; + } + + u8 localIndex = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_global_index_from_local"); return 0; } + + lua_pushinteger(L, network_global_index_from_local(localIndex)); + + return 1; +} + +int smlua_func_network_local_index_from_global(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", "network_local_index_from_global", 1, top); + return 0; + } + + u8 globalIndex = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_local_index_from_global"); return 0; } + + lua_pushinteger(L, network_local_index_from_global(globalIndex)); + + return 1; +} + +int smlua_func_network_is_server(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", "network_is_server", 0, top); + return 0; + } + + + lua_pushboolean(L, network_is_server()); + + return 1; +} + +int smlua_func_network_is_moderator(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", "network_is_moderator", 0, top); + return 0; + } + + + lua_pushboolean(L, network_is_moderator()); + + return 1; +} + +int smlua_func_network_get_player_text_color_string(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", "network_get_player_text_color_string", 1, top); + return 0; + } + + u8 localIndex = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_get_player_text_color_string"); return 0; } + + lua_pushstring(L, network_get_player_text_color_string(localIndex)); + + return 1; +} + int smlua_func_network_check_singleplayer_pause(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -20961,91 +21117,52 @@ int smlua_func_network_discord_id_from_local_index(lua_State* L) { return 1; } -int smlua_func_network_get_player_text_color_string(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", "network_get_player_text_color_string", 1, top); - return 0; - } - - u8 localIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_get_player_text_color_string"); return 0; } - - lua_pushstring(L, network_get_player_text_color_string(localIndex)); - - return 1; -} - -int smlua_func_network_global_index_from_local(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", "network_global_index_from_local", 1, top); - return 0; - } - - u8 localIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_global_index_from_local"); return 0; } - - lua_pushinteger(L, network_global_index_from_local(localIndex)); - - return 1; -} - -int smlua_func_network_is_moderator(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", "network_is_moderator", 0, top); - return 0; - } - - - lua_pushboolean(L, network_is_moderator()); - - return 1; -} - -int smlua_func_network_is_server(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", "network_is_server", 0, top); - return 0; - } - - - lua_pushboolean(L, network_is_server()); - - return 1; -} - -int smlua_func_network_local_index_from_global(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", "network_local_index_from_global", 1, top); - return 0; - } - - u8 globalIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "network_local_index_from_global"); return 0; } - - lua_pushinteger(L, network_local_index_from_global(globalIndex)); - - return 1; -} - ///////////////////// // obj_behaviors.c // ///////////////////// +int smlua_func_set_yoshi_as_not_dead(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", "set_yoshi_as_not_dead", 0, top); + return 0; + } + + + extern void set_yoshi_as_not_dead(void); + set_yoshi_as_not_dead(); + + 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; } + if (lua_isnil(L, 2)) { 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; } + if (lua_isnil(L, 3)) { 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; } @@ -21064,6 +21181,132 @@ int smlua_func_absf_2(lua_State* L) { return 1; } +int smlua_func_turn_obj_away_from_surface(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 7) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "turn_obj_away_from_surface", 7, top); + return 0; + } + + f32 velX = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "turn_obj_away_from_surface"); return 0; } + f32 velZ = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "turn_obj_away_from_surface"); return 0; } + f32 nX = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "turn_obj_away_from_surface"); return 0; } + f32 nY = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "turn_obj_away_from_surface"); return 0; } + f32 nZ = smlua_to_number(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "turn_obj_away_from_surface"); return 0; } + f32 * objYawX = (f32 *)smlua_to_cpointer(L, 6, LVT_F32_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "turn_obj_away_from_surface"); return 0; } + f32 * objYawZ = (f32 *)smlua_to_cpointer(L, 7, LVT_F32_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "turn_obj_away_from_surface"); return 0; } + + extern void turn_obj_away_from_surface(f32 velX, f32 velZ, f32 nX, UNUSED f32 nY, f32 nZ, f32 *objYawX, f32 *objYawZ); + turn_obj_away_from_surface(velX, velZ, nX, nY, nZ, objYawX, objYawZ); + + return 1; +} + +int smlua_func_obj_find_wall(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 5) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_find_wall", 5, top); + return 0; + } + + f32 objNewX = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_find_wall"); return 0; } + f32 objY = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_find_wall"); return 0; } + f32 objNewZ = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_find_wall"); return 0; } + f32 objVelX = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_find_wall"); return 0; } + f32 objVelZ = smlua_to_number(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "obj_find_wall"); return 0; } + + extern s8 obj_find_wall(f32 objNewX, f32 objY, f32 objNewZ, f32 objVelX, f32 objVelZ); + lua_pushinteger(L, obj_find_wall(objNewX, objY, objNewZ, objVelX, objVelZ)); + + return 1; +} + +int smlua_func_turn_obj_away_from_steep_floor(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "turn_obj_away_from_steep_floor", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Surface* objFloor = (struct Surface*)smlua_to_cobject(L, 1, LOT_SURFACE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "turn_obj_away_from_steep_floor"); return 0; } + f32 floorY = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "turn_obj_away_from_steep_floor"); return 0; } + f32 objVelX = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "turn_obj_away_from_steep_floor"); return 0; } + f32 objVelZ = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "turn_obj_away_from_steep_floor"); return 0; } + + extern s8 turn_obj_away_from_steep_floor(struct Surface *objFloor, f32 floorY, f32 objVelX, f32 objVelZ); + lua_pushinteger(L, turn_obj_away_from_steep_floor(objFloor, floorY, objVelX, objVelZ)); + + return 1; +} + +int smlua_func_obj_orient_graph(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_orient_graph", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_orient_graph"); return 0; } + f32 normalX = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_orient_graph"); return 0; } + f32 normalY = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_orient_graph"); return 0; } + f32 normalZ = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_orient_graph"); return 0; } + + extern void obj_orient_graph(struct Object *obj, f32 normalX, f32 normalY, f32 normalZ); + obj_orient_graph(obj, normalX, normalY, normalZ); + + return 1; +} + +int smlua_func_calc_obj_friction(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", "calc_obj_friction", 2, top); + return 0; + } + + f32 * objFriction = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "calc_obj_friction"); return 0; } + f32 floor_nY = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "calc_obj_friction"); return 0; } + + extern void calc_obj_friction(f32 *objFriction, f32 floor_nY); + calc_obj_friction(objFriction, floor_nY); + + return 1; +} + int smlua_func_calc_new_obj_vel_and_pos_y(lua_State* L) { if (L == NULL) { return 0; } @@ -21116,69 +21359,289 @@ int smlua_func_calc_new_obj_vel_and_pos_y_underwater(lua_State* L) { return 1; } -int smlua_func_calc_obj_friction(lua_State* L) { +int smlua_func_obj_update_pos_vel_xz(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", "obj_update_pos_vel_xz", 0, top); + return 0; + } + + + extern void obj_update_pos_vel_xz(void); + obj_update_pos_vel_xz(); + + return 1; +} + +int smlua_func_obj_splash(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", "calc_obj_friction", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_splash", 2, top); return 0; } - f32 * objFriction = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "calc_obj_friction"); return 0; } - f32 floor_nY = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "calc_obj_friction"); return 0; } + s32 waterY = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_splash"); return 0; } + s32 objY = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_splash"); return 0; } - extern void calc_obj_friction(f32 *objFriction, f32 floor_nY); - calc_obj_friction(objFriction, floor_nY); + extern void obj_splash(s32 waterY, s32 objY); + obj_splash(waterY, objY); return 1; } -int smlua_func_current_mario_room_check(lua_State* L) { +int smlua_func_object_step(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", "object_step", 0, top); + return 0; + } + + + extern s16 object_step(void); + lua_pushinteger(L, object_step()); + + return 1; +} + +int smlua_func_object_step_without_floor_orient(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", "object_step_without_floor_orient", 0, top); + return 0; + } + + + extern s16 object_step_without_floor_orient(void); + lua_pushinteger(L, object_step_without_floor_orient()); + + return 1; +} + +int smlua_func_obj_move_xyz_using_fvel_and_yaw(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", "current_mario_room_check", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_move_xyz_using_fvel_and_yaw", 1, top); return 0; } - s16 room = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "current_mario_room_check"); return 0; } + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_move_xyz_using_fvel_and_yaw"); return 0; } - extern s8 current_mario_room_check(s16 room); - lua_pushinteger(L, current_mario_room_check(room)); + extern void obj_move_xyz_using_fvel_and_yaw(struct Object *obj); + obj_move_xyz_using_fvel_and_yaw(obj); return 1; } -/* -int smlua_func_geo_obj_transparency_something(lua_State* L) { +int smlua_func_is_point_within_radius_of_mario(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); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "is_point_within_radius_of_mario", 4, 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; } - if (lua_isnil(L, 2)) { 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; } - if (lua_isnil(L, 3)) { 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; } + f32 x = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_point_within_radius_of_mario"); return 0; } + f32 y = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "is_point_within_radius_of_mario"); return 0; } + f32 z = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "is_point_within_radius_of_mario"); return 0; } + s32 dist = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "is_point_within_radius_of_mario"); 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); + extern s8 is_point_within_radius_of_mario(f32 x, f32 y, f32 z, s32 dist); + lua_pushinteger(L, is_point_within_radius_of_mario(x, y, z, dist)); + + return 1; +} + +int smlua_func_is_point_within_radius_of_any_player(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "is_point_within_radius_of_any_player", 4, top); + return 0; + } + + f32 x = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_point_within_radius_of_any_player"); return 0; } + f32 y = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "is_point_within_radius_of_any_player"); return 0; } + f32 z = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "is_point_within_radius_of_any_player"); return 0; } + s32 dist = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "is_point_within_radius_of_any_player"); return 0; } + + extern s8 is_point_within_radius_of_any_player(f32 x, f32 y, f32 z, s32 dist); + lua_pushinteger(L, is_point_within_radius_of_any_player(x, y, z, dist)); + + return 1; +} + +int smlua_func_is_player_active(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", "is_player_active", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_player_active"); return 0; } + + extern u8 is_player_active(struct MarioState* m); + lua_pushinteger(L, is_player_active(m)); + + return 1; +} + +int smlua_func_is_other_player_active(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", "is_other_player_active", 0, top); + return 0; + } + + + extern u8 is_other_player_active(void); + lua_pushinteger(L, is_other_player_active()); + + return 1; +} + +int smlua_func_is_player_in_local_area(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", "is_player_in_local_area", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_player_in_local_area"); return 0; } + + extern u8 is_player_in_local_area(struct MarioState* m); + lua_pushinteger(L, is_player_in_local_area(m)); + + return 1; +} + +int smlua_func_nearest_mario_state_to_object(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", "nearest_mario_state_to_object", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "nearest_mario_state_to_object"); return 0; } + + extern struct MarioState* nearest_mario_state_to_object(struct Object *obj); + smlua_push_object(L, LOT_MARIOSTATE, nearest_mario_state_to_object(obj), NULL); + + return 1; +} + +int smlua_func_nearest_possible_mario_state_to_object(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", "nearest_possible_mario_state_to_object", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "nearest_possible_mario_state_to_object"); return 0; } + + extern struct MarioState* nearest_possible_mario_state_to_object(struct Object *obj); + smlua_push_object(L, LOT_MARIOSTATE, nearest_possible_mario_state_to_object(obj), NULL); + + return 1; +} + +int smlua_func_nearest_player_to_object(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", "nearest_player_to_object", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "nearest_player_to_object"); return 0; } + + extern struct Object* nearest_player_to_object(struct Object *obj); + smlua_push_object(L, LOT_OBJECT, nearest_player_to_object(obj), NULL); + + return 1; +} + +int smlua_func_nearest_interacting_mario_state_to_object(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", "nearest_interacting_mario_state_to_object", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "nearest_interacting_mario_state_to_object"); return 0; } + + extern struct MarioState *nearest_interacting_mario_state_to_object(struct Object *obj); + smlua_push_object(L, LOT_MARIOSTATE, nearest_interacting_mario_state_to_object(obj), NULL); + + return 1; +} + +int smlua_func_nearest_interacting_player_to_object(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", "nearest_interacting_player_to_object", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "nearest_interacting_player_to_object"); return 0; } + + extern struct Object *nearest_interacting_player_to_object(struct Object *obj); + smlua_push_object(L, LOT_OBJECT, nearest_interacting_player_to_object(obj), NULL); return 1; } -*/ int smlua_func_is_nearest_mario_state_to_object(lua_State* L) { if (L == NULL) { return 0; } @@ -21224,60 +21687,6 @@ int smlua_func_is_nearest_player_to_object(lua_State* L) { return 1; } -int smlua_func_is_other_player_active(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", "is_other_player_active", 0, top); - return 0; - } - - - extern u8 is_other_player_active(void); - lua_pushinteger(L, is_other_player_active()); - - return 1; -} - -int smlua_func_is_player_active(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", "is_player_active", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_player_active"); return 0; } - - extern u8 is_player_active(struct MarioState* m); - lua_pushinteger(L, is_player_active(m)); - - return 1; -} - -int smlua_func_is_player_in_local_area(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", "is_player_in_local_area", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_player_in_local_area"); return 0; } - - extern u8 is_player_in_local_area(struct MarioState* m); - lua_pushinteger(L, is_player_in_local_area(m)); - - return 1; -} - int smlua_func_is_point_close_to_object(lua_State* L) { if (L == NULL) { return 0; } @@ -21305,166 +21714,77 @@ int smlua_func_is_point_close_to_object(lua_State* L) { return 1; } -int smlua_func_is_point_within_radius_of_any_player(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "is_point_within_radius_of_any_player", 4, top); - return 0; - } - - f32 x = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_point_within_radius_of_any_player"); return 0; } - f32 y = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "is_point_within_radius_of_any_player"); return 0; } - f32 z = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "is_point_within_radius_of_any_player"); return 0; } - s32 dist = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "is_point_within_radius_of_any_player"); return 0; } - - extern s8 is_point_within_radius_of_any_player(f32 x, f32 y, f32 z, s32 dist); - lua_pushinteger(L, is_point_within_radius_of_any_player(x, y, z, dist)); - - return 1; -} - -int smlua_func_is_point_within_radius_of_mario(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "is_point_within_radius_of_mario", 4, top); - return 0; - } - - f32 x = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_point_within_radius_of_mario"); return 0; } - f32 y = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "is_point_within_radius_of_mario"); return 0; } - f32 z = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "is_point_within_radius_of_mario"); return 0; } - s32 dist = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "is_point_within_radius_of_mario"); return 0; } - - extern s8 is_point_within_radius_of_mario(f32 x, f32 y, f32 z, s32 dist); - lua_pushinteger(L, is_point_within_radius_of_mario(x, y, z, dist)); - - return 1; -} - -int smlua_func_nearest_interacting_mario_state_to_object(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", "nearest_interacting_mario_state_to_object", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "nearest_interacting_mario_state_to_object"); return 0; } - - extern struct MarioState *nearest_interacting_mario_state_to_object(struct Object *obj); - smlua_push_object(L, LOT_MARIOSTATE, nearest_interacting_mario_state_to_object(obj), NULL); - - return 1; -} - -int smlua_func_nearest_interacting_player_to_object(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", "nearest_interacting_player_to_object", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "nearest_interacting_player_to_object"); return 0; } - - extern struct Object *nearest_interacting_player_to_object(struct Object *obj); - smlua_push_object(L, LOT_OBJECT, nearest_interacting_player_to_object(obj), NULL); - - return 1; -} - -int smlua_func_nearest_mario_state_to_object(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", "nearest_mario_state_to_object", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "nearest_mario_state_to_object"); return 0; } - - extern struct MarioState* nearest_mario_state_to_object(struct Object *obj); - smlua_push_object(L, LOT_MARIOSTATE, nearest_mario_state_to_object(obj), NULL); - - return 1; -} - -int smlua_func_nearest_player_to_object(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", "nearest_player_to_object", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "nearest_player_to_object"); return 0; } - - extern struct Object* nearest_player_to_object(struct Object *obj); - smlua_push_object(L, LOT_OBJECT, nearest_player_to_object(obj), NULL); - - return 1; -} - -int smlua_func_nearest_possible_mario_state_to_object(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", "nearest_possible_mario_state_to_object", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "nearest_possible_mario_state_to_object"); return 0; } - - extern struct MarioState* nearest_possible_mario_state_to_object(struct Object *obj); - smlua_push_object(L, LOT_MARIOSTATE, nearest_possible_mario_state_to_object(obj), NULL); - - return 1; -} - -int smlua_func_obj_check_floor_death(lua_State* L) { +int smlua_func_set_object_visibility(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", "obj_check_floor_death", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_object_visibility", 2, top); return 0; } - s16 collisionFlags = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_check_floor_death"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Surface* floor = (struct Surface*)smlua_to_cobject(L, 2, LOT_SURFACE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_check_floor_death"); return 0; } + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_object_visibility"); return 0; } + s32 dist = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_object_visibility"); return 0; } - extern void obj_check_floor_death(s16 collisionFlags, struct Surface *floor); - obj_check_floor_death(collisionFlags, floor); + extern void set_object_visibility(struct Object *obj, s32 dist); + set_object_visibility(obj, dist); + + return 1; +} + +int smlua_func_obj_return_home_if_safe(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 5) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_return_home_if_safe", 5, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_return_home_if_safe"); return 0; } + f32 homeX = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_return_home_if_safe"); return 0; } + f32 y = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_return_home_if_safe"); return 0; } + f32 homeZ = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_return_home_if_safe"); return 0; } + s32 dist = smlua_to_integer(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "obj_return_home_if_safe"); return 0; } + + extern s8 obj_return_home_if_safe(struct Object *obj, f32 homeX, f32 y, f32 homeZ, s32 dist); + lua_pushinteger(L, obj_return_home_if_safe(obj, homeX, y, homeZ, dist)); + + return 1; +} + +int smlua_func_obj_return_and_displace_home(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 5) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_return_and_displace_home", 5, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_return_and_displace_home"); return 0; } + f32 homeX = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_return_and_displace_home"); return 0; } + f32 homeY = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_return_and_displace_home"); return 0; } + f32 homeZ = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_return_and_displace_home"); return 0; } + s32 baseDisp = smlua_to_integer(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "obj_return_and_displace_home"); return 0; } + + extern void obj_return_and_displace_home(struct Object *obj, f32 homeX, UNUSED f32 homeY, f32 homeZ, s32 baseDisp); + obj_return_and_displace_home(obj, homeX, homeY, homeZ, baseDisp); return 1; } @@ -21491,32 +21811,6 @@ int smlua_func_obj_check_if_facing_toward_angle(lua_State* L) { return 1; } -int smlua_func_obj_find_wall(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 5) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_find_wall", 5, top); - return 0; - } - - f32 objNewX = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_find_wall"); return 0; } - f32 objY = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_find_wall"); return 0; } - f32 objNewZ = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_find_wall"); return 0; } - f32 objVelX = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_find_wall"); return 0; } - f32 objVelZ = smlua_to_number(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "obj_find_wall"); return 0; } - - extern s8 obj_find_wall(f32 objNewX, f32 objY, f32 objNewZ, f32 objVelX, f32 objVelZ); - lua_pushinteger(L, obj_find_wall(objNewX, objY, objNewZ, objVelX, objVelZ)); - - return 1; -} - int smlua_func_obj_find_wall_displacement(lua_State* L) { if (L == NULL) { return 0; } @@ -21547,141 +21841,6 @@ int smlua_func_obj_find_wall_displacement(lua_State* L) { return 1; } -int smlua_func_obj_flicker_and_disappear(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", "obj_flicker_and_disappear", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_flicker_and_disappear"); return 0; } - s16 lifeSpan = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_flicker_and_disappear"); return 0; } - - extern s8 obj_flicker_and_disappear(struct Object *obj, s16 lifeSpan); - lua_pushinteger(L, obj_flicker_and_disappear(obj, lifeSpan)); - - return 1; -} - -int smlua_func_obj_lava_death(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", "obj_lava_death", 0, top); - return 0; - } - - - extern s8 obj_lava_death(void); - lua_pushinteger(L, obj_lava_death()); - - return 1; -} - -int smlua_func_obj_move_xyz_using_fvel_and_yaw(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_move_xyz_using_fvel_and_yaw", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_move_xyz_using_fvel_and_yaw"); return 0; } - - extern void obj_move_xyz_using_fvel_and_yaw(struct Object *obj); - obj_move_xyz_using_fvel_and_yaw(obj); - - return 1; -} - -int smlua_func_obj_orient_graph(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_orient_graph", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_orient_graph"); return 0; } - f32 normalX = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_orient_graph"); return 0; } - f32 normalY = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_orient_graph"); return 0; } - f32 normalZ = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_orient_graph"); return 0; } - - extern void obj_orient_graph(struct Object *obj, f32 normalX, f32 normalY, f32 normalZ); - obj_orient_graph(obj, normalX, normalY, normalZ); - - return 1; -} - -int smlua_func_obj_return_and_displace_home(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 5) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_return_and_displace_home", 5, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_return_and_displace_home"); return 0; } - f32 homeX = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_return_and_displace_home"); return 0; } - f32 homeY = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_return_and_displace_home"); return 0; } - f32 homeZ = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_return_and_displace_home"); return 0; } - s32 baseDisp = smlua_to_integer(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "obj_return_and_displace_home"); return 0; } - - extern void obj_return_and_displace_home(struct Object *obj, f32 homeX, UNUSED f32 homeY, f32 homeZ, s32 baseDisp); - obj_return_and_displace_home(obj, homeX, homeY, homeZ, baseDisp); - - return 1; -} - -int smlua_func_obj_return_home_if_safe(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 5) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_return_home_if_safe", 5, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_return_home_if_safe"); return 0; } - f32 homeX = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_return_home_if_safe"); return 0; } - f32 y = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_return_home_if_safe"); return 0; } - f32 homeZ = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_return_home_if_safe"); return 0; } - s32 dist = smlua_to_integer(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "obj_return_home_if_safe"); return 0; } - - extern s8 obj_return_home_if_safe(struct Object *obj, f32 homeX, f32 y, f32 homeZ, s32 dist); - lua_pushinteger(L, obj_return_home_if_safe(obj, homeX, y, homeZ, dist)); - - return 1; -} - int smlua_func_obj_spawn_yellow_coins(lua_State* L) { if (L == NULL) { return 0; } @@ -21703,107 +21862,78 @@ int smlua_func_obj_spawn_yellow_coins(lua_State* L) { return 1; } -int smlua_func_obj_splash(lua_State* L) { +int smlua_func_obj_flicker_and_disappear(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", "obj_splash", 2, top); - return 0; - } - - s32 waterY = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_splash"); return 0; } - s32 objY = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_splash"); return 0; } - - extern void obj_splash(s32 waterY, s32 objY); - obj_splash(waterY, objY); - - return 1; -} - -int smlua_func_obj_update_pos_vel_xz(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", "obj_update_pos_vel_xz", 0, top); - return 0; - } - - - extern void obj_update_pos_vel_xz(void); - obj_update_pos_vel_xz(); - - return 1; -} - -int smlua_func_object_step(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", "object_step", 0, top); - return 0; - } - - - extern s16 object_step(void); - lua_pushinteger(L, object_step()); - - return 1; -} - -int smlua_func_object_step_without_floor_orient(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", "object_step_without_floor_orient", 0, top); - return 0; - } - - - extern s16 object_step_without_floor_orient(void); - lua_pushinteger(L, object_step_without_floor_orient()); - - return 1; -} - -int smlua_func_set_object_visibility(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", "set_object_visibility", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_flicker_and_disappear", 2, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_object_visibility"); return 0; } - s32 dist = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_object_visibility"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_flicker_and_disappear"); return 0; } + s16 lifeSpan = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_flicker_and_disappear"); return 0; } - extern void set_object_visibility(struct Object *obj, s32 dist); - set_object_visibility(obj, dist); + extern s8 obj_flicker_and_disappear(struct Object *obj, s16 lifeSpan); + lua_pushinteger(L, obj_flicker_and_disappear(obj, lifeSpan)); return 1; } -int smlua_func_set_yoshi_as_not_dead(UNUSED lua_State* L) { +int smlua_func_current_mario_room_check(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", "current_mario_room_check", 1, top); + return 0; + } + + s16 room = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "current_mario_room_check"); return 0; } + + extern s8 current_mario_room_check(s16 room); + lua_pushinteger(L, current_mario_room_check(room)); + + return 1; +} + +int smlua_func_obj_check_floor_death(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", "obj_check_floor_death", 2, top); + return 0; + } + + s16 collisionFlags = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_check_floor_death"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Surface* floor = (struct Surface*)smlua_to_cobject(L, 2, LOT_SURFACE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_check_floor_death"); return 0; } + + extern void obj_check_floor_death(s16 collisionFlags, struct Surface *floor); + obj_check_floor_death(collisionFlags, floor); + + return 1; +} + +int smlua_func_obj_lava_death(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", "set_yoshi_as_not_dead", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_lava_death", 0, top); return 0; } - extern void set_yoshi_as_not_dead(void); - set_yoshi_as_not_dead(); + extern s8 obj_lava_death(void); + lua_pushinteger(L, obj_lava_death()); return 1; } @@ -21832,83 +21962,197 @@ int smlua_func_spawn_orange_number(lua_State* L) { return 1; } -int smlua_func_turn_obj_away_from_steep_floor(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "turn_obj_away_from_steep_floor", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Surface* objFloor = (struct Surface*)smlua_to_cobject(L, 1, LOT_SURFACE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "turn_obj_away_from_steep_floor"); return 0; } - f32 floorY = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "turn_obj_away_from_steep_floor"); return 0; } - f32 objVelX = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "turn_obj_away_from_steep_floor"); return 0; } - f32 objVelZ = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "turn_obj_away_from_steep_floor"); return 0; } - - extern s8 turn_obj_away_from_steep_floor(struct Surface *objFloor, f32 floorY, f32 objVelX, f32 objVelZ); - lua_pushinteger(L, turn_obj_away_from_steep_floor(objFloor, floorY, objVelX, objVelZ)); - - return 1; -} - -int smlua_func_turn_obj_away_from_surface(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 7) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "turn_obj_away_from_surface", 7, top); - return 0; - } - - f32 velX = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "turn_obj_away_from_surface"); return 0; } - f32 velZ = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "turn_obj_away_from_surface"); return 0; } - f32 nX = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "turn_obj_away_from_surface"); return 0; } - f32 nY = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "turn_obj_away_from_surface"); return 0; } - f32 nZ = smlua_to_number(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "turn_obj_away_from_surface"); return 0; } - f32 * objYawX = (f32 *)smlua_to_cpointer(L, 6, LVT_F32_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "turn_obj_away_from_surface"); return 0; } - f32 * objYawZ = (f32 *)smlua_to_cpointer(L, 7, LVT_F32_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "turn_obj_away_from_surface"); return 0; } - - extern void turn_obj_away_from_surface(f32 velX, f32 velZ, f32 nX, UNUSED f32 nY, f32 nZ, f32 *objYawX, f32 *objYawZ); - turn_obj_away_from_surface(velX, velZ, nX, nY, nZ, objYawX, objYawZ); - - return 1; -} - /////////////////////// // obj_behaviors_2.c // /////////////////////// -int smlua_func_approach_f32_ptr(lua_State* L) { +int smlua_func_obj_is_rendering_enabled(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", "obj_is_rendering_enabled", 0, top); + return 0; + } + + + extern s32 obj_is_rendering_enabled(void); + lua_pushinteger(L, obj_is_rendering_enabled()); + + return 1; +} + +int smlua_func_obj_get_pitch_from_vel(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", "obj_get_pitch_from_vel", 0, top); + return 0; + } + + + extern s16 obj_get_pitch_from_vel(void); + lua_pushinteger(L, obj_get_pitch_from_vel()); + + return 1; +} + +int smlua_func_obj_set_dist_from_home(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_set_dist_from_home", 1, top); + return 0; + } + + f32 distFromHome = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_dist_from_home"); return 0; } + + extern void obj_set_dist_from_home(f32 distFromHome); + obj_set_dist_from_home(distFromHome); + + return 1; +} + +int smlua_func_obj_is_near_to_and_facing_mario(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", "approach_f32_ptr", 3, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_is_near_to_and_facing_mario", 3, top); return 0; } - f32 * px = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "approach_f32_ptr"); return 0; } - f32 target = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "approach_f32_ptr"); return 0; } - f32 delta = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "approach_f32_ptr"); return 0; } + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_is_near_to_and_facing_mario"); return 0; } + f32 maxDist = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_is_near_to_and_facing_mario"); return 0; } + s16 maxAngleDiff = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_is_near_to_and_facing_mario"); return 0; } - extern s32 approach_f32_ptr(f32 *px, f32 target, f32 delta); - lua_pushinteger(L, approach_f32_ptr(px, target, delta)); + extern s32 obj_is_near_to_and_facing_mario(struct MarioState* m, f32 maxDist, s16 maxAngleDiff); + lua_pushinteger(L, obj_is_near_to_and_facing_mario(m, maxDist, maxAngleDiff)); + + return 1; +} + +int smlua_func_platform_on_track_update_pos_or_spawn_ball(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "platform_on_track_update_pos_or_spawn_ball", 4, top); + return 0; + } + + s32 ballIndex = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "platform_on_track_update_pos_or_spawn_ball"); return 0; } + f32 x = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "platform_on_track_update_pos_or_spawn_ball"); return 0; } + f32 y = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "platform_on_track_update_pos_or_spawn_ball"); return 0; } + f32 z = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "platform_on_track_update_pos_or_spawn_ball"); return 0; } + + extern void platform_on_track_update_pos_or_spawn_ball(s32 ballIndex, f32 x, f32 y, f32 z); + platform_on_track_update_pos_or_spawn_ball(ballIndex, x, y, z); + + return 1; +} + +int smlua_func_cur_obj_spin_all_dimensions(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", "cur_obj_spin_all_dimensions", 2, top); + return 0; + } + + f32 arg0 = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_spin_all_dimensions"); return 0; } + f32 arg1 = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_spin_all_dimensions"); return 0; } + + extern void cur_obj_spin_all_dimensions(f32 arg0, f32 arg1); + cur_obj_spin_all_dimensions(arg0, arg1); + + return 1; +} + +int smlua_func_obj_rotate_yaw_and_bounce_off_walls(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", "obj_rotate_yaw_and_bounce_off_walls", 2, top); + return 0; + } + + s16 targetYaw = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_rotate_yaw_and_bounce_off_walls"); return 0; } + s16 turnAmount = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_rotate_yaw_and_bounce_off_walls"); return 0; } + + extern void obj_rotate_yaw_and_bounce_off_walls(s16 targetYaw, s16 turnAmount); + obj_rotate_yaw_and_bounce_off_walls(targetYaw, turnAmount); + + return 1; +} + +int smlua_func_obj_get_pitch_to_home(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_get_pitch_to_home", 1, top); + return 0; + } + + f32 latDistToHome = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_pitch_to_home"); return 0; } + + extern s16 obj_get_pitch_to_home(f32 latDistToHome); + lua_pushinteger(L, obj_get_pitch_to_home(latDistToHome)); + + return 1; +} + +int smlua_func_obj_compute_vel_from_move_pitch(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_compute_vel_from_move_pitch", 1, top); + return 0; + } + + f32 speed = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_compute_vel_from_move_pitch"); return 0; } + + extern void obj_compute_vel_from_move_pitch(f32 speed); + obj_compute_vel_from_move_pitch(speed); + + return 1; +} + +int smlua_func_cur_obj_init_anim_extend(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", "cur_obj_init_anim_extend", 1, top); + return 0; + } + + s32 arg0 = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_init_anim_extend"); return 0; } + + extern void cur_obj_init_anim_extend(s32 arg0); + cur_obj_init_anim_extend(arg0); return 1; } @@ -21951,20 +22195,20 @@ int smlua_func_cur_obj_init_anim_check_frame(lua_State* L) { return 1; } -int smlua_func_cur_obj_init_anim_extend(lua_State* L) { +int smlua_func_cur_obj_set_anim_if_at_end(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", "cur_obj_init_anim_extend", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_set_anim_if_at_end", 1, top); return 0; } s32 arg0 = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_init_anim_extend"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_anim_if_at_end"); return 0; } - extern void cur_obj_init_anim_extend(s32 arg0); - cur_obj_init_anim_extend(arg0); + extern s32 cur_obj_set_anim_if_at_end(s32 arg0); + lua_pushinteger(L, cur_obj_set_anim_if_at_end(arg0)); return 1; } @@ -21991,225 +22235,47 @@ int smlua_func_cur_obj_play_sound_at_anim_range(lua_State* L) { return 1; } -int smlua_func_cur_obj_set_anim_if_at_end(lua_State* L) { +int smlua_func_obj_turn_pitch_toward_mario(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", "cur_obj_set_anim_if_at_end", 1, top); - return 0; - } - - s32 arg0 = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_anim_if_at_end"); return 0; } - - extern s32 cur_obj_set_anim_if_at_end(s32 arg0); - lua_pushinteger(L, cur_obj_set_anim_if_at_end(arg0)); - - return 1; -} - -int smlua_func_cur_obj_spin_all_dimensions(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", "cur_obj_spin_all_dimensions", 2, top); - return 0; - } - - f32 arg0 = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_spin_all_dimensions"); return 0; } - f32 arg1 = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_spin_all_dimensions"); return 0; } - - extern void cur_obj_spin_all_dimensions(f32 arg0, f32 arg1); - cur_obj_spin_all_dimensions(arg0, arg1); - - return 1; -} - -int smlua_func_obj_act_knockback(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_act_knockback", 1, top); - return 0; - } - - f32 baseScale = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_act_knockback"); return 0; } - - extern void obj_act_knockback(UNUSED f32 baseScale); - obj_act_knockback(baseScale); - - return 1; -} - -int smlua_func_obj_act_squished(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_act_squished", 1, top); - return 0; - } - - f32 baseScale = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_act_squished"); return 0; } - - extern void obj_act_squished(f32 baseScale); - obj_act_squished(baseScale); - - return 1; -} - -int smlua_func_obj_bounce_off_walls_edges_objects(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_bounce_off_walls_edges_objects", 1, top); - return 0; - } - - s32 * targetYaw = (s32 *)smlua_to_cpointer(L, 1, LVT_S32_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_bounce_off_walls_edges_objects"); return 0; } - - extern s32 obj_bounce_off_walls_edges_objects(s32 *targetYaw); - lua_pushinteger(L, obj_bounce_off_walls_edges_objects(targetYaw)); - - return 1; -} - -int smlua_func_obj_check_attacks(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", "obj_check_attacks", 2, top); + if (top != 3) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_turn_pitch_toward_mario", 3, top); return 0; } if (lua_isnil(L, 1)) { return 0; } - struct ObjectHitbox* hitbox = (struct ObjectHitbox*)smlua_to_cobject(L, 1, LOT_OBJECTHITBOX); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_check_attacks"); return 0; } - s32 attackedMarioAction = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_check_attacks"); return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_turn_pitch_toward_mario"); return 0; } + f32 targetOffsetY = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_turn_pitch_toward_mario"); return 0; } + s16 turnAmount = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_turn_pitch_toward_mario"); return 0; } - extern s32 obj_check_attacks(struct ObjectHitbox *hitbox, s32 attackedMarioAction); - lua_pushinteger(L, obj_check_attacks(hitbox, attackedMarioAction)); + extern s16 obj_turn_pitch_toward_mario(struct MarioState* m, f32 targetOffsetY, s16 turnAmount); + lua_pushinteger(L, obj_turn_pitch_toward_mario(m, targetOffsetY, turnAmount)); return 1; } -int smlua_func_obj_compute_vel_from_move_pitch(lua_State* L) { +int smlua_func_approach_f32_ptr(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_compute_vel_from_move_pitch", 1, top); + if (top != 3) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "approach_f32_ptr", 3, top); return 0; } - f32 speed = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_compute_vel_from_move_pitch"); return 0; } + f32 * px = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "approach_f32_ptr"); return 0; } + f32 target = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "approach_f32_ptr"); return 0; } + f32 delta = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "approach_f32_ptr"); return 0; } - extern void obj_compute_vel_from_move_pitch(f32 speed); - obj_compute_vel_from_move_pitch(speed); - - return 1; -} - -int smlua_func_obj_die_if_above_lava_and_health_non_positive(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", "obj_die_if_above_lava_and_health_non_positive", 0, top); - return 0; - } - - - extern s32 obj_die_if_above_lava_and_health_non_positive(void); - lua_pushinteger(L, obj_die_if_above_lava_and_health_non_positive()); - - return 1; -} - -int smlua_func_obj_die_if_health_non_positive(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", "obj_die_if_health_non_positive", 0, top); - return 0; - } - - - extern void obj_die_if_health_non_positive(void); - obj_die_if_health_non_positive(); - - return 1; -} - -int smlua_func_obj_face_pitch_approach(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", "obj_face_pitch_approach", 2, top); - return 0; - } - - s16 targetPitch = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_face_pitch_approach"); return 0; } - s16 deltaPitch = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_face_pitch_approach"); return 0; } - - extern s32 obj_face_pitch_approach(s16 targetPitch, s16 deltaPitch); - lua_pushinteger(L, obj_face_pitch_approach(targetPitch, deltaPitch)); - - return 1; -} - -int smlua_func_obj_face_roll_approach(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", "obj_face_roll_approach", 2, top); - return 0; - } - - s16 targetRoll = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_face_roll_approach"); return 0; } - s16 deltaRoll = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_face_roll_approach"); return 0; } - - extern s32 obj_face_roll_approach(s16 targetRoll, s16 deltaRoll); - lua_pushinteger(L, obj_face_roll_approach(targetRoll, deltaRoll)); - - return 1; -} - -int smlua_func_obj_face_yaw_approach(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", "obj_face_yaw_approach", 2, top); - return 0; - } - - s16 targetYaw = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_face_yaw_approach"); return 0; } - s16 deltaYaw = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_face_yaw_approach"); return 0; } - - extern s32 obj_face_yaw_approach(s16 targetYaw, s16 deltaYaw); - lua_pushinteger(L, obj_face_yaw_approach(targetYaw, deltaYaw)); + extern s32 approach_f32_ptr(f32 *px, f32 target, f32 delta); + lua_pushinteger(L, approach_f32_ptr(px, target, delta)); return 1; } @@ -22234,138 +22300,22 @@ int smlua_func_obj_forward_vel_approach(lua_State* L) { return 1; } -int smlua_func_obj_get_pitch_from_vel(UNUSED lua_State* L) { +int smlua_func_obj_y_vel_approach(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", "obj_get_pitch_from_vel", 0, top); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_y_vel_approach", 2, top); return 0; } + f32 target = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_y_vel_approach"); return 0; } + f32 delta = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_y_vel_approach"); return 0; } - extern s16 obj_get_pitch_from_vel(void); - lua_pushinteger(L, obj_get_pitch_from_vel()); - - return 1; -} - -int smlua_func_obj_get_pitch_to_home(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_get_pitch_to_home", 1, top); - return 0; - } - - f32 latDistToHome = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_pitch_to_home"); return 0; } - - extern s16 obj_get_pitch_to_home(f32 latDistToHome); - lua_pushinteger(L, obj_get_pitch_to_home(latDistToHome)); - - return 1; -} - -int smlua_func_obj_grow_then_shrink(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", "obj_grow_then_shrink", 3, top); - return 0; - } - - f32 * scaleVel = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_grow_then_shrink"); return 0; } - f32 shootFireScale = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_grow_then_shrink"); return 0; } - f32 endScale = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_grow_then_shrink"); return 0; } - - extern s32 obj_grow_then_shrink(f32 *scaleVel, f32 shootFireScale, f32 endScale); - lua_pushinteger(L, obj_grow_then_shrink(scaleVel, shootFireScale, endScale)); - - return 1; -} - -int smlua_func_obj_handle_attacks(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", "obj_handle_attacks", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct ObjectHitbox* hitbox = (struct ObjectHitbox*)smlua_to_cobject(L, 1, LOT_OBJECTHITBOX); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_handle_attacks"); return 0; } - s32 attackedMarioAction = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_handle_attacks"); return 0; } - u8 * attackHandlers = (u8 *)smlua_to_cpointer(L, 3, LVT_U8_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_handle_attacks"); return 0; } - - extern s32 obj_handle_attacks(struct ObjectHitbox *hitbox, s32 attackedMarioAction, u8 *attackHandlers); - lua_pushinteger(L, obj_handle_attacks(hitbox, attackedMarioAction, attackHandlers)); - - return 1; -} - -int smlua_func_obj_is_near_to_and_facing_mario(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", "obj_is_near_to_and_facing_mario", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_is_near_to_and_facing_mario"); return 0; } - f32 maxDist = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_is_near_to_and_facing_mario"); return 0; } - s16 maxAngleDiff = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_is_near_to_and_facing_mario"); return 0; } - - extern s32 obj_is_near_to_and_facing_mario(struct MarioState* m, f32 maxDist, s16 maxAngleDiff); - lua_pushinteger(L, obj_is_near_to_and_facing_mario(m, maxDist, maxAngleDiff)); - - return 1; -} - -int smlua_func_obj_is_rendering_enabled(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", "obj_is_rendering_enabled", 0, top); - return 0; - } - - - extern s32 obj_is_rendering_enabled(void); - lua_pushinteger(L, obj_is_rendering_enabled()); - - return 1; -} - -int smlua_func_obj_move_for_one_second(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_move_for_one_second", 1, top); - return 0; - } - - s32 endAction = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_move_for_one_second"); return 0; } - - extern s32 obj_move_for_one_second(s32 endAction); - lua_pushinteger(L, obj_move_for_one_second(endAction)); + extern s32 obj_y_vel_approach(f32 target, f32 delta); + lua_pushinteger(L, obj_y_vel_approach(target, delta)); return 1; } @@ -22390,152 +22340,62 @@ int smlua_func_obj_move_pitch_approach(lua_State* L) { return 1; } -int smlua_func_obj_random_fixed_turn(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_random_fixed_turn", 1, top); - return 0; - } - - s16 delta = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_random_fixed_turn"); return 0; } - - extern s16 obj_random_fixed_turn(s16 delta); - lua_pushinteger(L, obj_random_fixed_turn(delta)); - - return 1; -} - -int smlua_func_obj_resolve_collisions_and_turn(lua_State* L) { +int smlua_func_obj_face_pitch_approach(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", "obj_resolve_collisions_and_turn", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_face_pitch_approach", 2, top); return 0; } - s16 targetYaw = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_resolve_collisions_and_turn"); return 0; } - s16 turnSpeed = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_resolve_collisions_and_turn"); return 0; } + s16 targetPitch = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_face_pitch_approach"); return 0; } + s16 deltaPitch = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_face_pitch_approach"); return 0; } - extern s32 obj_resolve_collisions_and_turn(s16 targetYaw, s16 turnSpeed); - lua_pushinteger(L, obj_resolve_collisions_and_turn(targetYaw, turnSpeed)); + extern s32 obj_face_pitch_approach(s16 targetPitch, s16 deltaPitch); + lua_pushinteger(L, obj_face_pitch_approach(targetPitch, deltaPitch)); return 1; } -int smlua_func_obj_resolve_object_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", "obj_resolve_object_collisions", 1, top); - return 0; - } - - s32 * targetYaw = (s32 *)smlua_to_cpointer(L, 1, LVT_S32_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_resolve_object_collisions"); return 0; } - - extern s32 obj_resolve_object_collisions(s32 *targetYaw); - lua_pushinteger(L, obj_resolve_object_collisions(targetYaw)); - - return 1; -} - -int smlua_func_obj_roll_to_match_yaw_turn(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", "obj_roll_to_match_yaw_turn", 3, top); - return 0; - } - - s16 targetYaw = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_roll_to_match_yaw_turn"); return 0; } - s16 maxRoll = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_roll_to_match_yaw_turn"); return 0; } - s16 rollSpeed = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_roll_to_match_yaw_turn"); return 0; } - - extern void obj_roll_to_match_yaw_turn(s16 targetYaw, s16 maxRoll, s16 rollSpeed); - obj_roll_to_match_yaw_turn(targetYaw, maxRoll, rollSpeed); - - return 1; -} - -int smlua_func_obj_rotate_yaw_and_bounce_off_walls(lua_State* L) { +int smlua_func_obj_face_yaw_approach(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", "obj_rotate_yaw_and_bounce_off_walls", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_face_yaw_approach", 2, top); return 0; } s16 targetYaw = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_rotate_yaw_and_bounce_off_walls"); return 0; } - s16 turnAmount = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_rotate_yaw_and_bounce_off_walls"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_face_yaw_approach"); return 0; } + s16 deltaYaw = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_face_yaw_approach"); return 0; } - extern void obj_rotate_yaw_and_bounce_off_walls(s16 targetYaw, s16 turnAmount); - obj_rotate_yaw_and_bounce_off_walls(targetYaw, turnAmount); + extern s32 obj_face_yaw_approach(s16 targetYaw, s16 deltaYaw); + lua_pushinteger(L, obj_face_yaw_approach(targetYaw, deltaYaw)); return 1; } -int smlua_func_obj_set_dist_from_home(lua_State* L) { +int smlua_func_obj_face_roll_approach(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_set_dist_from_home", 1, top); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_face_roll_approach", 2, top); return 0; } - f32 distFromHome = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_dist_from_home"); return 0; } + s16 targetRoll = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_face_roll_approach"); return 0; } + s16 deltaRoll = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_face_roll_approach"); return 0; } - extern void obj_set_dist_from_home(f32 distFromHome); - obj_set_dist_from_home(distFromHome); - - return 1; -} - -int smlua_func_obj_set_knockback_action(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_set_knockback_action", 1, top); - return 0; - } - - s32 attackType = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_knockback_action"); return 0; } - - extern void obj_set_knockback_action(s32 attackType); - obj_set_knockback_action(attackType); - - return 1; -} - -int smlua_func_obj_set_squished_action(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", "obj_set_squished_action", 0, top); - return 0; - } - - - extern void obj_set_squished_action(void); - obj_set_squished_action(); + extern s32 obj_face_roll_approach(s16 targetRoll, s16 deltaRoll); + lua_pushinteger(L, obj_face_roll_approach(targetRoll, deltaRoll)); return 1; } @@ -22570,187 +22430,24 @@ int smlua_func_obj_smooth_turn(lua_State* L) { return 1; } -int smlua_func_obj_spit_fire(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 8) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_spit_fire", 8, top); - return 0; - } - - s16 relativePosX = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_spit_fire"); return 0; } - s16 relativePosY = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_spit_fire"); return 0; } - s16 relativePosZ = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_spit_fire"); return 0; } - f32 scale = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_spit_fire"); return 0; } - s32 model = smlua_to_integer(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "obj_spit_fire"); return 0; } - f32 startSpeed = smlua_to_number(L, 6); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "obj_spit_fire"); return 0; } - f32 endSpeed = smlua_to_number(L, 7); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "obj_spit_fire"); return 0; } - s16 movePitch = smlua_to_integer(L, 8); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 8, "obj_spit_fire"); return 0; } - - extern struct Object* obj_spit_fire(s16 relativePosX, s16 relativePosY, s16 relativePosZ, f32 scale, s32 model, f32 startSpeed, f32 endSpeed, s16 movePitch); - smlua_push_object(L, LOT_OBJECT, obj_spit_fire(relativePosX, relativePosY, relativePosZ, scale, model, startSpeed, endSpeed, movePitch), NULL); - - return 1; -} - -int smlua_func_obj_turn_pitch_toward_mario(lua_State* L) { +int smlua_func_obj_roll_to_match_yaw_turn(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", "obj_turn_pitch_toward_mario", 3, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_roll_to_match_yaw_turn", 3, top); return 0; } - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_turn_pitch_toward_mario"); return 0; } - f32 targetOffsetY = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_turn_pitch_toward_mario"); return 0; } - s16 turnAmount = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_turn_pitch_toward_mario"); return 0; } + s16 targetYaw = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_roll_to_match_yaw_turn"); return 0; } + s16 maxRoll = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_roll_to_match_yaw_turn"); return 0; } + s16 rollSpeed = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_roll_to_match_yaw_turn"); return 0; } - extern s16 obj_turn_pitch_toward_mario(struct MarioState* m, f32 targetOffsetY, s16 turnAmount); - lua_pushinteger(L, obj_turn_pitch_toward_mario(m, targetOffsetY, turnAmount)); - - return 1; -} - -int smlua_func_obj_unused_die(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", "obj_unused_die", 0, top); - return 0; - } - - - extern void obj_unused_die(void); - obj_unused_die(); - - return 1; -} - -int smlua_func_obj_update_blinking(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_update_blinking", 4, top); - return 0; - } - - s32 * blinkTimer = (s32 *)smlua_to_cpointer(L, 1, LVT_S32_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_update_blinking"); return 0; } - s16 baseCycleLength = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_update_blinking"); return 0; } - s16 cycleLengthRange = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_update_blinking"); return 0; } - s16 blinkLength = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_update_blinking"); return 0; } - - extern void obj_update_blinking(s32 *blinkTimer, s16 baseCycleLength, s16 cycleLengthRange, s16 blinkLength); - obj_update_blinking(blinkTimer, baseCycleLength, cycleLengthRange, blinkLength); - - return 1; -} - -int smlua_func_obj_update_standard_actions(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_update_standard_actions", 1, top); - return 0; - } - - f32 scale = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_update_standard_actions"); return 0; } - - extern s32 obj_update_standard_actions(f32 scale); - lua_pushinteger(L, obj_update_standard_actions(scale)); - - return 1; -} - -int smlua_func_obj_y_vel_approach(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", "obj_y_vel_approach", 2, top); - return 0; - } - - f32 target = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_y_vel_approach"); return 0; } - f32 delta = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_y_vel_approach"); return 0; } - - extern s32 obj_y_vel_approach(f32 target, f32 delta); - lua_pushinteger(L, obj_y_vel_approach(target, delta)); - - return 1; -} - -int smlua_func_oscillate_toward(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 6) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "oscillate_toward", 6, top); - return 0; - } - - s32 * value = (s32 *)smlua_to_cpointer(L, 1, LVT_S32_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "oscillate_toward"); return 0; } - f32 * vel = (f32 *)smlua_to_cpointer(L, 2, LVT_F32_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "oscillate_toward"); return 0; } - s32 target = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "oscillate_toward"); return 0; } - f32 velCloseToZero = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "oscillate_toward"); return 0; } - f32 accel = smlua_to_number(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "oscillate_toward"); return 0; } - f32 slowdown = smlua_to_number(L, 6); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "oscillate_toward"); return 0; } - - extern s32 oscillate_toward(s32 *value, f32 *vel, s32 target, f32 velCloseToZero, f32 accel, f32 slowdown); - lua_pushinteger(L, oscillate_toward(value, vel, target, velCloseToZero, accel, slowdown)); - - return 1; -} - -int smlua_func_platform_on_track_update_pos_or_spawn_ball(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "platform_on_track_update_pos_or_spawn_ball", 4, top); - return 0; - } - - s32 ballIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "platform_on_track_update_pos_or_spawn_ball"); return 0; } - f32 x = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "platform_on_track_update_pos_or_spawn_ball"); return 0; } - f32 y = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "platform_on_track_update_pos_or_spawn_ball"); return 0; } - f32 z = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "platform_on_track_update_pos_or_spawn_ball"); return 0; } - - extern void platform_on_track_update_pos_or_spawn_ball(s32 ballIndex, f32 x, f32 y, f32 z); - platform_on_track_update_pos_or_spawn_ball(ballIndex, x, y, z); + extern void obj_roll_to_match_yaw_turn(s16 targetYaw, s16 maxRoll, s16 rollSpeed); + obj_roll_to_match_yaw_turn(targetYaw, maxRoll, rollSpeed); return 1; } @@ -22797,6 +22494,352 @@ int smlua_func_random_mod_offset(lua_State* L) { return 1; } +int smlua_func_obj_random_fixed_turn(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_random_fixed_turn", 1, top); + return 0; + } + + s16 delta = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_random_fixed_turn"); return 0; } + + extern s16 obj_random_fixed_turn(s16 delta); + lua_pushinteger(L, obj_random_fixed_turn(delta)); + + return 1; +} + +int smlua_func_obj_grow_then_shrink(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", "obj_grow_then_shrink", 3, top); + return 0; + } + + f32 * scaleVel = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_grow_then_shrink"); return 0; } + f32 shootFireScale = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_grow_then_shrink"); return 0; } + f32 endScale = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_grow_then_shrink"); return 0; } + + extern s32 obj_grow_then_shrink(f32 *scaleVel, f32 shootFireScale, f32 endScale); + lua_pushinteger(L, obj_grow_then_shrink(scaleVel, shootFireScale, endScale)); + + return 1; +} + +int smlua_func_oscillate_toward(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 6) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "oscillate_toward", 6, top); + return 0; + } + + s32 * value = (s32 *)smlua_to_cpointer(L, 1, LVT_S32_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "oscillate_toward"); return 0; } + f32 * vel = (f32 *)smlua_to_cpointer(L, 2, LVT_F32_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "oscillate_toward"); return 0; } + s32 target = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "oscillate_toward"); return 0; } + f32 velCloseToZero = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "oscillate_toward"); return 0; } + f32 accel = smlua_to_number(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "oscillate_toward"); return 0; } + f32 slowdown = smlua_to_number(L, 6); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "oscillate_toward"); return 0; } + + extern s32 oscillate_toward(s32 *value, f32 *vel, s32 target, f32 velCloseToZero, f32 accel, f32 slowdown); + lua_pushinteger(L, oscillate_toward(value, vel, target, velCloseToZero, accel, slowdown)); + + return 1; +} + +int smlua_func_obj_update_blinking(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_update_blinking", 4, top); + return 0; + } + + s32 * blinkTimer = (s32 *)smlua_to_cpointer(L, 1, LVT_S32_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_update_blinking"); return 0; } + s16 baseCycleLength = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_update_blinking"); return 0; } + s16 cycleLengthRange = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_update_blinking"); return 0; } + s16 blinkLength = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_update_blinking"); return 0; } + + extern void obj_update_blinking(s32 *blinkTimer, s16 baseCycleLength, s16 cycleLengthRange, s16 blinkLength); + obj_update_blinking(blinkTimer, baseCycleLength, cycleLengthRange, blinkLength); + + return 1; +} + +int smlua_func_obj_resolve_object_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", "obj_resolve_object_collisions", 1, top); + return 0; + } + + s32 * targetYaw = (s32 *)smlua_to_cpointer(L, 1, LVT_S32_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_resolve_object_collisions"); return 0; } + + extern s32 obj_resolve_object_collisions(s32 *targetYaw); + lua_pushinteger(L, obj_resolve_object_collisions(targetYaw)); + + return 1; +} + +int smlua_func_obj_bounce_off_walls_edges_objects(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_bounce_off_walls_edges_objects", 1, top); + return 0; + } + + s32 * targetYaw = (s32 *)smlua_to_cpointer(L, 1, LVT_S32_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_bounce_off_walls_edges_objects"); return 0; } + + extern s32 obj_bounce_off_walls_edges_objects(s32 *targetYaw); + lua_pushinteger(L, obj_bounce_off_walls_edges_objects(targetYaw)); + + return 1; +} + +int smlua_func_obj_resolve_collisions_and_turn(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", "obj_resolve_collisions_and_turn", 2, top); + return 0; + } + + s16 targetYaw = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_resolve_collisions_and_turn"); return 0; } + s16 turnSpeed = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_resolve_collisions_and_turn"); return 0; } + + extern s32 obj_resolve_collisions_and_turn(s16 targetYaw, s16 turnSpeed); + lua_pushinteger(L, obj_resolve_collisions_and_turn(targetYaw, turnSpeed)); + + return 1; +} + +int smlua_func_obj_die_if_health_non_positive(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", "obj_die_if_health_non_positive", 0, top); + return 0; + } + + + extern void obj_die_if_health_non_positive(void); + obj_die_if_health_non_positive(); + + return 1; +} + +int smlua_func_obj_unused_die(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", "obj_unused_die", 0, top); + return 0; + } + + + extern void obj_unused_die(void); + obj_unused_die(); + + return 1; +} + +int smlua_func_obj_set_knockback_action(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_set_knockback_action", 1, top); + return 0; + } + + s32 attackType = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_knockback_action"); return 0; } + + extern void obj_set_knockback_action(s32 attackType); + obj_set_knockback_action(attackType); + + return 1; +} + +int smlua_func_obj_set_squished_action(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", "obj_set_squished_action", 0, top); + return 0; + } + + + extern void obj_set_squished_action(void); + obj_set_squished_action(); + + return 1; +} + +int smlua_func_obj_die_if_above_lava_and_health_non_positive(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", "obj_die_if_above_lava_and_health_non_positive", 0, top); + return 0; + } + + + extern s32 obj_die_if_above_lava_and_health_non_positive(void); + lua_pushinteger(L, obj_die_if_above_lava_and_health_non_positive()); + + return 1; +} + +int smlua_func_obj_handle_attacks(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", "obj_handle_attacks", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct ObjectHitbox* hitbox = (struct ObjectHitbox*)smlua_to_cobject(L, 1, LOT_OBJECTHITBOX); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_handle_attacks"); return 0; } + s32 attackedMarioAction = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_handle_attacks"); return 0; } + u8 * attackHandlers = (u8 *)smlua_to_cpointer(L, 3, LVT_U8_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_handle_attacks"); return 0; } + + extern s32 obj_handle_attacks(struct ObjectHitbox *hitbox, s32 attackedMarioAction, u8 *attackHandlers); + lua_pushinteger(L, obj_handle_attacks(hitbox, attackedMarioAction, attackHandlers)); + + return 1; +} + +int smlua_func_obj_act_knockback(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_act_knockback", 1, top); + return 0; + } + + f32 baseScale = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_act_knockback"); return 0; } + + extern void obj_act_knockback(UNUSED f32 baseScale); + obj_act_knockback(baseScale); + + return 1; +} + +int smlua_func_obj_act_squished(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_act_squished", 1, top); + return 0; + } + + f32 baseScale = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_act_squished"); return 0; } + + extern void obj_act_squished(f32 baseScale); + obj_act_squished(baseScale); + + return 1; +} + +int smlua_func_obj_update_standard_actions(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_update_standard_actions", 1, top); + return 0; + } + + f32 scale = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_update_standard_actions"); return 0; } + + extern s32 obj_update_standard_actions(f32 scale); + lua_pushinteger(L, obj_update_standard_actions(scale)); + + return 1; +} + +int smlua_func_obj_check_attacks(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", "obj_check_attacks", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct ObjectHitbox* hitbox = (struct ObjectHitbox*)smlua_to_cobject(L, 1, LOT_OBJECTHITBOX); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_check_attacks"); return 0; } + s32 attackedMarioAction = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_check_attacks"); return 0; } + + extern s32 obj_check_attacks(struct ObjectHitbox *hitbox, s32 attackedMarioAction); + lua_pushinteger(L, obj_check_attacks(hitbox, attackedMarioAction)); + + return 1; +} + +int smlua_func_obj_move_for_one_second(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_move_for_one_second", 1, top); + return 0; + } + + s32 endAction = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_move_for_one_second"); return 0; } + + extern s32 obj_move_for_one_second(s32 endAction); + lua_pushinteger(L, obj_move_for_one_second(endAction)); + + return 1; +} + int smlua_func_treat_far_home_as_mario(lua_State* L) { if (L == NULL) { return 0; } @@ -22819,46 +22862,406 @@ int smlua_func_treat_far_home_as_mario(lua_State* L) { return 1; } - ////////////////////// - // object_helpers.c // -////////////////////// - -int smlua_func_abs_angle_diff(lua_State* L) { +int smlua_func_obj_spit_fire(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", "abs_angle_diff", 2, top); + if (top != 8) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_spit_fire", 8, top); return 0; } - s16 x0 = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "abs_angle_diff"); return 0; } - s16 x1 = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "abs_angle_diff"); return 0; } + s16 relativePosX = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_spit_fire"); return 0; } + s16 relativePosY = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_spit_fire"); return 0; } + s16 relativePosZ = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_spit_fire"); return 0; } + f32 scale = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_spit_fire"); return 0; } + s32 model = smlua_to_integer(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "obj_spit_fire"); return 0; } + f32 startSpeed = smlua_to_number(L, 6); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "obj_spit_fire"); return 0; } + f32 endSpeed = smlua_to_number(L, 7); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "obj_spit_fire"); return 0; } + s16 movePitch = smlua_to_integer(L, 8); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 8, "obj_spit_fire"); return 0; } - extern s16 abs_angle_diff(s16 x0, s16 x1); - lua_pushinteger(L, abs_angle_diff(x0, x1)); + extern struct Object* obj_spit_fire(s16 relativePosX, s16 relativePosY, s16 relativePosZ, f32 scale, s32 model, f32 startSpeed, f32 endSpeed, s16 movePitch); + smlua_push_object(L, LOT_OBJECT, obj_spit_fire(relativePosX, relativePosY, relativePosZ, scale, model, startSpeed, endSpeed, movePitch), NULL); return 1; } -int smlua_func_apply_drag_to_value(lua_State* L) { + ////////////////////// + // object_helpers.c // +////////////////////// + +int smlua_func_clear_move_flag(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", "apply_drag_to_value", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "clear_move_flag", 2, top); return 0; } - f32 * value = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "apply_drag_to_value"); return 0; } - f32 dragStrength = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "apply_drag_to_value"); return 0; } + u32 * bitSet = (u32 *)smlua_to_cpointer(L, 1, LVT_U32_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "clear_move_flag"); return 0; } + s32 flag = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "clear_move_flag"); return 0; } - extern void apply_drag_to_value(f32 *value, f32 dragStrength); - apply_drag_to_value(value, dragStrength); + extern s32 clear_move_flag(u32 *bitSet, s32 flag); + lua_pushinteger(L, clear_move_flag(bitSet, flag)); + + return 1; +} + +/* +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; } + if (lua_isnil(L, 2)) { 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); + + smlua_push_mat4(mtx, 3); + + 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; } + if (lua_isnil(L, 2)) { 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; } + if (lua_isnil(L, 3)) { 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; } + if (lua_isnil(L, 2)) { 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; } + + int top = lua_gettop(L); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_room_override", 1, top); + return 0; + } + + s16 room = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_room_override"); return 0; } + + extern void set_room_override(s16 room); + set_room_override(room); + + 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; } + if (lua_isnil(L, 2)) { 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; } + if (lua_isnil(L, 2)) { 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); + + smlua_push_mat4(mtx, 3); + + return 1; +} +*/ + +int smlua_func_obj_update_pos_from_parent_transformation(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", "obj_update_pos_from_parent_transformation", 2, top); + return 0; + } + + + Mat4 a0; + smlua_get_mat4(a0, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_update_pos_from_parent_transformation"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* a1 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_update_pos_from_parent_transformation"); return 0; } + + extern void obj_update_pos_from_parent_transformation(Mat4 a0, struct Object *a1); + obj_update_pos_from_parent_transformation(a0, a1); + + smlua_push_mat4(a0, 1); + + return 1; +} + +int smlua_func_obj_apply_scale_to_matrix(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", "obj_apply_scale_to_matrix", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_apply_scale_to_matrix"); return 0; } + + Mat4 dst; + smlua_get_mat4(dst, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_apply_scale_to_matrix"); return 0; } + + Mat4 src; + smlua_get_mat4(src, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_apply_scale_to_matrix"); return 0; } + + extern void obj_apply_scale_to_matrix(struct Object *obj, Mat4 dst, Mat4 src); + obj_apply_scale_to_matrix(obj, dst, src); + + smlua_push_mat4(dst, 2); + + smlua_push_mat4(src, 3); + + return 1; +} + +int smlua_func_create_transformation_from_matrices(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", "create_transformation_from_matrices", 3, top); + return 0; + } + + + Mat4 a0; + smlua_get_mat4(a0, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "create_transformation_from_matrices"); return 0; } + + Mat4 a1; + smlua_get_mat4(a1, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "create_transformation_from_matrices"); return 0; } + + Mat4 a2; + smlua_get_mat4(a2, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "create_transformation_from_matrices"); return 0; } + + extern void create_transformation_from_matrices(Mat4 a0, Mat4 a1, Mat4 a2); + create_transformation_from_matrices(a0, a1, a2); + + smlua_push_mat4(a0, 1); + + smlua_push_mat4(a1, 2); + + smlua_push_mat4(a2, 3); + + return 1; +} + +int smlua_func_obj_set_held_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", "obj_set_held_state", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_held_state"); return 0; } + BehaviorScript * heldBehavior = (BehaviorScript *)smlua_to_cpointer(L, 2, LVT_BEHAVIORSCRIPT_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_held_state"); return 0; } + + extern void obj_set_held_state(struct Object *obj, const BehaviorScript *heldBehavior); + obj_set_held_state(obj, heldBehavior); + + return 1; +} + +int smlua_func_lateral_dist_between_objects(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", "lateral_dist_between_objects", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "lateral_dist_between_objects"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "lateral_dist_between_objects"); return 0; } + + extern f32 lateral_dist_between_objects(struct Object *obj1, struct Object *obj2); + lua_pushnumber(L, lateral_dist_between_objects(obj1, obj2)); + + return 1; +} + +int smlua_func_dist_between_objects(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", "dist_between_objects", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "dist_between_objects"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "dist_between_objects"); return 0; } + + extern f32 dist_between_objects(struct Object *obj1, struct Object *obj2); + lua_pushnumber(L, dist_between_objects(obj1, obj2)); + + return 1; +} + +int smlua_func_dist_between_object_and_point(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "dist_between_object_and_point", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "dist_between_object_and_point"); return 0; } + f32 pointX = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "dist_between_object_and_point"); return 0; } + f32 pointY = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "dist_between_object_and_point"); return 0; } + f32 pointZ = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "dist_between_object_and_point"); return 0; } + + extern f32 dist_between_object_and_point(struct Object *obj, f32 pointX, f32 pointY, f32 pointZ); + lua_pushnumber(L, dist_between_object_and_point(obj, pointX, pointY, pointZ)); + + return 1; +} + +int smlua_func_cur_obj_forward_vel_approach_upward(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", "cur_obj_forward_vel_approach_upward", 2, top); + return 0; + } + + f32 target = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_forward_vel_approach_upward"); return 0; } + f32 increment = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_forward_vel_approach_upward"); return 0; } + + extern void cur_obj_forward_vel_approach_upward(f32 target, f32 increment); + cur_obj_forward_vel_approach_upward(target, increment); return 1; } @@ -22929,1601 +23332,6 @@ int smlua_func_approach_s16_symmetric(lua_State* L) { return 1; } -int smlua_func_bhv_dust_smoke_loop(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", "bhv_dust_smoke_loop", 0, top); - return 0; - } - - - extern void bhv_dust_smoke_loop(void); - bhv_dust_smoke_loop(); - - return 1; -} - -int smlua_func_bhv_init_room(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", "bhv_init_room", 0, top); - return 0; - } - - - extern void bhv_init_room(void); - bhv_init_room(); - - return 1; -} - -int smlua_func_bit_shift_left(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", "bit_shift_left", 1, top); - return 0; - } - - s32 a0 = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "bit_shift_left"); return 0; } - - extern s32 bit_shift_left(s32 a0); - lua_pushinteger(L, bit_shift_left(a0)); - - return 1; -} - -int smlua_func_chain_segment_init(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", "chain_segment_init", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct ChainSegment* segment = (struct ChainSegment*)smlua_to_cobject(L, 1, LOT_CHAINSEGMENT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "chain_segment_init"); return 0; } - - extern void chain_segment_init(struct ChainSegment *segment); - chain_segment_init(segment); - - return 1; -} - -int smlua_func_clear_move_flag(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", "clear_move_flag", 2, top); - return 0; - } - - u32 * bitSet = (u32 *)smlua_to_cpointer(L, 1, LVT_U32_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "clear_move_flag"); return 0; } - s32 flag = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "clear_move_flag"); return 0; } - - extern s32 clear_move_flag(u32 *bitSet, s32 flag); - lua_pushinteger(L, clear_move_flag(bitSet, flag)); - - return 1; -} - -int smlua_func_clear_time_stop_flags(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", "clear_time_stop_flags", 1, top); - return 0; - } - - s32 flags = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "clear_time_stop_flags"); return 0; } - - extern void clear_time_stop_flags(s32 flags); - clear_time_stop_flags(flags); - - return 1; -} - -int smlua_func_count_objects_with_behavior(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", "count_objects_with_behavior", 1, top); - return 0; - } - - BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "count_objects_with_behavior"); return 0; } - - extern s32 count_objects_with_behavior(const BehaviorScript *behavior); - lua_pushinteger(L, count_objects_with_behavior(behavior)); - - return 1; -} - -int smlua_func_count_unimportant_objects(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", "count_unimportant_objects", 0, top); - return 0; - } - - - extern s32 count_unimportant_objects(void); - lua_pushinteger(L, count_unimportant_objects()); - - return 1; -} - -int smlua_func_create_transformation_from_matrices(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", "create_transformation_from_matrices", 3, top); - return 0; - } - - - Mat4 a0; - smlua_get_mat4(a0, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "create_transformation_from_matrices"); return 0; } - - Mat4 a1; - smlua_get_mat4(a1, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "create_transformation_from_matrices"); return 0; } - - Mat4 a2; - smlua_get_mat4(a2, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "create_transformation_from_matrices"); return 0; } - - extern void create_transformation_from_matrices(Mat4 a0, Mat4 a1, Mat4 a2); - create_transformation_from_matrices(a0, a1, a2); - - smlua_push_mat4(a0, 1); - - smlua_push_mat4(a1, 2); - - smlua_push_mat4(a2, 3); - - return 1; -} - -int smlua_func_cur_obj_abs_y_dist_to_home(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", "cur_obj_abs_y_dist_to_home", 0, top); - return 0; - } - - - extern f32 cur_obj_abs_y_dist_to_home(void); - lua_pushnumber(L, cur_obj_abs_y_dist_to_home()); - - return 1; -} - -int smlua_func_cur_obj_advance_looping_anim(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", "cur_obj_advance_looping_anim", 0, top); - return 0; - } - - - extern s32 cur_obj_advance_looping_anim(void); - lua_pushinteger(L, cur_obj_advance_looping_anim()); - - return 1; -} - -int smlua_func_cur_obj_align_gfx_with_floor(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", "cur_obj_align_gfx_with_floor", 0, top); - return 0; - } - - - extern void cur_obj_align_gfx_with_floor(void); - cur_obj_align_gfx_with_floor(); - - return 1; -} - -int smlua_func_cur_obj_angle_to_home(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", "cur_obj_angle_to_home", 0, top); - return 0; - } - - - extern s16 cur_obj_angle_to_home(void); - lua_pushinteger(L, cur_obj_angle_to_home()); - - return 1; -} - -int smlua_func_cur_obj_apply_drag_xz(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", "cur_obj_apply_drag_xz", 1, top); - return 0; - } - - f32 dragStrength = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_apply_drag_xz"); return 0; } - - extern void cur_obj_apply_drag_xz(f32 dragStrength); - cur_obj_apply_drag_xz(dragStrength); - - return 1; -} - -int smlua_func_cur_obj_become_intangible(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", "cur_obj_become_intangible", 0, top); - return 0; - } - - - extern void cur_obj_become_intangible(void); - cur_obj_become_intangible(); - - return 1; -} - -int smlua_func_cur_obj_become_tangible(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", "cur_obj_become_tangible", 0, top); - return 0; - } - - - extern void cur_obj_become_tangible(void); - cur_obj_become_tangible(); - - return 1; -} - -int smlua_func_cur_obj_can_mario_activate_textbox(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_can_mario_activate_textbox", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_can_mario_activate_textbox"); return 0; } - f32 radius = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_can_mario_activate_textbox"); return 0; } - f32 height = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_can_mario_activate_textbox"); return 0; } - s32 unused = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "cur_obj_can_mario_activate_textbox"); return 0; } - - extern s32 cur_obj_can_mario_activate_textbox(struct MarioState* m, f32 radius, f32 height, UNUSED s32 unused); - lua_pushinteger(L, cur_obj_can_mario_activate_textbox(m, radius, height, unused)); - - return 1; -} - -int smlua_func_cur_obj_can_mario_activate_textbox_2(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", "cur_obj_can_mario_activate_textbox_2", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_can_mario_activate_textbox_2"); return 0; } - f32 radius = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_can_mario_activate_textbox_2"); return 0; } - f32 height = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_can_mario_activate_textbox_2"); return 0; } - - extern s32 cur_obj_can_mario_activate_textbox_2(struct MarioState* m, f32 radius, f32 height); - lua_pushinteger(L, cur_obj_can_mario_activate_textbox_2(m, radius, height)); - - return 1; -} - -int smlua_func_cur_obj_change_action(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", "cur_obj_change_action", 1, top); - return 0; - } - - s32 action = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_change_action"); return 0; } - - extern void cur_obj_change_action(s32 action); - cur_obj_change_action(action); - - return 1; -} - -int smlua_func_cur_obj_check_anim_frame(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", "cur_obj_check_anim_frame", 1, top); - return 0; - } - - s32 frame = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_check_anim_frame"); return 0; } - - extern s32 cur_obj_check_anim_frame(s32 frame); - lua_pushinteger(L, cur_obj_check_anim_frame(frame)); - - return 1; -} - -int smlua_func_cur_obj_check_anim_frame_in_range(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", "cur_obj_check_anim_frame_in_range", 2, top); - return 0; - } - - s32 startFrame = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_check_anim_frame_in_range"); return 0; } - s32 rangeLength = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_check_anim_frame_in_range"); return 0; } - - extern s32 cur_obj_check_anim_frame_in_range(s32 startFrame, s32 rangeLength); - lua_pushinteger(L, cur_obj_check_anim_frame_in_range(startFrame, rangeLength)); - - return 1; -} - -int smlua_func_cur_obj_check_frame_prior_current_frame(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", "cur_obj_check_frame_prior_current_frame", 1, top); - return 0; - } - - s16 * a0 = (s16 *)smlua_to_cpointer(L, 1, LVT_S16_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_check_frame_prior_current_frame"); return 0; } - - extern s32 cur_obj_check_frame_prior_current_frame(s16 *a0); - lua_pushinteger(L, cur_obj_check_frame_prior_current_frame(a0)); - - return 1; -} - -int smlua_func_cur_obj_check_grabbed_mario(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", "cur_obj_check_grabbed_mario", 0, top); - return 0; - } - - - extern s32 cur_obj_check_grabbed_mario(void); - lua_pushinteger(L, cur_obj_check_grabbed_mario()); - - return 1; -} - -int smlua_func_cur_obj_check_if_at_animation_end(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", "cur_obj_check_if_at_animation_end", 0, top); - return 0; - } - - - extern s32 cur_obj_check_if_at_animation_end(void); - lua_pushinteger(L, cur_obj_check_if_at_animation_end()); - - return 1; -} - -int smlua_func_cur_obj_check_if_near_animation_end(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", "cur_obj_check_if_near_animation_end", 0, top); - return 0; - } - - - extern s32 cur_obj_check_if_near_animation_end(void); - lua_pushinteger(L, cur_obj_check_if_near_animation_end()); - - return 1; -} - -int smlua_func_cur_obj_check_interacted(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", "cur_obj_check_interacted", 0, top); - return 0; - } - - - extern s32 cur_obj_check_interacted(void); - lua_pushinteger(L, cur_obj_check_interacted()); - - return 1; -} - -int smlua_func_cur_obj_clear_interact_status_flag(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", "cur_obj_clear_interact_status_flag", 1, top); - return 0; - } - - s32 flag = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_clear_interact_status_flag"); return 0; } - - extern s32 cur_obj_clear_interact_status_flag(s32 flag); - lua_pushinteger(L, cur_obj_clear_interact_status_flag(flag)); - - return 1; -} - -int smlua_func_cur_obj_compute_vel_xz(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", "cur_obj_compute_vel_xz", 0, top); - return 0; - } - - - extern void cur_obj_compute_vel_xz(void); - cur_obj_compute_vel_xz(); - - return 1; -} - -int smlua_func_cur_obj_count_objects_with_behavior(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", "cur_obj_count_objects_with_behavior", 2, top); - return 0; - } - - BehaviorScript* behavior = (BehaviorScript*)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_count_objects_with_behavior"); return 0; } - f32 dist = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_count_objects_with_behavior"); return 0; } - - extern u16 cur_obj_count_objects_with_behavior(const BehaviorScript* behavior, f32 dist); - lua_pushinteger(L, cur_obj_count_objects_with_behavior(behavior, dist)); - - return 1; -} - -int smlua_func_cur_obj_detect_steep_floor(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", "cur_obj_detect_steep_floor", 1, top); - return 0; - } - - s16 steepAngleDegrees = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_detect_steep_floor"); return 0; } - - extern s32 cur_obj_detect_steep_floor(s16 steepAngleDegrees); - lua_pushinteger(L, cur_obj_detect_steep_floor(steepAngleDegrees)); - - return 1; -} - -int smlua_func_cur_obj_disable(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", "cur_obj_disable", 0, top); - return 0; - } - - - extern void cur_obj_disable(void); - cur_obj_disable(); - - return 1; -} - -int smlua_func_cur_obj_disable_rendering(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", "cur_obj_disable_rendering", 0, top); - return 0; - } - - - extern void cur_obj_disable_rendering(void); - cur_obj_disable_rendering(); - - return 1; -} - -int smlua_func_cur_obj_disable_rendering_and_become_intangible(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", "cur_obj_disable_rendering_and_become_intangible", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_disable_rendering_and_become_intangible"); return 0; } - - extern void cur_obj_disable_rendering_and_become_intangible(struct Object *obj); - cur_obj_disable_rendering_and_become_intangible(obj); - - return 1; -} - -int smlua_func_cur_obj_dist_to_nearest_object_with_behavior(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", "cur_obj_dist_to_nearest_object_with_behavior", 1, top); - return 0; - } - - BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_dist_to_nearest_object_with_behavior"); return 0; } - - extern f32 cur_obj_dist_to_nearest_object_with_behavior(const BehaviorScript *behavior); - lua_pushnumber(L, cur_obj_dist_to_nearest_object_with_behavior(behavior)); - - return 1; -} - -int smlua_func_cur_obj_enable_rendering(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", "cur_obj_enable_rendering", 0, top); - return 0; - } - - - extern void cur_obj_enable_rendering(void); - cur_obj_enable_rendering(); - - return 1; -} - -int smlua_func_cur_obj_enable_rendering_2(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", "cur_obj_enable_rendering_2", 0, top); - return 0; - } - - - extern void cur_obj_enable_rendering_2(void); - cur_obj_enable_rendering_2(); - - return 1; -} - -int smlua_func_cur_obj_enable_rendering_and_become_tangible(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", "cur_obj_enable_rendering_and_become_tangible", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_enable_rendering_and_become_tangible"); return 0; } - - extern void cur_obj_enable_rendering_and_become_tangible(struct Object *obj); - cur_obj_enable_rendering_and_become_tangible(obj); - - return 1; -} - -int smlua_func_cur_obj_enable_rendering_if_mario_in_room(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", "cur_obj_enable_rendering_if_mario_in_room", 0, top); - return 0; - } - - - extern void cur_obj_enable_rendering_if_mario_in_room(void); - cur_obj_enable_rendering_if_mario_in_room(); - - return 1; -} - -int smlua_func_cur_obj_end_dialog(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", "cur_obj_end_dialog", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_end_dialog"); return 0; } - s32 dialogFlags = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_end_dialog"); return 0; } - s32 dialogResult = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_end_dialog"); return 0; } - - extern void cur_obj_end_dialog(struct MarioState* m, s32 dialogFlags, s32 dialogResult); - cur_obj_end_dialog(m, dialogFlags, dialogResult); - - return 1; -} - -int smlua_func_cur_obj_extend_animation_if_at_end(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", "cur_obj_extend_animation_if_at_end", 0, top); - return 0; - } - - - extern void cur_obj_extend_animation_if_at_end(void); - cur_obj_extend_animation_if_at_end(); - - return 1; -} - -int smlua_func_cur_obj_find_nearby_held_actor(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", "cur_obj_find_nearby_held_actor", 2, top); - return 0; - } - - BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_find_nearby_held_actor"); return 0; } - f32 maxDist = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_find_nearby_held_actor"); return 0; } - - extern struct Object *cur_obj_find_nearby_held_actor(const BehaviorScript *behavior, f32 maxDist); - smlua_push_object(L, LOT_OBJECT, cur_obj_find_nearby_held_actor(behavior, maxDist), NULL); - - return 1; -} - -int smlua_func_cur_obj_find_nearest_object_with_behavior(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", "cur_obj_find_nearest_object_with_behavior", 2, top); - return 0; - } - - BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_find_nearest_object_with_behavior"); return 0; } - f32 * dist = (f32 *)smlua_to_cpointer(L, 2, LVT_F32_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_find_nearest_object_with_behavior"); return 0; } - - extern struct Object *cur_obj_find_nearest_object_with_behavior(const BehaviorScript *behavior, f32 *dist); - smlua_push_object(L, LOT_OBJECT, cur_obj_find_nearest_object_with_behavior(behavior, dist), NULL); - - return 1; -} - -int smlua_func_cur_obj_find_nearest_pole(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", "cur_obj_find_nearest_pole", 0, top); - return 0; - } - - - extern struct Object* cur_obj_find_nearest_pole(void); - smlua_push_object(L, LOT_OBJECT, cur_obj_find_nearest_pole(), NULL); - - return 1; -} - -int smlua_func_cur_obj_follow_path(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", "cur_obj_follow_path", 1, top); - return 0; - } - - s32 unusedArg = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_follow_path"); return 0; } - - extern s32 cur_obj_follow_path(UNUSED s32 unusedArg); - lua_pushinteger(L, cur_obj_follow_path(unusedArg)); - - return 1; -} - -int smlua_func_cur_obj_forward_vel_approach_upward(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", "cur_obj_forward_vel_approach_upward", 2, top); - return 0; - } - - f32 target = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_forward_vel_approach_upward"); return 0; } - f32 increment = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_forward_vel_approach_upward"); return 0; } - - extern void cur_obj_forward_vel_approach_upward(f32 target, f32 increment); - cur_obj_forward_vel_approach_upward(target, increment); - - return 1; -} - -int smlua_func_cur_obj_get_dropped(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", "cur_obj_get_dropped", 0, top); - return 0; - } - - - extern void cur_obj_get_dropped(void); - cur_obj_get_dropped(); - - return 1; -} - -int smlua_func_cur_obj_get_thrown_or_placed(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", "cur_obj_get_thrown_or_placed", 3, top); - return 0; - } - - f32 forwardVel = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_get_thrown_or_placed"); return 0; } - f32 velY = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_get_thrown_or_placed"); return 0; } - s32 thrownAction = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_get_thrown_or_placed"); return 0; } - - extern void cur_obj_get_thrown_or_placed(f32 forwardVel, f32 velY, s32 thrownAction); - cur_obj_get_thrown_or_placed(forwardVel, velY, thrownAction); - - return 1; -} - -int smlua_func_cur_obj_has_behavior(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", "cur_obj_has_behavior", 1, top); - return 0; - } - - BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_has_behavior"); return 0; } - - extern s32 cur_obj_has_behavior(const BehaviorScript *behavior); - lua_pushinteger(L, cur_obj_has_behavior(behavior)); - - return 1; -} - -int smlua_func_cur_obj_has_model(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", "cur_obj_has_model", 1, top); - return 0; - } - - u16 modelID = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_has_model"); return 0; } - - extern s32 cur_obj_has_model(u16 modelID); - lua_pushinteger(L, cur_obj_has_model(modelID)); - - return 1; -} - -int smlua_func_cur_obj_hide(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", "cur_obj_hide", 0, top); - return 0; - } - - - extern void cur_obj_hide(void); - cur_obj_hide(); - - return 1; -} - -int smlua_func_cur_obj_hide_if_mario_far_away_y(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", "cur_obj_hide_if_mario_far_away_y", 1, top); - return 0; - } - - f32 distY = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_hide_if_mario_far_away_y"); return 0; } - - extern s32 cur_obj_hide_if_mario_far_away_y(f32 distY); - lua_pushinteger(L, cur_obj_hide_if_mario_far_away_y(distY)); - - return 1; -} - -int smlua_func_cur_obj_if_hit_wall_bounce_away(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", "cur_obj_if_hit_wall_bounce_away", 0, top); - return 0; - } - - - extern void cur_obj_if_hit_wall_bounce_away(void); - cur_obj_if_hit_wall_bounce_away(); - - return 1; -} - -int smlua_func_cur_obj_init_animation(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", "cur_obj_init_animation", 1, top); - return 0; - } - - s32 animIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_init_animation"); return 0; } - - extern void cur_obj_init_animation(s32 animIndex); - cur_obj_init_animation(animIndex); - - return 1; -} - -int smlua_func_cur_obj_init_animation_and_anim_frame(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", "cur_obj_init_animation_and_anim_frame", 2, top); - return 0; - } - - s32 animIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_init_animation_and_anim_frame"); return 0; } - s32 animFrame = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_init_animation_and_anim_frame"); return 0; } - - extern void cur_obj_init_animation_and_anim_frame(s32 animIndex, s32 animFrame); - cur_obj_init_animation_and_anim_frame(animIndex, animFrame); - - return 1; -} - -int smlua_func_cur_obj_init_animation_and_check_if_near_end(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", "cur_obj_init_animation_and_check_if_near_end", 1, top); - return 0; - } - - s32 animIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_init_animation_and_check_if_near_end"); return 0; } - - extern s32 cur_obj_init_animation_and_check_if_near_end(s32 animIndex); - lua_pushinteger(L, cur_obj_init_animation_and_check_if_near_end(animIndex)); - - return 1; -} - -int smlua_func_cur_obj_init_animation_and_extend_if_at_end(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", "cur_obj_init_animation_and_extend_if_at_end", 1, top); - return 0; - } - - s32 animIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_init_animation_and_extend_if_at_end"); return 0; } - - extern void cur_obj_init_animation_and_extend_if_at_end(s32 animIndex); - cur_obj_init_animation_and_extend_if_at_end(animIndex); - - return 1; -} - -int smlua_func_cur_obj_init_animation_with_accel_and_sound(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", "cur_obj_init_animation_with_accel_and_sound", 2, top); - return 0; - } - - s32 animIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_init_animation_with_accel_and_sound"); return 0; } - f32 accel = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_init_animation_with_accel_and_sound"); return 0; } - - extern void cur_obj_init_animation_with_accel_and_sound(s32 animIndex, f32 accel); - cur_obj_init_animation_with_accel_and_sound(animIndex, accel); - - return 1; -} - -int smlua_func_cur_obj_init_animation_with_sound(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", "cur_obj_init_animation_with_sound", 1, top); - return 0; - } - - s32 animIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_init_animation_with_sound"); return 0; } - - extern void cur_obj_init_animation_with_sound(s32 animIndex); - cur_obj_init_animation_with_sound(animIndex); - - return 1; -} - -int smlua_func_cur_obj_is_any_player_on_platform(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", "cur_obj_is_any_player_on_platform", 0, top); - return 0; - } - - - extern s32 cur_obj_is_any_player_on_platform(void); - lua_pushinteger(L, cur_obj_is_any_player_on_platform()); - - return 1; -} - -int smlua_func_cur_obj_is_mario_ground_pounding_platform(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", "cur_obj_is_mario_ground_pounding_platform", 0, top); - return 0; - } - - - extern s32 cur_obj_is_mario_ground_pounding_platform(void); - lua_pushinteger(L, cur_obj_is_mario_ground_pounding_platform()); - - return 1; -} - -int smlua_func_cur_obj_is_mario_on_platform(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", "cur_obj_is_mario_on_platform", 0, top); - return 0; - } - - - extern s32 cur_obj_is_mario_on_platform(void); - lua_pushinteger(L, cur_obj_is_mario_on_platform()); - - return 1; -} - -int smlua_func_cur_obj_lateral_dist_from_mario_to_home(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", "cur_obj_lateral_dist_from_mario_to_home", 0, top); - return 0; - } - - - extern f32 cur_obj_lateral_dist_from_mario_to_home(void); - lua_pushnumber(L, cur_obj_lateral_dist_from_mario_to_home()); - - return 1; -} - -int smlua_func_cur_obj_lateral_dist_from_obj_to_home(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", "cur_obj_lateral_dist_from_obj_to_home", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_lateral_dist_from_obj_to_home"); return 0; } - - extern f32 cur_obj_lateral_dist_from_obj_to_home(struct Object *obj); - lua_pushnumber(L, cur_obj_lateral_dist_from_obj_to_home(obj)); - - return 1; -} - -int smlua_func_cur_obj_lateral_dist_to_home(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", "cur_obj_lateral_dist_to_home", 0, top); - return 0; - } - - - extern f32 cur_obj_lateral_dist_to_home(void); - lua_pushnumber(L, cur_obj_lateral_dist_to_home()); - - return 1; -} - -int smlua_func_cur_obj_mario_far_away(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", "cur_obj_mario_far_away", 0, top); - return 0; - } - - - extern s32 cur_obj_mario_far_away(void); - lua_pushinteger(L, cur_obj_mario_far_away()); - - return 1; -} - -int smlua_func_cur_obj_move_after_thrown_or_dropped(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", "cur_obj_move_after_thrown_or_dropped", 2, top); - return 0; - } - - f32 forwardVel = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_move_after_thrown_or_dropped"); return 0; } - f32 velY = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_move_after_thrown_or_dropped"); return 0; } - - extern void cur_obj_move_after_thrown_or_dropped(f32 forwardVel, f32 velY); - cur_obj_move_after_thrown_or_dropped(forwardVel, velY); - - return 1; -} - -int smlua_func_cur_obj_move_standard(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", "cur_obj_move_standard", 1, top); - return 0; - } - - s16 steepSlopeAngleDegrees = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_move_standard"); return 0; } - - extern void cur_obj_move_standard(s16 steepSlopeAngleDegrees); - cur_obj_move_standard(steepSlopeAngleDegrees); - - return 1; -} - -int smlua_func_cur_obj_move_up_and_down(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", "cur_obj_move_up_and_down", 1, top); - return 0; - } - - s32 a0 = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_move_up_and_down"); return 0; } - - extern s32 cur_obj_move_up_and_down(s32 a0); - lua_pushinteger(L, cur_obj_move_up_and_down(a0)); - - return 1; -} - -int smlua_func_cur_obj_move_update_ground_air_flags(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", "cur_obj_move_update_ground_air_flags", 2, top); - return 0; - } - - f32 gravity = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_move_update_ground_air_flags"); return 0; } - f32 bounciness = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_move_update_ground_air_flags"); return 0; } - - extern void cur_obj_move_update_ground_air_flags(UNUSED f32 gravity, f32 bounciness); - cur_obj_move_update_ground_air_flags(gravity, bounciness); - - return 1; -} - -int smlua_func_cur_obj_move_update_underwater_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", "cur_obj_move_update_underwater_flags", 0, top); - return 0; - } - - - extern void cur_obj_move_update_underwater_flags(void); - cur_obj_move_update_underwater_flags(); - - return 1; -} - -int smlua_func_cur_obj_move_using_fvel_and_gravity(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", "cur_obj_move_using_fvel_and_gravity", 0, top); - return 0; - } - - - extern void cur_obj_move_using_fvel_and_gravity(void); - cur_obj_move_using_fvel_and_gravity(); - - return 1; -} - -int smlua_func_cur_obj_move_using_vel(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", "cur_obj_move_using_vel", 0, top); - return 0; - } - - - extern void cur_obj_move_using_vel(void); - cur_obj_move_using_vel(); - - return 1; -} - -int smlua_func_cur_obj_move_using_vel_and_gravity(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", "cur_obj_move_using_vel_and_gravity", 0, top); - return 0; - } - - - extern void cur_obj_move_using_vel_and_gravity(void); - cur_obj_move_using_vel_and_gravity(); - - return 1; -} - -int smlua_func_cur_obj_move_xz(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", "cur_obj_move_xz", 2, top); - return 0; - } - - f32 steepSlopeNormalY = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_move_xz"); return 0; } - s32 careAboutEdgesAndSteepSlopes = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_move_xz"); return 0; } - - extern s32 cur_obj_move_xz(f32 steepSlopeNormalY, s32 careAboutEdgesAndSteepSlopes); - lua_pushinteger(L, cur_obj_move_xz(steepSlopeNormalY, careAboutEdgesAndSteepSlopes)); - - return 1; -} - -int smlua_func_cur_obj_move_xz_using_fvel_and_yaw(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", "cur_obj_move_xz_using_fvel_and_yaw", 0, top); - return 0; - } - - - extern void cur_obj_move_xz_using_fvel_and_yaw(void); - cur_obj_move_xz_using_fvel_and_yaw(); - - return 1; -} - -int smlua_func_cur_obj_move_y(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", "cur_obj_move_y", 3, top); - return 0; - } - - f32 gravity = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_move_y"); return 0; } - f32 bounciness = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_move_y"); return 0; } - f32 buoyancy = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_move_y"); return 0; } - - extern void cur_obj_move_y(f32 gravity, f32 bounciness, f32 buoyancy); - cur_obj_move_y(gravity, bounciness, buoyancy); - - return 1; -} - -int smlua_func_cur_obj_move_y_and_get_water_level(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", "cur_obj_move_y_and_get_water_level", 2, top); - return 0; - } - - f32 gravity = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_move_y_and_get_water_level"); return 0; } - f32 buoyancy = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_move_y_and_get_water_level"); return 0; } - - extern f32 cur_obj_move_y_and_get_water_level(f32 gravity, f32 buoyancy); - lua_pushnumber(L, cur_obj_move_y_and_get_water_level(gravity, buoyancy)); - - return 1; -} - -int smlua_func_cur_obj_move_y_with_terminal_vel(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", "cur_obj_move_y_with_terminal_vel", 0, top); - return 0; - } - - - extern void cur_obj_move_y_with_terminal_vel(void); - cur_obj_move_y_with_terminal_vel(); - - return 1; -} - -int smlua_func_cur_obj_nearest_object_with_behavior(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", "cur_obj_nearest_object_with_behavior", 1, top); - return 0; - } - - BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_nearest_object_with_behavior"); return 0; } - - extern struct Object *cur_obj_nearest_object_with_behavior(const BehaviorScript *behavior); - smlua_push_object(L, LOT_OBJECT, cur_obj_nearest_object_with_behavior(behavior), NULL); - - return 1; -} - -int smlua_func_cur_obj_outside_home_rectangle(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_outside_home_rectangle", 4, top); - return 0; - } - - f32 minX = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_outside_home_rectangle"); return 0; } - f32 maxX = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_outside_home_rectangle"); return 0; } - f32 minZ = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_outside_home_rectangle"); return 0; } - f32 maxZ = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "cur_obj_outside_home_rectangle"); return 0; } - - extern s32 cur_obj_outside_home_rectangle(f32 minX, f32 maxX, f32 minZ, f32 maxZ); - lua_pushinteger(L, cur_obj_outside_home_rectangle(minX, maxX, minZ, maxZ)); - - return 1; -} - -int smlua_func_cur_obj_outside_home_square(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", "cur_obj_outside_home_square", 1, top); - return 0; - } - - f32 halfLength = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_outside_home_square"); return 0; } - - extern s32 cur_obj_outside_home_square(f32 halfLength); - lua_pushinteger(L, cur_obj_outside_home_square(halfLength)); - - return 1; -} - -int smlua_func_cur_obj_push_mario_away(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", "cur_obj_push_mario_away", 1, top); - return 0; - } - - f32 radius = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_push_mario_away"); return 0; } - - extern void cur_obj_push_mario_away(f32 radius); - cur_obj_push_mario_away(radius); - - return 1; -} - -int smlua_func_cur_obj_push_mario_away_from_cylinder(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", "cur_obj_push_mario_away_from_cylinder", 2, top); - return 0; - } - - f32 radius = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_push_mario_away_from_cylinder"); return 0; } - f32 extentY = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_push_mario_away_from_cylinder"); return 0; } - - extern void cur_obj_push_mario_away_from_cylinder(f32 radius, f32 extentY); - cur_obj_push_mario_away_from_cylinder(radius, extentY); - - return 1; -} - -int smlua_func_cur_obj_reflect_move_angle_off_wall(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", "cur_obj_reflect_move_angle_off_wall", 0, top); - return 0; - } - - - extern s16 cur_obj_reflect_move_angle_off_wall(void); - lua_pushinteger(L, cur_obj_reflect_move_angle_off_wall()); - - return 1; -} - -int smlua_func_cur_obj_reset_timer_and_subaction(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", "cur_obj_reset_timer_and_subaction", 0, top); - return 0; - } - - - extern void cur_obj_reset_timer_and_subaction(void); - cur_obj_reset_timer_and_subaction(); - - return 1; -} - -int smlua_func_cur_obj_resolve_wall_collisions(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", "cur_obj_resolve_wall_collisions", 0, top); - return 0; - } - - - extern s32 cur_obj_resolve_wall_collisions(void); - lua_pushinteger(L, cur_obj_resolve_wall_collisions()); - - return 1; -} - -int smlua_func_cur_obj_reverse_animation(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", "cur_obj_reverse_animation", 0, top); - return 0; - } - - - extern void cur_obj_reverse_animation(void); - cur_obj_reverse_animation(); - - return 1; -} - -int smlua_func_cur_obj_rotate_face_angle_using_vel(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", "cur_obj_rotate_face_angle_using_vel", 0, top); - return 0; - } - - - extern void cur_obj_rotate_face_angle_using_vel(void); - cur_obj_rotate_face_angle_using_vel(); - - return 1; -} - -int smlua_func_cur_obj_rotate_move_angle_using_vel(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", "cur_obj_rotate_move_angle_using_vel", 0, top); - return 0; - } - - - extern void cur_obj_rotate_move_angle_using_vel(void); - cur_obj_rotate_move_angle_using_vel(); - - return 1; -} - int smlua_func_cur_obj_rotate_yaw_toward(lua_State* L) { if (L == NULL) { return 0; } @@ -24544,1177 +23352,480 @@ int smlua_func_cur_obj_rotate_yaw_toward(lua_State* L) { return 1; } -int smlua_func_cur_obj_scale(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", "cur_obj_scale", 1, top); - return 0; - } - - f32 scale = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_scale"); return 0; } - - extern void cur_obj_scale(f32 scale); - cur_obj_scale(scale); - - return 1; -} - -int smlua_func_cur_obj_scale_over_time(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_scale_over_time", 4, top); - return 0; - } - - s32 a0 = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_scale_over_time"); return 0; } - s32 a1 = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_scale_over_time"); return 0; } - f32 sp10 = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_scale_over_time"); return 0; } - f32 sp14 = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "cur_obj_scale_over_time"); return 0; } - - extern void cur_obj_scale_over_time(s32 a0, s32 a1, f32 sp10, f32 sp14); - cur_obj_scale_over_time(a0, a1, sp10, sp14); - - return 1; -} - -int smlua_func_cur_obj_set_behavior(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", "cur_obj_set_behavior", 1, top); - return 0; - } - - BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_behavior"); return 0; } - - extern void cur_obj_set_behavior(const BehaviorScript *behavior); - cur_obj_set_behavior(behavior); - - return 1; -} - -int smlua_func_cur_obj_set_billboard_if_vanilla_cam(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", "cur_obj_set_billboard_if_vanilla_cam", 0, top); - return 0; - } - - - extern void cur_obj_set_billboard_if_vanilla_cam(void); - cur_obj_set_billboard_if_vanilla_cam(); - - return 1; -} - -int smlua_func_cur_obj_set_face_angle_to_move_angle(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", "cur_obj_set_face_angle_to_move_angle", 0, top); - return 0; - } - - - extern void cur_obj_set_face_angle_to_move_angle(void); - cur_obj_set_face_angle_to_move_angle(); - - return 1; -} - -int smlua_func_cur_obj_set_hitbox_and_die_if_attacked(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", "cur_obj_set_hitbox_and_die_if_attacked", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct ObjectHitbox* hitbox = (struct ObjectHitbox*)smlua_to_cobject(L, 1, LOT_OBJECTHITBOX); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_hitbox_and_die_if_attacked"); return 0; } - s32 deathSound = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_set_hitbox_and_die_if_attacked"); return 0; } - s32 noLootCoins = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_set_hitbox_and_die_if_attacked"); return 0; } - - extern s32 cur_obj_set_hitbox_and_die_if_attacked(struct ObjectHitbox *hitbox, s32 deathSound, s32 noLootCoins); - lua_pushinteger(L, cur_obj_set_hitbox_and_die_if_attacked(hitbox, deathSound, noLootCoins)); - - return 1; -} - -int smlua_func_cur_obj_set_hitbox_radius_and_height(lua_State* L) { +int smlua_func_obj_angle_to_object(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", "cur_obj_set_hitbox_radius_and_height", 2, top); - return 0; - } - - f32 radius = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_hitbox_radius_and_height"); return 0; } - f32 height = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_set_hitbox_radius_and_height"); return 0; } - - extern void cur_obj_set_hitbox_radius_and_height(f32 radius, f32 height); - cur_obj_set_hitbox_radius_and_height(radius, height); - - return 1; -} - -int smlua_func_cur_obj_set_home_once(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", "cur_obj_set_home_once", 0, top); - return 0; - } - - - extern void cur_obj_set_home_once(void); - cur_obj_set_home_once(); - - return 1; -} - -int smlua_func_cur_obj_set_hurtbox_radius_and_height(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", "cur_obj_set_hurtbox_radius_and_height", 2, top); - return 0; - } - - f32 radius = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_hurtbox_radius_and_height"); return 0; } - f32 height = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_set_hurtbox_radius_and_height"); return 0; } - - extern void cur_obj_set_hurtbox_radius_and_height(f32 radius, f32 height); - cur_obj_set_hurtbox_radius_and_height(radius, height); - - return 1; -} - -int smlua_func_cur_obj_set_pos_relative(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_set_pos_relative", 4, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_angle_to_object", 2, top); return 0; } if (lua_isnil(L, 1)) { return 0; } - struct Object* other = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_pos_relative"); return 0; } - f32 dleft = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_set_pos_relative"); return 0; } - f32 dy = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_set_pos_relative"); return 0; } - f32 dforward = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "cur_obj_set_pos_relative"); return 0; } + struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_angle_to_object"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_angle_to_object"); return 0; } - extern void cur_obj_set_pos_relative(struct Object *other, f32 dleft, f32 dy, f32 dforward); - cur_obj_set_pos_relative(other, dleft, dy, dforward); + extern s16 obj_angle_to_object(struct Object *obj1, struct Object *obj2); + lua_pushinteger(L, obj_angle_to_object(obj1, obj2)); return 1; } -int smlua_func_cur_obj_set_pos_relative_to_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", "cur_obj_set_pos_relative_to_parent", 3, top); - return 0; - } - - f32 dleft = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_pos_relative_to_parent"); return 0; } - f32 dy = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_set_pos_relative_to_parent"); return 0; } - f32 dforward = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_set_pos_relative_to_parent"); return 0; } - - extern void cur_obj_set_pos_relative_to_parent(f32 dleft, f32 dy, f32 dforward); - cur_obj_set_pos_relative_to_parent(dleft, dy, dforward); - - return 1; -} - -int smlua_func_cur_obj_set_pos_to_home(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", "cur_obj_set_pos_to_home", 0, top); - return 0; - } - - - extern void cur_obj_set_pos_to_home(void); - cur_obj_set_pos_to_home(); - - return 1; -} - -int smlua_func_cur_obj_set_pos_to_home_and_stop(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", "cur_obj_set_pos_to_home_and_stop", 0, top); - return 0; - } - - - extern void cur_obj_set_pos_to_home_and_stop(void); - cur_obj_set_pos_to_home_and_stop(); - - return 1; -} - -int smlua_func_cur_obj_set_pos_to_home_with_debug(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", "cur_obj_set_pos_to_home_with_debug", 0, top); - return 0; - } - - - extern void cur_obj_set_pos_to_home_with_debug(void); - cur_obj_set_pos_to_home_with_debug(); - - return 1; -} - -int smlua_func_cur_obj_set_pos_via_transform(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", "cur_obj_set_pos_via_transform", 0, top); - return 0; - } - - - extern void cur_obj_set_pos_via_transform(void); - cur_obj_set_pos_via_transform(); - - return 1; -} - -int smlua_func_cur_obj_set_vel_from_mario_vel(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", "cur_obj_set_vel_from_mario_vel", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_vel_from_mario_vel"); return 0; } - f32 f12 = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_set_vel_from_mario_vel"); return 0; } - f32 f14 = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_set_vel_from_mario_vel"); return 0; } - - extern void cur_obj_set_vel_from_mario_vel(struct MarioState* m, f32 f12, f32 f14); - cur_obj_set_vel_from_mario_vel(m, f12, f14); - - return 1; -} - -int smlua_func_cur_obj_set_y_vel_and_animation(lua_State* L) { +int smlua_func_obj_pitch_to_object(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", "cur_obj_set_y_vel_and_animation", 2, top); - return 0; - } - - f32 sp18 = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_y_vel_and_animation"); return 0; } - s32 sp1C = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_set_y_vel_and_animation"); return 0; } - - extern void cur_obj_set_y_vel_and_animation(f32 sp18, s32 sp1C); - cur_obj_set_y_vel_and_animation(sp18, sp1C); - - return 1; -} - -int smlua_func_cur_obj_shake_screen(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", "cur_obj_shake_screen", 1, top); - return 0; - } - - s32 shake = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_shake_screen"); return 0; } - - extern void cur_obj_shake_screen(s32 shake); - cur_obj_shake_screen(shake); - - return 1; -} - -int smlua_func_cur_obj_shake_y(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", "cur_obj_shake_y", 1, top); - return 0; - } - - f32 amount = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_shake_y"); return 0; } - - extern void cur_obj_shake_y(f32 amount); - cur_obj_shake_y(amount); - - return 1; -} - -int smlua_func_cur_obj_shake_y_until(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", "cur_obj_shake_y_until", 2, top); - return 0; - } - - s32 cycles = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_shake_y_until"); return 0; } - s32 amount = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_shake_y_until"); return 0; } - - extern s32 cur_obj_shake_y_until(s32 cycles, s32 amount); - lua_pushinteger(L, cur_obj_shake_y_until(cycles, amount)); - - return 1; -} - -int smlua_func_cur_obj_spawn_loot_blue_coin(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", "cur_obj_spawn_loot_blue_coin", 0, top); - return 0; - } - - - extern void cur_obj_spawn_loot_blue_coin(void); - cur_obj_spawn_loot_blue_coin(); - - return 1; -} - -int smlua_func_cur_obj_spawn_loot_coin_at_mario_pos(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", "cur_obj_spawn_loot_coin_at_mario_pos", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_spawn_loot_coin_at_mario_pos"); return 0; } - - extern void cur_obj_spawn_loot_coin_at_mario_pos(struct MarioState* m); - cur_obj_spawn_loot_coin_at_mario_pos(m); - - return 1; -} - -int smlua_func_cur_obj_spawn_particles(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", "cur_obj_spawn_particles", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct SpawnParticlesInfo* info = (struct SpawnParticlesInfo*)smlua_to_cobject(L, 1, LOT_SPAWNPARTICLESINFO); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_spawn_particles"); return 0; } - - extern void cur_obj_spawn_particles(struct SpawnParticlesInfo *info); - cur_obj_spawn_particles(info); - - return 1; -} - -#ifndef VERSION_JP -int smlua_func_cur_obj_spawn_star_at_y_offset(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_spawn_star_at_y_offset", 4, top); - return 0; - } - - f32 targetX = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_spawn_star_at_y_offset"); return 0; } - f32 targetY = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_spawn_star_at_y_offset"); return 0; } - f32 targetZ = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_spawn_star_at_y_offset"); return 0; } - f32 offsetY = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "cur_obj_spawn_star_at_y_offset"); return 0; } - - extern void cur_obj_spawn_star_at_y_offset(f32 targetX, f32 targetY, f32 targetZ, f32 offsetY); - cur_obj_spawn_star_at_y_offset(targetX, targetY, targetZ, offsetY); - - return 1; -} -#endif - -int smlua_func_cur_obj_start_cam_event(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", "cur_obj_start_cam_event", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_pitch_to_object", 2, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_start_cam_event"); return 0; } - s32 cameraEvent = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_start_cam_event"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_pitch_to_object"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* target = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_pitch_to_object"); return 0; } - extern void cur_obj_start_cam_event(UNUSED struct Object *obj, s32 cameraEvent); - cur_obj_start_cam_event(obj, cameraEvent); + extern s16 obj_pitch_to_object(struct Object* obj, struct Object* target); + lua_pushinteger(L, obj_pitch_to_object(obj, target)); return 1; } -int smlua_func_cur_obj_unhide(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", "cur_obj_unhide", 0, top); - return 0; - } - - - extern void cur_obj_unhide(void); - cur_obj_unhide(); - - return 1; -} - -int smlua_func_cur_obj_unrender_and_reset_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", "cur_obj_unrender_and_reset_state", 2, top); - return 0; - } - - s32 sp18 = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_unrender_and_reset_state"); return 0; } - s32 sp1C = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_unrender_and_reset_state"); return 0; } - - extern void cur_obj_unrender_and_reset_state(s32 sp18, s32 sp1C); - cur_obj_unrender_and_reset_state(sp18, sp1C); - - return 1; -} - -int smlua_func_cur_obj_unused_init_on_floor(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", "cur_obj_unused_init_on_floor", 0, top); - return 0; - } - - - extern void cur_obj_unused_init_on_floor(void); - cur_obj_unused_init_on_floor(); - - return 1; -} - -int smlua_func_cur_obj_unused_play_footstep_sound(lua_State* L) { +int smlua_func_obj_angle_to_point(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", "cur_obj_unused_play_footstep_sound", 3, top); - return 0; - } - - s32 animFrame1 = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_unused_play_footstep_sound"); return 0; } - s32 animFrame2 = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_unused_play_footstep_sound"); return 0; } - s32 sound = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_unused_play_footstep_sound"); return 0; } - - extern void cur_obj_unused_play_footstep_sound(s32 animFrame1, s32 animFrame2, s32 sound); - cur_obj_unused_play_footstep_sound(animFrame1, animFrame2, sound); - - return 1; -} - -int smlua_func_cur_obj_unused_resolve_wall_collisions(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", "cur_obj_unused_resolve_wall_collisions", 2, top); - return 0; - } - - f32 offsetY = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_unused_resolve_wall_collisions"); return 0; } - f32 radius = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_unused_resolve_wall_collisions"); return 0; } - - extern void cur_obj_unused_resolve_wall_collisions(f32 offsetY, f32 radius); - cur_obj_unused_resolve_wall_collisions(offsetY, radius); - - return 1; -} - -int smlua_func_cur_obj_update_floor(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", "cur_obj_update_floor", 0, top); - return 0; - } - - - extern void cur_obj_update_floor(void); - cur_obj_update_floor(); - - return 1; -} - -int smlua_func_cur_obj_update_floor_and_resolve_wall_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", "cur_obj_update_floor_and_resolve_wall_collisions", 1, top); - return 0; - } - - s16 steepSlopeDegrees = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_update_floor_and_resolve_wall_collisions"); return 0; } - - extern void cur_obj_update_floor_and_resolve_wall_collisions(s16 steepSlopeDegrees); - cur_obj_update_floor_and_resolve_wall_collisions(steepSlopeDegrees); - - return 1; -} - -int smlua_func_cur_obj_update_floor_and_walls(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", "cur_obj_update_floor_and_walls", 0, top); - return 0; - } - - - extern void cur_obj_update_floor_and_walls(void); - cur_obj_update_floor_and_walls(); - - return 1; -} - -int smlua_func_cur_obj_update_floor_height(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", "cur_obj_update_floor_height", 0, top); - return 0; - } - - - extern void cur_obj_update_floor_height(void); - cur_obj_update_floor_height(); - - return 1; -} - -int smlua_func_cur_obj_update_floor_height_and_get_floor(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", "cur_obj_update_floor_height_and_get_floor", 0, top); - return 0; - } - - - extern struct Surface *cur_obj_update_floor_height_and_get_floor(void); - smlua_push_object(L, LOT_SURFACE, cur_obj_update_floor_height_and_get_floor(), NULL); - - return 1; -} - -int smlua_func_cur_obj_wait_then_blink(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", "cur_obj_wait_then_blink", 2, top); - return 0; - } - - s32 timeUntilBlinking = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_wait_then_blink"); return 0; } - s32 numBlinks = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_wait_then_blink"); return 0; } - - extern s32 cur_obj_wait_then_blink(s32 timeUntilBlinking, s32 numBlinks); - lua_pushinteger(L, cur_obj_wait_then_blink(timeUntilBlinking, numBlinks)); - - return 1; -} - -int smlua_func_cur_obj_was_attacked_or_ground_pounded(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", "cur_obj_was_attacked_or_ground_pounded", 0, top); - return 0; - } - - - extern s32 cur_obj_was_attacked_or_ground_pounded(void); - lua_pushinteger(L, cur_obj_was_attacked_or_ground_pounded()); - - return 1; -} - -int smlua_func_cur_obj_within_12k_bounds(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", "cur_obj_within_12k_bounds", 0, top); - return 0; - } - - - extern s32 cur_obj_within_12k_bounds(void); - lua_pushinteger(L, cur_obj_within_12k_bounds()); - - return 1; -} - -int smlua_func_disable_time_stop(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", "disable_time_stop", 0, top); - return 0; - } - - - extern void disable_time_stop(void); - disable_time_stop(); - - return 1; -} - -int smlua_func_disable_time_stop_including_mario(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", "disable_time_stop_including_mario", 0, top); - return 0; - } - - - extern void disable_time_stop_including_mario(void); - disable_time_stop_including_mario(); - - return 1; -} - -int smlua_func_dist_between_object_and_point(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "dist_between_object_and_point", 4, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_angle_to_point", 3, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "dist_between_object_and_point"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_angle_to_point"); return 0; } f32 pointX = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "dist_between_object_and_point"); return 0; } - f32 pointY = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "dist_between_object_and_point"); return 0; } - f32 pointZ = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "dist_between_object_and_point"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_angle_to_point"); return 0; } + f32 pointZ = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_angle_to_point"); return 0; } - extern f32 dist_between_object_and_point(struct Object *obj, f32 pointX, f32 pointY, f32 pointZ); - lua_pushnumber(L, dist_between_object_and_point(obj, pointX, pointY, pointZ)); + extern s16 obj_angle_to_point(struct Object *obj, f32 pointX, f32 pointZ); + lua_pushinteger(L, obj_angle_to_point(obj, pointX, pointZ)); return 1; } -int smlua_func_dist_between_objects(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", "dist_between_objects", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "dist_between_objects"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "dist_between_objects"); return 0; } - - extern f32 dist_between_objects(struct Object *obj1, struct Object *obj2); - lua_pushnumber(L, dist_between_objects(obj1, obj2)); - - return 1; -} - -int smlua_func_enable_time_stop(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", "enable_time_stop", 0, top); - return 0; - } - - - extern void enable_time_stop(void); - enable_time_stop(); - - return 1; -} - -int smlua_func_enable_time_stop_if_alone(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", "enable_time_stop_if_alone", 0, top); - return 0; - } - - - extern void enable_time_stop_if_alone(void); - enable_time_stop_if_alone(); - - return 1; -} - -int smlua_func_enable_time_stop_including_mario(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", "enable_time_stop_including_mario", 0, top); - return 0; - } - - - extern void enable_time_stop_including_mario(void); - enable_time_stop_including_mario(); - - return 1; -} - -int smlua_func_find_object_with_behavior(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", "find_object_with_behavior", 1, top); - return 0; - } - - BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_object_with_behavior"); return 0; } - - extern struct Object *find_object_with_behavior(const BehaviorScript *behavior); - smlua_push_object(L, LOT_OBJECT, find_object_with_behavior(behavior), NULL); - - return 1; -} - -int smlua_func_find_unimportant_object(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", "find_unimportant_object", 0, top); - return 0; - } - - - extern struct Object *find_unimportant_object(void); - smlua_push_object(L, LOT_OBJECT, find_unimportant_object(), 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; } - if (lua_isnil(L, 2)) { 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); - - smlua_push_mat4(mtx, 3); - - 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; } - if (lua_isnil(L, 2)) { 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_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; } - if (lua_isnil(L, 2)) { 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); - - smlua_push_mat4(mtx, 3); - - 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; } - if (lua_isnil(L, 2)) { 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_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; } - if (lua_isnil(L, 2)) { 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_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; } - if (lua_isnil(L, 2)) { 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; } - if (lua_isnil(L, 3)) { 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_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; } - if (lua_isnil(L, 2)) { 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); - - smlua_push_mat4(mtx, 3); - - return 1; -} -*/ - -int smlua_func_get_object_list_from_behavior(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", "get_object_list_from_behavior", 1, top); - return 0; - } - - BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_object_list_from_behavior"); return 0; } - - extern u32 get_object_list_from_behavior(const BehaviorScript *behavior); - lua_pushinteger(L, get_object_list_from_behavior(behavior)); - - return 1; -} - -int smlua_func_get_trajectory_length(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", "get_trajectory_length", 1, top); - return 0; - } - - Trajectory* trajectory = (Trajectory*)smlua_to_cpointer(L, 1, LVT_TRAJECTORY_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_trajectory_length"); return 0; } - - extern s32 get_trajectory_length(Trajectory* trajectory); - lua_pushinteger(L, get_trajectory_length(trajectory)); - - return 1; -} - -int smlua_func_increment_velocity_toward_range(lua_State* L) { +int smlua_func_obj_turn_toward_object(lua_State* L) { if (L == NULL) { return 0; } int top = lua_gettop(L); if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "increment_velocity_toward_range", 4, top); - return 0; - } - - f32 value = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "increment_velocity_toward_range"); return 0; } - f32 center = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "increment_velocity_toward_range"); return 0; } - f32 zeroThreshold = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "increment_velocity_toward_range"); return 0; } - f32 increment = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "increment_velocity_toward_range"); return 0; } - - extern f32 increment_velocity_toward_range(f32 value, f32 center, f32 zeroThreshold, f32 increment); - lua_pushnumber(L, increment_velocity_toward_range(value, center, zeroThreshold, increment)); - - return 1; -} - -int smlua_func_is_item_in_array(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", "is_item_in_array", 2, top); - return 0; - } - - s8 item = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_item_in_array"); return 0; } - s8 * array = (s8 *)smlua_to_cpointer(L, 2, LVT_S8_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "is_item_in_array"); return 0; } - - extern s32 is_item_in_array(s8 item, s8 *array); - lua_pushinteger(L, is_item_in_array(item, array)); - - return 1; -} - -int smlua_func_is_mario_moving_fast_or_in_air(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", "is_mario_moving_fast_or_in_air", 1, top); - return 0; - } - - s32 speedThreshold = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_mario_moving_fast_or_in_air"); return 0; } - - extern s32 is_mario_moving_fast_or_in_air(s32 speedThreshold); - lua_pushinteger(L, is_mario_moving_fast_or_in_air(speedThreshold)); - - return 1; -} - -int smlua_func_lateral_dist_between_objects(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", "lateral_dist_between_objects", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_turn_toward_object", 4, top); return 0; } if (lua_isnil(L, 1)) { return 0; } - struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "lateral_dist_between_objects"); return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_turn_toward_object"); return 0; } if (lua_isnil(L, 2)) { return 0; } - struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "lateral_dist_between_objects"); return 0; } + struct Object* target = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_turn_toward_object"); return 0; } + s16 angleIndex = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_turn_toward_object"); return 0; } + s16 turnAmount = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_turn_toward_object"); return 0; } - extern f32 lateral_dist_between_objects(struct Object *obj1, struct Object *obj2); - lua_pushnumber(L, lateral_dist_between_objects(obj1, obj2)); + extern s16 obj_turn_toward_object(struct Object *obj, struct Object *target, s16 angleIndex, s16 turnAmount); + lua_pushinteger(L, obj_turn_toward_object(obj, target, angleIndex, turnAmount)); + + return 1; +} + +int smlua_func_obj_set_parent_relative_pos(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_parent_relative_pos", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_parent_relative_pos"); return 0; } + s16 relX = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_parent_relative_pos"); return 0; } + s16 relY = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_parent_relative_pos"); return 0; } + s16 relZ = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_parent_relative_pos"); return 0; } + + extern void obj_set_parent_relative_pos(struct Object *obj, s16 relX, s16 relY, s16 relZ); + obj_set_parent_relative_pos(obj, relX, relY, relZ); + + return 1; +} + +int smlua_func_obj_set_pos(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_pos", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_pos"); return 0; } + s16 x = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_pos"); return 0; } + s16 y = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_pos"); return 0; } + s16 z = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_pos"); return 0; } + + extern void obj_set_pos(struct Object *obj, s16 x, s16 y, s16 z); + obj_set_pos(obj, x, y, z); + + return 1; +} + +int smlua_func_obj_set_angle(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_angle", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_angle"); return 0; } + s16 pitch = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_angle"); return 0; } + s16 yaw = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_angle"); return 0; } + s16 roll = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_angle"); return 0; } + + extern void obj_set_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll); + obj_set_angle(obj, pitch, yaw, roll); + + return 1; +} + +int smlua_func_obj_set_move_angle(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_move_angle", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_move_angle"); return 0; } + s16 pitch = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_move_angle"); return 0; } + s16 yaw = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_move_angle"); return 0; } + s16 roll = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_move_angle"); return 0; } + + extern void obj_set_move_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll); + obj_set_move_angle(obj, pitch, yaw, roll); + + return 1; +} + +int smlua_func_obj_set_face_angle(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_face_angle", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_face_angle"); return 0; } + s16 pitch = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_face_angle"); return 0; } + s16 yaw = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_face_angle"); return 0; } + s16 roll = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_face_angle"); return 0; } + + extern void obj_set_face_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll); + obj_set_face_angle(obj, pitch, yaw, roll); + + return 1; +} + +int smlua_func_obj_set_gfx_angle(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_gfx_angle", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_gfx_angle"); return 0; } + s16 pitch = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_gfx_angle"); return 0; } + s16 yaw = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_gfx_angle"); return 0; } + s16 roll = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_gfx_angle"); return 0; } + + extern void obj_set_gfx_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll); + obj_set_gfx_angle(obj, pitch, yaw, roll); + + return 1; +} + +int smlua_func_obj_set_gfx_pos(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_gfx_pos", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_gfx_pos"); return 0; } + f32 x = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_gfx_pos"); return 0; } + f32 y = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_gfx_pos"); return 0; } + f32 z = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_gfx_pos"); return 0; } + + extern void obj_set_gfx_pos(struct Object *obj, f32 x, f32 y, f32 z); + obj_set_gfx_pos(obj, x, y, z); + + return 1; +} + +int smlua_func_obj_set_gfx_scale(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_gfx_scale", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_gfx_scale"); return 0; } + f32 x = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_gfx_scale"); return 0; } + f32 y = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_gfx_scale"); return 0; } + f32 z = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_gfx_scale"); return 0; } + + extern void obj_set_gfx_scale(struct Object *obj, f32 x, f32 y, f32 z); + obj_set_gfx_scale(obj, x, y, z); + + return 1; +} + +int smlua_func_spawn_water_droplet(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", "spawn_water_droplet", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* parent = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_water_droplet"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct WaterDropletParams* params = (struct WaterDropletParams*)smlua_to_cobject(L, 2, LOT_WATERDROPLETPARAMS); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_water_droplet"); return 0; } + + extern struct Object *spawn_water_droplet(struct Object *parent, struct WaterDropletParams *params); + smlua_push_object(L, LOT_OBJECT, spawn_water_droplet(parent, params), NULL); + + return 1; +} + +int smlua_func_obj_build_relative_transform(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_build_relative_transform", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_build_relative_transform"); return 0; } + + extern void obj_build_relative_transform(struct Object *obj); + obj_build_relative_transform(obj); + + return 1; +} + +int smlua_func_cur_obj_move_using_vel(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", "cur_obj_move_using_vel", 0, top); + return 0; + } + + + extern void cur_obj_move_using_vel(void); + cur_obj_move_using_vel(); + + return 1; +} + +int smlua_func_obj_copy_graph_y_offset(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", "obj_copy_graph_y_offset", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_copy_graph_y_offset"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_copy_graph_y_offset"); return 0; } + + extern void obj_copy_graph_y_offset(struct Object *dst, struct Object *src); + obj_copy_graph_y_offset(dst, src); + + return 1; +} + +int smlua_func_obj_copy_pos_and_angle(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", "obj_copy_pos_and_angle", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_copy_pos_and_angle"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_copy_pos_and_angle"); return 0; } + + extern void obj_copy_pos_and_angle(struct Object *dst, struct Object *src); + obj_copy_pos_and_angle(dst, src); + + return 1; +} + +int smlua_func_obj_copy_pos(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", "obj_copy_pos", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_copy_pos"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_copy_pos"); return 0; } + + extern void obj_copy_pos(struct Object *dst, struct Object *src); + obj_copy_pos(dst, src); + + return 1; +} + +int smlua_func_obj_copy_angle(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", "obj_copy_angle", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_copy_angle"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_copy_angle"); return 0; } + + extern void obj_copy_angle(struct Object *dst, struct Object *src); + obj_copy_angle(dst, src); + + return 1; +} + +int smlua_func_obj_set_gfx_pos_from_pos(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_set_gfx_pos_from_pos", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_gfx_pos_from_pos"); return 0; } + + extern void obj_set_gfx_pos_from_pos(struct Object *obj); + obj_set_gfx_pos_from_pos(obj); + + return 1; +} + +int smlua_func_obj_init_animation(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", "obj_init_animation", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_init_animation"); return 0; } + s32 animIndex = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_init_animation"); return 0; } + + extern void obj_init_animation(struct Object *obj, s32 animIndex); + obj_init_animation(obj, animIndex); return 1; } @@ -25787,162 +23898,6 @@ int smlua_func_linear_mtxf_transpose_mul_vec3f(lua_State* L) { return 1; } -int smlua_func_mario_is_dive_sliding(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", "mario_is_dive_sliding", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_is_dive_sliding"); return 0; } - - extern s32 mario_is_dive_sliding(struct MarioState* m); - lua_pushinteger(L, mario_is_dive_sliding(m)); - - return 1; -} - -int smlua_func_mario_is_in_air_action(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", "mario_is_in_air_action", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_is_in_air_action"); return 0; } - - extern s32 mario_is_in_air_action(struct MarioState* m); - lua_pushinteger(L, mario_is_in_air_action(m)); - - return 1; -} - -int smlua_func_mario_is_within_rectangle(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mario_is_within_rectangle", 4, top); - return 0; - } - - s16 minX = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_is_within_rectangle"); return 0; } - s16 maxX = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mario_is_within_rectangle"); return 0; } - s16 minZ = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "mario_is_within_rectangle"); return 0; } - s16 maxZ = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "mario_is_within_rectangle"); return 0; } - - extern s32 mario_is_within_rectangle(s16 minX, s16 maxX, s16 minZ, s16 maxZ); - lua_pushinteger(L, mario_is_within_rectangle(minX, maxX, minZ, maxZ)); - - return 1; -} - -int smlua_func_mario_set_flag(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", "mario_set_flag", 1, top); - return 0; - } - - s32 flag = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_set_flag"); return 0; } - - extern void mario_set_flag(s32 flag); - mario_set_flag(flag); - - return 1; -} - -int smlua_func_obj_angle_to_object(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", "obj_angle_to_object", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_angle_to_object"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_angle_to_object"); return 0; } - - extern s16 obj_angle_to_object(struct Object *obj1, struct Object *obj2); - lua_pushinteger(L, obj_angle_to_object(obj1, obj2)); - - return 1; -} - -int smlua_func_obj_angle_to_point(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", "obj_angle_to_point", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_angle_to_point"); return 0; } - f32 pointX = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_angle_to_point"); return 0; } - f32 pointZ = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_angle_to_point"); return 0; } - - extern s16 obj_angle_to_point(struct Object *obj, f32 pointX, f32 pointZ); - lua_pushinteger(L, obj_angle_to_point(obj, pointX, pointZ)); - - return 1; -} - -int smlua_func_obj_apply_scale_to_matrix(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", "obj_apply_scale_to_matrix", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_apply_scale_to_matrix"); return 0; } - - Mat4 dst; - smlua_get_mat4(dst, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_apply_scale_to_matrix"); return 0; } - - Mat4 src; - smlua_get_mat4(src, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_apply_scale_to_matrix"); return 0; } - - extern void obj_apply_scale_to_matrix(struct Object *obj, Mat4 dst, Mat4 src); - obj_apply_scale_to_matrix(obj, dst, src); - - smlua_push_mat4(dst, 2); - - smlua_push_mat4(src, 3); - - return 1; -} - int smlua_func_obj_apply_scale_to_transform(lua_State* L) { if (L == NULL) { return 0; } @@ -25962,256 +23917,6 @@ int smlua_func_obj_apply_scale_to_transform(lua_State* L) { return 1; } -int smlua_func_obj_attack_collided_from_other_object(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_attack_collided_from_other_object", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_attack_collided_from_other_object"); return 0; } - - extern s32 obj_attack_collided_from_other_object(struct Object *obj); - lua_pushinteger(L, obj_attack_collided_from_other_object(obj)); - - return 1; -} - -int smlua_func_obj_become_tangible(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_become_tangible", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_become_tangible"); return 0; } - - extern void obj_become_tangible(struct Object *obj); - obj_become_tangible(obj); - - return 1; -} - -int smlua_func_obj_build_relative_transform(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_build_relative_transform", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_build_relative_transform"); return 0; } - - extern void obj_build_relative_transform(struct Object *obj); - obj_build_relative_transform(obj); - - return 1; -} - -int smlua_func_obj_build_transform_from_pos_and_angle(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", "obj_build_transform_from_pos_and_angle", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_build_transform_from_pos_and_angle"); return 0; } - s16 posIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_build_transform_from_pos_and_angle"); return 0; } - s16 angleIndex = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_build_transform_from_pos_and_angle"); return 0; } - - extern void obj_build_transform_from_pos_and_angle(struct Object *obj, s16 posIndex, s16 angleIndex); - obj_build_transform_from_pos_and_angle(obj, posIndex, angleIndex); - - return 1; -} - -int smlua_func_obj_build_transform_relative_to_parent(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_build_transform_relative_to_parent", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_build_transform_relative_to_parent"); return 0; } - - extern void obj_build_transform_relative_to_parent(struct Object *obj); - obj_build_transform_relative_to_parent(obj); - - return 1; -} - -int smlua_func_obj_build_vel_from_transform(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_build_vel_from_transform", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* a0 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_build_vel_from_transform"); return 0; } - - extern void obj_build_vel_from_transform(struct Object *a0); - obj_build_vel_from_transform(a0); - - return 1; -} - -int smlua_func_obj_check_if_collided_with_object(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", "obj_check_if_collided_with_object", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_check_if_collided_with_object"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_check_if_collided_with_object"); return 0; } - - extern s32 obj_check_if_collided_with_object(struct Object *obj1, struct Object *obj2); - lua_pushinteger(L, obj_check_if_collided_with_object(obj1, obj2)); - - return 1; -} - -int smlua_func_obj_copy_angle(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", "obj_copy_angle", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_copy_angle"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_copy_angle"); return 0; } - - extern void obj_copy_angle(struct Object *dst, struct Object *src); - obj_copy_angle(dst, src); - - return 1; -} - -int smlua_func_obj_copy_behavior_params(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", "obj_copy_behavior_params", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_copy_behavior_params"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_copy_behavior_params"); return 0; } - - extern void obj_copy_behavior_params(struct Object *dst, struct Object *src); - obj_copy_behavior_params(dst, src); - - return 1; -} - -int smlua_func_obj_copy_graph_y_offset(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", "obj_copy_graph_y_offset", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_copy_graph_y_offset"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_copy_graph_y_offset"); return 0; } - - extern void obj_copy_graph_y_offset(struct Object *dst, struct Object *src); - obj_copy_graph_y_offset(dst, src); - - return 1; -} - -int smlua_func_obj_copy_pos(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", "obj_copy_pos", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_copy_pos"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_copy_pos"); return 0; } - - extern void obj_copy_pos(struct Object *dst, struct Object *src); - obj_copy_pos(dst, src); - - return 1; -} - -int smlua_func_obj_copy_pos_and_angle(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", "obj_copy_pos_and_angle", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_copy_pos_and_angle"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_copy_pos_and_angle"); return 0; } - - extern void obj_copy_pos_and_angle(struct Object *dst, struct Object *src); - obj_copy_pos_and_angle(dst, src); - - return 1; -} - int smlua_func_obj_copy_scale(lua_State* L) { if (L == NULL) { return 0; } @@ -26234,238 +23939,6 @@ int smlua_func_obj_copy_scale(lua_State* L) { return 1; } -int smlua_func_obj_create_transform_from_self(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_create_transform_from_self", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_create_transform_from_self"); return 0; } - - extern void obj_create_transform_from_self(struct Object *obj); - obj_create_transform_from_self(obj); - - return 1; -} - -int smlua_func_obj_explode_and_spawn_coins(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", "obj_explode_and_spawn_coins", 2, top); - return 0; - } - - f32 sp18 = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_explode_and_spawn_coins"); return 0; } - s32 sp1C = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_explode_and_spawn_coins"); return 0; } - - extern void obj_explode_and_spawn_coins(f32 sp18, s32 sp1C); - obj_explode_and_spawn_coins(sp18, sp1C); - - return 1; -} - -int smlua_func_obj_has_behavior(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", "obj_has_behavior", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_has_behavior"); return 0; } - BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 2, LVT_BEHAVIORSCRIPT_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_has_behavior"); return 0; } - - extern s32 obj_has_behavior(struct Object *obj, const BehaviorScript *behavior); - lua_pushinteger(L, obj_has_behavior(obj, behavior)); - - return 1; -} - -int smlua_func_obj_init_animation(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", "obj_init_animation", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_init_animation"); return 0; } - s32 animIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_init_animation"); return 0; } - - extern void obj_init_animation(struct Object *obj, s32 animIndex); - obj_init_animation(obj, animIndex); - - return 1; -} - -int smlua_func_obj_init_animation_with_accel_and_sound(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", "obj_init_animation_with_accel_and_sound", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_init_animation_with_accel_and_sound"); return 0; } - s32 animIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_init_animation_with_accel_and_sound"); return 0; } - f32 accel = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_init_animation_with_accel_and_sound"); return 0; } - - extern void obj_init_animation_with_accel_and_sound(struct Object *obj, s32 animIndex, f32 accel); - obj_init_animation_with_accel_and_sound(obj, animIndex, accel); - - return 1; -} - -int smlua_func_obj_init_animation_with_sound(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", "obj_init_animation_with_sound", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_init_animation_with_sound"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct AnimationTable* animations = (struct AnimationTable*)smlua_to_cobject(L, 2, LOT_ANIMATIONTABLE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_init_animation_with_sound"); return 0; } - s32 animIndex = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_init_animation_with_sound"); return 0; } - - extern void obj_init_animation_with_sound(struct Object *obj, const struct AnimationTable* animations, s32 animIndex); - obj_init_animation_with_sound(obj, animations, animIndex); - - return 1; -} - -int smlua_func_obj_is_hidden(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_is_hidden", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_is_hidden"); return 0; } - - extern s32 obj_is_hidden(struct Object *obj); - lua_pushinteger(L, obj_is_hidden(obj)); - - return 1; -} - -int smlua_func_obj_mark_for_deletion(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_mark_for_deletion", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_mark_for_deletion"); return 0; } - - extern void obj_mark_for_deletion(struct Object *obj); - obj_mark_for_deletion(obj); - - return 1; -} - -int smlua_func_obj_pitch_to_object(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", "obj_pitch_to_object", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_pitch_to_object"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Object* target = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_pitch_to_object"); return 0; } - - extern s16 obj_pitch_to_object(struct Object* obj, struct Object* target); - lua_pushinteger(L, obj_pitch_to_object(obj, target)); - - return 1; -} - -int smlua_func_obj_scale(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", "obj_scale", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_scale"); return 0; } - f32 scale = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_scale"); return 0; } - - extern void obj_scale(struct Object *obj, f32 scale); - obj_scale(obj, scale); - - return 1; -} - -int smlua_func_obj_scale_random(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", "obj_scale_random", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_scale_random"); return 0; } - f32 rangeLength = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_scale_random"); return 0; } - f32 minScale = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_scale_random"); return 0; } - - extern void obj_scale_random(struct Object *obj, f32 rangeLength, f32 minScale); - obj_scale_random(obj, rangeLength, minScale); - - return 1; -} - int smlua_func_obj_scale_xyz(lua_State* L) { if (L == NULL) { return 0; } @@ -26491,27 +23964,1297 @@ int smlua_func_obj_scale_xyz(lua_State* L) { return 1; } -int smlua_func_obj_set_angle(lua_State* L) { +int smlua_func_obj_scale(lua_State* L) { if (L == NULL) { return 0; } int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_angle", 4, top); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_scale", 2, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_angle"); return 0; } - s16 pitch = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_angle"); return 0; } - s16 yaw = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_angle"); return 0; } - s16 roll = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_angle"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_scale"); return 0; } + f32 scale = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_scale"); return 0; } - extern void obj_set_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll); - obj_set_angle(obj, pitch, yaw, roll); + extern void obj_scale(struct Object *obj, f32 scale); + obj_scale(obj, scale); + + return 1; +} + +int smlua_func_cur_obj_scale(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", "cur_obj_scale", 1, top); + return 0; + } + + f32 scale = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_scale"); return 0; } + + extern void cur_obj_scale(f32 scale); + cur_obj_scale(scale); + + return 1; +} + +int smlua_func_cur_obj_init_animation(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", "cur_obj_init_animation", 1, top); + return 0; + } + + s32 animIndex = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_init_animation"); return 0; } + + extern void cur_obj_init_animation(s32 animIndex); + cur_obj_init_animation(animIndex); + + return 1; +} + +int smlua_func_cur_obj_init_animation_with_sound(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", "cur_obj_init_animation_with_sound", 1, top); + return 0; + } + + s32 animIndex = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_init_animation_with_sound"); return 0; } + + extern void cur_obj_init_animation_with_sound(s32 animIndex); + cur_obj_init_animation_with_sound(animIndex); + + return 1; +} + +int smlua_func_obj_init_animation_with_accel_and_sound(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", "obj_init_animation_with_accel_and_sound", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_init_animation_with_accel_and_sound"); return 0; } + s32 animIndex = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_init_animation_with_accel_and_sound"); return 0; } + f32 accel = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_init_animation_with_accel_and_sound"); return 0; } + + extern void obj_init_animation_with_accel_and_sound(struct Object *obj, s32 animIndex, f32 accel); + obj_init_animation_with_accel_and_sound(obj, animIndex, accel); + + return 1; +} + +int smlua_func_cur_obj_init_animation_with_accel_and_sound(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", "cur_obj_init_animation_with_accel_and_sound", 2, top); + return 0; + } + + s32 animIndex = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_init_animation_with_accel_and_sound"); return 0; } + f32 accel = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_init_animation_with_accel_and_sound"); return 0; } + + extern void cur_obj_init_animation_with_accel_and_sound(s32 animIndex, f32 accel); + cur_obj_init_animation_with_accel_and_sound(animIndex, accel); + + return 1; +} + +int smlua_func_obj_init_animation_with_sound(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", "obj_init_animation_with_sound", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_init_animation_with_sound"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct AnimationTable* animations = (struct AnimationTable*)smlua_to_cobject(L, 2, LOT_ANIMATIONTABLE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_init_animation_with_sound"); return 0; } + s32 animIndex = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_init_animation_with_sound"); return 0; } + + extern void obj_init_animation_with_sound(struct Object *obj, const struct AnimationTable* animations, s32 animIndex); + obj_init_animation_with_sound(obj, animations, animIndex); + + return 1; +} + +int smlua_func_cur_obj_enable_rendering_and_become_tangible(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", "cur_obj_enable_rendering_and_become_tangible", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_enable_rendering_and_become_tangible"); return 0; } + + extern void cur_obj_enable_rendering_and_become_tangible(struct Object *obj); + cur_obj_enable_rendering_and_become_tangible(obj); + + return 1; +} + +int smlua_func_cur_obj_enable_rendering(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", "cur_obj_enable_rendering", 0, top); + return 0; + } + + + extern void cur_obj_enable_rendering(void); + cur_obj_enable_rendering(); + + return 1; +} + +int smlua_func_cur_obj_disable_rendering_and_become_intangible(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", "cur_obj_disable_rendering_and_become_intangible", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_disable_rendering_and_become_intangible"); return 0; } + + extern void cur_obj_disable_rendering_and_become_intangible(struct Object *obj); + cur_obj_disable_rendering_and_become_intangible(obj); + + return 1; +} + +int smlua_func_cur_obj_disable_rendering(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", "cur_obj_disable_rendering", 0, top); + return 0; + } + + + extern void cur_obj_disable_rendering(void); + cur_obj_disable_rendering(); + + return 1; +} + +int smlua_func_cur_obj_unhide(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", "cur_obj_unhide", 0, top); + return 0; + } + + + extern void cur_obj_unhide(void); + cur_obj_unhide(); + + return 1; +} + +int smlua_func_cur_obj_hide(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", "cur_obj_hide", 0, top); + return 0; + } + + + extern void cur_obj_hide(void); + cur_obj_hide(); + + return 1; +} + +int smlua_func_cur_obj_set_pos_relative(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_set_pos_relative", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* other = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_pos_relative"); return 0; } + f32 dleft = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_set_pos_relative"); return 0; } + f32 dy = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_set_pos_relative"); return 0; } + f32 dforward = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "cur_obj_set_pos_relative"); return 0; } + + extern void cur_obj_set_pos_relative(struct Object *other, f32 dleft, f32 dy, f32 dforward); + cur_obj_set_pos_relative(other, dleft, dy, dforward); + + return 1; +} + +int smlua_func_cur_obj_set_pos_relative_to_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", "cur_obj_set_pos_relative_to_parent", 3, top); + return 0; + } + + f32 dleft = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_pos_relative_to_parent"); return 0; } + f32 dy = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_set_pos_relative_to_parent"); return 0; } + f32 dforward = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_set_pos_relative_to_parent"); return 0; } + + extern void cur_obj_set_pos_relative_to_parent(f32 dleft, f32 dy, f32 dforward); + cur_obj_set_pos_relative_to_parent(dleft, dy, dforward); + + return 1; +} + +int smlua_func_cur_obj_enable_rendering_2(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", "cur_obj_enable_rendering_2", 0, top); + return 0; + } + + + extern void cur_obj_enable_rendering_2(void); + cur_obj_enable_rendering_2(); + + return 1; +} + +int smlua_func_cur_obj_unused_init_on_floor(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", "cur_obj_unused_init_on_floor", 0, top); + return 0; + } + + + extern void cur_obj_unused_init_on_floor(void); + cur_obj_unused_init_on_floor(); + + return 1; +} + +int smlua_func_obj_set_face_angle_to_move_angle(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_set_face_angle_to_move_angle", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_face_angle_to_move_angle"); return 0; } + + extern void obj_set_face_angle_to_move_angle(struct Object *obj); + obj_set_face_angle_to_move_angle(obj); + + return 1; +} + +int smlua_func_get_object_list_from_behavior(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", "get_object_list_from_behavior", 1, top); + return 0; + } + + BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_object_list_from_behavior"); return 0; } + + extern u32 get_object_list_from_behavior(const BehaviorScript *behavior); + lua_pushinteger(L, get_object_list_from_behavior(behavior)); + + return 1; +} + +int smlua_func_cur_obj_nearest_object_with_behavior(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", "cur_obj_nearest_object_with_behavior", 1, top); + return 0; + } + + BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_nearest_object_with_behavior"); return 0; } + + extern struct Object *cur_obj_nearest_object_with_behavior(const BehaviorScript *behavior); + smlua_push_object(L, LOT_OBJECT, cur_obj_nearest_object_with_behavior(behavior), NULL); + + return 1; +} + +int smlua_func_cur_obj_dist_to_nearest_object_with_behavior(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", "cur_obj_dist_to_nearest_object_with_behavior", 1, top); + return 0; + } + + BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_dist_to_nearest_object_with_behavior"); return 0; } + + extern f32 cur_obj_dist_to_nearest_object_with_behavior(const BehaviorScript *behavior); + lua_pushnumber(L, cur_obj_dist_to_nearest_object_with_behavior(behavior)); + + return 1; +} + +int smlua_func_cur_obj_find_nearest_pole(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", "cur_obj_find_nearest_pole", 0, top); + return 0; + } + + + extern struct Object* cur_obj_find_nearest_pole(void); + smlua_push_object(L, LOT_OBJECT, cur_obj_find_nearest_pole(), NULL); + + return 1; +} + +int smlua_func_cur_obj_find_nearest_object_with_behavior(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", "cur_obj_find_nearest_object_with_behavior", 2, top); + return 0; + } + + BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_find_nearest_object_with_behavior"); return 0; } + f32 * dist = (f32 *)smlua_to_cpointer(L, 2, LVT_F32_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_find_nearest_object_with_behavior"); return 0; } + + extern struct Object *cur_obj_find_nearest_object_with_behavior(const BehaviorScript *behavior, f32 *dist); + smlua_push_object(L, LOT_OBJECT, cur_obj_find_nearest_object_with_behavior(behavior, dist), NULL); + + return 1; +} + +int smlua_func_cur_obj_count_objects_with_behavior(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", "cur_obj_count_objects_with_behavior", 2, top); + return 0; + } + + BehaviorScript* behavior = (BehaviorScript*)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_count_objects_with_behavior"); return 0; } + f32 dist = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_count_objects_with_behavior"); return 0; } + + extern u16 cur_obj_count_objects_with_behavior(const BehaviorScript* behavior, f32 dist); + lua_pushinteger(L, cur_obj_count_objects_with_behavior(behavior, dist)); + + return 1; +} + +int smlua_func_find_unimportant_object(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", "find_unimportant_object", 0, top); + return 0; + } + + + extern struct Object *find_unimportant_object(void); + smlua_push_object(L, LOT_OBJECT, find_unimportant_object(), NULL); + + return 1; +} + +int smlua_func_count_unimportant_objects(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", "count_unimportant_objects", 0, top); + return 0; + } + + + extern s32 count_unimportant_objects(void); + lua_pushinteger(L, count_unimportant_objects()); + + return 1; +} + +int smlua_func_count_objects_with_behavior(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", "count_objects_with_behavior", 1, top); + return 0; + } + + BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "count_objects_with_behavior"); return 0; } + + extern s32 count_objects_with_behavior(const BehaviorScript *behavior); + lua_pushinteger(L, count_objects_with_behavior(behavior)); + + return 1; +} + +int smlua_func_find_object_with_behavior(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", "find_object_with_behavior", 1, top); + return 0; + } + + BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_object_with_behavior"); return 0; } + + extern struct Object *find_object_with_behavior(const BehaviorScript *behavior); + smlua_push_object(L, LOT_OBJECT, find_object_with_behavior(behavior), NULL); + + return 1; +} + +int smlua_func_cur_obj_find_nearby_held_actor(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", "cur_obj_find_nearby_held_actor", 2, top); + return 0; + } + + BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_find_nearby_held_actor"); return 0; } + f32 maxDist = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_find_nearby_held_actor"); return 0; } + + extern struct Object *cur_obj_find_nearby_held_actor(const BehaviorScript *behavior, f32 maxDist); + smlua_push_object(L, LOT_OBJECT, cur_obj_find_nearby_held_actor(behavior, maxDist), NULL); + + return 1; +} + +int smlua_func_cur_obj_reset_timer_and_subaction(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", "cur_obj_reset_timer_and_subaction", 0, top); + return 0; + } + + + extern void cur_obj_reset_timer_and_subaction(void); + cur_obj_reset_timer_and_subaction(); + + return 1; +} + +int smlua_func_cur_obj_change_action(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", "cur_obj_change_action", 1, top); + return 0; + } + + s32 action = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_change_action"); return 0; } + + extern void cur_obj_change_action(s32 action); + cur_obj_change_action(action); + + return 1; +} + +int smlua_func_cur_obj_set_vel_from_mario_vel(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", "cur_obj_set_vel_from_mario_vel", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_vel_from_mario_vel"); return 0; } + f32 f12 = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_set_vel_from_mario_vel"); return 0; } + f32 f14 = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_set_vel_from_mario_vel"); return 0; } + + extern void cur_obj_set_vel_from_mario_vel(struct MarioState* m, f32 f12, f32 f14); + cur_obj_set_vel_from_mario_vel(m, f12, f14); + + return 1; +} + +int smlua_func_cur_obj_reverse_animation(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", "cur_obj_reverse_animation", 0, top); + return 0; + } + + + extern void cur_obj_reverse_animation(void); + cur_obj_reverse_animation(); + + return 1; +} + +int smlua_func_cur_obj_extend_animation_if_at_end(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", "cur_obj_extend_animation_if_at_end", 0, top); + return 0; + } + + + extern void cur_obj_extend_animation_if_at_end(void); + cur_obj_extend_animation_if_at_end(); + + return 1; +} + +int smlua_func_cur_obj_check_if_near_animation_end(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", "cur_obj_check_if_near_animation_end", 0, top); + return 0; + } + + + extern s32 cur_obj_check_if_near_animation_end(void); + lua_pushinteger(L, cur_obj_check_if_near_animation_end()); + + return 1; +} + +int smlua_func_cur_obj_check_if_at_animation_end(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", "cur_obj_check_if_at_animation_end", 0, top); + return 0; + } + + + extern s32 cur_obj_check_if_at_animation_end(void); + lua_pushinteger(L, cur_obj_check_if_at_animation_end()); + + return 1; +} + +int smlua_func_cur_obj_check_anim_frame(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", "cur_obj_check_anim_frame", 1, top); + return 0; + } + + s32 frame = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_check_anim_frame"); return 0; } + + extern s32 cur_obj_check_anim_frame(s32 frame); + lua_pushinteger(L, cur_obj_check_anim_frame(frame)); + + return 1; +} + +int smlua_func_cur_obj_check_anim_frame_in_range(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", "cur_obj_check_anim_frame_in_range", 2, top); + return 0; + } + + s32 startFrame = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_check_anim_frame_in_range"); return 0; } + s32 rangeLength = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_check_anim_frame_in_range"); return 0; } + + extern s32 cur_obj_check_anim_frame_in_range(s32 startFrame, s32 rangeLength); + lua_pushinteger(L, cur_obj_check_anim_frame_in_range(startFrame, rangeLength)); + + return 1; +} + +int smlua_func_cur_obj_check_frame_prior_current_frame(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", "cur_obj_check_frame_prior_current_frame", 1, top); + return 0; + } + + s16 * a0 = (s16 *)smlua_to_cpointer(L, 1, LVT_S16_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_check_frame_prior_current_frame"); return 0; } + + extern s32 cur_obj_check_frame_prior_current_frame(s16 *a0); + lua_pushinteger(L, cur_obj_check_frame_prior_current_frame(a0)); + + return 1; +} + +int smlua_func_mario_is_in_air_action(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", "mario_is_in_air_action", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_is_in_air_action"); return 0; } + + extern s32 mario_is_in_air_action(struct MarioState* m); + lua_pushinteger(L, mario_is_in_air_action(m)); + + return 1; +} + +int smlua_func_mario_is_dive_sliding(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", "mario_is_dive_sliding", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_is_dive_sliding"); return 0; } + + extern s32 mario_is_dive_sliding(struct MarioState* m); + lua_pushinteger(L, mario_is_dive_sliding(m)); + + return 1; +} + +int smlua_func_cur_obj_set_y_vel_and_animation(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", "cur_obj_set_y_vel_and_animation", 2, top); + return 0; + } + + f32 sp18 = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_y_vel_and_animation"); return 0; } + s32 sp1C = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_set_y_vel_and_animation"); return 0; } + + extern void cur_obj_set_y_vel_and_animation(f32 sp18, s32 sp1C); + cur_obj_set_y_vel_and_animation(sp18, sp1C); + + return 1; +} + +int smlua_func_cur_obj_unrender_and_reset_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", "cur_obj_unrender_and_reset_state", 2, top); + return 0; + } + + s32 sp18 = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_unrender_and_reset_state"); return 0; } + s32 sp1C = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_unrender_and_reset_state"); return 0; } + + extern void cur_obj_unrender_and_reset_state(s32 sp18, s32 sp1C); + cur_obj_unrender_and_reset_state(sp18, sp1C); + + return 1; +} + +int smlua_func_cur_obj_move_after_thrown_or_dropped(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", "cur_obj_move_after_thrown_or_dropped", 2, top); + return 0; + } + + f32 forwardVel = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_move_after_thrown_or_dropped"); return 0; } + f32 velY = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_move_after_thrown_or_dropped"); return 0; } + + extern void cur_obj_move_after_thrown_or_dropped(f32 forwardVel, f32 velY); + cur_obj_move_after_thrown_or_dropped(forwardVel, velY); + + return 1; +} + +int smlua_func_cur_obj_get_thrown_or_placed(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", "cur_obj_get_thrown_or_placed", 3, top); + return 0; + } + + f32 forwardVel = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_get_thrown_or_placed"); return 0; } + f32 velY = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_get_thrown_or_placed"); return 0; } + s32 thrownAction = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_get_thrown_or_placed"); return 0; } + + extern void cur_obj_get_thrown_or_placed(f32 forwardVel, f32 velY, s32 thrownAction); + cur_obj_get_thrown_or_placed(forwardVel, velY, thrownAction); + + return 1; +} + +int smlua_func_cur_obj_get_dropped(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", "cur_obj_get_dropped", 0, top); + return 0; + } + + + extern void cur_obj_get_dropped(void); + cur_obj_get_dropped(); + + return 1; +} + +int smlua_func_mario_set_flag(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", "mario_set_flag", 1, top); + return 0; + } + + s32 flag = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_set_flag"); return 0; } + + extern void mario_set_flag(s32 flag); + mario_set_flag(flag); + + return 1; +} + +int smlua_func_cur_obj_clear_interact_status_flag(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", "cur_obj_clear_interact_status_flag", 1, top); + return 0; + } + + s32 flag = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_clear_interact_status_flag"); return 0; } + + extern s32 cur_obj_clear_interact_status_flag(s32 flag); + lua_pushinteger(L, cur_obj_clear_interact_status_flag(flag)); + + return 1; +} + +int smlua_func_obj_mark_for_deletion(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_mark_for_deletion", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_mark_for_deletion"); return 0; } + + extern void obj_mark_for_deletion(struct Object *obj); + obj_mark_for_deletion(obj); + + return 1; +} + +int smlua_func_cur_obj_disable(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", "cur_obj_disable", 0, top); + return 0; + } + + + extern void cur_obj_disable(void); + cur_obj_disable(); + + return 1; +} + +int smlua_func_cur_obj_become_intangible(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", "cur_obj_become_intangible", 0, top); + return 0; + } + + + extern void cur_obj_become_intangible(void); + cur_obj_become_intangible(); + + return 1; +} + +int smlua_func_cur_obj_become_tangible(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", "cur_obj_become_tangible", 0, top); + return 0; + } + + + extern void cur_obj_become_tangible(void); + cur_obj_become_tangible(); + + return 1; +} + +int smlua_func_obj_become_tangible(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_become_tangible", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_become_tangible"); return 0; } + + extern void obj_become_tangible(struct Object *obj); + obj_become_tangible(obj); + + return 1; +} + +int smlua_func_cur_obj_update_floor_height(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", "cur_obj_update_floor_height", 0, top); + return 0; + } + + + extern void cur_obj_update_floor_height(void); + cur_obj_update_floor_height(); + + return 1; +} + +int smlua_func_cur_obj_update_floor_height_and_get_floor(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", "cur_obj_update_floor_height_and_get_floor", 0, top); + return 0; + } + + + extern struct Surface *cur_obj_update_floor_height_and_get_floor(void); + smlua_push_object(L, LOT_SURFACE, cur_obj_update_floor_height_and_get_floor(), NULL); + + return 1; +} + +int smlua_func_apply_drag_to_value(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", "apply_drag_to_value", 2, top); + return 0; + } + + f32 * value = (f32 *)smlua_to_cpointer(L, 1, LVT_F32_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "apply_drag_to_value"); return 0; } + f32 dragStrength = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "apply_drag_to_value"); return 0; } + + extern void apply_drag_to_value(f32 *value, f32 dragStrength); + apply_drag_to_value(value, dragStrength); + + return 1; +} + +int smlua_func_cur_obj_apply_drag_xz(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", "cur_obj_apply_drag_xz", 1, top); + return 0; + } + + f32 dragStrength = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_apply_drag_xz"); return 0; } + + extern void cur_obj_apply_drag_xz(f32 dragStrength); + cur_obj_apply_drag_xz(dragStrength); + + return 1; +} + +int smlua_func_cur_obj_move_xz(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", "cur_obj_move_xz", 2, top); + return 0; + } + + f32 steepSlopeNormalY = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_move_xz"); return 0; } + s32 careAboutEdgesAndSteepSlopes = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_move_xz"); return 0; } + + extern s32 cur_obj_move_xz(f32 steepSlopeNormalY, s32 careAboutEdgesAndSteepSlopes); + lua_pushinteger(L, cur_obj_move_xz(steepSlopeNormalY, careAboutEdgesAndSteepSlopes)); + + return 1; +} + +int smlua_func_cur_obj_move_update_underwater_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", "cur_obj_move_update_underwater_flags", 0, top); + return 0; + } + + + extern void cur_obj_move_update_underwater_flags(void); + cur_obj_move_update_underwater_flags(); + + return 1; +} + +int smlua_func_cur_obj_move_update_ground_air_flags(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", "cur_obj_move_update_ground_air_flags", 2, top); + return 0; + } + + f32 gravity = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_move_update_ground_air_flags"); return 0; } + f32 bounciness = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_move_update_ground_air_flags"); return 0; } + + extern void cur_obj_move_update_ground_air_flags(UNUSED f32 gravity, f32 bounciness); + cur_obj_move_update_ground_air_flags(gravity, bounciness); + + return 1; +} + +int smlua_func_cur_obj_move_y_and_get_water_level(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", "cur_obj_move_y_and_get_water_level", 2, top); + return 0; + } + + f32 gravity = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_move_y_and_get_water_level"); return 0; } + f32 buoyancy = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_move_y_and_get_water_level"); return 0; } + + extern f32 cur_obj_move_y_and_get_water_level(f32 gravity, f32 buoyancy); + lua_pushnumber(L, cur_obj_move_y_and_get_water_level(gravity, buoyancy)); + + return 1; +} + +int smlua_func_cur_obj_move_y(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", "cur_obj_move_y", 3, top); + return 0; + } + + f32 gravity = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_move_y"); return 0; } + f32 bounciness = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_move_y"); return 0; } + f32 buoyancy = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_move_y"); return 0; } + + extern void cur_obj_move_y(f32 gravity, f32 bounciness, f32 buoyancy); + cur_obj_move_y(gravity, bounciness, buoyancy); + + return 1; +} + +int smlua_func_cur_obj_unused_resolve_wall_collisions(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", "cur_obj_unused_resolve_wall_collisions", 2, top); + return 0; + } + + f32 offsetY = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_unused_resolve_wall_collisions"); return 0; } + f32 radius = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_unused_resolve_wall_collisions"); return 0; } + + extern void cur_obj_unused_resolve_wall_collisions(f32 offsetY, f32 radius); + cur_obj_unused_resolve_wall_collisions(offsetY, radius); + + return 1; +} + +int smlua_func_abs_angle_diff(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", "abs_angle_diff", 2, top); + return 0; + } + + s16 x0 = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "abs_angle_diff"); return 0; } + s16 x1 = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "abs_angle_diff"); return 0; } + + extern s16 abs_angle_diff(s16 x0, s16 x1); + lua_pushinteger(L, abs_angle_diff(x0, x1)); + + return 1; +} + +int smlua_func_cur_obj_move_xz_using_fvel_and_yaw(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", "cur_obj_move_xz_using_fvel_and_yaw", 0, top); + return 0; + } + + + extern void cur_obj_move_xz_using_fvel_and_yaw(void); + cur_obj_move_xz_using_fvel_and_yaw(); + + return 1; +} + +int smlua_func_cur_obj_move_y_with_terminal_vel(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", "cur_obj_move_y_with_terminal_vel", 0, top); + return 0; + } + + + extern void cur_obj_move_y_with_terminal_vel(void); + cur_obj_move_y_with_terminal_vel(); + + return 1; +} + +int smlua_func_cur_obj_compute_vel_xz(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", "cur_obj_compute_vel_xz", 0, top); + return 0; + } + + + extern void cur_obj_compute_vel_xz(void); + cur_obj_compute_vel_xz(); + + return 1; +} + +int smlua_func_increment_velocity_toward_range(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "increment_velocity_toward_range", 4, top); + return 0; + } + + f32 value = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "increment_velocity_toward_range"); return 0; } + f32 center = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "increment_velocity_toward_range"); return 0; } + f32 zeroThreshold = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "increment_velocity_toward_range"); return 0; } + f32 increment = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "increment_velocity_toward_range"); return 0; } + + extern f32 increment_velocity_toward_range(f32 value, f32 center, f32 zeroThreshold, f32 increment); + lua_pushnumber(L, increment_velocity_toward_range(value, center, zeroThreshold, increment)); + + return 1; +} + +int smlua_func_obj_check_if_collided_with_object(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", "obj_check_if_collided_with_object", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_check_if_collided_with_object"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_check_if_collided_with_object"); return 0; } + + extern s32 obj_check_if_collided_with_object(struct Object *obj1, struct Object *obj2); + lua_pushinteger(L, obj_check_if_collided_with_object(obj1, obj2)); + + return 1; +} + +int smlua_func_cur_obj_set_behavior(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", "cur_obj_set_behavior", 1, top); + return 0; + } + + BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_behavior"); return 0; } + + extern void cur_obj_set_behavior(const BehaviorScript *behavior); + cur_obj_set_behavior(behavior); return 1; } @@ -26537,6 +25280,231 @@ int smlua_func_obj_set_behavior(lua_State* L) { return 1; } +int smlua_func_cur_obj_has_behavior(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", "cur_obj_has_behavior", 1, top); + return 0; + } + + BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 1, LVT_BEHAVIORSCRIPT_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_has_behavior"); return 0; } + + extern s32 cur_obj_has_behavior(const BehaviorScript *behavior); + lua_pushinteger(L, cur_obj_has_behavior(behavior)); + + return 1; +} + +int smlua_func_obj_has_behavior(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", "obj_has_behavior", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_has_behavior"); return 0; } + BehaviorScript * behavior = (BehaviorScript *)smlua_to_cpointer(L, 2, LVT_BEHAVIORSCRIPT_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_has_behavior"); return 0; } + + extern s32 obj_has_behavior(struct Object *obj, const BehaviorScript *behavior); + lua_pushinteger(L, obj_has_behavior(obj, behavior)); + + return 1; +} + +int smlua_func_cur_obj_lateral_dist_from_obj_to_home(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", "cur_obj_lateral_dist_from_obj_to_home", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_lateral_dist_from_obj_to_home"); return 0; } + + extern f32 cur_obj_lateral_dist_from_obj_to_home(struct Object *obj); + lua_pushnumber(L, cur_obj_lateral_dist_from_obj_to_home(obj)); + + return 1; +} + +int smlua_func_cur_obj_lateral_dist_from_mario_to_home(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", "cur_obj_lateral_dist_from_mario_to_home", 0, top); + return 0; + } + + + extern f32 cur_obj_lateral_dist_from_mario_to_home(void); + lua_pushnumber(L, cur_obj_lateral_dist_from_mario_to_home()); + + return 1; +} + +int smlua_func_cur_obj_lateral_dist_to_home(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", "cur_obj_lateral_dist_to_home", 0, top); + return 0; + } + + + extern f32 cur_obj_lateral_dist_to_home(void); + lua_pushnumber(L, cur_obj_lateral_dist_to_home()); + + return 1; +} + +int smlua_func_cur_obj_outside_home_square(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", "cur_obj_outside_home_square", 1, top); + return 0; + } + + f32 halfLength = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_outside_home_square"); return 0; } + + extern s32 cur_obj_outside_home_square(f32 halfLength); + lua_pushinteger(L, cur_obj_outside_home_square(halfLength)); + + return 1; +} + +int smlua_func_cur_obj_outside_home_rectangle(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_outside_home_rectangle", 4, top); + return 0; + } + + f32 minX = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_outside_home_rectangle"); return 0; } + f32 maxX = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_outside_home_rectangle"); return 0; } + f32 minZ = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_outside_home_rectangle"); return 0; } + f32 maxZ = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "cur_obj_outside_home_rectangle"); return 0; } + + extern s32 cur_obj_outside_home_rectangle(f32 minX, f32 maxX, f32 minZ, f32 maxZ); + lua_pushinteger(L, cur_obj_outside_home_rectangle(minX, maxX, minZ, maxZ)); + + return 1; +} + +int smlua_func_cur_obj_set_pos_to_home(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", "cur_obj_set_pos_to_home", 0, top); + return 0; + } + + + extern void cur_obj_set_pos_to_home(void); + cur_obj_set_pos_to_home(); + + return 1; +} + +int smlua_func_cur_obj_set_pos_to_home_and_stop(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", "cur_obj_set_pos_to_home_and_stop", 0, top); + return 0; + } + + + extern void cur_obj_set_pos_to_home_and_stop(void); + cur_obj_set_pos_to_home_and_stop(); + + return 1; +} + +int smlua_func_cur_obj_shake_y(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", "cur_obj_shake_y", 1, top); + return 0; + } + + f32 amount = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_shake_y"); return 0; } + + extern void cur_obj_shake_y(f32 amount); + cur_obj_shake_y(amount); + + return 1; +} + +int smlua_func_cur_obj_start_cam_event(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", "cur_obj_start_cam_event", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_start_cam_event"); return 0; } + s32 cameraEvent = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_start_cam_event"); return 0; } + + extern void cur_obj_start_cam_event(UNUSED struct Object *obj, s32 cameraEvent); + cur_obj_start_cam_event(obj, cameraEvent); + + return 1; +} + +int smlua_func_set_mario_interact_hoot_if_in_range(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", "set_mario_interact_hoot_if_in_range", 3, top); + return 0; + } + + s32 sp0 = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_mario_interact_hoot_if_in_range"); return 0; } + s32 sp4 = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_mario_interact_hoot_if_in_range"); return 0; } + f32 sp8 = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_mario_interact_hoot_if_in_range"); return 0; } + + extern void set_mario_interact_hoot_if_in_range(UNUSED s32 sp0, UNUSED s32 sp4, f32 sp8); + set_mario_interact_hoot_if_in_range(sp0, sp4, sp8); + + return 1; +} + int smlua_func_obj_set_billboard(lua_State* L) { if (L == NULL) { return 0; } @@ -26556,30 +25524,6 @@ int smlua_func_obj_set_billboard(lua_State* L) { return 1; } -/* -int smlua_func_obj_set_collision_data(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", "obj_set_collision_data", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_collision_data"); return 0; } - if (lua_isnil(L, 2)) { return 0; } -// void * segAddr = (void *)smlua_to_cobject(L, 2, LOT_???); <--- UNIMPLEMENTED - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_collision_data"); return 0; } - - extern void obj_set_collision_data(struct Object *obj, const void *segAddr); - obj_set_collision_data(obj, segAddr); - - return 1; -} -*/ - int smlua_func_obj_set_cylboard(lua_State* L) { if (L == NULL) { return 0; } @@ -26599,205 +25543,18 @@ int smlua_func_obj_set_cylboard(lua_State* L) { return 1; } -int smlua_func_obj_set_face_angle(lua_State* L) { +int smlua_func_cur_obj_set_billboard_if_vanilla_cam(UNUSED lua_State* L) { if (L == NULL) { return 0; } int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_face_angle", 4, top); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_set_billboard_if_vanilla_cam", 0, top); return 0; } - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_face_angle"); return 0; } - s16 pitch = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_face_angle"); return 0; } - s16 yaw = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_face_angle"); return 0; } - s16 roll = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_face_angle"); return 0; } - extern void obj_set_face_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll); - obj_set_face_angle(obj, pitch, yaw, roll); - - return 1; -} - -int smlua_func_obj_set_face_angle_to_move_angle(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_set_face_angle_to_move_angle", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_face_angle_to_move_angle"); return 0; } - - extern void obj_set_face_angle_to_move_angle(struct Object *obj); - obj_set_face_angle_to_move_angle(obj); - - return 1; -} - -int smlua_func_obj_set_gfx_angle(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_gfx_angle", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_gfx_angle"); return 0; } - s16 pitch = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_gfx_angle"); return 0; } - s16 yaw = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_gfx_angle"); return 0; } - s16 roll = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_gfx_angle"); return 0; } - - extern void obj_set_gfx_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll); - obj_set_gfx_angle(obj, pitch, yaw, roll); - - return 1; -} - -int smlua_func_obj_set_gfx_pos(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_gfx_pos", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_gfx_pos"); return 0; } - f32 x = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_gfx_pos"); return 0; } - f32 y = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_gfx_pos"); return 0; } - f32 z = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_gfx_pos"); return 0; } - - extern void obj_set_gfx_pos(struct Object *obj, f32 x, f32 y, f32 z); - obj_set_gfx_pos(obj, x, y, z); - - return 1; -} - -int smlua_func_obj_set_gfx_pos_at_obj_pos(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", "obj_set_gfx_pos_at_obj_pos", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_gfx_pos_at_obj_pos"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_gfx_pos_at_obj_pos"); return 0; } - - extern void obj_set_gfx_pos_at_obj_pos(struct Object *obj1, struct Object *obj2); - obj_set_gfx_pos_at_obj_pos(obj1, obj2); - - return 1; -} - -int smlua_func_obj_set_gfx_pos_from_pos(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_set_gfx_pos_from_pos", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_gfx_pos_from_pos"); return 0; } - - extern void obj_set_gfx_pos_from_pos(struct Object *obj); - obj_set_gfx_pos_from_pos(obj); - - return 1; -} - -int smlua_func_obj_set_gfx_scale(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_gfx_scale", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_gfx_scale"); return 0; } - f32 x = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_gfx_scale"); return 0; } - f32 y = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_gfx_scale"); return 0; } - f32 z = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_gfx_scale"); return 0; } - - extern void obj_set_gfx_scale(struct Object *obj, f32 x, f32 y, f32 z); - obj_set_gfx_scale(obj, x, y, z); - - return 1; -} - -int smlua_func_obj_set_held_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", "obj_set_held_state", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_held_state"); return 0; } - BehaviorScript * heldBehavior = (BehaviorScript *)smlua_to_cpointer(L, 2, LVT_BEHAVIORSCRIPT_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_held_state"); return 0; } - - extern void obj_set_held_state(struct Object *obj, const BehaviorScript *heldBehavior); - obj_set_held_state(obj, heldBehavior); - - return 1; -} - -int smlua_func_obj_set_hitbox(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", "obj_set_hitbox", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_hitbox"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct ObjectHitbox* hitbox = (struct ObjectHitbox*)smlua_to_cobject(L, 2, LOT_OBJECTHITBOX); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_hitbox"); return 0; } - - extern void obj_set_hitbox(struct Object *obj, struct ObjectHitbox *hitbox); - obj_set_hitbox(obj, hitbox); + extern void cur_obj_set_billboard_if_vanilla_cam(void); + cur_obj_set_billboard_if_vanilla_cam(); return 1; } @@ -26848,149 +25605,42 @@ int smlua_func_obj_set_hurtbox_radius_and_height(lua_State* L) { return 1; } -int smlua_func_obj_set_move_angle(lua_State* L) { +int smlua_func_cur_obj_set_hitbox_radius_and_height(lua_State* L) { if (L == NULL) { return 0; } int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_move_angle", 4, top); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_set_hitbox_radius_and_height", 2, top); return 0; } - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_move_angle"); return 0; } - s16 pitch = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_move_angle"); return 0; } - s16 yaw = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_move_angle"); return 0; } - s16 roll = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_move_angle"); return 0; } + f32 radius = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_hitbox_radius_and_height"); return 0; } + f32 height = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_set_hitbox_radius_and_height"); return 0; } - extern void obj_set_move_angle(struct Object *obj, s16 pitch, s16 yaw, s16 roll); - obj_set_move_angle(obj, pitch, yaw, roll); + extern void cur_obj_set_hitbox_radius_and_height(f32 radius, f32 height); + cur_obj_set_hitbox_radius_and_height(radius, height); return 1; } -int smlua_func_obj_set_parent_relative_pos(lua_State* L) { +int smlua_func_cur_obj_set_hurtbox_radius_and_height(lua_State* L) { if (L == NULL) { return 0; } int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_parent_relative_pos", 4, top); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_set_hurtbox_radius_and_height", 2, top); return 0; } - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_parent_relative_pos"); return 0; } - s16 relX = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_parent_relative_pos"); return 0; } - s16 relY = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_parent_relative_pos"); return 0; } - s16 relZ = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_parent_relative_pos"); return 0; } + f32 radius = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_hurtbox_radius_and_height"); return 0; } + f32 height = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_set_hurtbox_radius_and_height"); return 0; } - extern void obj_set_parent_relative_pos(struct Object *obj, s16 relX, s16 relY, s16 relZ); - obj_set_parent_relative_pos(obj, relX, relY, relZ); - - return 1; -} - -int smlua_func_obj_set_pos(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_pos", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_pos"); return 0; } - s16 x = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_pos"); return 0; } - s16 y = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_pos"); return 0; } - s16 z = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_pos"); return 0; } - - extern void obj_set_pos(struct Object *obj, s16 x, s16 y, s16 z); - obj_set_pos(obj, x, y, z); - - return 1; -} - -int smlua_func_obj_set_pos_relative(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 5) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_pos_relative", 5, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_pos_relative"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Object* other = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_pos_relative"); return 0; } - f32 dleft = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_pos_relative"); return 0; } - f32 dy = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_pos_relative"); return 0; } - f32 dforward = smlua_to_number(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "obj_set_pos_relative"); return 0; } - - extern void obj_set_pos_relative(struct Object *obj, struct Object *other, f32 dleft, f32 dy, f32 dforward); - obj_set_pos_relative(obj, other, dleft, dy, dforward); - - return 1; -} - -int smlua_func_obj_set_throw_matrix_from_transform(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_set_throw_matrix_from_transform", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_throw_matrix_from_transform"); return 0; } - - extern void obj_set_throw_matrix_from_transform(struct Object *obj); - obj_set_throw_matrix_from_transform(obj); - - return 1; -} - -int smlua_func_obj_spawn_loot_blue_coins(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_spawn_loot_blue_coins", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_spawn_loot_blue_coins"); return 0; } - s32 numCoins = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_spawn_loot_blue_coins"); return 0; } - f32 sp28 = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_spawn_loot_blue_coins"); return 0; } - s16 posJitter = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_spawn_loot_blue_coins"); return 0; } - - extern void obj_spawn_loot_blue_coins(struct Object *obj, s32 numCoins, f32 sp28, s16 posJitter); - obj_spawn_loot_blue_coins(obj, numCoins, sp28, posJitter); + extern void cur_obj_set_hurtbox_radius_and_height(f32 radius, f32 height); + cur_obj_set_hurtbox_radius_and_height(radius, height); return 1; } @@ -27024,6 +25674,31 @@ int smlua_func_obj_spawn_loot_coins(lua_State* L) { return 1; } +int smlua_func_obj_spawn_loot_blue_coins(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_spawn_loot_blue_coins", 4, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_spawn_loot_blue_coins"); return 0; } + s32 numCoins = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_spawn_loot_blue_coins"); return 0; } + f32 sp28 = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_spawn_loot_blue_coins"); return 0; } + s16 posJitter = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_spawn_loot_blue_coins"); return 0; } + + extern void obj_spawn_loot_blue_coins(struct Object *obj, s32 numCoins, f32 sp28, s16 posJitter); + obj_spawn_loot_blue_coins(obj, numCoins, sp28, posJitter); + + return 1; +} + int smlua_func_obj_spawn_loot_yellow_coins(lua_State* L) { if (L == NULL) { return 0; } @@ -27047,6 +25722,273 @@ int smlua_func_obj_spawn_loot_yellow_coins(lua_State* L) { return 1; } +int smlua_func_cur_obj_spawn_loot_coin_at_mario_pos(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", "cur_obj_spawn_loot_coin_at_mario_pos", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_spawn_loot_coin_at_mario_pos"); return 0; } + + extern void cur_obj_spawn_loot_coin_at_mario_pos(struct MarioState* m); + cur_obj_spawn_loot_coin_at_mario_pos(m); + + return 1; +} + +int smlua_func_cur_obj_abs_y_dist_to_home(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", "cur_obj_abs_y_dist_to_home", 0, top); + return 0; + } + + + extern f32 cur_obj_abs_y_dist_to_home(void); + lua_pushnumber(L, cur_obj_abs_y_dist_to_home()); + + return 1; +} + +int smlua_func_cur_obj_advance_looping_anim(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", "cur_obj_advance_looping_anim", 0, top); + return 0; + } + + + extern s32 cur_obj_advance_looping_anim(void); + lua_pushinteger(L, cur_obj_advance_looping_anim()); + + return 1; +} + +int smlua_func_cur_obj_detect_steep_floor(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", "cur_obj_detect_steep_floor", 1, top); + return 0; + } + + s16 steepAngleDegrees = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_detect_steep_floor"); return 0; } + + extern s32 cur_obj_detect_steep_floor(s16 steepAngleDegrees); + lua_pushinteger(L, cur_obj_detect_steep_floor(steepAngleDegrees)); + + return 1; +} + +int smlua_func_cur_obj_resolve_wall_collisions(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", "cur_obj_resolve_wall_collisions", 0, top); + return 0; + } + + + extern s32 cur_obj_resolve_wall_collisions(void); + lua_pushinteger(L, cur_obj_resolve_wall_collisions()); + + return 1; +} + +int smlua_func_cur_obj_update_floor(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", "cur_obj_update_floor", 0, top); + return 0; + } + + + extern void cur_obj_update_floor(void); + cur_obj_update_floor(); + + return 1; +} + +int smlua_func_cur_obj_update_floor_and_resolve_wall_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", "cur_obj_update_floor_and_resolve_wall_collisions", 1, top); + return 0; + } + + s16 steepSlopeDegrees = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_update_floor_and_resolve_wall_collisions"); return 0; } + + extern void cur_obj_update_floor_and_resolve_wall_collisions(s16 steepSlopeDegrees); + cur_obj_update_floor_and_resolve_wall_collisions(steepSlopeDegrees); + + return 1; +} + +int smlua_func_cur_obj_update_floor_and_walls(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", "cur_obj_update_floor_and_walls", 0, top); + return 0; + } + + + extern void cur_obj_update_floor_and_walls(void); + cur_obj_update_floor_and_walls(); + + return 1; +} + +int smlua_func_cur_obj_move_standard(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", "cur_obj_move_standard", 1, top); + return 0; + } + + s16 steepSlopeAngleDegrees = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_move_standard"); return 0; } + + extern void cur_obj_move_standard(s16 steepSlopeAngleDegrees); + cur_obj_move_standard(steepSlopeAngleDegrees); + + return 1; +} + +int smlua_func_cur_obj_within_12k_bounds(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", "cur_obj_within_12k_bounds", 0, top); + return 0; + } + + + extern s32 cur_obj_within_12k_bounds(void); + lua_pushinteger(L, cur_obj_within_12k_bounds()); + + return 1; +} + +int smlua_func_cur_obj_move_using_vel_and_gravity(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", "cur_obj_move_using_vel_and_gravity", 0, top); + return 0; + } + + + extern void cur_obj_move_using_vel_and_gravity(void); + cur_obj_move_using_vel_and_gravity(); + + return 1; +} + +int smlua_func_cur_obj_move_using_fvel_and_gravity(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", "cur_obj_move_using_fvel_and_gravity", 0, top); + return 0; + } + + + extern void cur_obj_move_using_fvel_and_gravity(void); + cur_obj_move_using_fvel_and_gravity(); + + return 1; +} + +int smlua_func_obj_set_pos_relative(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 5) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_pos_relative", 5, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_pos_relative"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* other = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_pos_relative"); return 0; } + f32 dleft = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_pos_relative"); return 0; } + f32 dy = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_pos_relative"); return 0; } + f32 dforward = smlua_to_number(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "obj_set_pos_relative"); return 0; } + + extern void obj_set_pos_relative(struct Object *obj, struct Object *other, f32 dleft, f32 dy, f32 dforward); + obj_set_pos_relative(obj, other, dleft, dy, dforward); + + return 1; +} + +int smlua_func_cur_obj_angle_to_home(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", "cur_obj_angle_to_home", 0, top); + return 0; + } + + + extern s16 cur_obj_angle_to_home(void); + lua_pushinteger(L, cur_obj_angle_to_home()); + + return 1; +} + +int smlua_func_obj_set_gfx_pos_at_obj_pos(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", "obj_set_gfx_pos_at_obj_pos", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_gfx_pos_at_obj_pos"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* obj2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_gfx_pos_at_obj_pos"); return 0; } + + extern void obj_set_gfx_pos_at_obj_pos(struct Object *obj1, struct Object *obj2); + obj_set_gfx_pos_at_obj_pos(obj1, obj2); + + return 1; +} + int smlua_func_obj_translate_local(lua_State* L) { if (L == NULL) { return 0; } @@ -27070,6 +26012,212 @@ int smlua_func_obj_translate_local(lua_State* L) { return 1; } +int smlua_func_obj_build_transform_from_pos_and_angle(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", "obj_build_transform_from_pos_and_angle", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_build_transform_from_pos_and_angle"); return 0; } + s16 posIndex = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_build_transform_from_pos_and_angle"); return 0; } + s16 angleIndex = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_build_transform_from_pos_and_angle"); return 0; } + + extern void obj_build_transform_from_pos_and_angle(struct Object *obj, s16 posIndex, s16 angleIndex); + obj_build_transform_from_pos_and_angle(obj, posIndex, angleIndex); + + return 1; +} + +int smlua_func_obj_set_throw_matrix_from_transform(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_set_throw_matrix_from_transform", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_throw_matrix_from_transform"); return 0; } + + extern void obj_set_throw_matrix_from_transform(struct Object *obj); + obj_set_throw_matrix_from_transform(obj); + + return 1; +} + +int smlua_func_obj_build_transform_relative_to_parent(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_build_transform_relative_to_parent", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_build_transform_relative_to_parent"); return 0; } + + extern void obj_build_transform_relative_to_parent(struct Object *obj); + obj_build_transform_relative_to_parent(obj); + + return 1; +} + +int smlua_func_obj_create_transform_from_self(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_create_transform_from_self", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_create_transform_from_self"); return 0; } + + extern void obj_create_transform_from_self(struct Object *obj); + obj_create_transform_from_self(obj); + + return 1; +} + +int smlua_func_cur_obj_rotate_move_angle_using_vel(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", "cur_obj_rotate_move_angle_using_vel", 0, top); + return 0; + } + + + extern void cur_obj_rotate_move_angle_using_vel(void); + cur_obj_rotate_move_angle_using_vel(); + + return 1; +} + +int smlua_func_cur_obj_rotate_face_angle_using_vel(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", "cur_obj_rotate_face_angle_using_vel", 0, top); + return 0; + } + + + extern void cur_obj_rotate_face_angle_using_vel(void); + cur_obj_rotate_face_angle_using_vel(); + + return 1; +} + +int smlua_func_cur_obj_set_face_angle_to_move_angle(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", "cur_obj_set_face_angle_to_move_angle", 0, top); + return 0; + } + + + extern void cur_obj_set_face_angle_to_move_angle(void); + cur_obj_set_face_angle_to_move_angle(); + + return 1; +} + +int smlua_func_cur_obj_follow_path(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", "cur_obj_follow_path", 1, top); + return 0; + } + + s32 unusedArg = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_follow_path"); return 0; } + + extern s32 cur_obj_follow_path(UNUSED s32 unusedArg); + lua_pushinteger(L, cur_obj_follow_path(unusedArg)); + + return 1; +} + +int smlua_func_chain_segment_init(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", "chain_segment_init", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct ChainSegment* segment = (struct ChainSegment*)smlua_to_cobject(L, 1, LOT_CHAINSEGMENT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "chain_segment_init"); return 0; } + + extern void chain_segment_init(struct ChainSegment *segment); + chain_segment_init(segment); + + return 1; +} + +int smlua_func_random_f32_around_zero(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", "random_f32_around_zero", 1, top); + return 0; + } + + f32 diameter = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "random_f32_around_zero"); return 0; } + + extern f32 random_f32_around_zero(f32 diameter); + lua_pushnumber(L, random_f32_around_zero(diameter)); + + return 1; +} + +int smlua_func_obj_scale_random(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", "obj_scale_random", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_scale_random"); return 0; } + f32 rangeLength = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_scale_random"); return 0; } + f32 minScale = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_scale_random"); return 0; } + + extern void obj_scale_random(struct Object *obj, f32 rangeLength, f32 minScale); + obj_scale_random(obj, rangeLength, minScale); + + return 1; +} + int smlua_func_obj_translate_xyz_random(lua_State* L) { if (L == NULL) { return 0; } @@ -27112,127 +26260,744 @@ int smlua_func_obj_translate_xz_random(lua_State* L) { return 1; } -int smlua_func_obj_turn_toward_object(lua_State* L) { +int smlua_func_obj_build_vel_from_transform(lua_State* L) { if (L == NULL) { return 0; } int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_turn_toward_object", 4, top); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_build_vel_from_transform", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* a0 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_build_vel_from_transform"); return 0; } + + extern void obj_build_vel_from_transform(struct Object *a0); + obj_build_vel_from_transform(a0); + + return 1; +} + +int smlua_func_cur_obj_set_pos_via_transform(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", "cur_obj_set_pos_via_transform", 0, top); + return 0; + } + + + extern void cur_obj_set_pos_via_transform(void); + cur_obj_set_pos_via_transform(); + + return 1; +} + +int smlua_func_cur_obj_reflect_move_angle_off_wall(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", "cur_obj_reflect_move_angle_off_wall", 0, top); + return 0; + } + + + extern s16 cur_obj_reflect_move_angle_off_wall(void); + lua_pushinteger(L, cur_obj_reflect_move_angle_off_wall()); + + return 1; +} + +int smlua_func_cur_obj_spawn_particles(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", "cur_obj_spawn_particles", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct SpawnParticlesInfo* info = (struct SpawnParticlesInfo*)smlua_to_cobject(L, 1, LOT_SPAWNPARTICLESINFO); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_spawn_particles"); return 0; } + + extern void cur_obj_spawn_particles(struct SpawnParticlesInfo *info); + cur_obj_spawn_particles(info); + + return 1; +} + +int smlua_func_obj_set_hitbox(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", "obj_set_hitbox", 2, top); return 0; } if (lua_isnil(L, 1)) { return 0; } struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_turn_toward_object"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_hitbox"); return 0; } if (lua_isnil(L, 2)) { return 0; } - struct Object* target = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_turn_toward_object"); return 0; } - s16 angleIndex = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_turn_toward_object"); return 0; } - s16 turnAmount = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_turn_toward_object"); return 0; } + struct ObjectHitbox* hitbox = (struct ObjectHitbox*)smlua_to_cobject(L, 2, LOT_OBJECTHITBOX); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_hitbox"); return 0; } - extern s16 obj_turn_toward_object(struct Object *obj, struct Object *target, s16 angleIndex, s16 turnAmount); - lua_pushinteger(L, obj_turn_toward_object(obj, target, angleIndex, turnAmount)); + extern void obj_set_hitbox(struct Object *obj, struct ObjectHitbox *hitbox); + obj_set_hitbox(obj, hitbox); return 1; } -int smlua_func_obj_update_pos_from_parent_transformation(lua_State* L) { +int smlua_func_signum_positive(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", "signum_positive", 1, top); + return 0; + } + + s32 x = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "signum_positive"); return 0; } + + extern s32 signum_positive(s32 x); + lua_pushinteger(L, signum_positive(x)); + + return 1; +} + +int smlua_func_cur_obj_wait_then_blink(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", "obj_update_pos_from_parent_transformation", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_wait_then_blink", 2, top); return 0; } + s32 timeUntilBlinking = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_wait_then_blink"); return 0; } + s32 numBlinks = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_wait_then_blink"); return 0; } - Mat4 a0; - smlua_get_mat4(a0, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_update_pos_from_parent_transformation"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Object* a1 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_update_pos_from_parent_transformation"); return 0; } - - extern void obj_update_pos_from_parent_transformation(Mat4 a0, struct Object *a1); - obj_update_pos_from_parent_transformation(a0, a1); - - smlua_push_mat4(a0, 1); + extern s32 cur_obj_wait_then_blink(s32 timeUntilBlinking, s32 numBlinks); + lua_pushinteger(L, cur_obj_wait_then_blink(timeUntilBlinking, numBlinks)); return 1; } -int smlua_func_player_performed_grab_escape_action(UNUSED lua_State* L) { +int smlua_func_cur_obj_is_mario_ground_pounding_platform(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", "player_performed_grab_escape_action", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_is_mario_ground_pounding_platform", 0, top); return 0; } - extern s32 player_performed_grab_escape_action(void); - lua_pushinteger(L, player_performed_grab_escape_action()); + extern s32 cur_obj_is_mario_ground_pounding_platform(void); + lua_pushinteger(L, cur_obj_is_mario_ground_pounding_platform()); return 1; } -int smlua_func_random_f32_around_zero(lua_State* L) { +int smlua_func_spawn_mist_particles(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", "spawn_mist_particles", 0, top); + return 0; + } + + + extern void spawn_mist_particles(void); + spawn_mist_particles(); + + return 1; +} + +int smlua_func_spawn_mist_particles_with_sound(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", "random_f32_around_zero", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "spawn_mist_particles_with_sound", 1, top); return 0; } - f32 diameter = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "random_f32_around_zero"); return 0; } + u32 sp18 = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_mist_particles_with_sound"); return 0; } - extern f32 random_f32_around_zero(f32 diameter); - lua_pushnumber(L, random_f32_around_zero(diameter)); + extern void spawn_mist_particles_with_sound(u32 sp18); + spawn_mist_particles_with_sound(sp18); return 1; } -int smlua_func_set_mario_interact_hoot_if_in_range(lua_State* L) { +int smlua_func_cur_obj_push_mario_away(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", "set_mario_interact_hoot_if_in_range", 3, top); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_push_mario_away", 1, top); + return 0; + } + + f32 radius = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_push_mario_away"); return 0; } + + extern void cur_obj_push_mario_away(f32 radius); + cur_obj_push_mario_away(radius); + + return 1; +} + +int smlua_func_cur_obj_push_mario_away_from_cylinder(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", "cur_obj_push_mario_away_from_cylinder", 2, top); + return 0; + } + + f32 radius = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_push_mario_away_from_cylinder"); return 0; } + f32 extentY = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_push_mario_away_from_cylinder"); return 0; } + + extern void cur_obj_push_mario_away_from_cylinder(f32 radius, f32 extentY); + cur_obj_push_mario_away_from_cylinder(radius, extentY); + + return 1; +} + +int smlua_func_bhv_dust_smoke_loop(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", "bhv_dust_smoke_loop", 0, top); + return 0; + } + + + extern void bhv_dust_smoke_loop(void); + bhv_dust_smoke_loop(); + + return 1; +} + +int smlua_func_stub_obj_helpers_3(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", "stub_obj_helpers_3", 2, top); return 0; } s32 sp0 = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_mario_interact_hoot_if_in_range"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "stub_obj_helpers_3"); return 0; } s32 sp4 = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_mario_interact_hoot_if_in_range"); return 0; } - f32 sp8 = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "set_mario_interact_hoot_if_in_range"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "stub_obj_helpers_3"); return 0; } - extern void set_mario_interact_hoot_if_in_range(UNUSED s32 sp0, UNUSED s32 sp4, f32 sp8); - set_mario_interact_hoot_if_in_range(sp0, sp4, sp8); + extern void stub_obj_helpers_3(UNUSED s32 sp0, UNUSED s32 sp4); + stub_obj_helpers_3(sp0, sp4); return 1; } -int smlua_func_set_room_override(lua_State* L) { +int smlua_func_cur_obj_scale_over_time(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_scale_over_time", 4, top); + return 0; + } + + s32 a0 = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_scale_over_time"); return 0; } + s32 a1 = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_scale_over_time"); return 0; } + f32 sp10 = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_scale_over_time"); return 0; } + f32 sp14 = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "cur_obj_scale_over_time"); return 0; } + + extern void cur_obj_scale_over_time(s32 a0, s32 a1, f32 sp10, f32 sp14); + cur_obj_scale_over_time(a0, a1, sp10, sp14); + + return 1; +} + +int smlua_func_cur_obj_set_pos_to_home_with_debug(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", "cur_obj_set_pos_to_home_with_debug", 0, top); + return 0; + } + + + extern void cur_obj_set_pos_to_home_with_debug(void); + cur_obj_set_pos_to_home_with_debug(); + + return 1; +} + +int smlua_func_stub_obj_helpers_4(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", "stub_obj_helpers_4", 0, top); + return 0; + } + + + extern void stub_obj_helpers_4(void); + stub_obj_helpers_4(); + + return 1; +} + +int smlua_func_cur_obj_is_mario_on_platform(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", "cur_obj_is_mario_on_platform", 0, top); + return 0; + } + + + extern s32 cur_obj_is_mario_on_platform(void); + lua_pushinteger(L, cur_obj_is_mario_on_platform()); + + return 1; +} + +int smlua_func_cur_obj_is_any_player_on_platform(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", "cur_obj_is_any_player_on_platform", 0, top); + return 0; + } + + + extern s32 cur_obj_is_any_player_on_platform(void); + lua_pushinteger(L, cur_obj_is_any_player_on_platform()); + + return 1; +} + +int smlua_func_cur_obj_shake_y_until(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", "cur_obj_shake_y_until", 2, top); + return 0; + } + + s32 cycles = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_shake_y_until"); return 0; } + s32 amount = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_shake_y_until"); return 0; } + + extern s32 cur_obj_shake_y_until(s32 cycles, s32 amount); + lua_pushinteger(L, cur_obj_shake_y_until(cycles, amount)); + + return 1; +} + +int smlua_func_cur_obj_move_up_and_down(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", "set_room_override", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_move_up_and_down", 1, top); return 0; } - s16 room = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_room_override"); return 0; } + s32 a0 = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_move_up_and_down"); return 0; } - extern void set_room_override(s16 room); - set_room_override(room); + extern s32 cur_obj_move_up_and_down(s32 a0); + lua_pushinteger(L, cur_obj_move_up_and_down(a0)); + + return 1; +} + +int smlua_func_spawn_star_with_no_lvl_exit(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", "spawn_star_with_no_lvl_exit", 2, top); + return 0; + } + + s32 sp20 = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_star_with_no_lvl_exit"); return 0; } + s32 sp24 = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_star_with_no_lvl_exit"); return 0; } + + extern struct Object *spawn_star_with_no_lvl_exit(s32 sp20, s32 sp24); + smlua_push_object(L, LOT_OBJECT, spawn_star_with_no_lvl_exit(sp20, sp24), NULL); + + return 1; +} + +int smlua_func_spawn_base_star_with_no_lvl_exit(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", "spawn_base_star_with_no_lvl_exit", 0, top); + return 0; + } + + + extern void spawn_base_star_with_no_lvl_exit(void); + spawn_base_star_with_no_lvl_exit(); + + return 1; +} + +int smlua_func_bit_shift_left(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", "bit_shift_left", 1, top); + return 0; + } + + s32 a0 = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "bit_shift_left"); return 0; } + + extern s32 bit_shift_left(s32 a0); + lua_pushinteger(L, bit_shift_left(a0)); + + return 1; +} + +int smlua_func_cur_obj_mario_far_away(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", "cur_obj_mario_far_away", 0, top); + return 0; + } + + + extern s32 cur_obj_mario_far_away(void); + lua_pushinteger(L, cur_obj_mario_far_away()); + + return 1; +} + +int smlua_func_is_mario_moving_fast_or_in_air(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", "is_mario_moving_fast_or_in_air", 1, top); + return 0; + } + + s32 speedThreshold = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_mario_moving_fast_or_in_air"); return 0; } + + extern s32 is_mario_moving_fast_or_in_air(s32 speedThreshold); + lua_pushinteger(L, is_mario_moving_fast_or_in_air(speedThreshold)); + + return 1; +} + +int smlua_func_is_item_in_array(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", "is_item_in_array", 2, top); + return 0; + } + + s8 item = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "is_item_in_array"); return 0; } + s8 * array = (s8 *)smlua_to_cpointer(L, 2, LVT_S8_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "is_item_in_array"); return 0; } + + extern s32 is_item_in_array(s8 item, s8 *array); + lua_pushinteger(L, is_item_in_array(item, array)); + + return 1; +} + +int smlua_func_bhv_init_room(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", "bhv_init_room", 0, top); + return 0; + } + + + extern void bhv_init_room(void); + bhv_init_room(); + + return 1; +} + +int smlua_func_cur_obj_enable_rendering_if_mario_in_room(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", "cur_obj_enable_rendering_if_mario_in_room", 0, top); + return 0; + } + + + extern void cur_obj_enable_rendering_if_mario_in_room(void); + cur_obj_enable_rendering_if_mario_in_room(); + + return 1; +} + +int smlua_func_cur_obj_set_hitbox_and_die_if_attacked(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", "cur_obj_set_hitbox_and_die_if_attacked", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct ObjectHitbox* hitbox = (struct ObjectHitbox*)smlua_to_cobject(L, 1, LOT_OBJECTHITBOX); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_set_hitbox_and_die_if_attacked"); return 0; } + s32 deathSound = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_set_hitbox_and_die_if_attacked"); return 0; } + s32 noLootCoins = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_set_hitbox_and_die_if_attacked"); return 0; } + + extern s32 cur_obj_set_hitbox_and_die_if_attacked(struct ObjectHitbox *hitbox, s32 deathSound, s32 noLootCoins); + lua_pushinteger(L, cur_obj_set_hitbox_and_die_if_attacked(hitbox, deathSound, noLootCoins)); + + return 1; +} + +int smlua_func_obj_explode_and_spawn_coins(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", "obj_explode_and_spawn_coins", 2, top); + return 0; + } + + f32 sp18 = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_explode_and_spawn_coins"); return 0; } + s32 sp1C = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_explode_and_spawn_coins"); return 0; } + + extern void obj_explode_and_spawn_coins(f32 sp18, s32 sp1C); + obj_explode_and_spawn_coins(sp18, sp1C); + + return 1; +} + +/* +int smlua_func_obj_set_collision_data(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", "obj_set_collision_data", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_collision_data"); return 0; } + if (lua_isnil(L, 2)) { return 0; } +// void * segAddr = (void *)smlua_to_cobject(L, 2, LOT_???); <--- UNIMPLEMENTED + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_collision_data"); return 0; } + + extern void obj_set_collision_data(struct Object *obj, const void *segAddr); + obj_set_collision_data(obj, segAddr); + + return 1; +} +*/ + +int smlua_func_cur_obj_if_hit_wall_bounce_away(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", "cur_obj_if_hit_wall_bounce_away", 0, top); + return 0; + } + + + extern void cur_obj_if_hit_wall_bounce_away(void); + cur_obj_if_hit_wall_bounce_away(); + + return 1; +} + +int smlua_func_cur_obj_hide_if_mario_far_away_y(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", "cur_obj_hide_if_mario_far_away_y", 1, top); + return 0; + } + + f32 distY = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_hide_if_mario_far_away_y"); return 0; } + + extern s32 cur_obj_hide_if_mario_far_away_y(f32 distY); + lua_pushinteger(L, cur_obj_hide_if_mario_far_away_y(distY)); + + 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; } + if (lua_isnil(L, 2)) { 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); + + smlua_push_mat4(mtx, 3); + + 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; } + if (lua_isnil(L, 2)) { 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; } + + int top = lua_gettop(L); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_is_hidden", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_is_hidden"); return 0; } + + extern s32 obj_is_hidden(struct Object *obj); + lua_pushinteger(L, obj_is_hidden(obj)); + + return 1; +} + +int smlua_func_enable_time_stop(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", "enable_time_stop", 0, top); + return 0; + } + + + extern void enable_time_stop(void); + enable_time_stop(); + + return 1; +} + +int smlua_func_enable_time_stop_if_alone(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", "enable_time_stop_if_alone", 0, top); + return 0; + } + + + extern void enable_time_stop_if_alone(void); + enable_time_stop_if_alone(); + + return 1; +} + +int smlua_func_disable_time_stop(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", "disable_time_stop", 0, top); + return 0; + } + + + extern void disable_time_stop(void); + disable_time_stop(); return 1; } @@ -27273,148 +27038,458 @@ int smlua_func_set_time_stop_flags_if_alone(lua_State* L) { return 1; } -int smlua_func_signum_positive(lua_State* L) { +int smlua_func_clear_time_stop_flags(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", "signum_positive", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "clear_time_stop_flags", 1, top); return 0; } - s32 x = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "signum_positive"); return 0; } + s32 flags = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "clear_time_stop_flags"); return 0; } - extern s32 signum_positive(s32 x); - lua_pushinteger(L, signum_positive(x)); + extern void clear_time_stop_flags(s32 flags); + clear_time_stop_flags(flags); return 1; } -int smlua_func_spawn_base_star_with_no_lvl_exit(UNUSED lua_State* L) { +int smlua_func_cur_obj_can_mario_activate_textbox(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", "spawn_base_star_with_no_lvl_exit", 0, top); - return 0; - } - - - extern void spawn_base_star_with_no_lvl_exit(void); - spawn_base_star_with_no_lvl_exit(); - - return 1; -} - -int smlua_func_spawn_mist_particles(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", "spawn_mist_particles", 0, top); - return 0; - } - - - extern void spawn_mist_particles(void); - spawn_mist_particles(); - - return 1; -} - -int smlua_func_spawn_mist_particles_with_sound(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", "spawn_mist_particles_with_sound", 1, top); - return 0; - } - - u32 sp18 = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_mist_particles_with_sound"); return 0; } - - extern void spawn_mist_particles_with_sound(u32 sp18); - spawn_mist_particles_with_sound(sp18); - - return 1; -} - -int smlua_func_spawn_star_with_no_lvl_exit(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", "spawn_star_with_no_lvl_exit", 2, top); - return 0; - } - - s32 sp20 = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_star_with_no_lvl_exit"); return 0; } - s32 sp24 = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_star_with_no_lvl_exit"); return 0; } - - extern struct Object *spawn_star_with_no_lvl_exit(s32 sp20, s32 sp24); - smlua_push_object(L, LOT_OBJECT, spawn_star_with_no_lvl_exit(sp20, sp24), NULL); - - return 1; -} - -int smlua_func_spawn_water_droplet(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", "spawn_water_droplet", 2, top); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_can_mario_activate_textbox", 4, top); return 0; } if (lua_isnil(L, 1)) { return 0; } - struct Object* parent = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_water_droplet"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct WaterDropletParams* params = (struct WaterDropletParams*)smlua_to_cobject(L, 2, LOT_WATERDROPLETPARAMS); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_water_droplet"); return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_can_mario_activate_textbox"); return 0; } + f32 radius = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_can_mario_activate_textbox"); return 0; } + f32 height = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_can_mario_activate_textbox"); return 0; } + s32 unused = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "cur_obj_can_mario_activate_textbox"); return 0; } - extern struct Object *spawn_water_droplet(struct Object *parent, struct WaterDropletParams *params); - smlua_push_object(L, LOT_OBJECT, spawn_water_droplet(parent, params), NULL); + extern s32 cur_obj_can_mario_activate_textbox(struct MarioState* m, f32 radius, f32 height, UNUSED s32 unused); + lua_pushinteger(L, cur_obj_can_mario_activate_textbox(m, radius, height, unused)); return 1; } -int smlua_func_stub_obj_helpers_3(lua_State* L) { +int smlua_func_cur_obj_can_mario_activate_textbox_2(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", "stub_obj_helpers_3", 2, top); + if (top != 3) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_can_mario_activate_textbox_2", 3, top); return 0; } - s32 sp0 = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "stub_obj_helpers_3"); return 0; } - s32 sp4 = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "stub_obj_helpers_3"); return 0; } + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_can_mario_activate_textbox_2"); return 0; } + f32 radius = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_can_mario_activate_textbox_2"); return 0; } + f32 height = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_can_mario_activate_textbox_2"); return 0; } - extern void stub_obj_helpers_3(UNUSED s32 sp0, UNUSED s32 sp4); - stub_obj_helpers_3(sp0, sp4); + extern s32 cur_obj_can_mario_activate_textbox_2(struct MarioState* m, f32 radius, f32 height); + lua_pushinteger(L, cur_obj_can_mario_activate_textbox_2(m, radius, height)); return 1; } -int smlua_func_stub_obj_helpers_4(UNUSED lua_State* L) { +int smlua_func_cur_obj_end_dialog(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", "cur_obj_end_dialog", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_end_dialog"); return 0; } + s32 dialogFlags = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_end_dialog"); return 0; } + s32 dialogResult = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_end_dialog"); return 0; } + + extern void cur_obj_end_dialog(struct MarioState* m, s32 dialogFlags, s32 dialogResult); + cur_obj_end_dialog(m, dialogFlags, dialogResult); + + return 1; +} + +int smlua_func_cur_obj_has_model(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", "cur_obj_has_model", 1, top); + return 0; + } + + u16 modelID = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_has_model"); return 0; } + + extern s32 cur_obj_has_model(u16 modelID); + lua_pushinteger(L, cur_obj_has_model(modelID)); + + return 1; +} + +int smlua_func_cur_obj_align_gfx_with_floor(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", "stub_obj_helpers_4", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_align_gfx_with_floor", 0, top); return 0; } - extern void stub_obj_helpers_4(void); - stub_obj_helpers_4(); + extern void cur_obj_align_gfx_with_floor(void); + cur_obj_align_gfx_with_floor(); + + return 1; +} + +int smlua_func_mario_is_within_rectangle(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "mario_is_within_rectangle", 4, top); + return 0; + } + + s16 minX = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mario_is_within_rectangle"); return 0; } + s16 maxX = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "mario_is_within_rectangle"); return 0; } + s16 minZ = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "mario_is_within_rectangle"); return 0; } + s16 maxZ = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "mario_is_within_rectangle"); return 0; } + + extern s32 mario_is_within_rectangle(s16 minX, s16 maxX, s16 minZ, s16 maxZ); + lua_pushinteger(L, mario_is_within_rectangle(minX, maxX, minZ, maxZ)); + + return 1; +} + +int smlua_func_cur_obj_shake_screen(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", "cur_obj_shake_screen", 1, top); + return 0; + } + + s32 shake = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_shake_screen"); return 0; } + + extern void cur_obj_shake_screen(s32 shake); + cur_obj_shake_screen(shake); + + return 1; +} + +int smlua_func_obj_attack_collided_from_other_object(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_attack_collided_from_other_object", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_attack_collided_from_other_object"); return 0; } + + extern s32 obj_attack_collided_from_other_object(struct Object *obj); + lua_pushinteger(L, obj_attack_collided_from_other_object(obj)); + + return 1; +} + +int smlua_func_cur_obj_was_attacked_or_ground_pounded(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", "cur_obj_was_attacked_or_ground_pounded", 0, top); + return 0; + } + + + extern s32 cur_obj_was_attacked_or_ground_pounded(void); + lua_pushinteger(L, cur_obj_was_attacked_or_ground_pounded()); + + return 1; +} + +int smlua_func_obj_copy_behavior_params(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", "obj_copy_behavior_params", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* dst = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_copy_behavior_params"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* src = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_copy_behavior_params"); return 0; } + + extern void obj_copy_behavior_params(struct Object *dst, struct Object *src); + obj_copy_behavior_params(dst, src); + + return 1; +} + +int smlua_func_cur_obj_init_animation_and_anim_frame(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", "cur_obj_init_animation_and_anim_frame", 2, top); + return 0; + } + + s32 animIndex = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_init_animation_and_anim_frame"); return 0; } + s32 animFrame = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_init_animation_and_anim_frame"); return 0; } + + extern void cur_obj_init_animation_and_anim_frame(s32 animIndex, s32 animFrame); + cur_obj_init_animation_and_anim_frame(animIndex, animFrame); + + return 1; +} + +int smlua_func_cur_obj_init_animation_and_check_if_near_end(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", "cur_obj_init_animation_and_check_if_near_end", 1, top); + return 0; + } + + s32 animIndex = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_init_animation_and_check_if_near_end"); return 0; } + + extern s32 cur_obj_init_animation_and_check_if_near_end(s32 animIndex); + lua_pushinteger(L, cur_obj_init_animation_and_check_if_near_end(animIndex)); + + return 1; +} + +int smlua_func_cur_obj_init_animation_and_extend_if_at_end(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", "cur_obj_init_animation_and_extend_if_at_end", 1, top); + return 0; + } + + s32 animIndex = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_init_animation_and_extend_if_at_end"); return 0; } + + extern void cur_obj_init_animation_and_extend_if_at_end(s32 animIndex); + cur_obj_init_animation_and_extend_if_at_end(animIndex); + + return 1; +} + +int smlua_func_cur_obj_check_grabbed_mario(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", "cur_obj_check_grabbed_mario", 0, top); + return 0; + } + + + extern s32 cur_obj_check_grabbed_mario(void); + lua_pushinteger(L, cur_obj_check_grabbed_mario()); + + return 1; +} + +int smlua_func_player_performed_grab_escape_action(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", "player_performed_grab_escape_action", 0, top); + return 0; + } + + + extern s32 player_performed_grab_escape_action(void); + lua_pushinteger(L, player_performed_grab_escape_action()); + + return 1; +} + +int smlua_func_cur_obj_unused_play_footstep_sound(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", "cur_obj_unused_play_footstep_sound", 3, top); + return 0; + } + + s32 animFrame1 = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_unused_play_footstep_sound"); return 0; } + s32 animFrame2 = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_unused_play_footstep_sound"); return 0; } + s32 sound = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_unused_play_footstep_sound"); return 0; } + + extern void cur_obj_unused_play_footstep_sound(s32 animFrame1, s32 animFrame2, s32 sound); + cur_obj_unused_play_footstep_sound(animFrame1, animFrame2, sound); + + return 1; +} + +int smlua_func_enable_time_stop_including_mario(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", "enable_time_stop_including_mario", 0, top); + return 0; + } + + + extern void enable_time_stop_including_mario(void); + enable_time_stop_including_mario(); + + return 1; +} + +int smlua_func_disable_time_stop_including_mario(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", "disable_time_stop_including_mario", 0, top); + return 0; + } + + + extern void disable_time_stop_including_mario(void); + disable_time_stop_including_mario(); + + return 1; +} + +int smlua_func_cur_obj_check_interacted(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", "cur_obj_check_interacted", 0, top); + return 0; + } + + + extern s32 cur_obj_check_interacted(void); + lua_pushinteger(L, cur_obj_check_interacted()); + + return 1; +} + +int smlua_func_cur_obj_spawn_loot_blue_coin(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", "cur_obj_spawn_loot_blue_coin", 0, top); + return 0; + } + + + extern void cur_obj_spawn_loot_blue_coin(void); + cur_obj_spawn_loot_blue_coin(); + + return 1; +} + +#ifndef VERSION_JP +int smlua_func_cur_obj_spawn_star_at_y_offset(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "cur_obj_spawn_star_at_y_offset", 4, top); + return 0; + } + + f32 targetX = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "cur_obj_spawn_star_at_y_offset"); return 0; } + f32 targetY = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "cur_obj_spawn_star_at_y_offset"); return 0; } + f32 targetZ = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "cur_obj_spawn_star_at_y_offset"); return 0; } + f32 offsetY = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "cur_obj_spawn_star_at_y_offset"); return 0; } + + extern void cur_obj_spawn_star_at_y_offset(f32 targetX, f32 targetY, f32 targetZ, f32 offsetY); + cur_obj_spawn_star_at_y_offset(targetX, targetY, targetZ, offsetY); + + return 1; +} +#endif + +int smlua_func_cur_obj_set_home_once(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", "cur_obj_set_home_once", 0, top); + return 0; + } + + + extern void cur_obj_set_home_once(void); + cur_obj_set_home_once(); + + return 1; +} + +int smlua_func_get_trajectory_length(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", "get_trajectory_length", 1, top); + return 0; + } + + Trajectory* trajectory = (Trajectory*)smlua_to_cpointer(L, 1, LVT_TRAJECTORY_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_trajectory_length"); return 0; } + + extern s32 get_trajectory_length(Trajectory* trajectory); + lua_pushinteger(L, get_trajectory_length(trajectory)); return 1; } @@ -27466,28 +27541,6 @@ int smlua_func_queue_rumble_data(lua_State* L) { return 1; } -int smlua_func_queue_rumble_data_mario(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", "queue_rumble_data_mario", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "queue_rumble_data_mario"); return 0; } - s16 a0 = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "queue_rumble_data_mario"); return 0; } - s16 a1 = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "queue_rumble_data_mario"); return 0; } - - queue_rumble_data_mario(m, a0, a1); - - return 1; -} - int smlua_func_queue_rumble_data_object(lua_State* L) { if (L == NULL) { return 0; } @@ -27510,6 +27563,28 @@ int smlua_func_queue_rumble_data_object(lua_State* L) { return 1; } +int smlua_func_queue_rumble_data_mario(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", "queue_rumble_data_mario", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "queue_rumble_data_mario"); return 0; } + s16 a0 = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "queue_rumble_data_mario"); return 0; } + s16 a1 = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "queue_rumble_data_mario"); return 0; } + + queue_rumble_data_mario(m, a0, a1); + + return 1; +} + int smlua_func_reset_rumble_timers(lua_State* L) { if (L == NULL) { return 0; } @@ -27552,19 +27627,21 @@ int smlua_func_reset_rumble_timers_2(lua_State* L) { // save_file.h // ///////////////// -int smlua_func_save_file_clear_flags(lua_State* L) { +int smlua_func_touch_coin_score_age(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", "save_file_clear_flags", 1, top); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "touch_coin_score_age", 2, top); return 0; } - u32 flags = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "save_file_clear_flags"); return 0; } + s32 fileIndex = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "touch_coin_score_age"); return 0; } + s32 courseIndex = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "touch_coin_score_age"); return 0; } - save_file_clear_flags(flags); + touch_coin_score_age(fileIndex, courseIndex); return 1; } @@ -27620,76 +27697,19 @@ int smlua_func_save_file_erase_current_backup_save(UNUSED lua_State* L) { return 1; } -int smlua_func_save_file_get_cap_pos(lua_State* L) { +int smlua_func_save_file_reload(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", "save_file_get_cap_pos", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "save_file_reload", 1, top); return 0; } + u8 load_all = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "save_file_reload"); return 0; } - Vec3s capPos; - smlua_get_vec3s(capPos, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "save_file_get_cap_pos"); return 0; } - - lua_pushinteger(L, save_file_get_cap_pos(capPos)); - - smlua_push_vec3s(capPos, 1); - - return 1; -} - -int smlua_func_save_file_get_course_coin_score(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", "save_file_get_course_coin_score", 2, top); - return 0; - } - - s32 fileIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "save_file_get_course_coin_score"); return 0; } - s32 courseIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "save_file_get_course_coin_score"); return 0; } - - lua_pushinteger(L, save_file_get_course_coin_score(fileIndex, courseIndex)); - - return 1; -} - -int smlua_func_save_file_get_course_star_count(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", "save_file_get_course_star_count", 2, top); - return 0; - } - - s32 fileIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "save_file_get_course_star_count"); return 0; } - s32 courseIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "save_file_get_course_star_count"); return 0; } - - lua_pushinteger(L, save_file_get_course_star_count(fileIndex, courseIndex)); - - return 1; -} - -int smlua_func_save_file_get_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", "save_file_get_flags", 0, top); - return 0; - } - - - lua_pushinteger(L, save_file_get_flags()); + save_file_reload(load_all); return 1; } @@ -27711,36 +27731,21 @@ int smlua_func_save_file_get_max_coin_score(lua_State* L) { return 1; } -int smlua_func_save_file_get_sound_mode(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", "save_file_get_sound_mode", 0, top); - return 0; - } - - - lua_pushinteger(L, save_file_get_sound_mode()); - - return 1; -} - -int smlua_func_save_file_get_star_flags(lua_State* L) { +int smlua_func_save_file_get_course_star_count(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", "save_file_get_star_flags", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "save_file_get_course_star_count", 2, top); return 0; } s32 fileIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "save_file_get_star_flags"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "save_file_get_course_star_count"); return 0; } s32 courseIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "save_file_get_star_flags"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "save_file_get_course_star_count"); return 0; } - lua_pushinteger(L, save_file_get_star_flags(fileIndex, courseIndex)); + lua_pushinteger(L, save_file_get_course_star_count(fileIndex, courseIndex)); return 1; } @@ -27766,84 +27771,6 @@ int smlua_func_save_file_get_total_star_count(lua_State* L) { return 1; } -int smlua_func_save_file_is_cannon_unlocked(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", "save_file_is_cannon_unlocked", 2, top); - return 0; - } - - s32 fileIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "save_file_is_cannon_unlocked"); return 0; } - s32 courseIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "save_file_is_cannon_unlocked"); return 0; } - - lua_pushinteger(L, save_file_is_cannon_unlocked(fileIndex, courseIndex)); - - return 1; -} - -int smlua_func_save_file_reload(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", "save_file_reload", 1, top); - return 0; - } - - u8 load_all = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "save_file_reload"); return 0; } - - save_file_reload(load_all); - - return 1; -} - -int smlua_func_save_file_remove_star_flags(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", "save_file_remove_star_flags", 3, top); - return 0; - } - - s32 fileIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "save_file_remove_star_flags"); return 0; } - s32 courseIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "save_file_remove_star_flags"); return 0; } - u32 starFlagsToRemove = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "save_file_remove_star_flags"); return 0; } - - save_file_remove_star_flags(fileIndex, courseIndex, starFlagsToRemove); - - return 1; -} - -int smlua_func_save_file_set_course_coin_score(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", "save_file_set_course_coin_score", 3, top); - return 0; - } - - s32 fileIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "save_file_set_course_coin_score"); return 0; } - s32 courseIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "save_file_set_course_coin_score"); return 0; } - u8 coinScore = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "save_file_set_course_coin_score"); return 0; } - - save_file_set_course_coin_score(fileIndex, courseIndex, coinScore); - - return 1; -} - int smlua_func_save_file_set_flags(lua_State* L) { if (L == NULL) { return 0; } @@ -27861,6 +27788,57 @@ int smlua_func_save_file_set_flags(lua_State* L) { return 1; } +int smlua_func_save_file_clear_flags(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", "save_file_clear_flags", 1, top); + return 0; + } + + u32 flags = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "save_file_clear_flags"); return 0; } + + save_file_clear_flags(flags); + + return 1; +} + +int smlua_func_save_file_get_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", "save_file_get_flags", 0, top); + return 0; + } + + + lua_pushinteger(L, save_file_get_flags()); + + return 1; +} + +int smlua_func_save_file_get_star_flags(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", "save_file_get_star_flags", 2, top); + return 0; + } + + s32 fileIndex = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "save_file_get_star_flags"); return 0; } + s32 courseIndex = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "save_file_get_star_flags"); return 0; } + + lua_pushinteger(L, save_file_get_star_flags(fileIndex, courseIndex)); + + return 1; +} + int smlua_func_save_file_set_star_flags(lua_State* L) { if (L == NULL) { return 0; } @@ -27882,21 +27860,118 @@ int smlua_func_save_file_set_star_flags(lua_State* L) { return 1; } -int smlua_func_touch_coin_score_age(lua_State* L) { +int smlua_func_save_file_remove_star_flags(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", "touch_coin_score_age", 2, top); + if (top != 3) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "save_file_remove_star_flags", 3, top); return 0; } s32 fileIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "touch_coin_score_age"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "save_file_remove_star_flags"); return 0; } s32 courseIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "touch_coin_score_age"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "save_file_remove_star_flags"); return 0; } + u32 starFlagsToRemove = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "save_file_remove_star_flags"); return 0; } - touch_coin_score_age(fileIndex, courseIndex); + save_file_remove_star_flags(fileIndex, courseIndex, starFlagsToRemove); + + return 1; +} + +int smlua_func_save_file_get_course_coin_score(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", "save_file_get_course_coin_score", 2, top); + return 0; + } + + s32 fileIndex = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "save_file_get_course_coin_score"); return 0; } + s32 courseIndex = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "save_file_get_course_coin_score"); return 0; } + + lua_pushinteger(L, save_file_get_course_coin_score(fileIndex, courseIndex)); + + return 1; +} + +int smlua_func_save_file_set_course_coin_score(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", "save_file_set_course_coin_score", 3, top); + return 0; + } + + s32 fileIndex = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "save_file_set_course_coin_score"); return 0; } + s32 courseIndex = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "save_file_set_course_coin_score"); return 0; } + u8 coinScore = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "save_file_set_course_coin_score"); return 0; } + + save_file_set_course_coin_score(fileIndex, courseIndex, coinScore); + + return 1; +} + +int smlua_func_save_file_is_cannon_unlocked(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", "save_file_is_cannon_unlocked", 2, top); + return 0; + } + + s32 fileIndex = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "save_file_is_cannon_unlocked"); return 0; } + s32 courseIndex = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "save_file_is_cannon_unlocked"); return 0; } + + lua_pushinteger(L, save_file_is_cannon_unlocked(fileIndex, courseIndex)); + + return 1; +} + +int smlua_func_save_file_get_cap_pos(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", "save_file_get_cap_pos", 1, top); + return 0; + } + + + Vec3s capPos; + smlua_get_vec3s(capPos, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "save_file_get_cap_pos"); return 0; } + + lua_pushinteger(L, save_file_get_cap_pos(capPos)); + + smlua_push_vec3s(capPos, 1); + + return 1; +} + +int smlua_func_save_file_get_sound_mode(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", "save_file_get_sound_mode", 0, top); + return 0; + } + + + lua_pushinteger(L, save_file_get_sound_mode()); return 1; } @@ -27922,40 +27997,6 @@ int smlua_func_sequence_player_get_tempo(lua_State* L) { return 1; } -int smlua_func_sequence_player_get_tempo_acc(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", "sequence_player_get_tempo_acc", 1, top); - return 0; - } - - u8 player = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sequence_player_get_tempo_acc"); return 0; } - - lua_pushinteger(L, sequence_player_get_tempo_acc(player)); - - return 1; -} - -int smlua_func_sequence_player_get_transposition(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", "sequence_player_get_transposition", 1, top); - return 0; - } - - u8 player = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sequence_player_get_transposition"); return 0; } - - lua_pushinteger(L, sequence_player_get_transposition(player)); - - return 1; -} - int smlua_func_sequence_player_set_tempo(lua_State* L) { if (L == NULL) { return 0; } @@ -27975,6 +28016,23 @@ int smlua_func_sequence_player_set_tempo(lua_State* L) { return 1; } +int smlua_func_sequence_player_get_tempo_acc(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", "sequence_player_get_tempo_acc", 1, top); + return 0; + } + + u8 player = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sequence_player_get_tempo_acc"); return 0; } + + lua_pushinteger(L, sequence_player_get_tempo_acc(player)); + + return 1; +} + int smlua_func_sequence_player_set_tempo_acc(lua_State* L) { if (L == NULL) { return 0; } @@ -27994,6 +28052,23 @@ int smlua_func_sequence_player_set_tempo_acc(lua_State* L) { return 1; } +int smlua_func_sequence_player_get_transposition(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", "sequence_player_get_transposition", 1, top); + return 0; + } + + u8 player = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sequence_player_get_transposition"); return 0; } + + lua_pushinteger(L, sequence_player_get_transposition(player)); + + return 1; +} + int smlua_func_sequence_player_set_transposition(lua_State* L) { if (L == NULL) { return 0; } @@ -28013,6 +28088,57 @@ int smlua_func_sequence_player_set_transposition(lua_State* L) { return 1; } +int smlua_func_sequence_player_get_volume(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", "sequence_player_get_volume", 1, top); + return 0; + } + + u8 player = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sequence_player_get_volume"); return 0; } + + lua_pushnumber(L, sequence_player_get_volume(player)); + + return 1; +} + +int smlua_func_sequence_player_get_fade_volume(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", "sequence_player_get_fade_volume", 1, top); + return 0; + } + + u8 player = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sequence_player_get_fade_volume"); return 0; } + + lua_pushnumber(L, sequence_player_get_fade_volume(player)); + + return 1; +} + +int smlua_func_sequence_player_get_mute_volume_scale(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", "sequence_player_get_mute_volume_scale", 1, top); + return 0; + } + + u8 player = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sequence_player_get_mute_volume_scale"); return 0; } + + lua_pushnumber(L, sequence_player_get_mute_volume_scale(player)); + + return 1; +} + //////////////////////// // smlua_anim_utils.h // //////////////////////// @@ -28034,24 +28160,6 @@ int smlua_func_get_mario_vanilla_animation(lua_State* L) { return 1; } -int smlua_func_smlua_anim_util_get_current_animation_name(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_anim_util_get_current_animation_name", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_anim_util_get_current_animation_name"); return 0; } - - lua_pushstring(L, smlua_anim_util_get_current_animation_name(obj)); - - return 1; -} - int smlua_func_smlua_anim_util_set_animation(lua_State* L) { if (L == NULL) { return 0; } @@ -28072,10 +28180,350 @@ int smlua_func_smlua_anim_util_set_animation(lua_State* L) { return 1; } +int smlua_func_smlua_anim_util_get_current_animation_name(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_anim_util_get_current_animation_name", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* obj = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_anim_util_get_current_animation_name"); return 0; } + + lua_pushstring(L, smlua_anim_util_get_current_animation_name(obj)); + + return 1; +} + ///////////////////////// // smlua_audio_utils.h // ///////////////////////// +int smlua_func_smlua_audio_utils_reset_all(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", "smlua_audio_utils_reset_all", 0, top); + return 0; + } + + + smlua_audio_utils_reset_all(); + + return 1; +} + +int smlua_func_smlua_audio_utils_replace_sequence(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "smlua_audio_utils_replace_sequence", 4, top); + return 0; + } + + u8 sequenceId = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_audio_utils_replace_sequence"); return 0; } + u8 bankId = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "smlua_audio_utils_replace_sequence"); return 0; } + u8 defaultVolume = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "smlua_audio_utils_replace_sequence"); return 0; } + const char* m64Name = smlua_to_string(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "smlua_audio_utils_replace_sequence"); return 0; } + + smlua_audio_utils_replace_sequence(sequenceId, bankId, defaultVolume, m64Name); + + return 1; +} + +int smlua_func_audio_stream_load(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", "audio_stream_load", 1, top); + return 0; + } + + const char* filename = smlua_to_string(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_load"); return 0; } + + smlua_push_object(L, LOT_MODAUDIO, audio_stream_load(filename), NULL); + + return 1; +} + +int smlua_func_audio_stream_destroy(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", "audio_stream_destroy", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_destroy"); return 0; } + + audio_stream_destroy(audio); + + return 1; +} + +int smlua_func_audio_stream_play(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", "audio_stream_play", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_play"); return 0; } + bool restart = smlua_to_boolean(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "audio_stream_play"); return 0; } + f32 volume = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "audio_stream_play"); return 0; } + + audio_stream_play(audio, restart, volume); + + return 1; +} + +int smlua_func_audio_stream_pause(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", "audio_stream_pause", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_pause"); return 0; } + + audio_stream_pause(audio); + + return 1; +} + +int smlua_func_audio_stream_stop(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", "audio_stream_stop", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_stop"); return 0; } + + audio_stream_stop(audio); + + return 1; +} + +int smlua_func_audio_stream_get_position(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", "audio_stream_get_position", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_get_position"); return 0; } + + lua_pushnumber(L, audio_stream_get_position(audio)); + + return 1; +} + +int smlua_func_audio_stream_set_position(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", "audio_stream_set_position", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_position"); return 0; } + f32 pos = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "audio_stream_set_position"); return 0; } + + audio_stream_set_position(audio, pos); + + return 1; +} + +int smlua_func_audio_stream_get_looping(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", "audio_stream_get_looping", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_get_looping"); return 0; } + + lua_pushboolean(L, audio_stream_get_looping(audio)); + + return 1; +} + +int smlua_func_audio_stream_set_looping(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", "audio_stream_set_looping", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_looping"); return 0; } + bool looping = smlua_to_boolean(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "audio_stream_set_looping"); return 0; } + + audio_stream_set_looping(audio, looping); + + return 1; +} + +int smlua_func_audio_stream_set_loop_points(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", "audio_stream_set_loop_points", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_loop_points"); return 0; } + s64 loopStart = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "audio_stream_set_loop_points"); return 0; } + s64 loopEnd = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "audio_stream_set_loop_points"); return 0; } + + audio_stream_set_loop_points(audio, loopStart, loopEnd); + + return 1; +} + +int smlua_func_audio_stream_get_frequency(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", "audio_stream_get_frequency", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_get_frequency"); return 0; } + + lua_pushnumber(L, audio_stream_get_frequency(audio)); + + return 1; +} + +int smlua_func_audio_stream_set_frequency(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", "audio_stream_set_frequency", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_frequency"); return 0; } + f32 freq = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "audio_stream_set_frequency"); return 0; } + + audio_stream_set_frequency(audio, freq); + + return 1; +} + +int smlua_func_audio_stream_get_volume(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", "audio_stream_get_volume", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_get_volume"); return 0; } + + lua_pushnumber(L, audio_stream_get_volume(audio)); + + return 1; +} + +int smlua_func_audio_stream_set_volume(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", "audio_stream_set_volume", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_volume"); return 0; } + f32 volume = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "audio_stream_set_volume"); return 0; } + + audio_stream_set_volume(audio, volume); + + return 1; +} + +int smlua_func_audio_sample_load(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", "audio_sample_load", 1, top); + return 0; + } + + const char* filename = smlua_to_string(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_sample_load"); return 0; } + + smlua_push_object(L, LOT_MODAUDIO, audio_sample_load(filename), NULL); + + return 1; +} + int smlua_func_audio_sample_destroy(lua_State* L) { if (L == NULL) { return 0; } @@ -28094,19 +28542,20 @@ int smlua_func_audio_sample_destroy(lua_State* L) { return 1; } -int smlua_func_audio_sample_load(lua_State* L) { +int smlua_func_audio_sample_stop(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", "audio_sample_load", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "audio_sample_stop", 1, top); return 0; } - const char* filename = smlua_to_string(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_sample_load"); return 0; } + if (lua_isnil(L, 1)) { return 0; } + struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_sample_stop"); return 0; } - smlua_push_object(L, LOT_MODAUDIO, audio_sample_load(filename), NULL); + audio_sample_stop(audio); return 1; } @@ -28137,332 +28586,120 @@ int smlua_func_audio_sample_play(lua_State* L) { return 1; } -int smlua_func_audio_sample_stop(lua_State* L) { - if (L == NULL) { return 0; } + ////////////////////////// + // smlua_camera_utils.h // +////////////////////////// - int top = lua_gettop(L); - if (top != 1) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "audio_sample_stop", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_sample_stop"); return 0; } - - audio_sample_stop(audio); - - return 1; -} - -int smlua_func_audio_stream_destroy(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", "audio_stream_destroy", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_destroy"); return 0; } - - audio_stream_destroy(audio); - - return 1; -} - -int smlua_func_audio_stream_get_frequency(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", "audio_stream_get_frequency", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_get_frequency"); return 0; } - - lua_pushnumber(L, audio_stream_get_frequency(audio)); - - return 1; -} - -int smlua_func_audio_stream_get_looping(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", "audio_stream_get_looping", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_get_looping"); return 0; } - - lua_pushboolean(L, audio_stream_get_looping(audio)); - - return 1; -} - -int smlua_func_audio_stream_get_position(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", "audio_stream_get_position", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_get_position"); return 0; } - - lua_pushnumber(L, audio_stream_get_position(audio)); - - return 1; -} - -int smlua_func_audio_stream_get_volume(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", "audio_stream_get_volume", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_get_volume"); return 0; } - - lua_pushnumber(L, audio_stream_get_volume(audio)); - - return 1; -} - -int smlua_func_audio_stream_load(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", "audio_stream_load", 1, top); - return 0; - } - - const char* filename = smlua_to_string(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_load"); return 0; } - - smlua_push_object(L, LOT_MODAUDIO, audio_stream_load(filename), NULL); - - return 1; -} - -int smlua_func_audio_stream_pause(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", "audio_stream_pause", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_pause"); return 0; } - - audio_stream_pause(audio); - - return 1; -} - -int smlua_func_audio_stream_play(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", "audio_stream_play", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_play"); return 0; } - bool restart = smlua_to_boolean(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "audio_stream_play"); return 0; } - f32 volume = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "audio_stream_play"); return 0; } - - audio_stream_play(audio, restart, volume); - - return 1; -} - -int smlua_func_audio_stream_set_frequency(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", "audio_stream_set_frequency", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_frequency"); return 0; } - f32 freq = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "audio_stream_set_frequency"); return 0; } - - audio_stream_set_frequency(audio, freq); - - return 1; -} - -int smlua_func_audio_stream_set_loop_points(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", "audio_stream_set_loop_points", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_loop_points"); return 0; } - s64 loopStart = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "audio_stream_set_loop_points"); return 0; } - s64 loopEnd = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "audio_stream_set_loop_points"); return 0; } - - audio_stream_set_loop_points(audio, loopStart, loopEnd); - - return 1; -} - -int smlua_func_audio_stream_set_looping(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", "audio_stream_set_looping", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_looping"); return 0; } - bool looping = smlua_to_boolean(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "audio_stream_set_looping"); return 0; } - - audio_stream_set_looping(audio, looping); - - return 1; -} - -int smlua_func_audio_stream_set_position(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", "audio_stream_set_position", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_position"); return 0; } - f32 pos = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "audio_stream_set_position"); return 0; } - - audio_stream_set_position(audio, pos); - - return 1; -} - -int smlua_func_audio_stream_set_volume(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", "audio_stream_set_volume", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_volume"); return 0; } - f32 volume = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "audio_stream_set_volume"); return 0; } - - audio_stream_set_volume(audio, volume); - - return 1; -} - -int smlua_func_audio_stream_stop(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", "audio_stream_stop", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_stop"); return 0; } - - audio_stream_stop(audio); - - return 1; -} - -int smlua_func_smlua_audio_utils_replace_sequence(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "smlua_audio_utils_replace_sequence", 4, top); - return 0; - } - - u8 sequenceId = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_audio_utils_replace_sequence"); return 0; } - u8 bankId = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "smlua_audio_utils_replace_sequence"); return 0; } - u8 defaultVolume = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "smlua_audio_utils_replace_sequence"); return 0; } - const char* m64Name = smlua_to_string(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "smlua_audio_utils_replace_sequence"); return 0; } - - smlua_audio_utils_replace_sequence(sequenceId, bankId, defaultVolume, m64Name); - - return 1; -} - -int smlua_func_smlua_audio_utils_reset_all(UNUSED lua_State* L) { +int smlua_func_camera_reset_overrides(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", "smlua_audio_utils_reset_all", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_reset_overrides", 0, top); return 0; } - smlua_audio_utils_reset_all(); + camera_reset_overrides(); return 1; } - ////////////////////////// - // smlua_camera_utils.h // -////////////////////////// +int smlua_func_camera_freeze(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", "camera_freeze", 0, top); + return 0; + } + + + camera_freeze(); + + return 1; +} + +int smlua_func_camera_unfreeze(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", "camera_unfreeze", 0, top); + return 0; + } + + + camera_unfreeze(); + + return 1; +} + +int smlua_func_camera_is_frozen(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", "camera_is_frozen", 0, top); + return 0; + } + + + lua_pushboolean(L, camera_is_frozen()); + + return 1; +} + +int smlua_func_camera_romhack_allow_only_mods(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", "camera_romhack_allow_only_mods", 1, top); + return 0; + } + + u8 allow = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_romhack_allow_only_mods"); return 0; } + + camera_romhack_allow_only_mods(allow); + + return 1; +} + +int smlua_func_camera_set_romhack_override(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", "camera_set_romhack_override", 1, top); + return 0; + } + + int rco = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_set_romhack_override"); return 0; } + + camera_set_romhack_override(rco); + + return 1; +} + +int smlua_func_camera_romhack_allow_centering(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", "camera_romhack_allow_centering", 1, top); + return 0; + } + + u8 allow = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_romhack_allow_centering"); return 0; } + + camera_romhack_allow_centering(allow); + + return 1; +} int smlua_func_camera_allow_toxic_gas_camera(lua_State* L) { if (L == NULL) { return 0; } @@ -28481,228 +28718,254 @@ int smlua_func_camera_allow_toxic_gas_camera(lua_State* L) { return 1; } -int smlua_func_camera_config_enable_analog_cam(lua_State* L) { +int smlua_func_camera_romhack_allow_dpad_usage(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", "camera_config_enable_analog_cam", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_romhack_allow_dpad_usage", 1, top); return 0; } - bool enable = smlua_to_boolean(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_enable_analog_cam"); return 0; } + u8 allow = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_romhack_allow_dpad_usage"); return 0; } - camera_config_enable_analog_cam(enable); + camera_romhack_allow_dpad_usage(allow); return 1; } -int smlua_func_camera_config_enable_centering(lua_State* L) { +int smlua_func_rom_hack_cam_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", "camera_config_enable_centering", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "rom_hack_cam_set_collisions", 1, top); return 0; } - bool enable = smlua_to_boolean(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_enable_centering"); 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; } - camera_config_enable_centering(enable); + rom_hack_cam_set_collisions(enable); return 1; } -int smlua_func_camera_config_enable_collisions(lua_State* L) { +int smlua_func_camera_romhack_set_zoomed_in_dist(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", "camera_config_enable_collisions", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_romhack_set_zoomed_in_dist", 1, top); return 0; } - bool enable = smlua_to_boolean(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_enable_collisions"); return 0; } + u32 val = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_romhack_set_zoomed_in_dist"); return 0; } - camera_config_enable_collisions(enable); + camera_romhack_set_zoomed_in_dist(val); return 1; } -int smlua_func_camera_config_enable_dpad(lua_State* L) { +int smlua_func_camera_romhack_set_zoomed_out_dist(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", "camera_config_enable_dpad", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_romhack_set_zoomed_out_dist", 1, top); return 0; } - bool enable = smlua_to_boolean(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_enable_dpad"); return 0; } + u32 val = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_romhack_set_zoomed_out_dist"); return 0; } - camera_config_enable_dpad(enable); + camera_romhack_set_zoomed_out_dist(val); return 1; } -int smlua_func_camera_config_enable_free_cam(lua_State* L) { +int smlua_func_camera_romhack_set_zoomed_in_height(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", "camera_config_enable_free_cam", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_romhack_set_zoomed_in_height", 1, top); return 0; } - bool enable = smlua_to_boolean(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_enable_free_cam"); return 0; } + u32 val = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_romhack_set_zoomed_in_height"); return 0; } - camera_config_enable_free_cam(enable); + camera_romhack_set_zoomed_in_height(val); return 1; } -int smlua_func_camera_config_enable_mouse_look(lua_State* L) { +int smlua_func_camera_romhack_set_zoomed_out_height(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", "camera_config_enable_mouse_look", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_romhack_set_zoomed_out_height", 1, top); return 0; } - bool enable = smlua_to_boolean(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_enable_mouse_look"); return 0; } + u32 val = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_romhack_set_zoomed_out_height"); return 0; } - camera_config_enable_mouse_look(enable); + camera_romhack_set_zoomed_out_height(val); return 1; } -int smlua_func_camera_config_get_aggression(UNUSED lua_State* L) { +int smlua_func_camera_romhack_get_zoomed_in_dist(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", "camera_config_get_aggression", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_romhack_get_zoomed_in_dist", 0, top); return 0; } - lua_pushinteger(L, camera_config_get_aggression()); + lua_pushinteger(L, camera_romhack_get_zoomed_in_dist()); return 1; } -int smlua_func_camera_config_get_centering(UNUSED lua_State* L) { +int smlua_func_camera_romhack_get_zoomed_out_dist(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", "camera_config_get_centering", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_romhack_get_zoomed_out_dist", 0, top); return 0; } - lua_pushboolean(L, camera_config_get_centering()); + lua_pushinteger(L, camera_romhack_get_zoomed_out_dist()); return 1; } -int smlua_func_camera_config_get_deceleration(UNUSED lua_State* L) { +int smlua_func_camera_romhack_get_zoomed_in_height(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", "camera_config_get_deceleration", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_romhack_get_zoomed_in_height", 0, top); return 0; } - lua_pushinteger(L, camera_config_get_deceleration()); + lua_pushinteger(L, camera_romhack_get_zoomed_in_height()); return 1; } -int smlua_func_camera_config_get_pan_level(UNUSED lua_State* L) { +int smlua_func_camera_romhack_get_zoomed_out_height(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", "camera_config_get_pan_level", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_romhack_get_zoomed_out_height", 0, top); return 0; } - lua_pushinteger(L, camera_config_get_pan_level()); + lua_pushinteger(L, camera_romhack_get_zoomed_out_height()); return 1; } -int smlua_func_camera_config_get_x_sensitivity(UNUSED lua_State* L) { +int smlua_func_camera_get_romhack_override(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", "camera_config_get_x_sensitivity", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_get_romhack_override", 0, top); return 0; } - lua_pushinteger(L, camera_config_get_x_sensitivity()); + lua_pushinteger(L, camera_get_romhack_override()); return 1; } -int smlua_func_camera_config_get_y_sensitivity(UNUSED lua_State* L) { +int smlua_func_camera_romhack_get_allow_centering(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", "camera_config_get_y_sensitivity", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_romhack_get_allow_centering", 0, top); return 0; } - lua_pushinteger(L, camera_config_get_y_sensitivity()); + lua_pushinteger(L, camera_romhack_get_allow_centering()); return 1; } -int smlua_func_camera_config_invert_x(lua_State* L) { +int smlua_func_camera_get_allow_toxic_gas_camera(UNUSED 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", "camera_config_invert_x", 1, top); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_get_allow_toxic_gas_camera", 0, top); return 0; } - bool invert = smlua_to_boolean(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_invert_x"); return 0; } - camera_config_invert_x(invert); + lua_pushinteger(L, camera_get_allow_toxic_gas_camera()); return 1; } -int smlua_func_camera_config_invert_y(lua_State* L) { +int smlua_func_camera_romhack_get_allow_dpad_usage(UNUSED 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", "camera_config_invert_y", 1, top); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_romhack_get_allow_dpad_usage", 0, top); return 0; } - bool invert = smlua_to_boolean(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_invert_y"); return 0; } - camera_config_invert_y(invert); + lua_pushinteger(L, camera_romhack_get_allow_dpad_usage()); + + return 1; +} + +int smlua_func_camera_romhack_get_collisions(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", "camera_romhack_get_collisions", 0, top); + return 0; + } + + + lua_pushinteger(L, camera_romhack_get_collisions()); + + return 1; +} + +int smlua_func_camera_config_is_free_cam_enabled(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", "camera_config_is_free_cam_enabled", 0, top); + return 0; + } + + + lua_pushboolean(L, camera_config_is_free_cam_enabled()); return 1; } @@ -28722,21 +28985,6 @@ int smlua_func_camera_config_is_analog_cam_enabled(UNUSED lua_State* L) { return 1; } -int smlua_func_camera_config_is_collision_enabled(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", "camera_config_is_collision_enabled", 0, top); - return 0; - } - - - lua_pushboolean(L, camera_config_is_collision_enabled()); - - return 1; -} - int smlua_func_camera_config_is_dpad_enabled(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -28752,17 +29000,17 @@ int smlua_func_camera_config_is_dpad_enabled(UNUSED lua_State* L) { return 1; } -int smlua_func_camera_config_is_free_cam_enabled(UNUSED lua_State* L) { +int smlua_func_camera_config_is_collision_enabled(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", "camera_config_is_free_cam_enabled", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_config_is_collision_enabled", 0, top); return 0; } - lua_pushboolean(L, camera_config_is_free_cam_enabled()); + lua_pushboolean(L, camera_config_is_collision_enabled()); return 1; } @@ -28812,53 +29060,228 @@ int smlua_func_camera_config_is_y_inverted(UNUSED lua_State* L) { return 1; } -int smlua_func_camera_config_set_aggression(lua_State* L) { +int smlua_func_camera_config_get_x_sensitivity(UNUSED 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", "camera_config_set_aggression", 1, top); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_config_get_x_sensitivity", 0, top); return 0; } - u32 value = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_set_aggression"); return 0; } - camera_config_set_aggression(value); + lua_pushinteger(L, camera_config_get_x_sensitivity()); return 1; } -int smlua_func_camera_config_set_deceleration(lua_State* L) { +int smlua_func_camera_config_get_y_sensitivity(UNUSED 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", "camera_config_set_deceleration", 1, top); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_config_get_y_sensitivity", 0, top); return 0; } - u32 value = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_set_deceleration"); return 0; } - camera_config_set_deceleration(value); + lua_pushinteger(L, camera_config_get_y_sensitivity()); return 1; } -int smlua_func_camera_config_set_pan_level(lua_State* L) { +int smlua_func_camera_config_get_aggression(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", "camera_config_get_aggression", 0, top); + return 0; + } + + + lua_pushinteger(L, camera_config_get_aggression()); + + return 1; +} + +int smlua_func_camera_config_get_pan_level(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", "camera_config_get_pan_level", 0, top); + return 0; + } + + + lua_pushinteger(L, camera_config_get_pan_level()); + + return 1; +} + +int smlua_func_camera_config_get_deceleration(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", "camera_config_get_deceleration", 0, top); + return 0; + } + + + lua_pushinteger(L, camera_config_get_deceleration()); + + return 1; +} + +int smlua_func_camera_config_get_centering(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", "camera_config_get_centering", 0, top); + return 0; + } + + + lua_pushboolean(L, camera_config_get_centering()); + + return 1; +} + +int smlua_func_camera_config_enable_free_cam(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", "camera_config_set_pan_level", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_config_enable_free_cam", 1, top); return 0; } - u32 value = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_set_pan_level"); return 0; } + bool enable = smlua_to_boolean(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_enable_free_cam"); return 0; } - camera_config_set_pan_level(value); + camera_config_enable_free_cam(enable); + + return 1; +} + +int smlua_func_camera_config_enable_analog_cam(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", "camera_config_enable_analog_cam", 1, top); + return 0; + } + + bool enable = smlua_to_boolean(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_enable_analog_cam"); return 0; } + + camera_config_enable_analog_cam(enable); + + return 1; +} + +int smlua_func_camera_config_enable_centering(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", "camera_config_enable_centering", 1, top); + return 0; + } + + bool enable = smlua_to_boolean(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_enable_centering"); return 0; } + + camera_config_enable_centering(enable); + + return 1; +} + +int smlua_func_camera_config_enable_dpad(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", "camera_config_enable_dpad", 1, top); + return 0; + } + + bool enable = smlua_to_boolean(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_enable_dpad"); return 0; } + + camera_config_enable_dpad(enable); + + return 1; +} + +int smlua_func_camera_config_enable_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", "camera_config_enable_collisions", 1, top); + return 0; + } + + bool enable = smlua_to_boolean(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_enable_collisions"); return 0; } + + camera_config_enable_collisions(enable); + + return 1; +} + +int smlua_func_camera_config_enable_mouse_look(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", "camera_config_enable_mouse_look", 1, top); + return 0; + } + + bool enable = smlua_to_boolean(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_enable_mouse_look"); return 0; } + + camera_config_enable_mouse_look(enable); + + return 1; +} + +int smlua_func_camera_config_invert_x(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", "camera_config_invert_x", 1, top); + return 0; + } + + bool invert = smlua_to_boolean(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_invert_x"); return 0; } + + camera_config_invert_x(invert); + + return 1; +} + +int smlua_func_camera_config_invert_y(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", "camera_config_invert_y", 1, top); + return 0; + } + + bool invert = smlua_to_boolean(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_invert_y"); return 0; } + + camera_config_invert_y(invert); return 1; } @@ -28897,32 +29320,53 @@ int smlua_func_camera_config_set_y_sensitivity(lua_State* L) { return 1; } -int smlua_func_camera_freeze(UNUSED lua_State* L) { +int smlua_func_camera_config_set_aggression(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", "camera_freeze", 0, top); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_config_set_aggression", 1, top); return 0; } + u32 value = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_set_aggression"); return 0; } - camera_freeze(); + camera_config_set_aggression(value); return 1; } -int smlua_func_camera_get_allow_toxic_gas_camera(UNUSED lua_State* L) { +int smlua_func_camera_config_set_pan_level(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", "camera_get_allow_toxic_gas_camera", 0, top); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_config_set_pan_level", 1, top); return 0; } + u32 value = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_set_pan_level"); return 0; } - lua_pushinteger(L, camera_get_allow_toxic_gas_camera()); + camera_config_set_pan_level(value); + + return 1; +} + +int smlua_func_camera_config_set_deceleration(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", "camera_config_set_deceleration", 1, top); + return 0; + } + + u32 value = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_set_deceleration"); return 0; } + + camera_config_set_deceleration(value); return 1; } @@ -28942,275 +29386,6 @@ int smlua_func_camera_get_checking_surfaces(UNUSED lua_State* L) { return 1; } -int smlua_func_camera_get_romhack_override(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", "camera_get_romhack_override", 0, top); - return 0; - } - - - lua_pushinteger(L, camera_get_romhack_override()); - - return 1; -} - -int smlua_func_camera_is_frozen(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", "camera_is_frozen", 0, top); - return 0; - } - - - lua_pushboolean(L, camera_is_frozen()); - - return 1; -} - -int smlua_func_camera_reset_overrides(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", "camera_reset_overrides", 0, top); - return 0; - } - - - camera_reset_overrides(); - - return 1; -} - -int smlua_func_camera_romhack_allow_centering(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", "camera_romhack_allow_centering", 1, top); - return 0; - } - - u8 allow = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_romhack_allow_centering"); return 0; } - - camera_romhack_allow_centering(allow); - - return 1; -} - -int smlua_func_camera_romhack_allow_dpad_usage(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", "camera_romhack_allow_dpad_usage", 1, top); - return 0; - } - - u8 allow = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_romhack_allow_dpad_usage"); return 0; } - - camera_romhack_allow_dpad_usage(allow); - - return 1; -} - -int smlua_func_camera_romhack_allow_only_mods(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", "camera_romhack_allow_only_mods", 1, top); - return 0; - } - - u8 allow = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_romhack_allow_only_mods"); return 0; } - - camera_romhack_allow_only_mods(allow); - - return 1; -} - -int smlua_func_camera_romhack_get_allow_centering(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", "camera_romhack_get_allow_centering", 0, top); - return 0; - } - - - lua_pushinteger(L, camera_romhack_get_allow_centering()); - - return 1; -} - -int smlua_func_camera_romhack_get_allow_dpad_usage(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", "camera_romhack_get_allow_dpad_usage", 0, top); - return 0; - } - - - lua_pushinteger(L, camera_romhack_get_allow_dpad_usage()); - - return 1; -} - -int smlua_func_camera_romhack_get_collisions(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", "camera_romhack_get_collisions", 0, top); - return 0; - } - - - lua_pushinteger(L, camera_romhack_get_collisions()); - - return 1; -} - -int smlua_func_camera_romhack_get_zoomed_in_dist(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", "camera_romhack_get_zoomed_in_dist", 0, top); - return 0; - } - - - lua_pushinteger(L, camera_romhack_get_zoomed_in_dist()); - - return 1; -} - -int smlua_func_camera_romhack_get_zoomed_in_height(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", "camera_romhack_get_zoomed_in_height", 0, top); - return 0; - } - - - lua_pushinteger(L, camera_romhack_get_zoomed_in_height()); - - return 1; -} - -int smlua_func_camera_romhack_get_zoomed_out_dist(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", "camera_romhack_get_zoomed_out_dist", 0, top); - return 0; - } - - - lua_pushinteger(L, camera_romhack_get_zoomed_out_dist()); - - return 1; -} - -int smlua_func_camera_romhack_get_zoomed_out_height(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", "camera_romhack_get_zoomed_out_height", 0, top); - return 0; - } - - - lua_pushinteger(L, camera_romhack_get_zoomed_out_height()); - - return 1; -} - -int smlua_func_camera_romhack_set_zoomed_in_dist(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", "camera_romhack_set_zoomed_in_dist", 1, top); - return 0; - } - - u32 val = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_romhack_set_zoomed_in_dist"); return 0; } - - camera_romhack_set_zoomed_in_dist(val); - - return 1; -} - -int smlua_func_camera_romhack_set_zoomed_in_height(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", "camera_romhack_set_zoomed_in_height", 1, top); - return 0; - } - - u32 val = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_romhack_set_zoomed_in_height"); return 0; } - - camera_romhack_set_zoomed_in_height(val); - - return 1; -} - -int smlua_func_camera_romhack_set_zoomed_out_dist(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", "camera_romhack_set_zoomed_out_dist", 1, top); - return 0; - } - - u32 val = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_romhack_set_zoomed_out_dist"); return 0; } - - camera_romhack_set_zoomed_out_dist(val); - - return 1; -} - -int smlua_func_camera_romhack_set_zoomed_out_height(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", "camera_romhack_set_zoomed_out_height", 1, top); - return 0; - } - - u32 val = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_romhack_set_zoomed_out_height"); return 0; } - - camera_romhack_set_zoomed_out_height(val); - - return 1; -} - int smlua_func_camera_set_checking_surfaces(lua_State* L) { if (L == NULL) { return 0; } @@ -29228,59 +29403,31 @@ int smlua_func_camera_set_checking_surfaces(lua_State* L) { return 1; } -int smlua_func_camera_set_romhack_override(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", "camera_set_romhack_override", 1, top); - return 0; - } - - int rco = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_set_romhack_override"); return 0; } - - camera_set_romhack_override(rco); - - return 1; -} - -int smlua_func_camera_unfreeze(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", "camera_unfreeze", 0, top); - return 0; - } - - - camera_unfreeze(); - - return 1; -} - -int smlua_func_rom_hack_cam_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); - 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; } - - rom_hack_cam_set_collisions(enable); - - return 1; -} - ///////////////////////////// // smlua_collision_utils.h // ///////////////////////////// +int smlua_func_collision_find_floor(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", "collision_find_floor", 3, top); + return 0; + } + + f32 x = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "collision_find_floor"); return 0; } + f32 y = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "collision_find_floor"); return 0; } + f32 z = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "collision_find_floor"); return 0; } + + smlua_push_object(L, LOT_SURFACE, collision_find_floor(x, y, z), NULL); + + return 1; +} + int smlua_func_collision_find_ceil(lua_State* L) { if (L == NULL) { return 0; } @@ -29302,23 +29449,34 @@ int smlua_func_collision_find_ceil(lua_State* L) { return 1; } -int smlua_func_collision_find_floor(lua_State* L) { +int smlua_func_get_water_surface_pseudo_floor(UNUSED 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", "collision_find_floor", 3, top); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "get_water_surface_pseudo_floor", 0, top); return 0; } - f32 x = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "collision_find_floor"); return 0; } - f32 y = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "collision_find_floor"); return 0; } - f32 z = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "collision_find_floor"); return 0; } - smlua_push_object(L, LOT_SURFACE, collision_find_floor(x, y, z), NULL); + smlua_push_object(L, LOT_SURFACE, get_water_surface_pseudo_floor(), NULL); + + return 1; +} + +int smlua_func_smlua_collision_util_get(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_collision_util_get", 1, top); + return 0; + } + + const char* name = smlua_to_string(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_collision_util_get"); return 0; } + + smlua_push_pointer(L, LVT_COLLISION_P, (void*)smlua_collision_util_get(name), NULL); return 1; } @@ -29358,55 +29516,6 @@ int smlua_func_get_surface_from_wcd_index(lua_State* L) { return 1; } -int smlua_func_get_water_surface_pseudo_floor(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_water_surface_pseudo_floor", 0, top); - return 0; - } - - - smlua_push_object(L, LOT_SURFACE, get_water_surface_pseudo_floor(), NULL); - - return 1; -} - -int smlua_func_smlua_collision_util_find_surface_types(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_collision_util_find_surface_types", 1, top); - return 0; - } - - Collision* data = (Collision*)smlua_to_cpointer(L, 1, LVT_COLLISION_P); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_collision_util_find_surface_types"); return 0; } - - smlua_collision_util_find_surface_types(data); - - return 1; -} - -int smlua_func_smlua_collision_util_get(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_collision_util_get", 1, top); - return 0; - } - - const char* name = smlua_to_string(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_collision_util_get"); return 0; } - - smlua_push_pointer(L, LVT_COLLISION_P, (void*)smlua_collision_util_get(name), NULL); - - return 1; -} - int smlua_func_smlua_collision_util_get_current_terrain_collision(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -29441,10 +29550,44 @@ int smlua_func_smlua_collision_util_get_level_collision(lua_State* L) { return 1; } +int smlua_func_smlua_collision_util_find_surface_types(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_collision_util_find_surface_types", 1, top); + return 0; + } + + Collision* data = (Collision*)smlua_to_cpointer(L, 1, LVT_COLLISION_P); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_collision_util_find_surface_types"); return 0; } + + smlua_collision_util_find_surface_types(data); + + return 1; +} + //////////////////////// // smlua_deprecated.h // //////////////////////// +int smlua_func_djui_hud_set_render_behind_hud(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", "djui_hud_set_render_behind_hud", 1, top); + return 0; + } + + bool enable = smlua_to_boolean(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_hud_set_render_behind_hud"); return 0; } + + djui_hud_set_render_behind_hud(enable); + + return 1; +} + int smlua_func_audio_stream_get_tempo(lua_State* L) { if (L == NULL) { return 0; } @@ -29463,30 +29606,6 @@ int smlua_func_audio_stream_get_tempo(lua_State* L) { return 1; } -int smlua_func_audio_stream_set_speed(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "audio_stream_set_speed", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_speed"); return 0; } - f32 initial_freq = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "audio_stream_set_speed"); return 0; } - f32 speed = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "audio_stream_set_speed"); return 0; } - bool pitch = smlua_to_boolean(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "audio_stream_set_speed"); return 0; } - - audio_stream_set_speed(audio, initial_freq, speed, pitch); - - return 1; -} - int smlua_func_audio_stream_set_tempo(lua_State* L) { if (L == NULL) { return 0; } @@ -29507,19 +29626,26 @@ int smlua_func_audio_stream_set_tempo(lua_State* L) { return 1; } -int smlua_func_djui_hud_set_render_behind_hud(lua_State* L) { +int smlua_func_audio_stream_set_speed(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", "djui_hud_set_render_behind_hud", 1, top); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "audio_stream_set_speed", 4, top); return 0; } - bool enable = smlua_to_boolean(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_hud_set_render_behind_hud"); return 0; } + if (lua_isnil(L, 1)) { return 0; } + struct ModAudio* audio = (struct ModAudio*)smlua_to_cobject(L, 1, LOT_MODAUDIO); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "audio_stream_set_speed"); return 0; } + f32 initial_freq = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "audio_stream_set_speed"); return 0; } + f32 speed = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "audio_stream_set_speed"); return 0; } + bool pitch = smlua_to_boolean(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "audio_stream_set_speed"); return 0; } - djui_hud_set_render_behind_hud(enable); + audio_stream_set_speed(audio, initial_freq, speed, pitch); return 1; } @@ -29580,34 +29706,89 @@ int smlua_func_network_player_palette_to_color(lua_State* L) { // smlua_gfx_utils.h // /////////////////////// -int smlua_func_get_fog_color(lua_State* L) { +int smlua_func_set_override_fov(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", "get_fog_color", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_override_fov", 1, top); return 0; } - u8 index = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_fog_color"); return 0; } + f32 fov = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_override_fov"); return 0; } - lua_pushinteger(L, get_fog_color(index)); + set_override_fov(fov); return 1; } -int smlua_func_get_fog_intensity(UNUSED lua_State* L) { +int smlua_func_set_override_near(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_fog_intensity", 0, top); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_override_near", 1, top); return 0; } + f32 near = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_override_near"); return 0; } - lua_pushnumber(L, get_fog_intensity()); + set_override_near(near); + + return 1; +} + +int smlua_func_set_override_far(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", "set_override_far", 1, top); + return 0; + } + + f32 far = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_override_far"); return 0; } + + set_override_far(far); + + return 1; +} + +int smlua_func_get_lighting_dir(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", "get_lighting_dir", 1, top); + return 0; + } + + u8 index = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_lighting_dir"); return 0; } + + lua_pushnumber(L, get_lighting_dir(index)); + + return 1; +} + +int smlua_func_set_lighting_dir(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", "set_lighting_dir", 2, top); + return 0; + } + + u8 index = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_lighting_dir"); return 0; } + f32 value = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_lighting_dir"); return 0; } + + set_lighting_dir(index, value); return 1; } @@ -29646,19 +29827,144 @@ int smlua_func_get_lighting_color_ambient(lua_State* L) { return 1; } -int smlua_func_get_lighting_dir(lua_State* L) { +int smlua_func_set_lighting_color(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", "get_lighting_dir", 1, top); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_lighting_color", 2, top); return 0; } u8 index = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_lighting_dir"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_lighting_color"); return 0; } + u8 value = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_lighting_color"); return 0; } - lua_pushnumber(L, get_lighting_dir(index)); + set_lighting_color(index, value); + + return 1; +} + +int smlua_func_set_lighting_color_ambient(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", "set_lighting_color_ambient", 2, top); + return 0; + } + + u8 index = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_lighting_color_ambient"); return 0; } + u8 value = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_lighting_color_ambient"); return 0; } + + set_lighting_color_ambient(index, value); + + return 1; +} + +int smlua_func_get_vertex_color(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", "get_vertex_color", 1, top); + return 0; + } + + u8 index = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_vertex_color"); return 0; } + + lua_pushinteger(L, get_vertex_color(index)); + + return 1; +} + +int smlua_func_set_vertex_color(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", "set_vertex_color", 2, top); + return 0; + } + + u8 index = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_vertex_color"); return 0; } + u8 value = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_vertex_color"); return 0; } + + set_vertex_color(index, value); + + return 1; +} + +int smlua_func_get_fog_color(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", "get_fog_color", 1, top); + return 0; + } + + u8 index = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_fog_color"); return 0; } + + lua_pushinteger(L, get_fog_color(index)); + + return 1; +} + +int smlua_func_set_fog_color(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", "set_fog_color", 2, top); + return 0; + } + + u8 index = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_fog_color"); return 0; } + u8 value = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_fog_color"); return 0; } + + set_fog_color(index, value); + + return 1; +} + +int smlua_func_get_fog_intensity(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_fog_intensity", 0, top); + return 0; + } + + + lua_pushnumber(L, get_fog_intensity()); + + return 1; +} + +int smlua_func_set_fog_intensity(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", "set_fog_intensity", 1, top); + return 0; + } + + f32 intensity = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_fog_intensity"); return 0; } + + set_fog_intensity(intensity); return 1; } @@ -29678,6 +29984,23 @@ int smlua_func_get_skybox(UNUSED lua_State* L) { return 1; } +int smlua_func_set_override_skybox(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", "set_override_skybox", 1, top); + return 0; + } + + s8 background = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_override_skybox"); return 0; } + + set_override_skybox(background); + + return 1; +} + int smlua_func_get_skybox_color(lua_State* L) { if (L == NULL) { return 0; } @@ -29695,19 +30018,41 @@ int smlua_func_get_skybox_color(lua_State* L) { return 1; } -int smlua_func_get_vertex_color(lua_State* L) { +int smlua_func_set_skybox_color(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", "get_vertex_color", 1, top); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_skybox_color", 2, top); return 0; } u8 index = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_vertex_color"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_skybox_color"); return 0; } + u8 value = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_skybox_color"); return 0; } - lua_pushinteger(L, get_vertex_color(index)); + set_skybox_color(index, value); + + return 1; +} + +int smlua_func_gfx_parse(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", "gfx_parse", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + Gfx* cmd = (Gfx*)smlua_to_cobject(L, 1, LOT_GFX); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "gfx_parse"); return 0; } + LuaFunction func = smlua_to_lua_function(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "gfx_parse"); return 0; } + + gfx_parse(cmd, func); return 1; } @@ -29750,26 +30095,6 @@ int smlua_func_gfx_get_vtx_count(lua_State* L) { return 1; } -int smlua_func_gfx_parse(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", "gfx_parse", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - Gfx* cmd = (Gfx*)smlua_to_cobject(L, 1, LOT_GFX); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "gfx_parse"); return 0; } - LuaFunction func = smlua_to_lua_function(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "gfx_parse"); return 0; } - - gfx_parse(cmd, func); - - return 1; -} - int smlua_func_gfx_set_combine_lerp(lua_State* L) { if (L == NULL) { return 0; } @@ -29846,257 +30171,10 @@ int smlua_func_gfx_set_texture_image(lua_State* L) { return 1; } -int smlua_func_set_fog_color(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", "set_fog_color", 2, top); - return 0; - } - - u8 index = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_fog_color"); return 0; } - u8 value = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_fog_color"); return 0; } - - set_fog_color(index, value); - - return 1; -} - -int smlua_func_set_fog_intensity(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", "set_fog_intensity", 1, top); - return 0; - } - - f32 intensity = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_fog_intensity"); return 0; } - - set_fog_intensity(intensity); - - return 1; -} - -int smlua_func_set_lighting_color(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", "set_lighting_color", 2, top); - return 0; - } - - u8 index = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_lighting_color"); return 0; } - u8 value = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_lighting_color"); return 0; } - - set_lighting_color(index, value); - - return 1; -} - -int smlua_func_set_lighting_color_ambient(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", "set_lighting_color_ambient", 2, top); - return 0; - } - - u8 index = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_lighting_color_ambient"); return 0; } - u8 value = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_lighting_color_ambient"); return 0; } - - set_lighting_color_ambient(index, value); - - return 1; -} - -int smlua_func_set_lighting_dir(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", "set_lighting_dir", 2, top); - return 0; - } - - u8 index = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_lighting_dir"); return 0; } - f32 value = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_lighting_dir"); return 0; } - - set_lighting_dir(index, value); - - return 1; -} - -int smlua_func_set_override_far(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", "set_override_far", 1, top); - return 0; - } - - f32 far = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_override_far"); return 0; } - - set_override_far(far); - - return 1; -} - -int smlua_func_set_override_fov(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", "set_override_fov", 1, top); - return 0; - } - - f32 fov = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_override_fov"); return 0; } - - set_override_fov(fov); - - return 1; -} - -int smlua_func_set_override_near(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", "set_override_near", 1, top); - return 0; - } - - f32 near = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_override_near"); return 0; } - - set_override_near(near); - - return 1; -} - -int smlua_func_set_override_skybox(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", "set_override_skybox", 1, top); - return 0; - } - - s8 background = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_override_skybox"); return 0; } - - set_override_skybox(background); - - return 1; -} - -int smlua_func_set_skybox_color(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", "set_skybox_color", 2, top); - return 0; - } - - u8 index = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_skybox_color"); return 0; } - u8 value = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_skybox_color"); return 0; } - - set_skybox_color(index, value); - - return 1; -} - -int smlua_func_set_vertex_color(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", "set_vertex_color", 2, top); - return 0; - } - - u8 index = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_vertex_color"); return 0; } - u8 value = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_vertex_color"); return 0; } - - set_vertex_color(index, value); - - return 1; -} - ///////////////////////// // smlua_level_utils.h // ///////////////////////// -int smlua_func_level_is_vanilla_level(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", "level_is_vanilla_level", 1, top); - return 0; - } - - s16 levelNum = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "level_is_vanilla_level"); return 0; } - - lua_pushboolean(L, level_is_vanilla_level(levelNum)); - - return 1; -} - -int smlua_func_level_register(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 8) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "level_register", 8, top); - return 0; - } - - const char* scriptEntryName = smlua_to_string(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "level_register"); return 0; } - s16 courseNum = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "level_register"); return 0; } - const char* fullName = smlua_to_string(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "level_register"); return 0; } - const char* shortName = smlua_to_string(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "level_register"); return 0; } - u32 acousticReach = smlua_to_integer(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "level_register"); return 0; } - u32 echoLevel1 = smlua_to_integer(L, 6); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "level_register"); return 0; } - u32 echoLevel2 = smlua_to_integer(L, 7); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "level_register"); return 0; } - u32 echoLevel3 = smlua_to_integer(L, 8); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 8, "level_register"); return 0; } - - lua_pushinteger(L, level_register(scriptEntryName, courseNum, fullName, shortName, acousticReach, echoLevel1, echoLevel2, echoLevel3)); - - return 1; -} - int smlua_func_smlua_level_util_change_area(lua_State* L) { if (L == NULL) { return 0; } @@ -30131,23 +30209,6 @@ int smlua_func_smlua_level_util_get_info(lua_State* L) { return 1; } -int smlua_func_smlua_level_util_get_info_from_course_num(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_level_util_get_info_from_course_num", 1, top); - return 0; - } - - u8 courseNum = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_level_util_get_info_from_course_num"); return 0; } - - smlua_push_object(L, LOT_CUSTOMLEVELINFO, smlua_level_util_get_info_from_course_num(courseNum), NULL); - - return 1; -} - int smlua_func_smlua_level_util_get_info_from_short_name(lua_State* L) { if (L == NULL) { return 0; } @@ -30165,87 +30226,67 @@ int smlua_func_smlua_level_util_get_info_from_short_name(lua_State* L) { return 1; } -int smlua_func_warp_exit_level(lua_State* L) { +int smlua_func_smlua_level_util_get_info_from_course_num(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", "warp_exit_level", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "smlua_level_util_get_info_from_course_num", 1, top); return 0; } - s32 aDelay = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "warp_exit_level"); return 0; } + u8 courseNum = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_level_util_get_info_from_course_num"); return 0; } - lua_pushboolean(L, warp_exit_level(aDelay)); + smlua_push_object(L, LOT_CUSTOMLEVELINFO, smlua_level_util_get_info_from_course_num(courseNum), NULL); return 1; } -int smlua_func_warp_restart_level(UNUSED lua_State* L) { +int smlua_func_level_register(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", "warp_restart_level", 0, top); + if (top != 8) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "level_register", 8, top); return 0; } + const char* scriptEntryName = smlua_to_string(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "level_register"); return 0; } + s16 courseNum = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "level_register"); return 0; } + const char* fullName = smlua_to_string(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "level_register"); return 0; } + const char* shortName = smlua_to_string(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "level_register"); return 0; } + u32 acousticReach = smlua_to_integer(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "level_register"); return 0; } + u32 echoLevel1 = smlua_to_integer(L, 6); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "level_register"); return 0; } + u32 echoLevel2 = smlua_to_integer(L, 7); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "level_register"); return 0; } + u32 echoLevel3 = smlua_to_integer(L, 8); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 8, "level_register"); return 0; } - lua_pushboolean(L, warp_restart_level()); + lua_pushinteger(L, level_register(scriptEntryName, courseNum, fullName, shortName, acousticReach, echoLevel1, echoLevel2, echoLevel3)); return 1; } -int smlua_func_warp_to_castle(lua_State* L) { +int smlua_func_level_is_vanilla_level(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", "warp_to_castle", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "level_is_vanilla_level", 1, top); return 0; } - s32 aLevel = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "warp_to_castle"); return 0; } + s16 levelNum = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "level_is_vanilla_level"); return 0; } - lua_pushboolean(L, warp_to_castle(aLevel)); - - return 1; -} - -int smlua_func_warp_to_level(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", "warp_to_level", 3, top); - return 0; - } - - s32 aLevel = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "warp_to_level"); return 0; } - s32 aArea = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "warp_to_level"); return 0; } - s32 aAct = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "warp_to_level"); return 0; } - - lua_pushboolean(L, warp_to_level(aLevel, aArea, aAct)); - - return 1; -} - -int smlua_func_warp_to_start_level(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", "warp_to_start_level", 0, top); - return 0; - } - - - lua_pushboolean(L, warp_to_start_level()); + lua_pushboolean(L, level_is_vanilla_level(levelNum)); return 1; } @@ -30273,10 +30314,292 @@ int smlua_func_warp_to_warpnode(lua_State* L) { return 1; } +int smlua_func_warp_to_level(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", "warp_to_level", 3, top); + return 0; + } + + s32 aLevel = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "warp_to_level"); return 0; } + s32 aArea = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "warp_to_level"); return 0; } + s32 aAct = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "warp_to_level"); return 0; } + + lua_pushboolean(L, warp_to_level(aLevel, aArea, aAct)); + + return 1; +} + +int smlua_func_warp_restart_level(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", "warp_restart_level", 0, top); + return 0; + } + + + lua_pushboolean(L, warp_restart_level()); + + return 1; +} + +int smlua_func_warp_to_start_level(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", "warp_to_start_level", 0, top); + return 0; + } + + + lua_pushboolean(L, warp_to_start_level()); + + return 1; +} + +int smlua_func_warp_exit_level(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", "warp_exit_level", 1, top); + return 0; + } + + s32 aDelay = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "warp_exit_level"); return 0; } + + lua_pushboolean(L, warp_exit_level(aDelay)); + + return 1; +} + +int smlua_func_warp_to_castle(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", "warp_to_castle", 1, top); + return 0; + } + + s32 aLevel = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "warp_to_castle"); return 0; } + + lua_pushboolean(L, warp_to_castle(aLevel)); + + return 1; +} + //////////////////////// // smlua_math_utils.h // //////////////////////// +int smlua_func_min(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", "min", 2, top); + return 0; + } + + s32 a = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "min"); return 0; } + s32 b = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "min"); return 0; } + + lua_pushinteger(L, min(a, b)); + + return 1; +} + +int smlua_func_max(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", "max", 2, top); + return 0; + } + + s32 a = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "max"); return 0; } + s32 b = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "max"); return 0; } + + lua_pushinteger(L, max(a, b)); + + return 1; +} + +int smlua_func_sqr(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", "sqr", 1, top); + return 0; + } + + s32 x = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sqr"); return 0; } + + lua_pushinteger(L, sqr(x)); + + return 1; +} + +int smlua_func_minf(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", "minf", 2, top); + return 0; + } + + f32 a = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "minf"); return 0; } + f32 b = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "minf"); return 0; } + + lua_pushnumber(L, minf(a, b)); + + return 1; +} + +int smlua_func_maxf(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", "maxf", 2, top); + return 0; + } + + f32 a = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "maxf"); return 0; } + f32 b = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "maxf"); return 0; } + + lua_pushnumber(L, maxf(a, b)); + + return 1; +} + +int smlua_func_sqrf(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", "sqrf", 1, top); + return 0; + } + + f32 x = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sqrf"); return 0; } + + lua_pushnumber(L, sqrf(x)); + + return 1; +} + +int smlua_func_sm64_to_radians(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", "sm64_to_radians", 1, top); + return 0; + } + + s16 sm64Angle = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sm64_to_radians"); return 0; } + + lua_pushnumber(L, sm64_to_radians(sm64Angle)); + + return 1; +} + +int smlua_func_radians_to_sm64(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", "radians_to_sm64", 1, top); + return 0; + } + + f32 radiansAngle = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "radians_to_sm64"); return 0; } + + lua_pushinteger(L, radians_to_sm64(radiansAngle)); + + return 1; +} + +int smlua_func_sm64_to_degrees(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", "sm64_to_degrees", 1, top); + return 0; + } + + s16 sm64Angle = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sm64_to_degrees"); return 0; } + + lua_pushnumber(L, sm64_to_degrees(sm64Angle)); + + return 1; +} + +int smlua_func_degrees_to_sm64(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", "degrees_to_sm64", 1, top); + return 0; + } + + f32 degreesAngle = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "degrees_to_sm64"); return 0; } + + lua_pushinteger(L, degrees_to_sm64(degreesAngle)); + + return 1; +} + +int smlua_func_hypotf(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", "hypotf", 2, top); + return 0; + } + + f32 a = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "hypotf"); return 0; } + f32 b = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "hypotf"); return 0; } + + lua_pushnumber(L, hypotf(a, b)); + + return 1; +} + int smlua_func_clamp(lua_State* L) { if (L == NULL) { return 0; } @@ -30319,252 +30642,102 @@ int smlua_func_clampf(lua_State* L) { return 1; } -int smlua_func_degrees_to_sm64(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", "degrees_to_sm64", 1, top); - return 0; - } - - f32 degreesAngle = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "degrees_to_sm64"); return 0; } - - lua_pushinteger(L, degrees_to_sm64(degreesAngle)); - - return 1; -} - -int smlua_func_hypotf(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", "hypotf", 2, top); - return 0; - } - - f32 a = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "hypotf"); return 0; } - f32 b = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "hypotf"); return 0; } - - lua_pushnumber(L, hypotf(a, b)); - - return 1; -} - -int smlua_func_max(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", "max", 2, top); - return 0; - } - - s32 a = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "max"); return 0; } - s32 b = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "max"); return 0; } - - lua_pushinteger(L, max(a, b)); - - return 1; -} - -int smlua_func_maxf(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", "maxf", 2, top); - return 0; - } - - f32 a = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "maxf"); return 0; } - f32 b = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "maxf"); return 0; } - - lua_pushnumber(L, maxf(a, b)); - - return 1; -} - -int smlua_func_min(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", "min", 2, top); - return 0; - } - - s32 a = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "min"); return 0; } - s32 b = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "min"); return 0; } - - lua_pushinteger(L, min(a, b)); - - return 1; -} - -int smlua_func_minf(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", "minf", 2, top); - return 0; - } - - f32 a = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "minf"); return 0; } - f32 b = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "minf"); return 0; } - - lua_pushnumber(L, minf(a, b)); - - return 1; -} - -int smlua_func_radians_to_sm64(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", "radians_to_sm64", 1, top); - return 0; - } - - f32 radiansAngle = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "radians_to_sm64"); return 0; } - - lua_pushinteger(L, radians_to_sm64(radiansAngle)); - - return 1; -} - -int smlua_func_sm64_to_degrees(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", "sm64_to_degrees", 1, top); - return 0; - } - - s16 sm64Angle = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sm64_to_degrees"); return 0; } - - lua_pushnumber(L, sm64_to_degrees(sm64Angle)); - - return 1; -} - -int smlua_func_sm64_to_radians(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", "sm64_to_radians", 1, top); - return 0; - } - - s16 sm64Angle = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sm64_to_radians"); return 0; } - - lua_pushnumber(L, sm64_to_radians(sm64Angle)); - - return 1; -} - -int smlua_func_sqr(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", "sqr", 1, top); - return 0; - } - - s32 x = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sqr"); return 0; } - - lua_pushinteger(L, sqr(x)); - - return 1; -} - -int smlua_func_sqrf(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", "sqrf", 1, top); - return 0; - } - - f32 x = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "sqrf"); return 0; } - - lua_pushnumber(L, sqrf(x)); - - return 1; -} - //////////////////////// // smlua_misc_utils.h // //////////////////////// -int smlua_func_allocate_mario_action(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", "allocate_mario_action", 1, top); - return 0; - } - - u32 actFlags = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "allocate_mario_action"); return 0; } - - lua_pushinteger(L, allocate_mario_action(actFlags)); - - return 1; -} - -int smlua_func_course_is_main_course(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", "course_is_main_course", 1, top); - return 0; - } - - u16 courseNum = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "course_is_main_course"); return 0; } - - lua_pushboolean(L, course_is_main_course(courseNum)); - - return 1; -} - -int smlua_func_djui_attempting_to_open_playerlist(UNUSED lua_State* L) { +int smlua_func_get_network_area_timer(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", "djui_attempting_to_open_playerlist", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "get_network_area_timer", 0, top); return 0; } - lua_pushboolean(L, djui_attempting_to_open_playerlist()); + lua_pushinteger(L, get_network_area_timer()); + + return 1; +} + +int smlua_func_get_area_update_counter(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_area_update_counter", 0, top); + return 0; + } + + + lua_pushinteger(L, get_area_update_counter()); + + return 1; +} + +int smlua_func_djui_popup_create_global(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", "djui_popup_create_global", 2, top); + return 0; + } + + const char* message = smlua_to_string(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_popup_create_global"); return 0; } + int lines = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "djui_popup_create_global"); return 0; } + + djui_popup_create_global(message, lines); + + return 1; +} + +int smlua_func_djui_is_popup_disabled(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", "djui_is_popup_disabled", 0, top); + return 0; + } + + + lua_pushboolean(L, djui_is_popup_disabled()); + + return 1; +} + +int smlua_func_djui_set_popup_disabled_override(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", "djui_set_popup_disabled_override", 1, top); + return 0; + } + + bool value = smlua_to_boolean(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_set_popup_disabled_override"); return 0; } + + djui_set_popup_disabled_override(value); + + return 1; +} + +int smlua_func_djui_reset_popup_disabled_override(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", "djui_reset_popup_disabled_override", 0, top); + return 0; + } + + + djui_reset_popup_disabled_override(); return 1; } @@ -30584,17 +30757,32 @@ int smlua_func_djui_is_playerlist_open(UNUSED lua_State* L) { return 1; } -int smlua_func_djui_is_popup_disabled(UNUSED lua_State* L) { +int smlua_func_djui_attempting_to_open_playerlist(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", "djui_is_popup_disabled", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "djui_attempting_to_open_playerlist", 0, top); return 0; } - lua_pushboolean(L, djui_is_popup_disabled()); + lua_pushboolean(L, djui_attempting_to_open_playerlist()); + + return 1; +} + +int smlua_func_djui_get_playerlist_page_index(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", "djui_get_playerlist_page_index", 0, top); + return 0; + } + + + lua_pushinteger(L, djui_get_playerlist_page_index()); return 1; } @@ -30629,134 +30817,6 @@ int smlua_func_djui_menu_get_theme(UNUSED lua_State* L) { return 1; } -int smlua_func_djui_popup_create_global(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", "djui_popup_create_global", 2, top); - return 0; - } - - const char* message = smlua_to_string(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_popup_create_global"); return 0; } - int lines = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "djui_popup_create_global"); return 0; } - - djui_popup_create_global(message, lines); - - return 1; -} - -int smlua_func_djui_reset_popup_disabled_override(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", "djui_reset_popup_disabled_override", 0, top); - return 0; - } - - - djui_reset_popup_disabled_override(); - - return 1; -} - -int smlua_func_djui_set_popup_disabled_override(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", "djui_set_popup_disabled_override", 1, top); - return 0; - } - - bool value = smlua_to_boolean(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "djui_set_popup_disabled_override"); return 0; } - - djui_set_popup_disabled_override(value); - - return 1; -} - -int smlua_func_get_active_mod(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_active_mod", 0, top); - return 0; - } - - - smlua_push_object(L, LOT_MOD, get_active_mod(), NULL); - - return 1; -} - -int smlua_func_get_area_update_counter(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_area_update_counter", 0, top); - return 0; - } - - - lua_pushinteger(L, get_area_update_counter()); - - return 1; -} - -int smlua_func_get_coopnet_id(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", "get_coopnet_id", 1, top); - return 0; - } - - s8 localIndex = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_coopnet_id"); return 0; } - - lua_pushstring(L, get_coopnet_id(localIndex)); - - return 1; -} - -int smlua_func_get_current_save_file_num(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_current_save_file_num", 0, top); - return 0; - } - - - lua_pushinteger(L, get_current_save_file_num()); - - return 1; -} - -int smlua_func_get_date_and_time(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_date_and_time", 0, top); - return 0; - } - - - smlua_push_object(L, LOT_DATETIME, get_date_and_time(), NULL); - - return 1; -} - int smlua_func_get_dialog_box_state(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -30787,64 +30847,98 @@ int smlua_func_get_dialog_id(UNUSED lua_State* L) { return 1; } -int smlua_func_get_dialog_response(UNUSED lua_State* L) { +int smlua_func_get_last_star_or_key(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_dialog_response", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "get_last_star_or_key", 0, top); return 0; } - lua_pushinteger(L, get_dialog_response()); + lua_pushinteger(L, get_last_star_or_key()); return 1; } -int smlua_func_get_envfx(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_envfx", 0, top); - return 0; - } - - - lua_pushinteger(L, get_envfx()); - - return 1; -} - -int smlua_func_get_environment_region(lua_State* L) { +int smlua_func_set_last_star_or_key(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", "get_environment_region", 1, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_last_star_or_key", 1, top); return 0; } - u8 index = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_environment_region"); return 0; } + u8 value = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_last_star_or_key"); return 0; } - lua_pushnumber(L, get_environment_region(index)); + set_last_star_or_key(value); return 1; } -int smlua_func_get_global_timer(UNUSED lua_State* L) { +int smlua_func_get_last_completed_course_num(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_global_timer", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "get_last_completed_course_num", 0, top); return 0; } - lua_pushinteger(L, get_global_timer()); + lua_pushinteger(L, get_last_completed_course_num()); + + return 1; +} + +int smlua_func_set_last_completed_course_num(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", "set_last_completed_course_num", 1, top); + return 0; + } + + u8 courseNum = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_last_completed_course_num"); return 0; } + + set_last_completed_course_num(courseNum); + + return 1; +} + +int smlua_func_get_last_completed_star_num(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_last_completed_star_num", 0, top); + return 0; + } + + + lua_pushinteger(L, get_last_completed_star_num()); + + return 1; +} + +int smlua_func_set_last_completed_star_num(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", "set_last_completed_star_num", 1, top); + return 0; + } + + u8 starNum = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_last_completed_star_num"); return 0; } + + set_last_completed_star_num(starNum); return 1; } @@ -30864,6 +30958,273 @@ int smlua_func_get_got_file_coin_hi_score(UNUSED lua_State* L) { return 1; } +int smlua_func_set_got_file_coin_hi_score(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", "set_got_file_coin_hi_score", 1, top); + return 0; + } + + bool value = smlua_to_boolean(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_got_file_coin_hi_score"); return 0; } + + set_got_file_coin_hi_score(value); + + return 1; +} + +int smlua_func_get_save_file_modified(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_save_file_modified", 0, top); + return 0; + } + + + lua_pushboolean(L, get_save_file_modified()); + + return 1; +} + +int smlua_func_set_save_file_modified(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", "set_save_file_modified", 1, top); + return 0; + } + + bool value = smlua_to_boolean(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_save_file_modified"); return 0; } + + set_save_file_modified(value); + + return 1; +} + +int smlua_func_hud_hide(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", "hud_hide", 0, top); + return 0; + } + + + hud_hide(); + + return 1; +} + +int smlua_func_hud_show(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", "hud_show", 0, top); + return 0; + } + + + hud_show(); + + return 1; +} + +int smlua_func_hud_is_hidden(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", "hud_is_hidden", 0, top); + return 0; + } + + + lua_pushboolean(L, hud_is_hidden()); + + return 1; +} + +int smlua_func_hud_get_value(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", "hud_get_value", 1, top); + return 0; + } + + int type = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "hud_get_value"); return 0; } + + lua_pushinteger(L, hud_get_value(type)); + + return 1; +} + +int smlua_func_hud_set_value(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", "hud_set_value", 2, top); + return 0; + } + + int type = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "hud_set_value"); return 0; } + s32 value = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "hud_set_value"); return 0; } + + hud_set_value(type, value); + + return 1; +} + +int smlua_func_hud_render_power_meter(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 5) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "hud_render_power_meter", 5, top); + return 0; + } + + s32 health = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "hud_render_power_meter"); return 0; } + f32 x = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "hud_render_power_meter"); return 0; } + f32 y = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "hud_render_power_meter"); return 0; } + f32 width = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "hud_render_power_meter"); return 0; } + f32 height = smlua_to_number(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "hud_render_power_meter"); return 0; } + + hud_render_power_meter(health, x, y, width, height); + + return 1; +} + +int smlua_func_hud_render_power_meter_interpolated(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 9) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "hud_render_power_meter_interpolated", 9, top); + return 0; + } + + s32 health = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "hud_render_power_meter_interpolated"); return 0; } + f32 prevX = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "hud_render_power_meter_interpolated"); return 0; } + f32 prevY = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "hud_render_power_meter_interpolated"); return 0; } + f32 prevWidth = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "hud_render_power_meter_interpolated"); return 0; } + f32 prevHeight = smlua_to_number(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "hud_render_power_meter_interpolated"); return 0; } + f32 x = smlua_to_number(L, 6); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "hud_render_power_meter_interpolated"); return 0; } + f32 y = smlua_to_number(L, 7); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "hud_render_power_meter_interpolated"); return 0; } + f32 width = smlua_to_number(L, 8); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 8, "hud_render_power_meter_interpolated"); return 0; } + f32 height = smlua_to_number(L, 9); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 9, "hud_render_power_meter_interpolated"); return 0; } + + hud_render_power_meter_interpolated(health, prevX, prevY, prevWidth, prevHeight, x, y, width, height); + + return 1; +} + +int smlua_func_hud_get_flash(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", "hud_get_flash", 0, top); + return 0; + } + + + lua_pushinteger(L, hud_get_flash()); + + return 1; +} + +int smlua_func_hud_set_flash(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", "hud_set_flash", 1, top); + return 0; + } + + s8 value = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "hud_set_flash"); return 0; } + + hud_set_flash(value); + + return 1; +} + +int smlua_func_is_game_paused(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", "is_game_paused", 0, top); + return 0; + } + + + lua_pushboolean(L, is_game_paused()); + + return 1; +} + +int smlua_func_is_transition_playing(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", "is_transition_playing", 0, top); + return 0; + } + + + lua_pushboolean(L, is_transition_playing()); + + return 1; +} + +int smlua_func_allocate_mario_action(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", "allocate_mario_action", 1, top); + return 0; + } + + u32 actFlags = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "allocate_mario_action"); return 0; } + + lua_pushinteger(L, allocate_mario_action(actFlags)); + + return 1; +} + int smlua_func_get_hand_foot_pos_x(lua_State* L) { if (L == NULL) { return 0; } @@ -30924,495 +31285,17 @@ int smlua_func_get_hand_foot_pos_z(lua_State* L) { return 1; } -int smlua_func_get_last_completed_course_num(UNUSED lua_State* L) { +int smlua_func_get_current_save_file_num(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_last_completed_course_num", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "get_current_save_file_num", 0, top); return 0; } - lua_pushinteger(L, get_last_completed_course_num()); - - return 1; -} - -int smlua_func_get_last_completed_star_num(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_last_completed_star_num", 0, top); - return 0; - } - - - lua_pushinteger(L, get_last_completed_star_num()); - - return 1; -} - -int smlua_func_get_last_star_or_key(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_last_star_or_key", 0, top); - return 0; - } - - - lua_pushinteger(L, get_last_star_or_key()); - - return 1; -} - -int smlua_func_get_local_discord_id(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_local_discord_id", 0, top); - return 0; - } - - - lua_pushstring(L, get_local_discord_id()); - - return 1; -} - -int smlua_func_get_network_area_timer(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_network_area_timer", 0, top); - return 0; - } - - - lua_pushinteger(L, get_network_area_timer()); - - return 1; -} - -int smlua_func_get_os_name(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_os_name", 0, top); - return 0; - } - - - lua_pushstring(L, get_os_name()); - - return 1; -} - -int smlua_func_get_save_file_modified(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_save_file_modified", 0, top); - return 0; - } - - - lua_pushboolean(L, get_save_file_modified()); - - return 1; -} - -int smlua_func_get_time(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", 0, top); - return 0; - } - - - lua_pushinteger(L, get_time()); - - return 1; -} - -int smlua_func_get_ttc_speed_setting(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_ttc_speed_setting", 0, top); - return 0; - } - - - lua_pushinteger(L, get_ttc_speed_setting()); - - return 1; -} - -int smlua_func_get_volume_env(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_volume_env", 0, top); - return 0; - } - - - lua_pushnumber(L, get_volume_env()); - - return 1; -} - -int smlua_func_get_volume_level(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_volume_level", 0, top); - return 0; - } - - - lua_pushnumber(L, get_volume_level()); - - return 1; -} - -int smlua_func_get_volume_master(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_volume_master", 0, top); - return 0; - } - - - lua_pushnumber(L, get_volume_master()); - - return 1; -} - -int smlua_func_get_volume_sfx(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_volume_sfx", 0, top); - return 0; - } - - - lua_pushnumber(L, get_volume_sfx()); - - return 1; -} - -int smlua_func_get_water_level(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", "get_water_level", 1, top); - return 0; - } - - u8 index = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_water_level"); return 0; } - - lua_pushinteger(L, get_water_level(index)); - - return 1; -} - -int smlua_func_hud_get_flash(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", "hud_get_flash", 0, top); - return 0; - } - - - lua_pushinteger(L, hud_get_flash()); - - return 1; -} - -int smlua_func_hud_get_value(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", "hud_get_value", 1, top); - return 0; - } - - int type = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "hud_get_value"); return 0; } - - lua_pushinteger(L, hud_get_value(type)); - - return 1; -} - -int smlua_func_hud_hide(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", "hud_hide", 0, top); - return 0; - } - - - hud_hide(); - - return 1; -} - -int smlua_func_hud_is_hidden(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", "hud_is_hidden", 0, top); - return 0; - } - - - lua_pushboolean(L, hud_is_hidden()); - - return 1; -} - -int smlua_func_hud_render_power_meter(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 5) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "hud_render_power_meter", 5, top); - return 0; - } - - s32 health = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "hud_render_power_meter"); return 0; } - f32 x = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "hud_render_power_meter"); return 0; } - f32 y = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "hud_render_power_meter"); return 0; } - f32 width = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "hud_render_power_meter"); return 0; } - f32 height = smlua_to_number(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "hud_render_power_meter"); return 0; } - - hud_render_power_meter(health, x, y, width, height); - - return 1; -} - -int smlua_func_hud_render_power_meter_interpolated(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 9) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "hud_render_power_meter_interpolated", 9, top); - return 0; - } - - s32 health = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "hud_render_power_meter_interpolated"); return 0; } - f32 prevX = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "hud_render_power_meter_interpolated"); return 0; } - f32 prevY = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "hud_render_power_meter_interpolated"); return 0; } - f32 prevWidth = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "hud_render_power_meter_interpolated"); return 0; } - f32 prevHeight = smlua_to_number(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "hud_render_power_meter_interpolated"); return 0; } - f32 x = smlua_to_number(L, 6); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "hud_render_power_meter_interpolated"); return 0; } - f32 y = smlua_to_number(L, 7); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "hud_render_power_meter_interpolated"); return 0; } - f32 width = smlua_to_number(L, 8); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 8, "hud_render_power_meter_interpolated"); return 0; } - f32 height = smlua_to_number(L, 9); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 9, "hud_render_power_meter_interpolated"); return 0; } - - hud_render_power_meter_interpolated(health, prevX, prevY, prevWidth, prevHeight, x, y, width, height); - - return 1; -} - -int smlua_func_hud_set_flash(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", "hud_set_flash", 1, top); - return 0; - } - - s8 value = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "hud_set_flash"); return 0; } - - hud_set_flash(value); - - return 1; -} - -int smlua_func_hud_set_value(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", "hud_set_value", 2, top); - return 0; - } - - int type = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "hud_set_value"); return 0; } - s32 value = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "hud_set_value"); return 0; } - - hud_set_value(type, value); - - return 1; -} - -int smlua_func_hud_show(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", "hud_show", 0, top); - return 0; - } - - - hud_show(); - - return 1; -} - -int smlua_func_is_game_paused(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", "is_game_paused", 0, top); - return 0; - } - - - lua_pushboolean(L, is_game_paused()); - - return 1; -} - -int smlua_func_is_transition_playing(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", "is_transition_playing", 0, top); - return 0; - } - - - lua_pushboolean(L, is_transition_playing()); - - return 1; -} - -int smlua_func_mod_file_exists(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", "mod_file_exists", 1, top); - return 0; - } - - const char* filename = smlua_to_string(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_file_exists"); return 0; } - - lua_pushboolean(L, mod_file_exists(filename)); - - return 1; -} - -int smlua_func_movtexqc_register(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "movtexqc_register", 4, top); - return 0; - } - - const char* name = smlua_to_string(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "movtexqc_register"); return 0; } - s16 level = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "movtexqc_register"); return 0; } - s16 area = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "movtexqc_register"); return 0; } - s16 type = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "movtexqc_register"); return 0; } - - movtexqc_register(name, level, area, type); - - return 1; -} - -int smlua_func_play_transition(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 5) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "play_transition", 5, top); - return 0; - } - - s16 transType = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_transition"); return 0; } - s16 time = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_transition"); return 0; } - u8 red = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_transition"); return 0; } - u8 green = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "play_transition"); return 0; } - u8 blue = smlua_to_integer(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "play_transition"); return 0; } - - play_transition(transType, time, red, green, blue); - - return 1; -} - -int smlua_func_reset_window_title(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", "reset_window_title", 0, top); - return 0; - } - - - reset_window_title(); + lua_pushinteger(L, get_current_save_file_num()); return 1; } @@ -31449,208 +31332,42 @@ int smlua_func_save_file_set_using_backup_slot(lua_State* L) { return 1; } -int smlua_func_set_environment_region(lua_State* L) { +int smlua_func_movtexqc_register(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", "set_environment_region", 2, top); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "movtexqc_register", 4, top); + return 0; + } + + const char* name = smlua_to_string(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "movtexqc_register"); return 0; } + s16 level = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "movtexqc_register"); return 0; } + s16 area = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "movtexqc_register"); return 0; } + s16 type = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "movtexqc_register"); return 0; } + + movtexqc_register(name, level, area, type); + + return 1; +} + +int smlua_func_get_water_level(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", "get_water_level", 1, top); return 0; } u8 index = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_environment_region"); return 0; } - s32 value = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_environment_region"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_water_level"); return 0; } - set_environment_region(index, value); - - return 1; -} - -int smlua_func_set_got_file_coin_hi_score(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", "set_got_file_coin_hi_score", 1, top); - return 0; - } - - bool value = smlua_to_boolean(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_got_file_coin_hi_score"); return 0; } - - set_got_file_coin_hi_score(value); - - return 1; -} - -int smlua_func_set_last_completed_course_num(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", "set_last_completed_course_num", 1, top); - return 0; - } - - u8 courseNum = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_last_completed_course_num"); return 0; } - - set_last_completed_course_num(courseNum); - - return 1; -} - -int smlua_func_set_last_completed_star_num(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", "set_last_completed_star_num", 1, top); - return 0; - } - - u8 starNum = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_last_completed_star_num"); return 0; } - - set_last_completed_star_num(starNum); - - return 1; -} - -int smlua_func_set_last_star_or_key(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", "set_last_star_or_key", 1, top); - return 0; - } - - u8 value = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_last_star_or_key"); return 0; } - - set_last_star_or_key(value); - - return 1; -} - -int smlua_func_set_override_envfx(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", "set_override_envfx", 1, top); - return 0; - } - - s32 envfx = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_override_envfx"); return 0; } - - set_override_envfx(envfx); - - return 1; -} - -int smlua_func_set_save_file_modified(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", "set_save_file_modified", 1, top); - return 0; - } - - bool value = smlua_to_boolean(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_save_file_modified"); return 0; } - - set_save_file_modified(value); - - return 1; -} - -int smlua_func_set_ttc_speed_setting(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", "set_ttc_speed_setting", 1, top); - return 0; - } - - s16 speed = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_ttc_speed_setting"); return 0; } - - set_ttc_speed_setting(speed); - - return 1; -} - -int smlua_func_set_volume_env(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", "set_volume_env", 1, top); - return 0; - } - - f32 volume = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_volume_env"); return 0; } - - set_volume_env(volume); - - return 1; -} - -int smlua_func_set_volume_level(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", "set_volume_level", 1, top); - return 0; - } - - f32 volume = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_volume_level"); return 0; } - - set_volume_level(volume); - - return 1; -} - -int smlua_func_set_volume_master(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", "set_volume_master", 1, top); - return 0; - } - - f32 volume = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_volume_master"); return 0; } - - set_volume_master(volume); - - return 1; -} - -int smlua_func_set_volume_sfx(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", "set_volume_sfx", 1, top); - return 0; - } - - f32 volume = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_volume_sfx"); return 0; } - - set_volume_sfx(volume); + lua_pushinteger(L, get_water_level(index)); return 1; } @@ -31676,6 +31393,400 @@ int smlua_func_set_water_level(lua_State* L) { return 1; } +int smlua_func_play_transition(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 5) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "play_transition", 5, top); + return 0; + } + + s16 transType = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_transition"); return 0; } + s16 time = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "play_transition"); return 0; } + u8 red = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "play_transition"); return 0; } + u8 green = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "play_transition"); return 0; } + u8 blue = smlua_to_integer(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "play_transition"); return 0; } + + play_transition(transType, time, red, green, blue); + + return 1; +} + +int smlua_func_course_is_main_course(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", "course_is_main_course", 1, top); + return 0; + } + + u16 courseNum = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "course_is_main_course"); return 0; } + + lua_pushboolean(L, course_is_main_course(courseNum)); + + return 1; +} + +int smlua_func_get_ttc_speed_setting(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_ttc_speed_setting", 0, top); + return 0; + } + + + lua_pushinteger(L, get_ttc_speed_setting()); + + return 1; +} + +int smlua_func_set_ttc_speed_setting(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", "set_ttc_speed_setting", 1, top); + return 0; + } + + s16 speed = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_ttc_speed_setting"); return 0; } + + set_ttc_speed_setting(speed); + + return 1; +} + +int smlua_func_get_time(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", 0, top); + return 0; + } + + + lua_pushinteger(L, get_time()); + + return 1; +} + +int smlua_func_get_date_and_time(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_date_and_time", 0, top); + return 0; + } + + + smlua_push_object(L, LOT_DATETIME, get_date_and_time(), NULL); + + return 1; +} + +int smlua_func_get_envfx(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_envfx", 0, top); + return 0; + } + + + lua_pushinteger(L, get_envfx()); + + return 1; +} + +int smlua_func_set_override_envfx(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", "set_override_envfx", 1, top); + return 0; + } + + s32 envfx = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_override_envfx"); return 0; } + + set_override_envfx(envfx); + + return 1; +} + +int smlua_func_get_global_timer(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_global_timer", 0, top); + return 0; + } + + + lua_pushinteger(L, get_global_timer()); + + return 1; +} + +int smlua_func_get_dialog_response(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_dialog_response", 0, top); + return 0; + } + + + lua_pushinteger(L, get_dialog_response()); + + return 1; +} + +int smlua_func_get_local_discord_id(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_local_discord_id", 0, top); + return 0; + } + + + lua_pushstring(L, get_local_discord_id()); + + return 1; +} + +int smlua_func_get_coopnet_id(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", "get_coopnet_id", 1, top); + return 0; + } + + s8 localIndex = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_coopnet_id"); return 0; } + + lua_pushstring(L, get_coopnet_id(localIndex)); + + return 1; +} + +int smlua_func_get_volume_master(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_volume_master", 0, top); + return 0; + } + + + lua_pushnumber(L, get_volume_master()); + + return 1; +} + +int smlua_func_get_volume_level(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_volume_level", 0, top); + return 0; + } + + + lua_pushnumber(L, get_volume_level()); + + return 1; +} + +int smlua_func_get_volume_sfx(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_volume_sfx", 0, top); + return 0; + } + + + lua_pushnumber(L, get_volume_sfx()); + + return 1; +} + +int smlua_func_get_volume_env(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_volume_env", 0, top); + return 0; + } + + + lua_pushnumber(L, get_volume_env()); + + return 1; +} + +int smlua_func_set_volume_master(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", "set_volume_master", 1, top); + return 0; + } + + f32 volume = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_volume_master"); return 0; } + + set_volume_master(volume); + + return 1; +} + +int smlua_func_set_volume_level(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", "set_volume_level", 1, top); + return 0; + } + + f32 volume = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_volume_level"); return 0; } + + set_volume_level(volume); + + return 1; +} + +int smlua_func_set_volume_sfx(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", "set_volume_sfx", 1, top); + return 0; + } + + f32 volume = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_volume_sfx"); return 0; } + + set_volume_sfx(volume); + + return 1; +} + +int smlua_func_set_volume_env(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", "set_volume_env", 1, top); + return 0; + } + + f32 volume = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_volume_env"); return 0; } + + set_volume_env(volume); + + return 1; +} + +int smlua_func_get_environment_region(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", "get_environment_region", 1, top); + return 0; + } + + u8 index = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_environment_region"); return 0; } + + lua_pushnumber(L, get_environment_region(index)); + + return 1; +} + +int smlua_func_set_environment_region(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", "set_environment_region", 2, top); + return 0; + } + + u8 index = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_environment_region"); return 0; } + s32 value = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "set_environment_region"); return 0; } + + set_environment_region(index, value); + + return 1; +} + +int smlua_func_mod_file_exists(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", "mod_file_exists", 1, top); + return 0; + } + + const char* filename = smlua_to_string(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "mod_file_exists"); return 0; } + + lua_pushboolean(L, mod_file_exists(filename)); + + return 1; +} + +int smlua_func_get_active_mod(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_active_mod", 0, top); + return 0; + } + + + smlua_push_object(L, LOT_MOD, get_active_mod(), NULL); + + return 1; +} + int smlua_func_set_window_title(lua_State* L) { if (L == NULL) { return 0; } @@ -31693,6 +31804,36 @@ int smlua_func_set_window_title(lua_State* L) { return 1; } +int smlua_func_reset_window_title(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", "reset_window_title", 0, top); + return 0; + } + + + reset_window_title(); + + return 1; +} + +int smlua_func_get_os_name(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_os_name", 0, top); + return 0; + } + + + lua_pushstring(L, get_os_name()); + + return 1; +} + ///////////////////////// // smlua_model_utils.h // ///////////////////////// @@ -31718,6 +31859,155 @@ int smlua_func_smlua_model_util_get_id(lua_State* L) { // smlua_obj_utils.h // /////////////////////// +int smlua_func_spawn_sync_object(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 6) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "spawn_sync_object", 6, top); + return 0; + } + + int behaviorId = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_sync_object"); return 0; } + int modelId = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_sync_object"); return 0; } + f32 x = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "spawn_sync_object"); return 0; } + f32 y = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "spawn_sync_object"); return 0; } + f32 z = smlua_to_number(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "spawn_sync_object"); return 0; } + LuaFunction objSetupFunction = smlua_to_lua_function(L, 6); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "spawn_sync_object"); return 0; } + + smlua_push_object(L, LOT_OBJECT, spawn_sync_object(behaviorId, modelId, x, y, z, objSetupFunction), NULL); + + return 1; +} + +int smlua_func_spawn_non_sync_object(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 6) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "spawn_non_sync_object", 6, top); + return 0; + } + + int behaviorId = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_non_sync_object"); return 0; } + int modelId = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_non_sync_object"); return 0; } + f32 x = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "spawn_non_sync_object"); return 0; } + f32 y = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "spawn_non_sync_object"); return 0; } + f32 z = smlua_to_number(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "spawn_non_sync_object"); return 0; } + LuaFunction objSetupFunction = smlua_to_lua_function(L, 6); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "spawn_non_sync_object"); return 0; } + + smlua_push_object(L, LOT_OBJECT, spawn_non_sync_object(behaviorId, modelId, x, y, z, objSetupFunction), NULL); + + return 1; +} + +int smlua_func_obj_has_behavior_id(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", "obj_has_behavior_id", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { 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_has_behavior_id"); return 0; } + int behaviorId = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_has_behavior_id"); return 0; } + + lua_pushinteger(L, obj_has_behavior_id(o, behaviorId)); + + return 1; +} + +int smlua_func_obj_has_model_extended(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", "obj_has_model_extended", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { 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_has_model_extended"); return 0; } + int modelId = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_has_model_extended"); return 0; } + + lua_pushinteger(L, obj_has_model_extended(o, modelId)); + + return 1; +} + +int smlua_func_obj_get_model_id_extended(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_get_model_id_extended", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { 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_get_model_id_extended"); return 0; } + + lua_pushinteger(L, obj_get_model_id_extended(o)); + + return 1; +} + +int smlua_func_obj_set_model_extended(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", "obj_set_model_extended", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { 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_set_model_extended"); return 0; } + int modelId = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_model_extended"); return 0; } + + obj_set_model_extended(o, modelId); + + return 1; +} + +int smlua_func_get_trajectory(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", "get_trajectory", 1, top); + return 0; + } + + const char* name = smlua_to_string(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_trajectory"); return 0; } + + smlua_push_pointer(L, LVT_TRAJECTORY_P, (void*)get_trajectory(name), NULL); + + return 1; +} + int smlua_func_geo_get_current_object(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -31748,21 +32038,6 @@ int smlua_func_get_current_object(UNUSED lua_State* L) { return 1; } -int smlua_func_get_cutscene_focus(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_cutscene_focus", 0, top); - return 0; - } - - - smlua_push_object(L, LOT_OBJECT, get_cutscene_focus(), NULL); - - return 1; -} - int smlua_func_get_dialog_object(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -31778,6 +32053,21 @@ int smlua_func_get_dialog_object(UNUSED lua_State* L) { return 1; } +int smlua_func_get_cutscene_focus(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_cutscene_focus", 0, top); + return 0; + } + + + smlua_push_object(L, LOT_OBJECT, get_cutscene_focus(), NULL); + + return 1; +} + int smlua_func_get_secondary_camera_focus(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -31793,85 +32083,214 @@ int smlua_func_get_secondary_camera_focus(UNUSED lua_State* L) { return 1; } -int smlua_func_get_temp_object_hitbox(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_temp_object_hitbox", 0, top); - return 0; - } - - - smlua_push_object(L, LOT_OBJECTHITBOX, get_temp_object_hitbox(), NULL); - - return 1; -} - -int smlua_func_get_trajectory(lua_State* L) { +int smlua_func_set_cutscene_focus(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", "get_trajectory", 1, top); - return 0; - } - - const char* name = smlua_to_string(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "get_trajectory"); return 0; } - - smlua_push_pointer(L, LVT_TRAJECTORY_P, (void*)get_trajectory(name), NULL); - - return 1; -} - -int smlua_func_obj_check_hitbox_overlap(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", "obj_check_hitbox_overlap", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct Object* o1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_check_hitbox_overlap"); return 0; } - if (lua_isnil(L, 2)) { return 0; } - struct Object* o2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_check_hitbox_overlap"); return 0; } - - lua_pushboolean(L, obj_check_hitbox_overlap(o1, o2)); - - return 1; -} - -int smlua_func_obj_check_overlap_with_hitbox_params(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 7) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_check_overlap_with_hitbox_params", 7, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "set_cutscene_focus", 1, top); return 0; } if (lua_isnil(L, 1)) { 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_check_overlap_with_hitbox_params"); return 0; } - f32 x = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_check_overlap_with_hitbox_params"); return 0; } - f32 y = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_check_overlap_with_hitbox_params"); return 0; } - f32 z = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_check_overlap_with_hitbox_params"); return 0; } - f32 h = smlua_to_number(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "obj_check_overlap_with_hitbox_params"); return 0; } - f32 r = smlua_to_number(L, 6); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "obj_check_overlap_with_hitbox_params"); return 0; } - f32 d = smlua_to_number(L, 7); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "obj_check_overlap_with_hitbox_params"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "set_cutscene_focus"); return 0; } - lua_pushboolean(L, obj_check_overlap_with_hitbox_params(o, x, y, z, h, r, d)); + set_cutscene_focus(o); + + return 1; +} + +int smlua_func_set_secondary_camera_focus(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", "set_secondary_camera_focus", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { 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, "set_secondary_camera_focus"); return 0; } + + set_secondary_camera_focus(o); + + return 1; +} + +int smlua_func_obj_get_first(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_get_first", 1, top); + return 0; + } + + int objList = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_first"); return 0; } + + smlua_push_object(L, LOT_OBJECT, obj_get_first(objList), NULL); + + return 1; +} + +int smlua_func_obj_get_first_with_behavior_id(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_get_first_with_behavior_id", 1, top); + return 0; + } + + int behaviorId = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_first_with_behavior_id"); return 0; } + + smlua_push_object(L, LOT_OBJECT, obj_get_first_with_behavior_id(behaviorId), NULL); + + return 1; +} + +int smlua_func_obj_get_first_with_behavior_id_and_field_s32(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", "obj_get_first_with_behavior_id_and_field_s32", 3, top); + return 0; + } + + int behaviorId = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_first_with_behavior_id_and_field_s32"); return 0; } + s32 fieldIndex = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_get_first_with_behavior_id_and_field_s32"); return 0; } + s32 value = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_get_first_with_behavior_id_and_field_s32"); return 0; } + + smlua_push_object(L, LOT_OBJECT, obj_get_first_with_behavior_id_and_field_s32(behaviorId, fieldIndex, value), NULL); + + return 1; +} + +int smlua_func_obj_get_first_with_behavior_id_and_field_f32(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", "obj_get_first_with_behavior_id_and_field_f32", 3, top); + return 0; + } + + int behaviorId = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_first_with_behavior_id_and_field_f32"); return 0; } + s32 fieldIndex = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_get_first_with_behavior_id_and_field_f32"); return 0; } + f32 value = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_get_first_with_behavior_id_and_field_f32"); return 0; } + + smlua_push_object(L, LOT_OBJECT, obj_get_first_with_behavior_id_and_field_f32(behaviorId, fieldIndex, value), NULL); + + return 1; +} + +int smlua_func_obj_get_next(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_get_next", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { 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_get_next"); return 0; } + + smlua_push_object(L, LOT_OBJECT, obj_get_next(o), NULL); + + return 1; +} + +int smlua_func_obj_get_next_with_same_behavior_id(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_get_next_with_same_behavior_id", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { 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_get_next_with_same_behavior_id"); return 0; } + + smlua_push_object(L, LOT_OBJECT, obj_get_next_with_same_behavior_id(o), NULL); + + return 1; +} + +int smlua_func_obj_get_next_with_same_behavior_id_and_field_s32(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", "obj_get_next_with_same_behavior_id_and_field_s32", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { 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_get_next_with_same_behavior_id_and_field_s32"); return 0; } + s32 fieldIndex = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_get_next_with_same_behavior_id_and_field_s32"); return 0; } + s32 value = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_get_next_with_same_behavior_id_and_field_s32"); return 0; } + + smlua_push_object(L, LOT_OBJECT, obj_get_next_with_same_behavior_id_and_field_s32(o, fieldIndex, value), NULL); + + return 1; +} + +int smlua_func_obj_get_next_with_same_behavior_id_and_field_f32(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", "obj_get_next_with_same_behavior_id_and_field_f32", 3, top); + return 0; + } + + if (lua_isnil(L, 1)) { 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_get_next_with_same_behavior_id_and_field_f32"); return 0; } + s32 fieldIndex = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_get_next_with_same_behavior_id_and_field_f32"); return 0; } + f32 value = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_get_next_with_same_behavior_id_and_field_f32"); return 0; } + + smlua_push_object(L, LOT_OBJECT, obj_get_next_with_same_behavior_id_and_field_f32(o, fieldIndex, value), NULL); + + return 1; +} + +int smlua_func_obj_get_nearest_object_with_behavior_id(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", "obj_get_nearest_object_with_behavior_id", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { 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_get_nearest_object_with_behavior_id"); return 0; } + int behaviorId = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_get_nearest_object_with_behavior_id"); return 0; } + + smlua_push_object(L, LOT_OBJECT, obj_get_nearest_object_with_behavior_id(o, behaviorId), NULL); return 1; } @@ -31913,6 +32332,46 @@ int smlua_func_obj_get_collided_object(lua_State* L) { return 1; } +int smlua_func_obj_get_field_u32(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", "obj_get_field_u32", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { 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_get_field_u32"); return 0; } + s32 fieldIndex = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_get_field_u32"); return 0; } + + lua_pushinteger(L, obj_get_field_u32(o, fieldIndex)); + + return 1; +} + +int smlua_func_obj_get_field_s32(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", "obj_get_field_s32", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { 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_get_field_s32"); return 0; } + s32 fieldIndex = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_get_field_s32"); return 0; } + + lua_pushinteger(L, obj_get_field_s32(o, fieldIndex)); + + return 1; +} + int smlua_func_obj_get_field_f32(lua_State* L) { if (L == NULL) { return 0; } @@ -31955,236 +32414,92 @@ int smlua_func_obj_get_field_s16(lua_State* L) { return 1; } -int smlua_func_obj_get_field_s32(lua_State* L) { +int smlua_func_obj_set_field_u32(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", "obj_get_field_s32", 2, top); + if (top != 3) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_field_u32", 3, top); return 0; } if (lua_isnil(L, 1)) { 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_get_field_s32"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_field_u32"); return 0; } s32 fieldIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_get_field_s32"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_field_u32"); return 0; } + u32 value = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_field_u32"); return 0; } - lua_pushinteger(L, obj_get_field_s32(o, fieldIndex)); + obj_set_field_u32(o, fieldIndex, value); return 1; } -int smlua_func_obj_get_field_u32(lua_State* L) { +int smlua_func_obj_set_field_s32(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", "obj_get_field_u32", 2, top); + if (top != 3) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_field_s32", 3, top); return 0; } if (lua_isnil(L, 1)) { 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_get_field_u32"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_field_s32"); return 0; } s32 fieldIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_get_field_u32"); return 0; } - - lua_pushinteger(L, obj_get_field_u32(o, fieldIndex)); - - return 1; -} - -int smlua_func_obj_get_first(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_get_first", 1, top); - return 0; - } - - int objList = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_first"); return 0; } - - smlua_push_object(L, LOT_OBJECT, obj_get_first(objList), NULL); - - return 1; -} - -int smlua_func_obj_get_first_with_behavior_id(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_get_first_with_behavior_id", 1, top); - return 0; - } - - int behaviorId = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_first_with_behavior_id"); return 0; } - - smlua_push_object(L, LOT_OBJECT, obj_get_first_with_behavior_id(behaviorId), NULL); - - return 1; -} - -int smlua_func_obj_get_first_with_behavior_id_and_field_f32(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", "obj_get_first_with_behavior_id_and_field_f32", 3, top); - return 0; - } - - int behaviorId = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_first_with_behavior_id_and_field_f32"); return 0; } - s32 fieldIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_get_first_with_behavior_id_and_field_f32"); return 0; } - f32 value = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_get_first_with_behavior_id_and_field_f32"); return 0; } - - smlua_push_object(L, LOT_OBJECT, obj_get_first_with_behavior_id_and_field_f32(behaviorId, fieldIndex, value), NULL); - - return 1; -} - -int smlua_func_obj_get_first_with_behavior_id_and_field_s32(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", "obj_get_first_with_behavior_id_and_field_s32", 3, top); - return 0; - } - - int behaviorId = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_get_first_with_behavior_id_and_field_s32"); return 0; } - s32 fieldIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_get_first_with_behavior_id_and_field_s32"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_field_s32"); return 0; } s32 value = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_get_first_with_behavior_id_and_field_s32"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_field_s32"); return 0; } - smlua_push_object(L, LOT_OBJECT, obj_get_first_with_behavior_id_and_field_s32(behaviorId, fieldIndex, value), NULL); + obj_set_field_s32(o, fieldIndex, value); return 1; } -int smlua_func_obj_get_model_id_extended(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_get_model_id_extended", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { 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_get_model_id_extended"); return 0; } - - lua_pushinteger(L, obj_get_model_id_extended(o)); - - return 1; -} - -int smlua_func_obj_get_nearest_object_with_behavior_id(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", "obj_get_nearest_object_with_behavior_id", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { 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_get_nearest_object_with_behavior_id"); return 0; } - int behaviorId = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_get_nearest_object_with_behavior_id"); return 0; } - - smlua_push_object(L, LOT_OBJECT, obj_get_nearest_object_with_behavior_id(o, behaviorId), NULL); - - return 1; -} - -int smlua_func_obj_get_next(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_get_next", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { 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_get_next"); return 0; } - - smlua_push_object(L, LOT_OBJECT, obj_get_next(o), NULL); - - return 1; -} - -int smlua_func_obj_get_next_with_same_behavior_id(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_get_next_with_same_behavior_id", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { 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_get_next_with_same_behavior_id"); return 0; } - - smlua_push_object(L, LOT_OBJECT, obj_get_next_with_same_behavior_id(o), NULL); - - return 1; -} - -int smlua_func_obj_get_next_with_same_behavior_id_and_field_f32(lua_State* L) { +int smlua_func_obj_set_field_f32(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", "obj_get_next_with_same_behavior_id_and_field_f32", 3, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_field_f32", 3, top); return 0; } if (lua_isnil(L, 1)) { 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_get_next_with_same_behavior_id_and_field_f32"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_field_f32"); return 0; } s32 fieldIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_get_next_with_same_behavior_id_and_field_f32"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_field_f32"); return 0; } f32 value = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_get_next_with_same_behavior_id_and_field_f32"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_field_f32"); return 0; } - smlua_push_object(L, LOT_OBJECT, obj_get_next_with_same_behavior_id_and_field_f32(o, fieldIndex, value), NULL); + obj_set_field_f32(o, fieldIndex, value); return 1; } -int smlua_func_obj_get_next_with_same_behavior_id_and_field_s32(lua_State* L) { +int smlua_func_obj_set_field_s16(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", "obj_get_next_with_same_behavior_id_and_field_s32", 3, top); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_field_s16", 4, top); return 0; } if (lua_isnil(L, 1)) { 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_get_next_with_same_behavior_id_and_field_s32"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_set_field_s16"); return 0; } s32 fieldIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_get_next_with_same_behavior_id_and_field_s32"); return 0; } - s32 value = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_get_next_with_same_behavior_id_and_field_s32"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_field_s16"); return 0; } + s32 fieldSubIndex = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_field_s16"); return 0; } + s16 value = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_field_s16"); return 0; } - smlua_push_object(L, LOT_OBJECT, obj_get_next_with_same_behavior_id_and_field_s32(o, fieldIndex, value), NULL); + obj_set_field_s16(o, fieldIndex, fieldSubIndex, value); return 1; } @@ -32206,42 +32521,17 @@ int smlua_func_obj_get_temp_spawn_particles_info(lua_State* L) { return 1; } -int smlua_func_obj_has_behavior_id(lua_State* L) { +int smlua_func_get_temp_object_hitbox(UNUSED 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", "obj_has_behavior_id", 2, top); + if (top != 0) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "get_temp_object_hitbox", 0, top); return 0; } - if (lua_isnil(L, 1)) { 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_has_behavior_id"); return 0; } - int behaviorId = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_has_behavior_id"); return 0; } - lua_pushinteger(L, obj_has_behavior_id(o, behaviorId)); - - return 1; -} - -int smlua_func_obj_has_model_extended(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", "obj_has_model_extended", 2, top); - return 0; - } - - if (lua_isnil(L, 1)) { 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_has_model_extended"); return 0; } - int modelId = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_has_model_extended"); return 0; } - - lua_pushinteger(L, obj_has_model_extended(o, modelId)); + smlua_push_object(L, LOT_OBJECTHITBOX, get_temp_object_hitbox(), NULL); return 1; } @@ -32408,136 +32698,53 @@ int smlua_func_obj_is_valid_for_interaction(lua_State* L) { return 1; } -int smlua_func_obj_move_xyz(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_move_xyz", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { 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_move_xyz"); return 0; } - f32 dx = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_move_xyz"); return 0; } - f32 dy = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_move_xyz"); return 0; } - f32 dz = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_move_xyz"); return 0; } - - obj_move_xyz(o, dx, dy, dz); - - return 1; -} - -int smlua_func_obj_set_field_f32(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", "obj_set_field_f32", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { 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_set_field_f32"); return 0; } - s32 fieldIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_field_f32"); return 0; } - f32 value = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_field_f32"); return 0; } - - obj_set_field_f32(o, fieldIndex, value); - - return 1; -} - -int smlua_func_obj_set_field_s16(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_set_field_s16", 4, top); - return 0; - } - - if (lua_isnil(L, 1)) { 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_set_field_s16"); return 0; } - s32 fieldIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_field_s16"); return 0; } - s32 fieldSubIndex = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_field_s16"); return 0; } - s16 value = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_set_field_s16"); return 0; } - - obj_set_field_s16(o, fieldIndex, fieldSubIndex, value); - - return 1; -} - -int smlua_func_obj_set_field_s32(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", "obj_set_field_s32", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { 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_set_field_s32"); return 0; } - s32 fieldIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_field_s32"); return 0; } - s32 value = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_field_s32"); return 0; } - - obj_set_field_s32(o, fieldIndex, value); - - return 1; -} - -int smlua_func_obj_set_field_u32(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", "obj_set_field_u32", 3, top); - return 0; - } - - if (lua_isnil(L, 1)) { 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_set_field_u32"); return 0; } - s32 fieldIndex = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_field_u32"); return 0; } - u32 value = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_set_field_u32"); return 0; } - - obj_set_field_u32(o, fieldIndex, value); - - return 1; -} - -int smlua_func_obj_set_model_extended(lua_State* L) { +int smlua_func_obj_check_hitbox_overlap(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", "obj_set_model_extended", 2, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_check_hitbox_overlap", 2, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct Object* o1 = (struct Object*)smlua_to_cobject(L, 1, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_check_hitbox_overlap"); return 0; } + if (lua_isnil(L, 2)) { return 0; } + struct Object* o2 = (struct Object*)smlua_to_cobject(L, 2, LOT_OBJECT); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_check_hitbox_overlap"); return 0; } + + lua_pushboolean(L, obj_check_hitbox_overlap(o1, o2)); + + return 1; +} + +int smlua_func_obj_check_overlap_with_hitbox_params(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 7) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_check_overlap_with_hitbox_params", 7, top); return 0; } if (lua_isnil(L, 1)) { 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_set_model_extended"); return 0; } - int modelId = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_set_model_extended"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_check_overlap_with_hitbox_params"); return 0; } + f32 x = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_check_overlap_with_hitbox_params"); return 0; } + f32 y = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_check_overlap_with_hitbox_params"); return 0; } + f32 z = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_check_overlap_with_hitbox_params"); return 0; } + f32 h = smlua_to_number(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "obj_check_overlap_with_hitbox_params"); return 0; } + f32 r = smlua_to_number(L, 6); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "obj_check_overlap_with_hitbox_params"); return 0; } + f32 d = smlua_to_number(L, 7); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "obj_check_overlap_with_hitbox_params"); return 0; } - obj_set_model_extended(o, modelId); + lua_pushboolean(L, obj_check_overlap_with_hitbox_params(o, x, y, z, h, r, d)); return 1; } @@ -32566,38 +32773,26 @@ int smlua_func_obj_set_vel(lua_State* L) { return 1; } -int smlua_func_set_cutscene_focus(lua_State* L) { +int smlua_func_obj_move_xyz(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", "set_cutscene_focus", 1, top); + if (top != 4) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "obj_move_xyz", 4, top); return 0; } if (lua_isnil(L, 1)) { 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, "set_cutscene_focus"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "obj_move_xyz"); return 0; } + f32 dx = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "obj_move_xyz"); return 0; } + f32 dy = smlua_to_number(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "obj_move_xyz"); return 0; } + f32 dz = smlua_to_number(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "obj_move_xyz"); return 0; } - set_cutscene_focus(o); - - return 1; -} - -int smlua_func_set_secondary_camera_focus(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", "set_secondary_camera_focus", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { 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, "set_secondary_camera_focus"); return 0; } - - set_secondary_camera_focus(o); + obj_move_xyz(o, dx, dy, dz); return 1; } @@ -32629,64 +32824,193 @@ int smlua_func_set_whirlpools(lua_State* L) { return 1; } -int smlua_func_spawn_non_sync_object(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 6) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "spawn_non_sync_object", 6, top); - return 0; - } - - int behaviorId = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_non_sync_object"); return 0; } - int modelId = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_non_sync_object"); return 0; } - f32 x = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "spawn_non_sync_object"); return 0; } - f32 y = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "spawn_non_sync_object"); return 0; } - f32 z = smlua_to_number(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "spawn_non_sync_object"); return 0; } - LuaFunction objSetupFunction = smlua_to_lua_function(L, 6); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "spawn_non_sync_object"); return 0; } - - smlua_push_object(L, LOT_OBJECT, spawn_non_sync_object(behaviorId, modelId, x, y, z, objSetupFunction), NULL); - - return 1; -} - -int smlua_func_spawn_sync_object(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 6) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "spawn_sync_object", 6, top); - return 0; - } - - int behaviorId = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "spawn_sync_object"); return 0; } - int modelId = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "spawn_sync_object"); return 0; } - f32 x = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "spawn_sync_object"); return 0; } - f32 y = smlua_to_number(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "spawn_sync_object"); return 0; } - f32 z = smlua_to_number(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "spawn_sync_object"); return 0; } - LuaFunction objSetupFunction = smlua_to_lua_function(L, 6); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "spawn_sync_object"); return 0; } - - smlua_push_object(L, LOT_OBJECT, spawn_sync_object(behaviorId, modelId, x, y, z, objSetupFunction), NULL); - - return 1; -} - //////////////////////// // smlua_text_utils.h // //////////////////////// +int smlua_func_smlua_text_utils_reset_all(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", "smlua_text_utils_reset_all", 0, top); + return 0; + } + + + smlua_text_utils_reset_all(); + + return 1; +} + +int smlua_func_smlua_text_utils_dialog_replace(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 6) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "smlua_text_utils_dialog_replace", 6, top); + return 0; + } + + int dialogId = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_text_utils_dialog_replace"); return 0; } + u32 unused = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "smlua_text_utils_dialog_replace"); return 0; } + s8 linesPerBox = smlua_to_integer(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "smlua_text_utils_dialog_replace"); return 0; } + s16 leftOffset = smlua_to_integer(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "smlua_text_utils_dialog_replace"); return 0; } + s16 width = smlua_to_integer(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "smlua_text_utils_dialog_replace"); return 0; } + const char* str = smlua_to_string(L, 6); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "smlua_text_utils_dialog_replace"); return 0; } + + smlua_text_utils_dialog_replace(dialogId, unused, linesPerBox, leftOffset, width, str); + + return 1; +} + +int smlua_func_smlua_text_utils_course_acts_replace(lua_State* L) { + if (L == NULL) { return 0; } + + int top = lua_gettop(L); + if (top != 8) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "smlua_text_utils_course_acts_replace", 8, top); + return 0; + } + + s16 courseNum = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_text_utils_course_acts_replace"); return 0; } + const char* courseName = smlua_to_string(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "smlua_text_utils_course_acts_replace"); return 0; } + const char* act1 = smlua_to_string(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "smlua_text_utils_course_acts_replace"); return 0; } + const char* act2 = smlua_to_string(L, 4); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "smlua_text_utils_course_acts_replace"); return 0; } + const char* act3 = smlua_to_string(L, 5); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "smlua_text_utils_course_acts_replace"); return 0; } + const char* act4 = smlua_to_string(L, 6); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "smlua_text_utils_course_acts_replace"); return 0; } + const char* act5 = smlua_to_string(L, 7); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "smlua_text_utils_course_acts_replace"); return 0; } + const char* act6 = smlua_to_string(L, 8); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 8, "smlua_text_utils_course_acts_replace"); return 0; } + + smlua_text_utils_course_acts_replace(courseNum, courseName, act1, act2, act3, act4, act5, act6); + + return 1; +} + +int smlua_func_smlua_text_utils_secret_star_replace(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", "smlua_text_utils_secret_star_replace", 2, top); + return 0; + } + + s16 courseNum = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_text_utils_secret_star_replace"); return 0; } + const char* courseName = smlua_to_string(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "smlua_text_utils_secret_star_replace"); return 0; } + + smlua_text_utils_secret_star_replace(courseNum, courseName); + + return 1; +} + +int smlua_func_smlua_text_utils_course_name_replace(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", "smlua_text_utils_course_name_replace", 2, top); + return 0; + } + + s16 courseNum = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_text_utils_course_name_replace"); return 0; } + const char* name = smlua_to_string(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "smlua_text_utils_course_name_replace"); return 0; } + + smlua_text_utils_course_name_replace(courseNum, name); + + return 1; +} + +int smlua_func_smlua_text_utils_course_name_get(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_text_utils_course_name_get", 1, top); + return 0; + } + + s16 courseNum = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_text_utils_course_name_get"); return 0; } + + lua_pushstring(L, smlua_text_utils_course_name_get(courseNum)); + + return 1; +} + +int smlua_func_smlua_text_utils_course_name_mod_index(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_text_utils_course_name_mod_index", 1, top); + return 0; + } + + s16 courseNum = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_text_utils_course_name_mod_index"); return 0; } + + lua_pushinteger(L, smlua_text_utils_course_name_mod_index(courseNum)); + + return 1; +} + +int smlua_func_smlua_text_utils_course_name_reset(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_text_utils_course_name_reset", 1, top); + return 0; + } + + s16 courseNum = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_text_utils_course_name_reset"); return 0; } + + smlua_text_utils_course_name_reset(courseNum); + + return 1; +} + +int smlua_func_smlua_text_utils_act_name_replace(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", "smlua_text_utils_act_name_replace", 3, top); + return 0; + } + + s16 courseNum = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_text_utils_act_name_replace"); return 0; } + u8 actNum = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "smlua_text_utils_act_name_replace"); return 0; } + const char* name = smlua_to_string(L, 3); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "smlua_text_utils_act_name_replace"); return 0; } + + smlua_text_utils_act_name_replace(courseNum, actNum, name); + + return 1; +} + int smlua_func_smlua_text_utils_act_name_get(lua_State* L) { if (L == NULL) { return 0; } @@ -32725,27 +33049,6 @@ int smlua_func_smlua_text_utils_act_name_mod_index(lua_State* L) { return 1; } -int smlua_func_smlua_text_utils_act_name_replace(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", "smlua_text_utils_act_name_replace", 3, top); - return 0; - } - - s16 courseNum = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_text_utils_act_name_replace"); return 0; } - u8 actNum = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "smlua_text_utils_act_name_replace"); return 0; } - const char* name = smlua_to_string(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "smlua_text_utils_act_name_replace"); return 0; } - - smlua_text_utils_act_name_replace(courseNum, actNum, name); - - return 1; -} - int smlua_func_smlua_text_utils_act_name_reset(lua_State* L) { if (L == NULL) { return 0; } @@ -32782,134 +33085,6 @@ int smlua_func_smlua_text_utils_castle_secret_stars_replace(lua_State* L) { return 1; } -int smlua_func_smlua_text_utils_course_acts_replace(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 8) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "smlua_text_utils_course_acts_replace", 8, top); - return 0; - } - - s16 courseNum = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_text_utils_course_acts_replace"); return 0; } - const char* courseName = smlua_to_string(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "smlua_text_utils_course_acts_replace"); return 0; } - const char* act1 = smlua_to_string(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "smlua_text_utils_course_acts_replace"); return 0; } - const char* act2 = smlua_to_string(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "smlua_text_utils_course_acts_replace"); return 0; } - const char* act3 = smlua_to_string(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "smlua_text_utils_course_acts_replace"); return 0; } - const char* act4 = smlua_to_string(L, 6); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "smlua_text_utils_course_acts_replace"); return 0; } - const char* act5 = smlua_to_string(L, 7); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 7, "smlua_text_utils_course_acts_replace"); return 0; } - const char* act6 = smlua_to_string(L, 8); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 8, "smlua_text_utils_course_acts_replace"); return 0; } - - smlua_text_utils_course_acts_replace(courseNum, courseName, act1, act2, act3, act4, act5, act6); - - return 1; -} - -int smlua_func_smlua_text_utils_course_name_get(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_text_utils_course_name_get", 1, top); - return 0; - } - - s16 courseNum = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_text_utils_course_name_get"); return 0; } - - lua_pushstring(L, smlua_text_utils_course_name_get(courseNum)); - - return 1; -} - -int smlua_func_smlua_text_utils_course_name_mod_index(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_text_utils_course_name_mod_index", 1, top); - return 0; - } - - s16 courseNum = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_text_utils_course_name_mod_index"); return 0; } - - lua_pushinteger(L, smlua_text_utils_course_name_mod_index(courseNum)); - - return 1; -} - -int smlua_func_smlua_text_utils_course_name_replace(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", "smlua_text_utils_course_name_replace", 2, top); - return 0; - } - - s16 courseNum = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_text_utils_course_name_replace"); return 0; } - const char* name = smlua_to_string(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "smlua_text_utils_course_name_replace"); return 0; } - - smlua_text_utils_course_name_replace(courseNum, name); - - return 1; -} - -int smlua_func_smlua_text_utils_course_name_reset(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_text_utils_course_name_reset", 1, top); - return 0; - } - - s16 courseNum = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_text_utils_course_name_reset"); return 0; } - - smlua_text_utils_course_name_reset(courseNum); - - return 1; -} - -int smlua_func_smlua_text_utils_dialog_replace(lua_State* L) { - if (L == NULL) { return 0; } - - int top = lua_gettop(L); - if (top != 6) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "smlua_text_utils_dialog_replace", 6, top); - return 0; - } - - int dialogId = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_text_utils_dialog_replace"); return 0; } - u32 unused = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "smlua_text_utils_dialog_replace"); return 0; } - s8 linesPerBox = smlua_to_integer(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "smlua_text_utils_dialog_replace"); return 0; } - s16 leftOffset = smlua_to_integer(L, 4); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "smlua_text_utils_dialog_replace"); return 0; } - s16 width = smlua_to_integer(L, 5); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 5, "smlua_text_utils_dialog_replace"); return 0; } - const char* str = smlua_to_string(L, 6); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 6, "smlua_text_utils_dialog_replace"); return 0; } - - smlua_text_utils_dialog_replace(dialogId, unused, linesPerBox, leftOffset, width, str); - - return 1; -} - int smlua_func_smlua_text_utils_extra_text_replace(lua_State* L) { if (L == NULL) { return 0; } @@ -32944,43 +33119,58 @@ int smlua_func_smlua_text_utils_get_language(UNUSED lua_State* L) { return 1; } -int smlua_func_smlua_text_utils_reset_all(UNUSED lua_State* L) { + ////////////////// + // sound_init.h // +////////////////// + +int smlua_func_reset_volume(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", "smlua_text_utils_reset_all", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "reset_volume", 0, top); return 0; } - smlua_text_utils_reset_all(); + reset_volume(); return 1; } -int smlua_func_smlua_text_utils_secret_star_replace(lua_State* L) { +int smlua_func_raise_background_noise(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", "smlua_text_utils_secret_star_replace", 2, top); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "raise_background_noise", 1, top); return 0; } - s16 courseNum = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "smlua_text_utils_secret_star_replace"); return 0; } - const char* courseName = smlua_to_string(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "smlua_text_utils_secret_star_replace"); return 0; } + s32 a = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "raise_background_noise"); return 0; } - smlua_text_utils_secret_star_replace(courseNum, courseName); + raise_background_noise(a); return 1; } - ////////////////// - // sound_init.h // -////////////////// +int smlua_func_lower_background_noise(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", "lower_background_noise", 1, top); + return 0; + } + + s32 a = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "lower_background_noise"); return 0; } + + lower_background_noise(a); + + return 1; +} int smlua_func_disable_background_sound(UNUSED lua_State* L) { if (L == NULL) { return 0; } @@ -33012,121 +33202,6 @@ int smlua_func_enable_background_sound(UNUSED lua_State* L) { return 1; } -int smlua_func_fadeout_cap_music(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", "fadeout_cap_music", 0, top); - return 0; - } - - - fadeout_cap_music(); - - return 1; -} - -int smlua_func_fadeout_level_music(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", "fadeout_level_music", 1, top); - return 0; - } - - s16 fadeTimer = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "fadeout_level_music"); return 0; } - - fadeout_level_music(fadeTimer); - - return 1; -} - -int smlua_func_fadeout_music(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", "fadeout_music", 1, top); - return 0; - } - - s16 fadeOutTime = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "fadeout_music"); return 0; } - - fadeout_music(fadeOutTime); - - return 1; -} - -int smlua_func_lower_background_noise(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", "lower_background_noise", 1, top); - return 0; - } - - s32 a = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "lower_background_noise"); return 0; } - - lower_background_noise(a); - - return 1; -} - -int smlua_func_play_cap_music(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", "play_cap_music", 1, top); - return 0; - } - - u16 seqArgs = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_cap_music"); return 0; } - - play_cap_music(seqArgs); - - return 1; -} - -int smlua_func_play_cutscene_music(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", "play_cutscene_music", 1, top); - return 0; - } - - u16 seqArgs = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_cutscene_music"); return 0; } - - play_cutscene_music(seqArgs); - - return 1; -} - -int smlua_func_play_infinite_stairs_music(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", "play_infinite_stairs_music", 0, top); - return 0; - } - - - play_infinite_stairs_music(); - - return 1; -} - int smlua_func_play_menu_sounds(lua_State* L) { if (L == NULL) { return 0; } @@ -33159,49 +33234,17 @@ int smlua_func_play_painting_eject_sound(UNUSED lua_State* L) { return 1; } -int smlua_func_play_shell_music(UNUSED lua_State* L) { +int smlua_func_play_infinite_stairs_music(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", "play_shell_music", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "play_infinite_stairs_music", 0, top); return 0; } - play_shell_music(); - - return 1; -} - -int smlua_func_raise_background_noise(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", "raise_background_noise", 1, top); - return 0; - } - - s32 a = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "raise_background_noise"); return 0; } - - raise_background_noise(a); - - return 1; -} - -int smlua_func_reset_volume(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", "reset_volume", 0, top); - return 0; - } - - - reset_volume(); + play_infinite_stairs_music(); return 1; } @@ -33227,17 +33270,68 @@ int smlua_func_set_background_music(lua_State* L) { return 1; } -int smlua_func_stop_cap_music(UNUSED lua_State* L) { +int smlua_func_fadeout_music(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", "fadeout_music", 1, top); + return 0; + } + + s16 fadeOutTime = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "fadeout_music"); return 0; } + + fadeout_music(fadeOutTime); + + return 1; +} + +int smlua_func_fadeout_level_music(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", "fadeout_level_music", 1, top); + return 0; + } + + s16 fadeTimer = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "fadeout_level_music"); return 0; } + + fadeout_level_music(fadeTimer); + + return 1; +} + +int smlua_func_play_cutscene_music(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", "play_cutscene_music", 1, top); + return 0; + } + + u16 seqArgs = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_cutscene_music"); return 0; } + + play_cutscene_music(seqArgs); + + return 1; +} + +int smlua_func_play_shell_music(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", "stop_cap_music", 0, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "play_shell_music", 0, top); return 0; } - stop_cap_music(); + play_shell_music(); return 1; } @@ -33257,57 +33351,73 @@ int smlua_func_stop_shell_music(UNUSED lua_State* L) { return 1; } +int smlua_func_play_cap_music(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", "play_cap_music", 1, top); + return 0; + } + + u16 seqArgs = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "play_cap_music"); return 0; } + + play_cap_music(seqArgs); + + return 1; +} + +int smlua_func_fadeout_cap_music(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", "fadeout_cap_music", 0, top); + return 0; + } + + + fadeout_cap_music(); + + return 1; +} + +int smlua_func_stop_cap_music(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", "stop_cap_music", 0, top); + return 0; + } + + + stop_cap_music(); + + return 1; +} + /////////////////// // spawn_sound.h // /////////////////// -int smlua_func_calc_dist_to_volume_range_1(lua_State* L) { +int smlua_func_exec_anim_sound_state(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", "calc_dist_to_volume_range_1", 1, top); + if (top != 2) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "exec_anim_sound_state", 2, top); return 0; } - f32 distance = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "calc_dist_to_volume_range_1"); return 0; } + if (lua_isnil(L, 1)) { return 0; } + struct SoundState* soundStates = (struct SoundState*)smlua_to_cobject(L, 1, LOT_SOUNDSTATE); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "exec_anim_sound_state"); return 0; } + u16 maxSoundStates = smlua_to_integer(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "exec_anim_sound_state"); return 0; } - lua_pushinteger(L, calc_dist_to_volume_range_1(distance)); - - return 1; -} - -int smlua_func_calc_dist_to_volume_range_2(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", "calc_dist_to_volume_range_2", 1, top); - return 0; - } - - f32 distance = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "calc_dist_to_volume_range_2"); return 0; } - - lua_pushinteger(L, calc_dist_to_volume_range_2(distance)); - - return 1; -} - -int smlua_func_create_sound_spawner(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", "create_sound_spawner", 1, top); - return 0; - } - - s32 soundMagic = smlua_to_integer(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "create_sound_spawner"); return 0; } - - create_sound_spawner(soundMagic); + exec_anim_sound_state(soundStates, maxSoundStates); return 1; } @@ -33346,22 +33456,53 @@ int smlua_func_cur_obj_play_sound_2(lua_State* L) { return 1; } -int smlua_func_exec_anim_sound_state(lua_State* L) { +int smlua_func_create_sound_spawner(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", "exec_anim_sound_state", 2, top); + if (top != 1) { + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "create_sound_spawner", 1, top); return 0; } - if (lua_isnil(L, 1)) { return 0; } - struct SoundState* soundStates = (struct SoundState*)smlua_to_cobject(L, 1, LOT_SOUNDSTATE); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "exec_anim_sound_state"); return 0; } - u16 maxSoundStates = smlua_to_integer(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "exec_anim_sound_state"); return 0; } + s32 soundMagic = smlua_to_integer(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "create_sound_spawner"); return 0; } - exec_anim_sound_state(soundStates, maxSoundStates); + create_sound_spawner(soundMagic); + + return 1; +} + +int smlua_func_calc_dist_to_volume_range_1(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", "calc_dist_to_volume_range_1", 1, top); + return 0; + } + + f32 distance = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "calc_dist_to_volume_range_1"); return 0; } + + lua_pushinteger(L, calc_dist_to_volume_range_1(distance)); + + return 1; +} + +int smlua_func_calc_dist_to_volume_range_2(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", "calc_dist_to_volume_range_2", 1, top); + return 0; + } + + f32 distance = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "calc_dist_to_volume_range_2"); return 0; } + + lua_pushinteger(L, calc_dist_to_volume_range_2(distance)); return 1; } @@ -33370,6 +33511,24 @@ int smlua_func_exec_anim_sound_state(lua_State* L) { // surface_collision.h // ///////////////////////// +int smlua_func_find_wall_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", "find_wall_collisions", 1, top); + return 0; + } + + if (lua_isnil(L, 1)) { return 0; } + struct WallCollisionData* colData = (struct WallCollisionData*)smlua_to_cobject(L, 1, LOT_WALLCOLLISIONDATA); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_wall_collisions"); return 0; } + + lua_pushinteger(L, find_wall_collisions(colData)); + + return 1; +} + /* int smlua_func_find_ceil(lua_State* L) { if (L == NULL) { return 0; } @@ -33418,26 +33577,26 @@ int smlua_func_find_ceil_height(lua_State* L) { } /* -int smlua_func_find_floor(lua_State* L) { +int smlua_func_find_floor_height_and_data(lua_State* L) { if (L == NULL) { return 0; } int top = lua_gettop(L); if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "find_floor", 4, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "find_floor_height_and_data", 4, top); return 0; } f32 xPos = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_floor"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_floor_height_and_data"); return 0; } f32 yPos = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "find_floor"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "find_floor_height_and_data"); return 0; } f32 zPos = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "find_floor"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "find_floor_height_and_data"); return 0; } if (lua_isnil(L, 4)) { return 0; } -// struct Surface** pfloor = (struct Surface**)smlua_to_cobject(L, 4, LOT_???); <--- UNIMPLEMENTED - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "find_floor"); return 0; } +// struct FloorGeometry** floorGeo = (struct FloorGeometry**)smlua_to_cobject(L, 4, LOT_???); <--- UNIMPLEMENTED + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "find_floor_height_and_data"); return 0; } - lua_pushnumber(L, find_floor(xPos, yPos, zPos, pfloor)); + lua_pushnumber(L, find_floor_height_and_data(xPos, yPos, zPos, floorGeo)); return 1; } @@ -33465,31 +33624,50 @@ int smlua_func_find_floor_height(lua_State* L) { } /* -int smlua_func_find_floor_height_and_data(lua_State* L) { +int smlua_func_find_floor(lua_State* L) { if (L == NULL) { return 0; } int top = lua_gettop(L); if (top != 4) { - LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "find_floor_height_and_data", 4, top); + LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "find_floor", 4, top); return 0; } f32 xPos = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_floor_height_and_data"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_floor"); return 0; } f32 yPos = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "find_floor_height_and_data"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "find_floor"); return 0; } f32 zPos = smlua_to_number(L, 3); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "find_floor_height_and_data"); return 0; } + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "find_floor"); return 0; } if (lua_isnil(L, 4)) { return 0; } -// struct FloorGeometry** floorGeo = (struct FloorGeometry**)smlua_to_cobject(L, 4, LOT_???); <--- UNIMPLEMENTED - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "find_floor_height_and_data"); return 0; } +// struct Surface** pfloor = (struct Surface**)smlua_to_cobject(L, 4, LOT_???); <--- UNIMPLEMENTED + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 4, "find_floor"); return 0; } - lua_pushnumber(L, find_floor_height_and_data(xPos, yPos, zPos, floorGeo)); + lua_pushnumber(L, find_floor(xPos, yPos, zPos, pfloor)); return 1; } */ +int smlua_func_find_water_level(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", "find_water_level", 2, top); + return 0; + } + + f32 x = smlua_to_number(L, 1); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_water_level"); return 0; } + f32 z = smlua_to_number(L, 2); + if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "find_water_level"); return 0; } + + lua_pushnumber(L, find_water_level(x, z)); + + return 1; +} + int smlua_func_find_poison_gas_level(lua_State* L) { if (L == NULL) { return 0; } @@ -33549,43 +33727,6 @@ int smlua_func_find_surface_on_ray(lua_State* L) { } */ -int smlua_func_find_wall_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", "find_wall_collisions", 1, top); - return 0; - } - - if (lua_isnil(L, 1)) { return 0; } - struct WallCollisionData* colData = (struct WallCollisionData*)smlua_to_cobject(L, 1, LOT_WALLCOLLISIONDATA); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_wall_collisions"); return 0; } - - lua_pushinteger(L, find_wall_collisions(colData)); - - return 1; -} - -int smlua_func_find_water_level(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", "find_water_level", 2, top); - return 0; - } - - f32 x = smlua_to_number(L, 1); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "find_water_level"); return 0; } - f32 z = smlua_to_number(L, 2); - if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "find_water_level"); return 0; } - - lua_pushnumber(L, find_water_level(x, z)); - - return 1; -} - int smlua_func_set_find_wall_direction(lua_State* L) { if (L == NULL) { return 0; } @@ -33717,710 +33858,710 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "area_get_warp_node_from_params", smlua_func_area_get_warp_node_from_params); // behavior_actions.h + smlua_bind_function(L, "spawn_mist_particles_variable", smlua_func_spawn_mist_particles_variable); + smlua_bind_function(L, "bhv_spawn_star_no_level_exit", smlua_func_bhv_spawn_star_no_level_exit); + smlua_bind_function(L, "spawn_triangle_break_particles", smlua_func_spawn_triangle_break_particles); + smlua_bind_function(L, "spawn_mist_from_global", smlua_func_spawn_mist_from_global); + smlua_bind_function(L, "clear_particle_flags", smlua_func_clear_particle_flags); + smlua_bind_function(L, "spawn_wind_particles", smlua_func_spawn_wind_particles); + smlua_bind_function(L, "check_if_moving_over_floor", smlua_func_check_if_moving_over_floor); smlua_bind_function(L, "arc_to_goal_pos", smlua_func_arc_to_goal_pos); - smlua_bind_function(L, "bhv_1up_common_init", smlua_func_bhv_1up_common_init); - smlua_bind_function(L, "bhv_1up_hidden_in_pole_loop", smlua_func_bhv_1up_hidden_in_pole_loop); - smlua_bind_function(L, "bhv_1up_hidden_in_pole_spawner_loop", smlua_func_bhv_1up_hidden_in_pole_spawner_loop); - smlua_bind_function(L, "bhv_1up_hidden_in_pole_trigger_loop", smlua_func_bhv_1up_hidden_in_pole_trigger_loop); - smlua_bind_function(L, "bhv_1up_hidden_loop", smlua_func_bhv_1up_hidden_loop); - smlua_bind_function(L, "bhv_1up_hidden_trigger_loop", smlua_func_bhv_1up_hidden_trigger_loop); - smlua_bind_function(L, "bhv_1up_init", smlua_func_bhv_1up_init); - smlua_bind_function(L, "bhv_1up_jump_on_approach_loop", smlua_func_bhv_1up_jump_on_approach_loop); - smlua_bind_function(L, "bhv_1up_loop", smlua_func_bhv_1up_loop); - smlua_bind_function(L, "bhv_1up_running_away_loop", smlua_func_bhv_1up_running_away_loop); - smlua_bind_function(L, "bhv_1up_sliding_loop", smlua_func_bhv_1up_sliding_loop); - smlua_bind_function(L, "bhv_1up_trigger_init", smlua_func_bhv_1up_trigger_init); - smlua_bind_function(L, "bhv_1up_walking_loop", smlua_func_bhv_1up_walking_loop); - smlua_bind_function(L, "bhv_act_selector_init", smlua_func_bhv_act_selector_init); - smlua_bind_function(L, "bhv_act_selector_loop", smlua_func_bhv_act_selector_loop); - smlua_bind_function(L, "bhv_act_selector_star_type_loop", smlua_func_bhv_act_selector_star_type_loop); - smlua_bind_function(L, "bhv_activated_back_and_forth_platform_init", smlua_func_bhv_activated_back_and_forth_platform_init); - smlua_bind_function(L, "bhv_activated_back_and_forth_platform_update", smlua_func_bhv_activated_back_and_forth_platform_update); - smlua_bind_function(L, "bhv_alpha_boo_key_loop", smlua_func_bhv_alpha_boo_key_loop); - smlua_bind_function(L, "bhv_ambient_light_update", smlua_func_bhv_ambient_light_update); - smlua_bind_function(L, "bhv_ambient_sounds_init", smlua_func_bhv_ambient_sounds_init); - smlua_bind_function(L, "bhv_animated_texture_loop", smlua_func_bhv_animated_texture_loop); - smlua_bind_function(L, "bhv_animates_on_floor_switch_press_init", smlua_func_bhv_animates_on_floor_switch_press_init); - smlua_bind_function(L, "bhv_animates_on_floor_switch_press_loop", smlua_func_bhv_animates_on_floor_switch_press_loop); - smlua_bind_function(L, "bhv_arrow_lift_loop", smlua_func_bhv_arrow_lift_loop); - smlua_bind_function(L, "bhv_bbh_tilting_trap_platform_loop", smlua_func_bhv_bbh_tilting_trap_platform_loop); - smlua_bind_function(L, "bhv_beta_boo_key_loop", smlua_func_bhv_beta_boo_key_loop); - smlua_bind_function(L, "bhv_beta_bowser_anchor_loop", smlua_func_bhv_beta_bowser_anchor_loop); + smlua_bind_function(L, "vec3f_copy_2", smlua_func_vec3f_copy_2); + smlua_bind_function(L, "tox_box_move", smlua_func_tox_box_move); + smlua_bind_function(L, "play_penguin_walking_sound", smlua_func_play_penguin_walking_sound); + smlua_bind_function(L, "update_angle_from_move_flags", smlua_func_update_angle_from_move_flags); + smlua_bind_function(L, "cur_obj_spawn_strong_wind_particles", smlua_func_cur_obj_spawn_strong_wind_particles); + smlua_bind_function(L, "bhv_star_door_loop_2", smlua_func_bhv_star_door_loop_2); + smlua_bind_function(L, "bhv_cap_switch_loop", smlua_func_bhv_cap_switch_loop); + smlua_bind_function(L, "bhv_tiny_star_particles_init", smlua_func_bhv_tiny_star_particles_init); + smlua_bind_function(L, "bhv_grindel_thwomp_loop", smlua_func_bhv_grindel_thwomp_loop); + smlua_bind_function(L, "bhv_koopa_shell_underwater_loop", smlua_func_bhv_koopa_shell_underwater_loop); + smlua_bind_function(L, "bhv_door_init", smlua_func_bhv_door_init); + smlua_bind_function(L, "bhv_door_loop", smlua_func_bhv_door_loop); + smlua_bind_function(L, "bhv_star_door_loop", smlua_func_bhv_star_door_loop); + smlua_bind_function(L, "bhv_mr_i_loop", smlua_func_bhv_mr_i_loop); + smlua_bind_function(L, "bhv_mr_i_body_loop", smlua_func_bhv_mr_i_body_loop); + smlua_bind_function(L, "bhv_mr_i_particle_loop", smlua_func_bhv_mr_i_particle_loop); + smlua_bind_function(L, "bhv_piranha_particle_loop", smlua_func_bhv_piranha_particle_loop); + smlua_bind_function(L, "bhv_giant_pole_loop", smlua_func_bhv_giant_pole_loop); + smlua_bind_function(L, "bhv_pole_init", smlua_func_bhv_pole_init); + smlua_bind_function(L, "bhv_pole_base_loop", smlua_func_bhv_pole_base_loop); + smlua_bind_function(L, "bhv_thi_huge_island_top_loop", smlua_func_bhv_thi_huge_island_top_loop); + smlua_bind_function(L, "bhv_thi_tiny_island_top_loop", smlua_func_bhv_thi_tiny_island_top_loop); + smlua_bind_function(L, "bhv_king_bobomb_loop", smlua_func_bhv_king_bobomb_loop); + smlua_bind_function(L, "bhv_bobomb_anchor_mario_loop", smlua_func_bhv_bobomb_anchor_mario_loop); smlua_bind_function(L, "bhv_beta_chest_bottom_init", smlua_func_bhv_beta_chest_bottom_init); smlua_bind_function(L, "bhv_beta_chest_bottom_loop", smlua_func_bhv_beta_chest_bottom_loop); smlua_bind_function(L, "bhv_beta_chest_lid_loop", smlua_func_bhv_beta_chest_lid_loop); - smlua_bind_function(L, "bhv_beta_fish_splash_spawner_loop", smlua_func_bhv_beta_fish_splash_spawner_loop); - smlua_bind_function(L, "bhv_beta_holdable_object_init", smlua_func_bhv_beta_holdable_object_init); - smlua_bind_function(L, "bhv_beta_holdable_object_loop", smlua_func_bhv_beta_holdable_object_loop); - smlua_bind_function(L, "bhv_beta_moving_flames_loop", smlua_func_bhv_beta_moving_flames_loop); - smlua_bind_function(L, "bhv_beta_moving_flames_spawn_loop", smlua_func_bhv_beta_moving_flames_spawn_loop); - smlua_bind_function(L, "bhv_beta_trampoline_spring_loop", smlua_func_bhv_beta_trampoline_spring_loop); - smlua_bind_function(L, "bhv_beta_trampoline_top_loop", smlua_func_bhv_beta_trampoline_top_loop); - smlua_bind_function(L, "bhv_big_boo_loop", smlua_func_bhv_big_boo_loop); - smlua_bind_function(L, "bhv_big_boulder_generator_loop", smlua_func_bhv_big_boulder_generator_loop); - smlua_bind_function(L, "bhv_big_boulder_init", smlua_func_bhv_big_boulder_init); - smlua_bind_function(L, "bhv_big_boulder_loop", smlua_func_bhv_big_boulder_loop); - smlua_bind_function(L, "bhv_big_bully_init", smlua_func_bhv_big_bully_init); - smlua_bind_function(L, "bhv_big_bully_with_minions_init", smlua_func_bhv_big_bully_with_minions_init); - smlua_bind_function(L, "bhv_big_bully_with_minions_loop", smlua_func_bhv_big_bully_with_minions_loop); - smlua_bind_function(L, "bhv_bird_update", smlua_func_bhv_bird_update); - smlua_bind_function(L, "bhv_birds_sound_loop", smlua_func_bhv_birds_sound_loop); - smlua_bind_function(L, "bhv_bitfs_sinking_cage_platform_loop", smlua_func_bhv_bitfs_sinking_cage_platform_loop); - smlua_bind_function(L, "bhv_bitfs_sinking_platform_loop", smlua_func_bhv_bitfs_sinking_platform_loop); - smlua_bind_function(L, "bhv_black_smoke_bowser_loop", smlua_func_bhv_black_smoke_bowser_loop); - smlua_bind_function(L, "bhv_black_smoke_mario_loop", smlua_func_bhv_black_smoke_mario_loop); - smlua_bind_function(L, "bhv_black_smoke_upward_loop", smlua_func_bhv_black_smoke_upward_loop); - smlua_bind_function(L, "bhv_blue_bowser_flame_init", smlua_func_bhv_blue_bowser_flame_init); - smlua_bind_function(L, "bhv_blue_bowser_flame_loop", smlua_func_bhv_blue_bowser_flame_loop); - smlua_bind_function(L, "bhv_blue_coin_jumping_loop", smlua_func_bhv_blue_coin_jumping_loop); - smlua_bind_function(L, "bhv_blue_coin_number_loop", smlua_func_bhv_blue_coin_number_loop); - smlua_bind_function(L, "bhv_blue_coin_sliding_jumping_init", smlua_func_bhv_blue_coin_sliding_jumping_init); - smlua_bind_function(L, "bhv_blue_coin_sliding_loop", smlua_func_bhv_blue_coin_sliding_loop); - smlua_bind_function(L, "bhv_blue_coin_switch_init", smlua_func_bhv_blue_coin_switch_init); - smlua_bind_function(L, "bhv_blue_coin_switch_loop", smlua_func_bhv_blue_coin_switch_loop); - smlua_bind_function(L, "bhv_blue_fish_movement_loop", smlua_func_bhv_blue_fish_movement_loop); - smlua_bind_function(L, "bhv_blue_flames_group_loop", smlua_func_bhv_blue_flames_group_loop); - smlua_bind_function(L, "bhv_bob_pit_bowling_ball_init", smlua_func_bhv_bob_pit_bowling_ball_init); - smlua_bind_function(L, "bhv_bob_pit_bowling_ball_loop", smlua_func_bhv_bob_pit_bowling_ball_loop); - smlua_bind_function(L, "bhv_bobomb_anchor_mario_loop", smlua_func_bhv_bobomb_anchor_mario_loop); - smlua_bind_function(L, "bhv_bobomb_buddy_init", smlua_func_bhv_bobomb_buddy_init); - smlua_bind_function(L, "bhv_bobomb_buddy_loop", smlua_func_bhv_bobomb_buddy_loop); - smlua_bind_function(L, "bhv_bobomb_bully_death_smoke_init", smlua_func_bhv_bobomb_bully_death_smoke_init); - smlua_bind_function(L, "bhv_bobomb_explosion_bubble_init", smlua_func_bhv_bobomb_explosion_bubble_init); - smlua_bind_function(L, "bhv_bobomb_explosion_bubble_loop", smlua_func_bhv_bobomb_explosion_bubble_loop); - smlua_bind_function(L, "bhv_bobomb_fuse_smoke_init", smlua_func_bhv_bobomb_fuse_smoke_init); - smlua_bind_function(L, "bhv_bobomb_init", smlua_func_bhv_bobomb_init); - smlua_bind_function(L, "bhv_bobomb_loop", smlua_func_bhv_bobomb_loop); - smlua_bind_function(L, "bhv_boo_boss_spawned_bridge_loop", smlua_func_bhv_boo_boss_spawned_bridge_loop); - smlua_bind_function(L, "bhv_boo_cage_init", smlua_func_bhv_boo_cage_init); - smlua_bind_function(L, "bhv_boo_cage_loop", smlua_func_bhv_boo_cage_loop); - smlua_bind_function(L, "bhv_boo_in_castle_loop", smlua_func_bhv_boo_in_castle_loop); - smlua_bind_function(L, "bhv_boo_init", smlua_func_bhv_boo_init); - smlua_bind_function(L, "bhv_boo_loop", smlua_func_bhv_boo_loop); - smlua_bind_function(L, "bhv_boo_with_cage_init", smlua_func_bhv_boo_with_cage_init); - smlua_bind_function(L, "bhv_boo_with_cage_loop", smlua_func_bhv_boo_with_cage_loop); - smlua_bind_function(L, "bhv_book_switch_loop", smlua_func_bhv_book_switch_loop); - smlua_bind_function(L, "bhv_bookend_spawn_loop", smlua_func_bhv_bookend_spawn_loop); - smlua_bind_function(L, "bhv_bouncing_fireball_flame_loop", smlua_func_bhv_bouncing_fireball_flame_loop); - smlua_bind_function(L, "bhv_bouncing_fireball_loop", smlua_func_bhv_bouncing_fireball_loop); - smlua_bind_function(L, "bhv_bowling_ball_init", smlua_func_bhv_bowling_ball_init); - smlua_bind_function(L, "bhv_bowling_ball_loop", smlua_func_bhv_bowling_ball_loop); - smlua_bind_function(L, "bhv_bowser_body_anchor_init", smlua_func_bhv_bowser_body_anchor_init); - smlua_bind_function(L, "bhv_bowser_body_anchor_loop", smlua_func_bhv_bowser_body_anchor_loop); - smlua_bind_function(L, "bhv_bowser_bomb_explosion_loop", smlua_func_bhv_bowser_bomb_explosion_loop); - smlua_bind_function(L, "bhv_bowser_bomb_loop", smlua_func_bhv_bowser_bomb_loop); - smlua_bind_function(L, "bhv_bowser_bomb_smoke_loop", smlua_func_bhv_bowser_bomb_smoke_loop); - smlua_bind_function(L, "bhv_bowser_course_red_coin_star_loop", smlua_func_bhv_bowser_course_red_coin_star_loop); - smlua_bind_function(L, "bhv_bowser_flame_spawn_loop", smlua_func_bhv_bowser_flame_spawn_loop); - smlua_bind_function(L, "bhv_bowser_init", smlua_func_bhv_bowser_init); - smlua_bind_function(L, "bhv_bowser_key_course_exit_loop", smlua_func_bhv_bowser_key_course_exit_loop); - smlua_bind_function(L, "bhv_bowser_key_init", smlua_func_bhv_bowser_key_init); - smlua_bind_function(L, "bhv_bowser_key_loop", smlua_func_bhv_bowser_key_loop); - smlua_bind_function(L, "bhv_bowser_key_unlock_door_loop", smlua_func_bhv_bowser_key_unlock_door_loop); - smlua_bind_function(L, "bhv_bowser_loop", smlua_func_bhv_bowser_loop); - smlua_bind_function(L, "bhv_bowser_shock_wave_loop", smlua_func_bhv_bowser_shock_wave_loop); - smlua_bind_function(L, "bhv_bowser_tail_anchor_init", smlua_func_bhv_bowser_tail_anchor_init); - smlua_bind_function(L, "bhv_bowser_tail_anchor_loop", smlua_func_bhv_bowser_tail_anchor_loop); - smlua_bind_function(L, "bhv_bowsers_sub_loop", smlua_func_bhv_bowsers_sub_loop); - smlua_bind_function(L, "bhv_breakable_box_loop", smlua_func_bhv_breakable_box_loop); - smlua_bind_function(L, "bhv_breakable_box_small_init", smlua_func_bhv_breakable_box_small_init); - smlua_bind_function(L, "bhv_breakable_box_small_loop", smlua_func_bhv_breakable_box_small_loop); - smlua_bind_function(L, "bhv_bub_loop", smlua_func_bhv_bub_loop); - smlua_bind_function(L, "bhv_bub_spawner_loop", smlua_func_bhv_bub_spawner_loop); - smlua_bind_function(L, "bhv_bubba_loop", smlua_func_bhv_bubba_loop); - smlua_bind_function(L, "bhv_bubble_cannon_barrel_loop", smlua_func_bhv_bubble_cannon_barrel_loop); + smlua_bind_function(L, "bhv_bubble_wave_init", smlua_func_bhv_bubble_wave_init); smlua_bind_function(L, "bhv_bubble_maybe_loop", smlua_func_bhv_bubble_maybe_loop); smlua_bind_function(L, "bhv_bubble_player_loop", smlua_func_bhv_bubble_player_loop); - smlua_bind_function(L, "bhv_bubble_splash_init", smlua_func_bhv_bubble_splash_init); - smlua_bind_function(L, "bhv_bubble_wave_init", smlua_func_bhv_bubble_wave_init); + smlua_bind_function(L, "bhv_water_air_bubble_init", smlua_func_bhv_water_air_bubble_init); + smlua_bind_function(L, "bhv_water_air_bubble_loop", smlua_func_bhv_water_air_bubble_loop); + smlua_bind_function(L, "bhv_particle_init", smlua_func_bhv_particle_init); + smlua_bind_function(L, "bhv_particle_loop", smlua_func_bhv_particle_loop); + smlua_bind_function(L, "bhv_water_waves_init", smlua_func_bhv_water_waves_init); + smlua_bind_function(L, "bhv_small_bubbles_loop", smlua_func_bhv_small_bubbles_loop); + smlua_bind_function(L, "bhv_fish_group_loop", smlua_func_bhv_fish_group_loop); + smlua_bind_function(L, "bhv_cannon_base_loop", smlua_func_bhv_cannon_base_loop); + smlua_bind_function(L, "bhv_cannon_barrel_loop", smlua_func_bhv_cannon_barrel_loop); + smlua_bind_function(L, "bhv_cannon_base_unused_loop", smlua_func_bhv_cannon_base_unused_loop); + smlua_bind_function(L, "common_anchor_mario_behavior", smlua_func_common_anchor_mario_behavior); + smlua_bind_function(L, "bhv_chuckya_loop", smlua_func_bhv_chuckya_loop); + smlua_bind_function(L, "bhv_chuckya_anchor_mario_loop", smlua_func_bhv_chuckya_anchor_mario_loop); + smlua_bind_function(L, "bhv_rotating_platform_loop", smlua_func_bhv_rotating_platform_loop); + smlua_bind_function(L, "bhv_wf_breakable_wall_loop", smlua_func_bhv_wf_breakable_wall_loop); + smlua_bind_function(L, "bhv_kickable_board_loop", smlua_func_bhv_kickable_board_loop); + smlua_bind_function(L, "bhv_tower_door_loop", smlua_func_bhv_tower_door_loop); + smlua_bind_function(L, "bhv_wf_rotating_wooden_platform_init", smlua_func_bhv_wf_rotating_wooden_platform_init); + smlua_bind_function(L, "bhv_wf_rotating_wooden_platform_loop", smlua_func_bhv_wf_rotating_wooden_platform_loop); + smlua_bind_function(L, "bhv_fading_warp_loop", smlua_func_bhv_fading_warp_loop); + smlua_bind_function(L, "bhv_warp_loop", smlua_func_bhv_warp_loop); + smlua_bind_function(L, "bhv_white_puff_exploding_loop", smlua_func_bhv_white_puff_exploding_loop); + smlua_bind_function(L, "bhv_spawned_star_init", smlua_func_bhv_spawned_star_init); + smlua_bind_function(L, "bhv_spawned_star_loop", smlua_func_bhv_spawned_star_loop); + smlua_bind_function(L, "bhv_coin_init", smlua_func_bhv_coin_init); + smlua_bind_function(L, "bhv_coin_loop", smlua_func_bhv_coin_loop); + smlua_bind_function(L, "bhv_coin_inside_boo_loop", smlua_func_bhv_coin_inside_boo_loop); + smlua_bind_function(L, "bhv_coin_formation_init", smlua_func_bhv_coin_formation_init); + smlua_bind_function(L, "bhv_coin_formation_spawn_loop", smlua_func_bhv_coin_formation_spawn_loop); + smlua_bind_function(L, "bhv_coin_formation_loop", smlua_func_bhv_coin_formation_loop); + smlua_bind_function(L, "bhv_temp_coin_loop", smlua_func_bhv_temp_coin_loop); + smlua_bind_function(L, "bhv_coin_sparkles_loop", smlua_func_bhv_coin_sparkles_loop); + smlua_bind_function(L, "bhv_golden_coin_sparkles_loop", smlua_func_bhv_golden_coin_sparkles_loop); + smlua_bind_function(L, "bhv_wall_tiny_star_particle_loop", smlua_func_bhv_wall_tiny_star_particle_loop); + smlua_bind_function(L, "bhv_pound_tiny_star_particle_loop", smlua_func_bhv_pound_tiny_star_particle_loop); + smlua_bind_function(L, "bhv_pound_tiny_star_particle_init", smlua_func_bhv_pound_tiny_star_particle_init); + smlua_bind_function(L, "bhv_punch_tiny_triangle_loop", smlua_func_bhv_punch_tiny_triangle_loop); + smlua_bind_function(L, "bhv_punch_tiny_triangle_init", smlua_func_bhv_punch_tiny_triangle_init); + smlua_bind_function(L, "bhv_tumbling_bridge_platform_loop", smlua_func_bhv_tumbling_bridge_platform_loop); + smlua_bind_function(L, "bhv_tumbling_bridge_loop", smlua_func_bhv_tumbling_bridge_loop); + smlua_bind_function(L, "bhv_elevator_init", smlua_func_bhv_elevator_init); + smlua_bind_function(L, "bhv_elevator_loop", smlua_func_bhv_elevator_loop); + smlua_bind_function(L, "bhv_water_mist_loop", smlua_func_bhv_water_mist_loop); + smlua_bind_function(L, "bhv_water_mist_spawn_loop", smlua_func_bhv_water_mist_spawn_loop); + smlua_bind_function(L, "bhv_water_mist_2_loop", smlua_func_bhv_water_mist_2_loop); + smlua_bind_function(L, "bhv_pound_white_puffs_init", smlua_func_bhv_pound_white_puffs_init); + smlua_bind_function(L, "bhv_ground_sand_init", smlua_func_bhv_ground_sand_init); + smlua_bind_function(L, "bhv_ground_snow_init", smlua_func_bhv_ground_snow_init); + smlua_bind_function(L, "bhv_wind_loop", smlua_func_bhv_wind_loop); + smlua_bind_function(L, "bhv_unused_particle_spawn_loop", smlua_func_bhv_unused_particle_spawn_loop); + smlua_bind_function(L, "bhv_ukiki_cage_star_loop", smlua_func_bhv_ukiki_cage_star_loop); + smlua_bind_function(L, "bhv_ukiki_cage_loop", smlua_func_bhv_ukiki_cage_loop); + smlua_bind_function(L, "bhv_bitfs_sinking_platform_loop", smlua_func_bhv_bitfs_sinking_platform_loop); + smlua_bind_function(L, "bhv_bitfs_sinking_cage_platform_loop", smlua_func_bhv_bitfs_sinking_cage_platform_loop); + smlua_bind_function(L, "bhv_ddd_moving_pole_loop", smlua_func_bhv_ddd_moving_pole_loop); + smlua_bind_function(L, "bhv_platform_normals_init", smlua_func_bhv_platform_normals_init); + smlua_bind_function(L, "bhv_tilting_inverted_pyramid_loop", smlua_func_bhv_tilting_inverted_pyramid_loop); + smlua_bind_function(L, "bhv_squishable_platform_loop", smlua_func_bhv_squishable_platform_loop); + smlua_bind_function(L, "bhv_beta_moving_flames_spawn_loop", smlua_func_bhv_beta_moving_flames_spawn_loop); + smlua_bind_function(L, "bhv_beta_moving_flames_loop", smlua_func_bhv_beta_moving_flames_loop); + smlua_bind_function(L, "bhv_rr_rotating_bridge_platform_loop", smlua_func_bhv_rr_rotating_bridge_platform_loop); + smlua_bind_function(L, "bhv_flamethrower_loop", smlua_func_bhv_flamethrower_loop); + smlua_bind_function(L, "bhv_flamethrower_flame_loop", smlua_func_bhv_flamethrower_flame_loop); + smlua_bind_function(L, "bhv_bouncing_fireball_loop", smlua_func_bhv_bouncing_fireball_loop); + smlua_bind_function(L, "bhv_bouncing_fireball_flame_loop", smlua_func_bhv_bouncing_fireball_flame_loop); + smlua_bind_function(L, "bhv_bowser_shock_wave_loop", smlua_func_bhv_bowser_shock_wave_loop); + smlua_bind_function(L, "bhv_flame_mario_loop", smlua_func_bhv_flame_mario_loop); + smlua_bind_function(L, "bhv_black_smoke_mario_loop", smlua_func_bhv_black_smoke_mario_loop); + smlua_bind_function(L, "bhv_black_smoke_bowser_loop", smlua_func_bhv_black_smoke_bowser_loop); + smlua_bind_function(L, "bhv_black_smoke_upward_loop", smlua_func_bhv_black_smoke_upward_loop); + smlua_bind_function(L, "bhv_beta_fish_splash_spawner_loop", smlua_func_bhv_beta_fish_splash_spawner_loop); + smlua_bind_function(L, "bhv_spindrift_loop", smlua_func_bhv_spindrift_loop); + smlua_bind_function(L, "bhv_tower_platform_group_init", smlua_func_bhv_tower_platform_group_init); + smlua_bind_function(L, "bhv_tower_platform_group_loop", smlua_func_bhv_tower_platform_group_loop); + smlua_bind_function(L, "bhv_wf_sliding_tower_platform_loop", smlua_func_bhv_wf_sliding_tower_platform_loop); + smlua_bind_function(L, "bhv_wf_elevator_tower_platform_loop", smlua_func_bhv_wf_elevator_tower_platform_loop); + smlua_bind_function(L, "bhv_wf_solid_tower_platform_loop", smlua_func_bhv_wf_solid_tower_platform_loop); + smlua_bind_function(L, "bhv_snow_leaf_particle_spawn_init", smlua_func_bhv_snow_leaf_particle_spawn_init); + smlua_bind_function(L, "bhv_tree_snow_or_leaf_loop", smlua_func_bhv_tree_snow_or_leaf_loop); + smlua_bind_function(L, "bhv_piranha_plant_bubble_loop", smlua_func_bhv_piranha_plant_bubble_loop); + smlua_bind_function(L, "bhv_piranha_plant_waking_bubbles_loop", smlua_func_bhv_piranha_plant_waking_bubbles_loop); + smlua_bind_function(L, "bhv_purple_switch_loop", smlua_func_bhv_purple_switch_loop); + smlua_bind_function(L, "bhv_hidden_object_loop", smlua_func_bhv_hidden_object_loop); + smlua_bind_function(L, "bhv_breakable_box_loop", smlua_func_bhv_breakable_box_loop); + smlua_bind_function(L, "bhv_pushable_loop", smlua_func_bhv_pushable_loop); + smlua_bind_function(L, "bhv_small_water_wave_loop", smlua_func_bhv_small_water_wave_loop); + smlua_bind_function(L, "bhv_yellow_coin_init", smlua_func_bhv_yellow_coin_init); + smlua_bind_function(L, "bhv_yellow_coin_loop", smlua_func_bhv_yellow_coin_loop); + smlua_bind_function(L, "bhv_squarish_path_moving_loop", smlua_func_bhv_squarish_path_moving_loop); + smlua_bind_function(L, "bhv_squarish_path_parent_init", smlua_func_bhv_squarish_path_parent_init); + smlua_bind_function(L, "bhv_squarish_path_parent_loop", smlua_func_bhv_squarish_path_parent_loop); + smlua_bind_function(L, "bhv_heave_ho_loop", smlua_func_bhv_heave_ho_loop); + smlua_bind_function(L, "bhv_heave_ho_throw_mario_loop", smlua_func_bhv_heave_ho_throw_mario_loop); + smlua_bind_function(L, "bhv_ccm_touched_star_spawn_loop", smlua_func_bhv_ccm_touched_star_spawn_loop); + smlua_bind_function(L, "bhv_unused_poundable_platform", smlua_func_bhv_unused_poundable_platform); + smlua_bind_function(L, "bhv_beta_trampoline_top_loop", smlua_func_bhv_beta_trampoline_top_loop); + smlua_bind_function(L, "bhv_beta_trampoline_spring_loop", smlua_func_bhv_beta_trampoline_spring_loop); + smlua_bind_function(L, "bhv_jumping_box_loop", smlua_func_bhv_jumping_box_loop); + smlua_bind_function(L, "bhv_boo_cage_init", smlua_func_bhv_boo_cage_init); + smlua_bind_function(L, "bhv_boo_cage_loop", smlua_func_bhv_boo_cage_loop); + smlua_bind_function(L, "bhv_bowser_key_init", smlua_func_bhv_bowser_key_init); + smlua_bind_function(L, "bhv_bowser_key_loop", smlua_func_bhv_bowser_key_loop); + smlua_bind_function(L, "bhv_grand_star_init", smlua_func_bhv_grand_star_init); + smlua_bind_function(L, "bhv_grand_star_loop", smlua_func_bhv_grand_star_loop); + smlua_bind_function(L, "bhv_beta_boo_key_loop", smlua_func_bhv_beta_boo_key_loop); + smlua_bind_function(L, "bhv_alpha_boo_key_loop", smlua_func_bhv_alpha_boo_key_loop); smlua_bind_function(L, "bhv_bullet_bill_init", smlua_func_bhv_bullet_bill_init); smlua_bind_function(L, "bhv_bullet_bill_loop", smlua_func_bhv_bullet_bill_loop); - smlua_bind_function(L, "bhv_bully_loop", smlua_func_bhv_bully_loop); - smlua_bind_function(L, "bhv_butterfly_init", smlua_func_bhv_butterfly_init); - smlua_bind_function(L, "bhv_butterfly_loop", smlua_func_bhv_butterfly_loop); - smlua_bind_function(L, "bhv_camera_lakitu_init", smlua_func_bhv_camera_lakitu_init); - smlua_bind_function(L, "bhv_camera_lakitu_update", smlua_func_bhv_camera_lakitu_update); - smlua_bind_function(L, "bhv_cannon_barrel_loop", smlua_func_bhv_cannon_barrel_loop); - smlua_bind_function(L, "bhv_cannon_base_loop", smlua_func_bhv_cannon_base_loop); - smlua_bind_function(L, "bhv_cannon_base_unused_loop", smlua_func_bhv_cannon_base_unused_loop); - smlua_bind_function(L, "bhv_cannon_closed_init", smlua_func_bhv_cannon_closed_init); - smlua_bind_function(L, "bhv_cannon_closed_loop", smlua_func_bhv_cannon_closed_loop); - smlua_bind_function(L, "bhv_cap_switch_loop", smlua_func_bhv_cap_switch_loop); - smlua_bind_function(L, "bhv_castle_cannon_grate_init", smlua_func_bhv_castle_cannon_grate_init); - smlua_bind_function(L, "bhv_castle_flag_init", smlua_func_bhv_castle_flag_init); - smlua_bind_function(L, "bhv_castle_floor_trap_init", smlua_func_bhv_castle_floor_trap_init); - smlua_bind_function(L, "bhv_castle_floor_trap_loop", smlua_func_bhv_castle_floor_trap_loop); - smlua_bind_function(L, "bhv_ccm_touched_star_spawn_loop", smlua_func_bhv_ccm_touched_star_spawn_loop); - smlua_bind_function(L, "bhv_celebration_star_init", smlua_func_bhv_celebration_star_init); - smlua_bind_function(L, "bhv_celebration_star_loop", smlua_func_bhv_celebration_star_loop); - smlua_bind_function(L, "bhv_celebration_star_sparkle_loop", smlua_func_bhv_celebration_star_sparkle_loop); - smlua_bind_function(L, "bhv_chain_chomp_chain_part_update", smlua_func_bhv_chain_chomp_chain_part_update); - smlua_bind_function(L, "bhv_chain_chomp_gate_init", smlua_func_bhv_chain_chomp_gate_init); - smlua_bind_function(L, "bhv_chain_chomp_gate_update", smlua_func_bhv_chain_chomp_gate_update); - smlua_bind_function(L, "bhv_chain_chomp_update", smlua_func_bhv_chain_chomp_update); + smlua_bind_function(L, "bhv_white_puff_smoke_init", smlua_func_bhv_white_puff_smoke_init); + smlua_bind_function(L, "bhv_bowser_tail_anchor_init", smlua_func_bhv_bowser_tail_anchor_init); + smlua_bind_function(L, "bhv_bowser_tail_anchor_loop", smlua_func_bhv_bowser_tail_anchor_loop); + smlua_bind_function(L, "bhv_bowser_init", smlua_func_bhv_bowser_init); + smlua_bind_function(L, "bhv_bowser_loop", smlua_func_bhv_bowser_loop); + smlua_bind_function(L, "bhv_bowser_body_anchor_init", smlua_func_bhv_bowser_body_anchor_init); + smlua_bind_function(L, "bhv_bowser_body_anchor_loop", smlua_func_bhv_bowser_body_anchor_loop); + smlua_bind_function(L, "bhv_bowser_flame_spawn_loop", smlua_func_bhv_bowser_flame_spawn_loop); + smlua_bind_function(L, "bhv_tilting_bowser_lava_platform_init", smlua_func_bhv_tilting_bowser_lava_platform_init); + smlua_bind_function(L, "bhv_falling_bowser_platform_loop", smlua_func_bhv_falling_bowser_platform_loop); + smlua_bind_function(L, "bhv_blue_bowser_flame_init", smlua_func_bhv_blue_bowser_flame_init); + smlua_bind_function(L, "bhv_blue_bowser_flame_loop", smlua_func_bhv_blue_bowser_flame_loop); + smlua_bind_function(L, "bhv_flame_floating_landing_init", smlua_func_bhv_flame_floating_landing_init); + smlua_bind_function(L, "bhv_flame_floating_landing_loop", smlua_func_bhv_flame_floating_landing_loop); + smlua_bind_function(L, "bhv_blue_flames_group_loop", smlua_func_bhv_blue_flames_group_loop); + smlua_bind_function(L, "bhv_flame_bouncing_init", smlua_func_bhv_flame_bouncing_init); + smlua_bind_function(L, "bhv_flame_bouncing_loop", smlua_func_bhv_flame_bouncing_loop); + smlua_bind_function(L, "bhv_flame_moving_forward_growing_init", smlua_func_bhv_flame_moving_forward_growing_init); + smlua_bind_function(L, "bhv_flame_moving_forward_growing_loop", smlua_func_bhv_flame_moving_forward_growing_loop); + smlua_bind_function(L, "bhv_flame_bowser_init", smlua_func_bhv_flame_bowser_init); + smlua_bind_function(L, "bhv_flame_bowser_loop", smlua_func_bhv_flame_bowser_loop); + smlua_bind_function(L, "bhv_flame_large_burning_out_init", smlua_func_bhv_flame_large_burning_out_init); + smlua_bind_function(L, "bhv_blue_fish_movement_loop", smlua_func_bhv_blue_fish_movement_loop); + smlua_bind_function(L, "bhv_tank_fish_group_loop", smlua_func_bhv_tank_fish_group_loop); smlua_bind_function(L, "bhv_checkerboard_elevator_group_init", smlua_func_bhv_checkerboard_elevator_group_init); smlua_bind_function(L, "bhv_checkerboard_elevator_group_loop", smlua_func_bhv_checkerboard_elevator_group_loop); smlua_bind_function(L, "bhv_checkerboard_platform_init", smlua_func_bhv_checkerboard_platform_init); smlua_bind_function(L, "bhv_checkerboard_platform_loop", smlua_func_bhv_checkerboard_platform_loop); - smlua_bind_function(L, "bhv_chuckya_anchor_mario_loop", smlua_func_bhv_chuckya_anchor_mario_loop); - smlua_bind_function(L, "bhv_chuckya_loop", smlua_func_bhv_chuckya_loop); - smlua_bind_function(L, "bhv_circling_amp_init", smlua_func_bhv_circling_amp_init); - smlua_bind_function(L, "bhv_circling_amp_loop", smlua_func_bhv_circling_amp_loop); - smlua_bind_function(L, "bhv_clam_loop", smlua_func_bhv_clam_loop); - smlua_bind_function(L, "bhv_cloud_part_update", smlua_func_bhv_cloud_part_update); - smlua_bind_function(L, "bhv_cloud_update", smlua_func_bhv_cloud_update); - smlua_bind_function(L, "bhv_coffin_loop", smlua_func_bhv_coffin_loop); - smlua_bind_function(L, "bhv_coffin_spawner_loop", smlua_func_bhv_coffin_spawner_loop); - smlua_bind_function(L, "bhv_coin_formation_init", smlua_func_bhv_coin_formation_init); - smlua_bind_function(L, "bhv_coin_formation_loop", smlua_func_bhv_coin_formation_loop); - smlua_bind_function(L, "bhv_coin_formation_spawn_loop", smlua_func_bhv_coin_formation_spawn_loop); - smlua_bind_function(L, "bhv_coin_init", smlua_func_bhv_coin_init); - smlua_bind_function(L, "bhv_coin_inside_boo_loop", smlua_func_bhv_coin_inside_boo_loop); - smlua_bind_function(L, "bhv_coin_loop", smlua_func_bhv_coin_loop); - smlua_bind_function(L, "bhv_coin_sparkles_loop", smlua_func_bhv_coin_sparkles_loop); - smlua_bind_function(L, "bhv_collect_star_init", smlua_func_bhv_collect_star_init); - smlua_bind_function(L, "bhv_collect_star_loop", smlua_func_bhv_collect_star_loop); - smlua_bind_function(L, "bhv_controllable_platform_init", smlua_func_bhv_controllable_platform_init); - smlua_bind_function(L, "bhv_controllable_platform_loop", smlua_func_bhv_controllable_platform_loop); - smlua_bind_function(L, "bhv_controllable_platform_sub_loop", smlua_func_bhv_controllable_platform_sub_loop); - smlua_bind_function(L, "bhv_courtyard_boo_triplet_init", smlua_func_bhv_courtyard_boo_triplet_init); - smlua_bind_function(L, "bhv_ddd_moving_pole_loop", smlua_func_bhv_ddd_moving_pole_loop); - smlua_bind_function(L, "bhv_ddd_pole_init", smlua_func_bhv_ddd_pole_init); - smlua_bind_function(L, "bhv_ddd_pole_update", smlua_func_bhv_ddd_pole_update); - smlua_bind_function(L, "bhv_ddd_warp_loop", smlua_func_bhv_ddd_warp_loop); - smlua_bind_function(L, "bhv_decorative_pendulum_init", smlua_func_bhv_decorative_pendulum_init); - smlua_bind_function(L, "bhv_decorative_pendulum_loop", smlua_func_bhv_decorative_pendulum_loop); - smlua_bind_function(L, "bhv_donut_platform_spawner_update", smlua_func_bhv_donut_platform_spawner_update); - smlua_bind_function(L, "bhv_donut_platform_update", smlua_func_bhv_donut_platform_update); - smlua_bind_function(L, "bhv_door_init", smlua_func_bhv_door_init); - smlua_bind_function(L, "bhv_door_loop", smlua_func_bhv_door_loop); - smlua_bind_function(L, "bhv_dorrie_update", smlua_func_bhv_dorrie_update); - smlua_bind_function(L, "bhv_elevator_init", smlua_func_bhv_elevator_init); - smlua_bind_function(L, "bhv_elevator_loop", smlua_func_bhv_elevator_loop); - smlua_bind_function(L, "bhv_end_birds_1_loop", smlua_func_bhv_end_birds_1_loop); - smlua_bind_function(L, "bhv_end_birds_2_loop", smlua_func_bhv_end_birds_2_loop); - smlua_bind_function(L, "bhv_enemy_lakitu_update", smlua_func_bhv_enemy_lakitu_update); - smlua_bind_function(L, "bhv_exclamation_box_init", smlua_func_bhv_exclamation_box_init); - smlua_bind_function(L, "bhv_exclamation_box_loop", smlua_func_bhv_exclamation_box_loop); - smlua_bind_function(L, "bhv_explosion_init", smlua_func_bhv_explosion_init); - smlua_bind_function(L, "bhv_explosion_loop", smlua_func_bhv_explosion_loop); - smlua_bind_function(L, "bhv_eyerok_boss_init", smlua_func_bhv_eyerok_boss_init); - smlua_bind_function(L, "bhv_eyerok_boss_loop", smlua_func_bhv_eyerok_boss_loop); - smlua_bind_function(L, "bhv_eyerok_hand_loop", smlua_func_bhv_eyerok_hand_loop); - smlua_bind_function(L, "bhv_fading_warp_loop", smlua_func_bhv_fading_warp_loop); - smlua_bind_function(L, "bhv_falling_bowser_platform_loop", smlua_func_bhv_falling_bowser_platform_loop); - smlua_bind_function(L, "bhv_falling_pillar_hitbox_loop", smlua_func_bhv_falling_pillar_hitbox_loop); - smlua_bind_function(L, "bhv_falling_pillar_init", smlua_func_bhv_falling_pillar_init); - smlua_bind_function(L, "bhv_falling_pillar_loop", smlua_func_bhv_falling_pillar_loop); - smlua_bind_function(L, "bhv_ferris_wheel_axle_init", smlua_func_bhv_ferris_wheel_axle_init); - smlua_bind_function(L, "bhv_ferris_wheel_platform_init", smlua_func_bhv_ferris_wheel_platform_init); - smlua_bind_function(L, "bhv_ferris_wheel_platform_update", smlua_func_bhv_ferris_wheel_platform_update); - smlua_bind_function(L, "bhv_fire_piranha_plant_init", smlua_func_bhv_fire_piranha_plant_init); - smlua_bind_function(L, "bhv_fire_piranha_plant_update", smlua_func_bhv_fire_piranha_plant_update); - smlua_bind_function(L, "bhv_fire_spitter_update", smlua_func_bhv_fire_spitter_update); - smlua_bind_function(L, "bhv_fish_group_loop", smlua_func_bhv_fish_group_loop); - smlua_bind_function(L, "bhv_fish_loop", smlua_func_bhv_fish_loop); - smlua_bind_function(L, "bhv_fish_spawner_loop", smlua_func_bhv_fish_spawner_loop); - smlua_bind_function(L, "bhv_flame_bouncing_init", smlua_func_bhv_flame_bouncing_init); - smlua_bind_function(L, "bhv_flame_bouncing_loop", smlua_func_bhv_flame_bouncing_loop); - smlua_bind_function(L, "bhv_flame_bowser_init", smlua_func_bhv_flame_bowser_init); - smlua_bind_function(L, "bhv_flame_bowser_loop", smlua_func_bhv_flame_bowser_loop); - smlua_bind_function(L, "bhv_flame_floating_landing_init", smlua_func_bhv_flame_floating_landing_init); - smlua_bind_function(L, "bhv_flame_floating_landing_loop", smlua_func_bhv_flame_floating_landing_loop); - smlua_bind_function(L, "bhv_flame_large_burning_out_init", smlua_func_bhv_flame_large_burning_out_init); - smlua_bind_function(L, "bhv_flame_mario_loop", smlua_func_bhv_flame_mario_loop); - smlua_bind_function(L, "bhv_flame_moving_forward_growing_init", smlua_func_bhv_flame_moving_forward_growing_init); - smlua_bind_function(L, "bhv_flame_moving_forward_growing_loop", smlua_func_bhv_flame_moving_forward_growing_loop); - smlua_bind_function(L, "bhv_flamethrower_flame_loop", smlua_func_bhv_flamethrower_flame_loop); - smlua_bind_function(L, "bhv_flamethrower_loop", smlua_func_bhv_flamethrower_loop); - smlua_bind_function(L, "bhv_floating_platform_loop", smlua_func_bhv_floating_platform_loop); - smlua_bind_function(L, "bhv_floor_trap_in_castle_loop", smlua_func_bhv_floor_trap_in_castle_loop); - smlua_bind_function(L, "bhv_fly_guy_flame_loop", smlua_func_bhv_fly_guy_flame_loop); - smlua_bind_function(L, "bhv_fly_guy_update", smlua_func_bhv_fly_guy_update); - smlua_bind_function(L, "bhv_flying_bookend_loop", smlua_func_bhv_flying_bookend_loop); - smlua_bind_function(L, "bhv_free_bowling_ball_init", smlua_func_bhv_free_bowling_ball_init); - smlua_bind_function(L, "bhv_free_bowling_ball_loop", smlua_func_bhv_free_bowling_ball_loop); - smlua_bind_function(L, "bhv_generic_bowling_ball_spawner_init", smlua_func_bhv_generic_bowling_ball_spawner_init); - smlua_bind_function(L, "bhv_generic_bowling_ball_spawner_loop", smlua_func_bhv_generic_bowling_ball_spawner_loop); - smlua_bind_function(L, "bhv_giant_pole_loop", smlua_func_bhv_giant_pole_loop); - smlua_bind_function(L, "bhv_golden_coin_sparkles_loop", smlua_func_bhv_golden_coin_sparkles_loop); - smlua_bind_function(L, "bhv_goomba_init", smlua_func_bhv_goomba_init); - smlua_bind_function(L, "bhv_goomba_triplet_spawner_update", smlua_func_bhv_goomba_triplet_spawner_update); - smlua_bind_function(L, "bhv_goomba_update", smlua_func_bhv_goomba_update); - smlua_bind_function(L, "bhv_grand_star_init", smlua_func_bhv_grand_star_init); - smlua_bind_function(L, "bhv_grand_star_loop", smlua_func_bhv_grand_star_loop); - smlua_bind_function(L, "bhv_grindel_thwomp_loop", smlua_func_bhv_grindel_thwomp_loop); - smlua_bind_function(L, "bhv_ground_sand_init", smlua_func_bhv_ground_sand_init); - smlua_bind_function(L, "bhv_ground_snow_init", smlua_func_bhv_ground_snow_init); - smlua_bind_function(L, "bhv_haunted_bookshelf_loop", smlua_func_bhv_haunted_bookshelf_loop); - smlua_bind_function(L, "bhv_haunted_bookshelf_manager_loop", smlua_func_bhv_haunted_bookshelf_manager_loop); - smlua_bind_function(L, "bhv_haunted_chair_init", smlua_func_bhv_haunted_chair_init); - smlua_bind_function(L, "bhv_haunted_chair_loop", smlua_func_bhv_haunted_chair_loop); - smlua_bind_function(L, "bhv_heave_ho_loop", smlua_func_bhv_heave_ho_loop); - smlua_bind_function(L, "bhv_heave_ho_throw_mario_loop", smlua_func_bhv_heave_ho_throw_mario_loop); - smlua_bind_function(L, "bhv_hidden_blue_coin_loop", smlua_func_bhv_hidden_blue_coin_loop); - smlua_bind_function(L, "bhv_hidden_object_loop", smlua_func_bhv_hidden_object_loop); - smlua_bind_function(L, "bhv_hidden_red_coin_star_init", smlua_func_bhv_hidden_red_coin_star_init); - smlua_bind_function(L, "bhv_hidden_red_coin_star_loop", smlua_func_bhv_hidden_red_coin_star_loop); - smlua_bind_function(L, "bhv_hidden_star_init", smlua_func_bhv_hidden_star_init); - smlua_bind_function(L, "bhv_hidden_star_loop", smlua_func_bhv_hidden_star_loop); - smlua_bind_function(L, "bhv_hidden_star_trigger_loop", smlua_func_bhv_hidden_star_trigger_loop); - smlua_bind_function(L, "bhv_homing_amp_init", smlua_func_bhv_homing_amp_init); - smlua_bind_function(L, "bhv_homing_amp_loop", smlua_func_bhv_homing_amp_loop); - smlua_bind_function(L, "bhv_hoot_init", smlua_func_bhv_hoot_init); - smlua_bind_function(L, "bhv_hoot_loop", smlua_func_bhv_hoot_loop); - smlua_bind_function(L, "bhv_horizontal_grindel_init", smlua_func_bhv_horizontal_grindel_init); - smlua_bind_function(L, "bhv_horizontal_grindel_update", smlua_func_bhv_horizontal_grindel_update); - smlua_bind_function(L, "bhv_idle_water_wave_loop", smlua_func_bhv_idle_water_wave_loop); - smlua_bind_function(L, "bhv_init_changing_water_level_loop", smlua_func_bhv_init_changing_water_level_loop); - smlua_bind_function(L, "bhv_intro_lakitu_loop", smlua_func_bhv_intro_lakitu_loop); - smlua_bind_function(L, "bhv_intro_peach_loop", smlua_func_bhv_intro_peach_loop); - smlua_bind_function(L, "bhv_intro_scene_loop", smlua_func_bhv_intro_scene_loop); + smlua_bind_function(L, "bhv_bowser_key_unlock_door_loop", smlua_func_bhv_bowser_key_unlock_door_loop); + smlua_bind_function(L, "bhv_bowser_key_course_exit_loop", smlua_func_bhv_bowser_key_course_exit_loop); smlua_bind_function(L, "bhv_invisible_objects_under_bridge_init", smlua_func_bhv_invisible_objects_under_bridge_init); smlua_bind_function(L, "bhv_invisible_objects_under_bridge_loop", smlua_func_bhv_invisible_objects_under_bridge_loop); - smlua_bind_function(L, "bhv_jet_stream_loop", smlua_func_bhv_jet_stream_loop); - smlua_bind_function(L, "bhv_jet_stream_ring_spawner_loop", smlua_func_bhv_jet_stream_ring_spawner_loop); - smlua_bind_function(L, "bhv_jet_stream_water_ring_init", smlua_func_bhv_jet_stream_water_ring_init); - smlua_bind_function(L, "bhv_jet_stream_water_ring_loop", smlua_func_bhv_jet_stream_water_ring_loop); - smlua_bind_function(L, "bhv_jrb_floating_box_loop", smlua_func_bhv_jrb_floating_box_loop); - smlua_bind_function(L, "bhv_jrb_sliding_box_loop", smlua_func_bhv_jrb_sliding_box_loop); - smlua_bind_function(L, "bhv_jumping_box_loop", smlua_func_bhv_jumping_box_loop); - smlua_bind_function(L, "bhv_kickable_board_loop", smlua_func_bhv_kickable_board_loop); - smlua_bind_function(L, "bhv_king_bobomb_loop", smlua_func_bhv_king_bobomb_loop); - smlua_bind_function(L, "bhv_klepto_init", smlua_func_bhv_klepto_init); - smlua_bind_function(L, "bhv_klepto_update", smlua_func_bhv_klepto_update); - smlua_bind_function(L, "bhv_koopa_init", smlua_func_bhv_koopa_init); - smlua_bind_function(L, "bhv_koopa_race_endpoint_update", smlua_func_bhv_koopa_race_endpoint_update); - smlua_bind_function(L, "bhv_koopa_shell_flame_loop", smlua_func_bhv_koopa_shell_flame_loop); - smlua_bind_function(L, "bhv_koopa_shell_loop", smlua_func_bhv_koopa_shell_loop); - smlua_bind_function(L, "bhv_koopa_shell_underwater_loop", smlua_func_bhv_koopa_shell_underwater_loop); - smlua_bind_function(L, "bhv_koopa_update", smlua_func_bhv_koopa_update); - smlua_bind_function(L, "bhv_large_bomp_init", smlua_func_bhv_large_bomp_init); - smlua_bind_function(L, "bhv_large_bomp_loop", smlua_func_bhv_large_bomp_loop); - smlua_bind_function(L, "bhv_lll_bowser_puzzle_loop", smlua_func_bhv_lll_bowser_puzzle_loop); - smlua_bind_function(L, "bhv_lll_bowser_puzzle_piece_loop", smlua_func_bhv_lll_bowser_puzzle_piece_loop); - smlua_bind_function(L, "bhv_lll_drawbridge_loop", smlua_func_bhv_lll_drawbridge_loop); - smlua_bind_function(L, "bhv_lll_drawbridge_spawner_init", smlua_func_bhv_lll_drawbridge_spawner_init); - smlua_bind_function(L, "bhv_lll_drawbridge_spawner_loop", smlua_func_bhv_lll_drawbridge_spawner_loop); - smlua_bind_function(L, "bhv_lll_floating_wood_bridge_loop", smlua_func_bhv_lll_floating_wood_bridge_loop); + smlua_bind_function(L, "bhv_water_level_pillar_init", smlua_func_bhv_water_level_pillar_init); + smlua_bind_function(L, "bhv_water_level_pillar_loop", smlua_func_bhv_water_level_pillar_loop); + smlua_bind_function(L, "bhv_ddd_warp_loop", smlua_func_bhv_ddd_warp_loop); + smlua_bind_function(L, "bhv_moat_grills_loop", smlua_func_bhv_moat_grills_loop); + smlua_bind_function(L, "bhv_rotating_clock_arm_loop", smlua_func_bhv_rotating_clock_arm_loop); + smlua_bind_function(L, "bhv_ukiki_init", smlua_func_bhv_ukiki_init); + smlua_bind_function(L, "bhv_ukiki_loop", smlua_func_bhv_ukiki_loop); + smlua_bind_function(L, "bhv_lll_sinking_rock_block_loop", smlua_func_bhv_lll_sinking_rock_block_loop); smlua_bind_function(L, "bhv_lll_moving_octagonal_mesh_platform_loop", smlua_func_bhv_lll_moving_octagonal_mesh_platform_loop); - smlua_bind_function(L, "bhv_lll_rolling_log_init", smlua_func_bhv_lll_rolling_log_init); smlua_bind_function(L, "bhv_lll_rotating_block_fire_bars_loop", smlua_func_bhv_lll_rotating_block_fire_bars_loop); smlua_bind_function(L, "bhv_lll_rotating_hex_flame_loop", smlua_func_bhv_lll_rotating_hex_flame_loop); + smlua_bind_function(L, "bhv_lll_wood_piece_loop", smlua_func_bhv_lll_wood_piece_loop); + smlua_bind_function(L, "bhv_lll_floating_wood_bridge_loop", smlua_func_bhv_lll_floating_wood_bridge_loop); + smlua_bind_function(L, "bhv_volcano_flames_loop", smlua_func_bhv_volcano_flames_loop); smlua_bind_function(L, "bhv_lll_rotating_hexagonal_ring_loop", smlua_func_bhv_lll_rotating_hexagonal_ring_loop); smlua_bind_function(L, "bhv_lll_sinking_rectangular_platform_loop", smlua_func_bhv_lll_sinking_rectangular_platform_loop); - smlua_bind_function(L, "bhv_lll_sinking_rock_block_loop", smlua_func_bhv_lll_sinking_rock_block_loop); smlua_bind_function(L, "bhv_lll_sinking_square_platforms_loop", smlua_func_bhv_lll_sinking_square_platforms_loop); - smlua_bind_function(L, "bhv_lll_wood_piece_loop", smlua_func_bhv_lll_wood_piece_loop); - smlua_bind_function(L, "bhv_mad_piano_update", smlua_func_bhv_mad_piano_update); - smlua_bind_function(L, "bhv_manta_ray_init", smlua_func_bhv_manta_ray_init); - smlua_bind_function(L, "bhv_manta_ray_loop", smlua_func_bhv_manta_ray_loop); - smlua_bind_function(L, "bhv_manta_ray_water_ring_init", smlua_func_bhv_manta_ray_water_ring_init); - smlua_bind_function(L, "bhv_manta_ray_water_ring_loop", smlua_func_bhv_manta_ray_water_ring_loop); + smlua_bind_function(L, "bhv_koopa_shell_loop", smlua_func_bhv_koopa_shell_loop); + smlua_bind_function(L, "bhv_koopa_shell_flame_loop", smlua_func_bhv_koopa_shell_flame_loop); + smlua_bind_function(L, "bhv_tox_box_loop", smlua_func_bhv_tox_box_loop); + smlua_bind_function(L, "mario_moving_fast_enough_to_make_piranha_plant_bite", smlua_func_mario_moving_fast_enough_to_make_piranha_plant_bite); + smlua_bind_function(L, "bhv_piranha_plant_loop", smlua_func_bhv_piranha_plant_loop); + smlua_bind_function(L, "bhv_lll_bowser_puzzle_piece_loop", smlua_func_bhv_lll_bowser_puzzle_piece_loop); + smlua_bind_function(L, "bhv_lll_bowser_puzzle_loop", smlua_func_bhv_lll_bowser_puzzle_loop); + smlua_bind_function(L, "bhv_tuxies_mother_loop", smlua_func_bhv_tuxies_mother_loop); + smlua_bind_function(L, "bhv_small_penguin_loop", smlua_func_bhv_small_penguin_loop); + smlua_bind_function(L, "bhv_fish_spawner_loop", smlua_func_bhv_fish_spawner_loop); + smlua_bind_function(L, "bhv_fish_loop", smlua_func_bhv_fish_loop); + smlua_bind_function(L, "bhv_wdw_express_elevator_loop", smlua_func_bhv_wdw_express_elevator_loop); + smlua_bind_function(L, "bhv_bub_spawner_loop", smlua_func_bhv_bub_spawner_loop); + smlua_bind_function(L, "bhv_bub_loop", smlua_func_bhv_bub_loop); + smlua_bind_function(L, "bhv_exclamation_box_init", smlua_func_bhv_exclamation_box_init); + smlua_bind_function(L, "bhv_exclamation_box_loop", smlua_func_bhv_exclamation_box_loop); + smlua_bind_function(L, "bhv_rotating_exclamation_box_loop", smlua_func_bhv_rotating_exclamation_box_loop); + smlua_bind_function(L, "bhv_sound_spawner_init", smlua_func_bhv_sound_spawner_init); + smlua_bind_function(L, "bhv_bowsers_sub_loop", smlua_func_bhv_bowsers_sub_loop); + smlua_bind_function(L, "bhv_sushi_shark_loop", smlua_func_bhv_sushi_shark_loop); + smlua_bind_function(L, "bhv_sushi_shark_collision_loop", smlua_func_bhv_sushi_shark_collision_loop); + smlua_bind_function(L, "bhv_jrb_sliding_box_loop", smlua_func_bhv_jrb_sliding_box_loop); + smlua_bind_function(L, "bhv_ship_part_3_loop", smlua_func_bhv_ship_part_3_loop); + smlua_bind_function(L, "bhv_sunken_ship_part_loop", smlua_func_bhv_sunken_ship_part_loop); + smlua_bind_function(L, "bhv_white_puff_1_loop", smlua_func_bhv_white_puff_1_loop); + smlua_bind_function(L, "bhv_white_puff_2_loop", smlua_func_bhv_white_puff_2_loop); + smlua_bind_function(L, "bhv_blue_coin_number_loop", smlua_func_bhv_blue_coin_number_loop); + smlua_bind_function(L, "bhv_blue_coin_switch_init", smlua_func_bhv_blue_coin_switch_init); + smlua_bind_function(L, "bhv_blue_coin_switch_loop", smlua_func_bhv_blue_coin_switch_loop); + smlua_bind_function(L, "bhv_hidden_blue_coin_loop", smlua_func_bhv_hidden_blue_coin_loop); + smlua_bind_function(L, "bhv_openable_cage_door_loop", smlua_func_bhv_openable_cage_door_loop); + smlua_bind_function(L, "bhv_openable_grill_loop", smlua_func_bhv_openable_grill_loop); + smlua_bind_function(L, "bhv_water_level_diamond_loop", smlua_func_bhv_water_level_diamond_loop); + smlua_bind_function(L, "bhv_init_changing_water_level_loop", smlua_func_bhv_init_changing_water_level_loop); + smlua_bind_function(L, "bhv_tweester_sand_particle_loop", smlua_func_bhv_tweester_sand_particle_loop); + smlua_bind_function(L, "bhv_tweester_loop", smlua_func_bhv_tweester_loop); + smlua_bind_function(L, "bhv_merry_go_round_boo_manager_loop", smlua_func_bhv_merry_go_round_boo_manager_loop); + smlua_bind_function(L, "bhv_animated_texture_loop", smlua_func_bhv_animated_texture_loop); + smlua_bind_function(L, "bhv_boo_in_castle_loop", smlua_func_bhv_boo_in_castle_loop); + smlua_bind_function(L, "bhv_boo_with_cage_init", smlua_func_bhv_boo_with_cage_init); + smlua_bind_function(L, "bhv_boo_with_cage_loop", smlua_func_bhv_boo_with_cage_loop); + smlua_bind_function(L, "bhv_boo_init", smlua_func_bhv_boo_init); + smlua_bind_function(L, "bhv_big_boo_loop", smlua_func_bhv_big_boo_loop); + smlua_bind_function(L, "bhv_courtyard_boo_triplet_init", smlua_func_bhv_courtyard_boo_triplet_init); + smlua_bind_function(L, "obj_set_secondary_camera_focus", smlua_func_obj_set_secondary_camera_focus); + smlua_bind_function(L, "bhv_boo_loop", smlua_func_bhv_boo_loop); + smlua_bind_function(L, "bhv_boo_boss_spawned_bridge_loop", smlua_func_bhv_boo_boss_spawned_bridge_loop); + smlua_bind_function(L, "bhv_bbh_tilting_trap_platform_loop", smlua_func_bhv_bbh_tilting_trap_platform_loop); + smlua_bind_function(L, "bhv_haunted_bookshelf_loop", smlua_func_bhv_haunted_bookshelf_loop); + smlua_bind_function(L, "bhv_merry_go_round_loop", smlua_func_bhv_merry_go_round_loop); +#ifndef VERSION_JP + smlua_bind_function(L, "bhv_play_music_track_when_touched_loop", smlua_func_bhv_play_music_track_when_touched_loop); +#endif + smlua_bind_function(L, "bhv_beta_bowser_anchor_loop", smlua_func_bhv_beta_bowser_anchor_loop); + smlua_bind_function(L, "bhv_static_checkered_platform_loop", smlua_func_bhv_static_checkered_platform_loop); + smlua_bind_function(L, "bhv_castle_floor_trap_init", smlua_func_bhv_castle_floor_trap_init); + smlua_bind_function(L, "bhv_castle_floor_trap_loop", smlua_func_bhv_castle_floor_trap_loop); + smlua_bind_function(L, "bhv_floor_trap_in_castle_loop", smlua_func_bhv_floor_trap_in_castle_loop); + smlua_bind_function(L, "bhv_sparkle_spawn_loop", smlua_func_bhv_sparkle_spawn_loop); + smlua_bind_function(L, "bhv_scuttlebug_loop", smlua_func_bhv_scuttlebug_loop); + smlua_bind_function(L, "bhv_scuttlebug_spawn_loop", smlua_func_bhv_scuttlebug_spawn_loop); + smlua_bind_function(L, "bhv_whomp_loop", smlua_func_bhv_whomp_loop); + smlua_bind_function(L, "bhv_water_splash_spawn_droplets", smlua_func_bhv_water_splash_spawn_droplets); + smlua_bind_function(L, "bhv_water_droplet_loop", smlua_func_bhv_water_droplet_loop); + smlua_bind_function(L, "bhv_water_droplet_splash_init", smlua_func_bhv_water_droplet_splash_init); + smlua_bind_function(L, "bhv_bubble_splash_init", smlua_func_bhv_bubble_splash_init); + smlua_bind_function(L, "bhv_idle_water_wave_loop", smlua_func_bhv_idle_water_wave_loop); + smlua_bind_function(L, "bhv_shallow_water_splash_init", smlua_func_bhv_shallow_water_splash_init); + smlua_bind_function(L, "bhv_wave_trail_shrink", smlua_func_bhv_wave_trail_shrink); + smlua_bind_function(L, "bhv_strong_wind_particle_loop", smlua_func_bhv_strong_wind_particle_loop); + smlua_bind_function(L, "bhv_sl_snowman_wind_loop", smlua_func_bhv_sl_snowman_wind_loop); + smlua_bind_function(L, "bhv_sl_walking_penguin_loop", smlua_func_bhv_sl_walking_penguin_loop); smlua_bind_function(L, "bhv_menu_button_init", smlua_func_bhv_menu_button_init); smlua_bind_function(L, "bhv_menu_button_loop", smlua_func_bhv_menu_button_loop); smlua_bind_function(L, "bhv_menu_button_manager_init", smlua_func_bhv_menu_button_manager_init); smlua_bind_function(L, "bhv_menu_button_manager_loop", smlua_func_bhv_menu_button_manager_loop); - smlua_bind_function(L, "bhv_merry_go_round_boo_manager_loop", smlua_func_bhv_merry_go_round_boo_manager_loop); - smlua_bind_function(L, "bhv_merry_go_round_loop", smlua_func_bhv_merry_go_round_loop); - smlua_bind_function(L, "bhv_metal_cap_init", smlua_func_bhv_metal_cap_init); - smlua_bind_function(L, "bhv_metal_cap_loop", smlua_func_bhv_metal_cap_loop); - smlua_bind_function(L, "bhv_mips_init", smlua_func_bhv_mips_init); - smlua_bind_function(L, "bhv_mips_loop", smlua_func_bhv_mips_loop); - smlua_bind_function(L, "bhv_moat_grills_loop", smlua_func_bhv_moat_grills_loop); - smlua_bind_function(L, "bhv_moneybag_hidden_loop", smlua_func_bhv_moneybag_hidden_loop); - smlua_bind_function(L, "bhv_moneybag_init", smlua_func_bhv_moneybag_init); - smlua_bind_function(L, "bhv_moneybag_loop", smlua_func_bhv_moneybag_loop); - smlua_bind_function(L, "bhv_monty_mole_hole_update", smlua_func_bhv_monty_mole_hole_update); - smlua_bind_function(L, "bhv_monty_mole_init", smlua_func_bhv_monty_mole_init); - smlua_bind_function(L, "bhv_monty_mole_rock_update", smlua_func_bhv_monty_mole_rock_update); - smlua_bind_function(L, "bhv_monty_mole_update", smlua_func_bhv_monty_mole_update); - smlua_bind_function(L, "bhv_moving_blue_coin_init", smlua_func_bhv_moving_blue_coin_init); - smlua_bind_function(L, "bhv_moving_blue_coin_loop", smlua_func_bhv_moving_blue_coin_loop); + smlua_bind_function(L, "bhv_act_selector_star_type_loop", smlua_func_bhv_act_selector_star_type_loop); + smlua_bind_function(L, "bhv_act_selector_init", smlua_func_bhv_act_selector_init); + smlua_bind_function(L, "bhv_act_selector_loop", smlua_func_bhv_act_selector_loop); smlua_bind_function(L, "bhv_moving_yellow_coin_init", smlua_func_bhv_moving_yellow_coin_init); smlua_bind_function(L, "bhv_moving_yellow_coin_loop", smlua_func_bhv_moving_yellow_coin_loop); - smlua_bind_function(L, "bhv_mr_blizzard_init", smlua_func_bhv_mr_blizzard_init); - smlua_bind_function(L, "bhv_mr_blizzard_snowball", smlua_func_bhv_mr_blizzard_snowball); - smlua_bind_function(L, "bhv_mr_blizzard_update", smlua_func_bhv_mr_blizzard_update); - smlua_bind_function(L, "bhv_mr_i_body_loop", smlua_func_bhv_mr_i_body_loop); - smlua_bind_function(L, "bhv_mr_i_loop", smlua_func_bhv_mr_i_loop); - smlua_bind_function(L, "bhv_mr_i_particle_loop", smlua_func_bhv_mr_i_particle_loop); - smlua_bind_function(L, "bhv_normal_cap_init", smlua_func_bhv_normal_cap_init); - smlua_bind_function(L, "bhv_normal_cap_loop", smlua_func_bhv_normal_cap_loop); + smlua_bind_function(L, "bhv_moving_blue_coin_init", smlua_func_bhv_moving_blue_coin_init); + smlua_bind_function(L, "bhv_moving_blue_coin_loop", smlua_func_bhv_moving_blue_coin_loop); + smlua_bind_function(L, "bhv_blue_coin_sliding_jumping_init", smlua_func_bhv_blue_coin_sliding_jumping_init); + smlua_bind_function(L, "bhv_blue_coin_sliding_loop", smlua_func_bhv_blue_coin_sliding_loop); + smlua_bind_function(L, "bhv_blue_coin_jumping_loop", smlua_func_bhv_blue_coin_jumping_loop); + smlua_bind_function(L, "bhv_seaweed_init", smlua_func_bhv_seaweed_init); + smlua_bind_function(L, "bhv_seaweed_bundle_init", smlua_func_bhv_seaweed_bundle_init); + smlua_bind_function(L, "bhv_bobomb_init", smlua_func_bhv_bobomb_init); + smlua_bind_function(L, "bhv_bobomb_loop", smlua_func_bhv_bobomb_loop); + smlua_bind_function(L, "bhv_bobomb_fuse_smoke_init", smlua_func_bhv_bobomb_fuse_smoke_init); + smlua_bind_function(L, "bhv_bobomb_buddy_init", smlua_func_bhv_bobomb_buddy_init); + smlua_bind_function(L, "bhv_bobomb_buddy_loop", smlua_func_bhv_bobomb_buddy_loop); + smlua_bind_function(L, "bhv_cannon_closed_init", smlua_func_bhv_cannon_closed_init); + smlua_bind_function(L, "bhv_cannon_closed_loop", smlua_func_bhv_cannon_closed_loop); + smlua_bind_function(L, "bhv_whirlpool_init", smlua_func_bhv_whirlpool_init); + smlua_bind_function(L, "bhv_whirlpool_loop", smlua_func_bhv_whirlpool_loop); + smlua_bind_function(L, "bhv_jet_stream_loop", smlua_func_bhv_jet_stream_loop); + smlua_bind_function(L, "bhv_homing_amp_init", smlua_func_bhv_homing_amp_init); + smlua_bind_function(L, "bhv_homing_amp_loop", smlua_func_bhv_homing_amp_loop); + smlua_bind_function(L, "bhv_circling_amp_init", smlua_func_bhv_circling_amp_init); + smlua_bind_function(L, "bhv_circling_amp_loop", smlua_func_bhv_circling_amp_loop); + smlua_bind_function(L, "bhv_butterfly_init", smlua_func_bhv_butterfly_init); + smlua_bind_function(L, "bhv_butterfly_loop", smlua_func_bhv_butterfly_loop); + smlua_bind_function(L, "bhv_hoot_init", smlua_func_bhv_hoot_init); + smlua_bind_function(L, "bhv_hoot_loop", smlua_func_bhv_hoot_loop); + smlua_bind_function(L, "bhv_beta_holdable_object_init", smlua_func_bhv_beta_holdable_object_init); + smlua_bind_function(L, "bhv_beta_holdable_object_loop", smlua_func_bhv_beta_holdable_object_loop); smlua_bind_function(L, "bhv_object_bubble_init", smlua_func_bhv_object_bubble_init); smlua_bind_function(L, "bhv_object_bubble_loop", smlua_func_bhv_object_bubble_loop); smlua_bind_function(L, "bhv_object_water_wave_init", smlua_func_bhv_object_water_wave_init); smlua_bind_function(L, "bhv_object_water_wave_loop", smlua_func_bhv_object_water_wave_loop); - smlua_bind_function(L, "bhv_openable_cage_door_loop", smlua_func_bhv_openable_cage_door_loop); - smlua_bind_function(L, "bhv_openable_grill_loop", smlua_func_bhv_openable_grill_loop); - smlua_bind_function(L, "bhv_orange_number_init", smlua_func_bhv_orange_number_init); - smlua_bind_function(L, "bhv_orange_number_loop", smlua_func_bhv_orange_number_loop); - smlua_bind_function(L, "bhv_particle_init", smlua_func_bhv_particle_init); - smlua_bind_function(L, "bhv_particle_loop", smlua_func_bhv_particle_loop); - smlua_bind_function(L, "bhv_penguin_race_finish_line_update", smlua_func_bhv_penguin_race_finish_line_update); - smlua_bind_function(L, "bhv_penguin_race_shortcut_check_update", smlua_func_bhv_penguin_race_shortcut_check_update); - smlua_bind_function(L, "bhv_piranha_particle_loop", smlua_func_bhv_piranha_particle_loop); - smlua_bind_function(L, "bhv_piranha_plant_bubble_loop", smlua_func_bhv_piranha_plant_bubble_loop); - smlua_bind_function(L, "bhv_piranha_plant_loop", smlua_func_bhv_piranha_plant_loop); - smlua_bind_function(L, "bhv_piranha_plant_waking_bubbles_loop", smlua_func_bhv_piranha_plant_waking_bubbles_loop); - smlua_bind_function(L, "bhv_platform_normals_init", smlua_func_bhv_platform_normals_init); - smlua_bind_function(L, "bhv_platform_on_track_init", smlua_func_bhv_platform_on_track_init); - smlua_bind_function(L, "bhv_platform_on_track_update", smlua_func_bhv_platform_on_track_update); -#ifndef VERSION_JP - smlua_bind_function(L, "bhv_play_music_track_when_touched_loop", smlua_func_bhv_play_music_track_when_touched_loop); -#endif - 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, "bhv_pokey_body_part_update", smlua_func_bhv_pokey_body_part_update); - smlua_bind_function(L, "bhv_pokey_update", smlua_func_bhv_pokey_update); - smlua_bind_function(L, "bhv_pole_base_loop", smlua_func_bhv_pole_base_loop); - smlua_bind_function(L, "bhv_pole_init", smlua_func_bhv_pole_init); - smlua_bind_function(L, "bhv_pound_tiny_star_particle_init", smlua_func_bhv_pound_tiny_star_particle_init); - smlua_bind_function(L, "bhv_pound_tiny_star_particle_loop", smlua_func_bhv_pound_tiny_star_particle_loop); - smlua_bind_function(L, "bhv_pound_white_puffs_init", smlua_func_bhv_pound_white_puffs_init); - smlua_bind_function(L, "bhv_punch_tiny_triangle_init", smlua_func_bhv_punch_tiny_triangle_init); - smlua_bind_function(L, "bhv_punch_tiny_triangle_loop", smlua_func_bhv_punch_tiny_triangle_loop); - smlua_bind_function(L, "bhv_purple_switch_loop", smlua_func_bhv_purple_switch_loop); - smlua_bind_function(L, "bhv_pushable_loop", smlua_func_bhv_pushable_loop); + smlua_bind_function(L, "bhv_explosion_init", smlua_func_bhv_explosion_init); + smlua_bind_function(L, "bhv_explosion_loop", smlua_func_bhv_explosion_loop); + smlua_bind_function(L, "bhv_bobomb_bully_death_smoke_init", smlua_func_bhv_bobomb_bully_death_smoke_init); + smlua_bind_function(L, "bhv_bobomb_explosion_bubble_init", smlua_func_bhv_bobomb_explosion_bubble_init); + smlua_bind_function(L, "bhv_bobomb_explosion_bubble_loop", smlua_func_bhv_bobomb_explosion_bubble_loop); + smlua_bind_function(L, "bhv_respawner_loop", smlua_func_bhv_respawner_loop); + smlua_bind_function(L, "bhv_small_bully_init", smlua_func_bhv_small_bully_init); + smlua_bind_function(L, "bhv_bully_loop", smlua_func_bhv_bully_loop); + smlua_bind_function(L, "bhv_big_bully_init", smlua_func_bhv_big_bully_init); + smlua_bind_function(L, "bhv_big_bully_with_minions_init", smlua_func_bhv_big_bully_with_minions_init); + smlua_bind_function(L, "bhv_big_bully_with_minions_loop", smlua_func_bhv_big_bully_with_minions_loop); + smlua_bind_function(L, "bhv_jet_stream_ring_spawner_loop", smlua_func_bhv_jet_stream_ring_spawner_loop); + smlua_bind_function(L, "bhv_jet_stream_water_ring_init", smlua_func_bhv_jet_stream_water_ring_init); + smlua_bind_function(L, "bhv_jet_stream_water_ring_loop", smlua_func_bhv_jet_stream_water_ring_loop); + smlua_bind_function(L, "bhv_manta_ray_water_ring_init", smlua_func_bhv_manta_ray_water_ring_init); + smlua_bind_function(L, "bhv_manta_ray_water_ring_loop", smlua_func_bhv_manta_ray_water_ring_loop); + smlua_bind_function(L, "bhv_bowser_bomb_loop", smlua_func_bhv_bowser_bomb_loop); + smlua_bind_function(L, "bhv_bowser_bomb_explosion_loop", smlua_func_bhv_bowser_bomb_explosion_loop); + smlua_bind_function(L, "bhv_bowser_bomb_smoke_loop", smlua_func_bhv_bowser_bomb_smoke_loop); + smlua_bind_function(L, "bhv_celebration_star_init", smlua_func_bhv_celebration_star_init); + smlua_bind_function(L, "bhv_celebration_star_loop", smlua_func_bhv_celebration_star_loop); + smlua_bind_function(L, "bhv_celebration_star_sparkle_loop", smlua_func_bhv_celebration_star_sparkle_loop); + smlua_bind_function(L, "bhv_star_key_collection_puff_spawner_loop", smlua_func_bhv_star_key_collection_puff_spawner_loop); + smlua_bind_function(L, "bhv_lll_drawbridge_spawner_init", smlua_func_bhv_lll_drawbridge_spawner_init); + smlua_bind_function(L, "bhv_lll_drawbridge_spawner_loop", smlua_func_bhv_lll_drawbridge_spawner_loop); + smlua_bind_function(L, "bhv_lll_drawbridge_loop", smlua_func_bhv_lll_drawbridge_loop); + smlua_bind_function(L, "bhv_small_bomp_init", smlua_func_bhv_small_bomp_init); + smlua_bind_function(L, "bhv_small_bomp_loop", smlua_func_bhv_small_bomp_loop); + smlua_bind_function(L, "bhv_large_bomp_init", smlua_func_bhv_large_bomp_init); + smlua_bind_function(L, "bhv_large_bomp_loop", smlua_func_bhv_large_bomp_loop); + smlua_bind_function(L, "bhv_wf_sliding_platform_init", smlua_func_bhv_wf_sliding_platform_init); + smlua_bind_function(L, "bhv_wf_sliding_platform_loop", smlua_func_bhv_wf_sliding_platform_loop); + smlua_bind_function(L, "bhv_moneybag_init", smlua_func_bhv_moneybag_init); + smlua_bind_function(L, "bhv_moneybag_loop", smlua_func_bhv_moneybag_loop); + smlua_bind_function(L, "bhv_moneybag_hidden_loop", smlua_func_bhv_moneybag_hidden_loop); + smlua_bind_function(L, "bhv_bob_pit_bowling_ball_init", smlua_func_bhv_bob_pit_bowling_ball_init); + smlua_bind_function(L, "bhv_bob_pit_bowling_ball_loop", smlua_func_bhv_bob_pit_bowling_ball_loop); + smlua_bind_function(L, "bhv_free_bowling_ball_init", smlua_func_bhv_free_bowling_ball_init); + smlua_bind_function(L, "bhv_free_bowling_ball_loop", smlua_func_bhv_free_bowling_ball_loop); + smlua_bind_function(L, "bhv_bowling_ball_init", smlua_func_bhv_bowling_ball_init); + smlua_bind_function(L, "bhv_bowling_ball_loop", smlua_func_bhv_bowling_ball_loop); + smlua_bind_function(L, "bhv_generic_bowling_ball_spawner_init", smlua_func_bhv_generic_bowling_ball_spawner_init); + smlua_bind_function(L, "bhv_generic_bowling_ball_spawner_loop", smlua_func_bhv_generic_bowling_ball_spawner_loop); + smlua_bind_function(L, "bhv_thi_bowling_ball_spawner_loop", smlua_func_bhv_thi_bowling_ball_spawner_loop); + smlua_bind_function(L, "bhv_rr_cruiser_wing_init", smlua_func_bhv_rr_cruiser_wing_init); + smlua_bind_function(L, "bhv_rr_cruiser_wing_loop", smlua_func_bhv_rr_cruiser_wing_loop); + smlua_bind_function(L, "bhv_spindel_init", smlua_func_bhv_spindel_init); + smlua_bind_function(L, "bhv_spindel_loop", smlua_func_bhv_spindel_loop); + smlua_bind_function(L, "bhv_ssl_moving_pyramid_wall_init", smlua_func_bhv_ssl_moving_pyramid_wall_init); + smlua_bind_function(L, "bhv_ssl_moving_pyramid_wall_loop", smlua_func_bhv_ssl_moving_pyramid_wall_loop); smlua_bind_function(L, "bhv_pyramid_elevator_init", smlua_func_bhv_pyramid_elevator_init); smlua_bind_function(L, "bhv_pyramid_elevator_loop", smlua_func_bhv_pyramid_elevator_loop); smlua_bind_function(L, "bhv_pyramid_elevator_trajectory_marker_ball_loop", smlua_func_bhv_pyramid_elevator_trajectory_marker_ball_loop); - smlua_bind_function(L, "bhv_pyramid_pillar_touch_detector_loop", smlua_func_bhv_pyramid_pillar_touch_detector_loop); - smlua_bind_function(L, "bhv_pyramid_top_fragment_init", smlua_func_bhv_pyramid_top_fragment_init); - smlua_bind_function(L, "bhv_pyramid_top_fragment_loop", smlua_func_bhv_pyramid_top_fragment_loop); smlua_bind_function(L, "bhv_pyramid_top_init", smlua_func_bhv_pyramid_top_init); smlua_bind_function(L, "bhv_pyramid_top_loop", smlua_func_bhv_pyramid_top_loop); - smlua_bind_function(L, "bhv_racing_penguin_init", smlua_func_bhv_racing_penguin_init); - smlua_bind_function(L, "bhv_racing_penguin_update", smlua_func_bhv_racing_penguin_update); - smlua_bind_function(L, "bhv_recovery_heart_loop", smlua_func_bhv_recovery_heart_loop); - smlua_bind_function(L, "bhv_red_coin_init", smlua_func_bhv_red_coin_init); - smlua_bind_function(L, "bhv_red_coin_loop", smlua_func_bhv_red_coin_loop); - smlua_bind_function(L, "bhv_red_coin_star_marker_init", smlua_func_bhv_red_coin_star_marker_init); - smlua_bind_function(L, "bhv_respawner_loop", smlua_func_bhv_respawner_loop); - smlua_bind_function(L, "bhv_rolling_log_loop", smlua_func_bhv_rolling_log_loop); - smlua_bind_function(L, "bhv_rotating_clock_arm_loop", smlua_func_bhv_rotating_clock_arm_loop); - smlua_bind_function(L, "bhv_rotating_exclamation_box_loop", smlua_func_bhv_rotating_exclamation_box_loop); - smlua_bind_function(L, "bhv_rotating_octagonal_plat_init", smlua_func_bhv_rotating_octagonal_plat_init); - smlua_bind_function(L, "bhv_rotating_octagonal_plat_loop", smlua_func_bhv_rotating_octagonal_plat_loop); - smlua_bind_function(L, "bhv_rotating_platform_loop", smlua_func_bhv_rotating_platform_loop); - smlua_bind_function(L, "bhv_rr_cruiser_wing_init", smlua_func_bhv_rr_cruiser_wing_init); - smlua_bind_function(L, "bhv_rr_cruiser_wing_loop", smlua_func_bhv_rr_cruiser_wing_loop); - smlua_bind_function(L, "bhv_rr_rotating_bridge_platform_loop", smlua_func_bhv_rr_rotating_bridge_platform_loop); + smlua_bind_function(L, "bhv_pyramid_top_fragment_init", smlua_func_bhv_pyramid_top_fragment_init); + smlua_bind_function(L, "bhv_pyramid_top_fragment_loop", smlua_func_bhv_pyramid_top_fragment_loop); + smlua_bind_function(L, "bhv_pyramid_pillar_touch_detector_loop", smlua_func_bhv_pyramid_pillar_touch_detector_loop); + smlua_bind_function(L, "bhv_waterfall_sound_loop", smlua_func_bhv_waterfall_sound_loop); + smlua_bind_function(L, "bhv_volcano_sound_loop", smlua_func_bhv_volcano_sound_loop); + smlua_bind_function(L, "bhv_castle_flag_init", smlua_func_bhv_castle_flag_init); + smlua_bind_function(L, "bhv_birds_sound_loop", smlua_func_bhv_birds_sound_loop); + smlua_bind_function(L, "bhv_ambient_sounds_init", smlua_func_bhv_ambient_sounds_init); smlua_bind_function(L, "bhv_sand_sound_loop", smlua_func_bhv_sand_sound_loop); - smlua_bind_function(L, "bhv_scuttlebug_loop", smlua_func_bhv_scuttlebug_loop); - smlua_bind_function(L, "bhv_scuttlebug_spawn_loop", smlua_func_bhv_scuttlebug_spawn_loop); - smlua_bind_function(L, "bhv_seaweed_bundle_init", smlua_func_bhv_seaweed_bundle_init); - smlua_bind_function(L, "bhv_seaweed_init", smlua_func_bhv_seaweed_init); - smlua_bind_function(L, "bhv_seesaw_platform_init", smlua_func_bhv_seesaw_platform_init); - smlua_bind_function(L, "bhv_seesaw_platform_update", smlua_func_bhv_seesaw_platform_update); - smlua_bind_function(L, "bhv_shallow_water_splash_init", smlua_func_bhv_shallow_water_splash_init); - smlua_bind_function(L, "bhv_ship_part_3_loop", smlua_func_bhv_ship_part_3_loop); - smlua_bind_function(L, "bhv_skeeter_update", smlua_func_bhv_skeeter_update); - smlua_bind_function(L, "bhv_skeeter_wave_update", smlua_func_bhv_skeeter_wave_update); - smlua_bind_function(L, "bhv_sl_snowman_wind_loop", smlua_func_bhv_sl_snowman_wind_loop); - smlua_bind_function(L, "bhv_sl_walking_penguin_loop", smlua_func_bhv_sl_walking_penguin_loop); - smlua_bind_function(L, "bhv_sliding_plat_2_init", smlua_func_bhv_sliding_plat_2_init); - smlua_bind_function(L, "bhv_sliding_plat_2_loop", smlua_func_bhv_sliding_plat_2_loop); - smlua_bind_function(L, "bhv_sliding_snow_mound_loop", smlua_func_bhv_sliding_snow_mound_loop); - smlua_bind_function(L, "bhv_small_bomp_init", smlua_func_bhv_small_bomp_init); - smlua_bind_function(L, "bhv_small_bomp_loop", smlua_func_bhv_small_bomp_loop); - smlua_bind_function(L, "bhv_small_bubbles_loop", smlua_func_bhv_small_bubbles_loop); - smlua_bind_function(L, "bhv_small_bully_init", smlua_func_bhv_small_bully_init); - smlua_bind_function(L, "bhv_small_penguin_loop", smlua_func_bhv_small_penguin_loop); - smlua_bind_function(L, "bhv_small_piranha_flame_loop", smlua_func_bhv_small_piranha_flame_loop); - smlua_bind_function(L, "bhv_small_water_wave_loop", smlua_func_bhv_small_water_wave_loop); - smlua_bind_function(L, "bhv_snow_leaf_particle_spawn_init", smlua_func_bhv_snow_leaf_particle_spawn_init); - smlua_bind_function(L, "bhv_snow_mound_spawn_loop", smlua_func_bhv_snow_mound_spawn_loop); - smlua_bind_function(L, "bhv_snowmans_body_checkpoint_loop", smlua_func_bhv_snowmans_body_checkpoint_loop); + smlua_bind_function(L, "bhv_castle_cannon_grate_init", smlua_func_bhv_castle_cannon_grate_init); smlua_bind_function(L, "bhv_snowmans_bottom_init", smlua_func_bhv_snowmans_bottom_init); smlua_bind_function(L, "bhv_snowmans_bottom_loop", smlua_func_bhv_snowmans_bottom_loop); smlua_bind_function(L, "bhv_snowmans_head_init", smlua_func_bhv_snowmans_head_init); smlua_bind_function(L, "bhv_snowmans_head_loop", smlua_func_bhv_snowmans_head_loop); - smlua_bind_function(L, "bhv_snufit_balls_loop", smlua_func_bhv_snufit_balls_loop); - smlua_bind_function(L, "bhv_snufit_loop", smlua_func_bhv_snufit_loop); - smlua_bind_function(L, "bhv_sound_spawner_init", smlua_func_bhv_sound_spawner_init); - smlua_bind_function(L, "bhv_sparkle_spawn_loop", smlua_func_bhv_sparkle_spawn_loop); - smlua_bind_function(L, "bhv_spawn_star_no_level_exit", smlua_func_bhv_spawn_star_no_level_exit); - smlua_bind_function(L, "bhv_spawned_star_init", smlua_func_bhv_spawned_star_init); - smlua_bind_function(L, "bhv_spawned_star_loop", smlua_func_bhv_spawned_star_loop); - smlua_bind_function(L, "bhv_spindel_init", smlua_func_bhv_spindel_init); - smlua_bind_function(L, "bhv_spindel_loop", smlua_func_bhv_spindel_loop); - smlua_bind_function(L, "bhv_spindrift_loop", smlua_func_bhv_spindrift_loop); - smlua_bind_function(L, "bhv_spiny_update", smlua_func_bhv_spiny_update); - smlua_bind_function(L, "bhv_squarish_path_moving_loop", smlua_func_bhv_squarish_path_moving_loop); - smlua_bind_function(L, "bhv_squarish_path_parent_init", smlua_func_bhv_squarish_path_parent_init); - smlua_bind_function(L, "bhv_squarish_path_parent_loop", smlua_func_bhv_squarish_path_parent_loop); - smlua_bind_function(L, "bhv_squishable_platform_loop", smlua_func_bhv_squishable_platform_loop); - smlua_bind_function(L, "bhv_ssl_moving_pyramid_wall_init", smlua_func_bhv_ssl_moving_pyramid_wall_init); - smlua_bind_function(L, "bhv_ssl_moving_pyramid_wall_loop", smlua_func_bhv_ssl_moving_pyramid_wall_loop); - smlua_bind_function(L, "bhv_star_door_loop", smlua_func_bhv_star_door_loop); - smlua_bind_function(L, "bhv_star_door_loop_2", smlua_func_bhv_star_door_loop_2); - smlua_bind_function(L, "bhv_star_key_collection_puff_spawner_loop", smlua_func_bhv_star_key_collection_puff_spawner_loop); + smlua_bind_function(L, "bhv_snowmans_body_checkpoint_loop", smlua_func_bhv_snowmans_body_checkpoint_loop); + smlua_bind_function(L, "bhv_big_boulder_init", smlua_func_bhv_big_boulder_init); + smlua_bind_function(L, "bhv_big_boulder_loop", smlua_func_bhv_big_boulder_loop); + smlua_bind_function(L, "bhv_big_boulder_generator_loop", smlua_func_bhv_big_boulder_generator_loop); + smlua_bind_function(L, "bhv_wing_cap_init", smlua_func_bhv_wing_cap_init); + smlua_bind_function(L, "bhv_wing_vanish_cap_loop", smlua_func_bhv_wing_vanish_cap_loop); + smlua_bind_function(L, "bhv_metal_cap_init", smlua_func_bhv_metal_cap_init); + smlua_bind_function(L, "bhv_metal_cap_loop", smlua_func_bhv_metal_cap_loop); + smlua_bind_function(L, "bhv_normal_cap_init", smlua_func_bhv_normal_cap_init); + smlua_bind_function(L, "bhv_normal_cap_loop", smlua_func_bhv_normal_cap_loop); + smlua_bind_function(L, "bhv_vanish_cap_init", smlua_func_bhv_vanish_cap_init); smlua_bind_function(L, "bhv_star_number_loop", smlua_func_bhv_star_number_loop); + smlua_bind_function(L, "spawn_star_number", smlua_func_spawn_star_number); + smlua_bind_function(L, "bhv_collect_star_init", smlua_func_bhv_collect_star_init); + smlua_bind_function(L, "bhv_collect_star_loop", smlua_func_bhv_collect_star_loop); smlua_bind_function(L, "bhv_star_spawn_init", smlua_func_bhv_star_spawn_init); smlua_bind_function(L, "bhv_star_spawn_loop", smlua_func_bhv_star_spawn_loop); - smlua_bind_function(L, "bhv_static_checkered_platform_loop", smlua_func_bhv_static_checkered_platform_loop); - smlua_bind_function(L, "bhv_strong_wind_particle_loop", smlua_func_bhv_strong_wind_particle_loop); - smlua_bind_function(L, "bhv_sunken_ship_part_loop", smlua_func_bhv_sunken_ship_part_loop); - smlua_bind_function(L, "bhv_sushi_shark_collision_loop", smlua_func_bhv_sushi_shark_collision_loop); - smlua_bind_function(L, "bhv_sushi_shark_loop", smlua_func_bhv_sushi_shark_loop); - smlua_bind_function(L, "bhv_swing_platform_init", smlua_func_bhv_swing_platform_init); - smlua_bind_function(L, "bhv_swing_platform_update", smlua_func_bhv_swing_platform_update); - smlua_bind_function(L, "bhv_swoop_update", smlua_func_bhv_swoop_update); - smlua_bind_function(L, "bhv_tank_fish_group_loop", smlua_func_bhv_tank_fish_group_loop); - smlua_bind_function(L, "bhv_temp_coin_loop", smlua_func_bhv_temp_coin_loop); - smlua_bind_function(L, "bhv_thi_bowling_ball_spawner_loop", smlua_func_bhv_thi_bowling_ball_spawner_loop); - smlua_bind_function(L, "bhv_thi_huge_island_top_loop", smlua_func_bhv_thi_huge_island_top_loop); - smlua_bind_function(L, "bhv_thi_tiny_island_top_loop", smlua_func_bhv_thi_tiny_island_top_loop); - smlua_bind_function(L, "bhv_tilting_bowser_lava_platform_init", smlua_func_bhv_tilting_bowser_lava_platform_init); - smlua_bind_function(L, "bhv_tilting_inverted_pyramid_loop", smlua_func_bhv_tilting_inverted_pyramid_loop); - smlua_bind_function(L, "bhv_tiny_star_particles_init", smlua_func_bhv_tiny_star_particles_init); - smlua_bind_function(L, "bhv_tower_door_loop", smlua_func_bhv_tower_door_loop); - smlua_bind_function(L, "bhv_tower_platform_group_init", smlua_func_bhv_tower_platform_group_init); - smlua_bind_function(L, "bhv_tower_platform_group_loop", smlua_func_bhv_tower_platform_group_loop); - smlua_bind_function(L, "bhv_tox_box_loop", smlua_func_bhv_tox_box_loop); - smlua_bind_function(L, "bhv_track_ball_update", smlua_func_bhv_track_ball_update); - smlua_bind_function(L, "bhv_treasure_chest_bottom_init", smlua_func_bhv_treasure_chest_bottom_init); - smlua_bind_function(L, "bhv_treasure_chest_bottom_loop", smlua_func_bhv_treasure_chest_bottom_loop); - smlua_bind_function(L, "bhv_treasure_chest_init", smlua_func_bhv_treasure_chest_init); - smlua_bind_function(L, "bhv_treasure_chest_jrb_init", smlua_func_bhv_treasure_chest_jrb_init); - smlua_bind_function(L, "bhv_treasure_chest_jrb_loop", smlua_func_bhv_treasure_chest_jrb_loop); - smlua_bind_function(L, "bhv_treasure_chest_loop", smlua_func_bhv_treasure_chest_loop); + smlua_bind_function(L, "bhv_hidden_red_coin_star_init", smlua_func_bhv_hidden_red_coin_star_init); + smlua_bind_function(L, "bhv_hidden_red_coin_star_loop", smlua_func_bhv_hidden_red_coin_star_loop); + smlua_bind_function(L, "bhv_red_coin_init", smlua_func_bhv_red_coin_init); + smlua_bind_function(L, "bhv_red_coin_loop", smlua_func_bhv_red_coin_loop); + smlua_bind_function(L, "bhv_bowser_course_red_coin_star_loop", smlua_func_bhv_bowser_course_red_coin_star_loop); + smlua_bind_function(L, "bhv_hidden_star_init", smlua_func_bhv_hidden_star_init); + smlua_bind_function(L, "bhv_hidden_star_loop", smlua_func_bhv_hidden_star_loop); + smlua_bind_function(L, "bhv_hidden_star_trigger_loop", smlua_func_bhv_hidden_star_trigger_loop); + smlua_bind_function(L, "bhv_ttm_rolling_log_init", smlua_func_bhv_ttm_rolling_log_init); + smlua_bind_function(L, "bhv_rolling_log_loop", smlua_func_bhv_rolling_log_loop); + smlua_bind_function(L, "bhv_lll_rolling_log_init", smlua_func_bhv_lll_rolling_log_init); + smlua_bind_function(L, "bhv_1up_trigger_init", smlua_func_bhv_1up_trigger_init); + smlua_bind_function(L, "bhv_1up_common_init", smlua_func_bhv_1up_common_init); + smlua_bind_function(L, "bhv_1up_walking_loop", smlua_func_bhv_1up_walking_loop); + smlua_bind_function(L, "bhv_1up_running_away_loop", smlua_func_bhv_1up_running_away_loop); + smlua_bind_function(L, "bhv_1up_sliding_loop", smlua_func_bhv_1up_sliding_loop); + smlua_bind_function(L, "bhv_1up_init", smlua_func_bhv_1up_init); + smlua_bind_function(L, "bhv_1up_loop", smlua_func_bhv_1up_loop); + smlua_bind_function(L, "bhv_1up_jump_on_approach_loop", smlua_func_bhv_1up_jump_on_approach_loop); + smlua_bind_function(L, "bhv_1up_hidden_loop", smlua_func_bhv_1up_hidden_loop); + smlua_bind_function(L, "bhv_1up_hidden_trigger_loop", smlua_func_bhv_1up_hidden_trigger_loop); + smlua_bind_function(L, "bhv_1up_hidden_in_pole_loop", smlua_func_bhv_1up_hidden_in_pole_loop); + smlua_bind_function(L, "bhv_1up_hidden_in_pole_trigger_loop", smlua_func_bhv_1up_hidden_in_pole_trigger_loop); + smlua_bind_function(L, "bhv_1up_hidden_in_pole_spawner_loop", smlua_func_bhv_1up_hidden_in_pole_spawner_loop); + smlua_bind_function(L, "bhv_controllable_platform_init", smlua_func_bhv_controllable_platform_init); + smlua_bind_function(L, "bhv_controllable_platform_loop", smlua_func_bhv_controllable_platform_loop); + smlua_bind_function(L, "bhv_controllable_platform_sub_loop", smlua_func_bhv_controllable_platform_sub_loop); + smlua_bind_function(L, "bhv_breakable_box_small_init", smlua_func_bhv_breakable_box_small_init); + smlua_bind_function(L, "bhv_breakable_box_small_loop", smlua_func_bhv_breakable_box_small_loop); + smlua_bind_function(L, "bhv_sliding_snow_mound_loop", smlua_func_bhv_sliding_snow_mound_loop); + smlua_bind_function(L, "bhv_snow_mound_spawn_loop", smlua_func_bhv_snow_mound_spawn_loop); + smlua_bind_function(L, "bhv_floating_platform_loop", smlua_func_bhv_floating_platform_loop); + smlua_bind_function(L, "bhv_arrow_lift_loop", smlua_func_bhv_arrow_lift_loop); + smlua_bind_function(L, "bhv_orange_number_init", smlua_func_bhv_orange_number_init); + smlua_bind_function(L, "bhv_orange_number_loop", smlua_func_bhv_orange_number_loop); + smlua_bind_function(L, "bhv_manta_ray_init", smlua_func_bhv_manta_ray_init); + smlua_bind_function(L, "bhv_manta_ray_loop", smlua_func_bhv_manta_ray_loop); + smlua_bind_function(L, "bhv_falling_pillar_init", smlua_func_bhv_falling_pillar_init); + smlua_bind_function(L, "bhv_falling_pillar_loop", smlua_func_bhv_falling_pillar_loop); + smlua_bind_function(L, "bhv_falling_pillar_hitbox_loop", smlua_func_bhv_falling_pillar_hitbox_loop); + smlua_bind_function(L, "bhv_jrb_floating_box_loop", smlua_func_bhv_jrb_floating_box_loop); + smlua_bind_function(L, "bhv_decorative_pendulum_init", smlua_func_bhv_decorative_pendulum_init); + smlua_bind_function(L, "bhv_decorative_pendulum_loop", smlua_func_bhv_decorative_pendulum_loop); smlua_bind_function(L, "bhv_treasure_chest_ship_init", smlua_func_bhv_treasure_chest_ship_init); smlua_bind_function(L, "bhv_treasure_chest_ship_loop", smlua_func_bhv_treasure_chest_ship_loop); + smlua_bind_function(L, "bhv_treasure_chest_jrb_init", smlua_func_bhv_treasure_chest_jrb_init); + smlua_bind_function(L, "bhv_treasure_chest_jrb_loop", smlua_func_bhv_treasure_chest_jrb_loop); + smlua_bind_function(L, "bhv_treasure_chest_init", smlua_func_bhv_treasure_chest_init); + smlua_bind_function(L, "bhv_treasure_chest_loop", smlua_func_bhv_treasure_chest_loop); + smlua_bind_function(L, "bhv_treasure_chest_bottom_init", smlua_func_bhv_treasure_chest_bottom_init); + smlua_bind_function(L, "bhv_treasure_chest_bottom_loop", smlua_func_bhv_treasure_chest_bottom_loop); smlua_bind_function(L, "bhv_treasure_chest_top_loop", smlua_func_bhv_treasure_chest_top_loop); - smlua_bind_function(L, "bhv_tree_snow_or_leaf_loop", smlua_func_bhv_tree_snow_or_leaf_loop); - smlua_bind_function(L, "bhv_triplet_butterfly_update", smlua_func_bhv_triplet_butterfly_update); - smlua_bind_function(L, "bhv_ttc_2d_rotator_init", smlua_func_bhv_ttc_2d_rotator_init); - smlua_bind_function(L, "bhv_ttc_2d_rotator_update", smlua_func_bhv_ttc_2d_rotator_update); - smlua_bind_function(L, "bhv_ttc_cog_init", smlua_func_bhv_ttc_cog_init); - smlua_bind_function(L, "bhv_ttc_cog_update", smlua_func_bhv_ttc_cog_update); - smlua_bind_function(L, "bhv_ttc_elevator_init", smlua_func_bhv_ttc_elevator_init); - smlua_bind_function(L, "bhv_ttc_elevator_update", smlua_func_bhv_ttc_elevator_update); - smlua_bind_function(L, "bhv_ttc_moving_bar_init", smlua_func_bhv_ttc_moving_bar_init); - smlua_bind_function(L, "bhv_ttc_moving_bar_update", smlua_func_bhv_ttc_moving_bar_update); - smlua_bind_function(L, "bhv_ttc_pendulum_init", smlua_func_bhv_ttc_pendulum_init); - smlua_bind_function(L, "bhv_ttc_pendulum_update", smlua_func_bhv_ttc_pendulum_update); - smlua_bind_function(L, "bhv_ttc_pit_block_init", smlua_func_bhv_ttc_pit_block_init); - smlua_bind_function(L, "bhv_ttc_pit_block_update", smlua_func_bhv_ttc_pit_block_update); + smlua_bind_function(L, "bhv_mips_init", smlua_func_bhv_mips_init); + smlua_bind_function(L, "bhv_mips_loop", smlua_func_bhv_mips_loop); + smlua_bind_function(L, "bhv_yoshi_init", smlua_func_bhv_yoshi_init); + smlua_bind_function(L, "bhv_koopa_init", smlua_func_bhv_koopa_init); + smlua_bind_function(L, "bhv_koopa_update", smlua_func_bhv_koopa_update); + smlua_bind_function(L, "bhv_koopa_race_endpoint_update", smlua_func_bhv_koopa_race_endpoint_update); + smlua_bind_function(L, "bhv_pokey_update", smlua_func_bhv_pokey_update); + smlua_bind_function(L, "bhv_pokey_body_part_update", smlua_func_bhv_pokey_body_part_update); + smlua_bind_function(L, "bhv_swoop_update", smlua_func_bhv_swoop_update); + smlua_bind_function(L, "bhv_fly_guy_update", smlua_func_bhv_fly_guy_update); + smlua_bind_function(L, "bhv_goomba_init", smlua_func_bhv_goomba_init); + smlua_bind_function(L, "bhv_goomba_update", smlua_func_bhv_goomba_update); + smlua_bind_function(L, "bhv_goomba_triplet_spawner_update", smlua_func_bhv_goomba_triplet_spawner_update); + smlua_bind_function(L, "bhv_chain_chomp_update", smlua_func_bhv_chain_chomp_update); + smlua_bind_function(L, "bhv_chain_chomp_chain_part_update", smlua_func_bhv_chain_chomp_chain_part_update); + smlua_bind_function(L, "bhv_wooden_post_update", smlua_func_bhv_wooden_post_update); + smlua_bind_function(L, "bhv_chain_chomp_gate_init", smlua_func_bhv_chain_chomp_gate_init); + smlua_bind_function(L, "bhv_chain_chomp_gate_update", smlua_func_bhv_chain_chomp_gate_update); + smlua_bind_function(L, "bhv_wiggler_update", smlua_func_bhv_wiggler_update); + smlua_bind_function(L, "bhv_wiggler_body_part_update", smlua_func_bhv_wiggler_body_part_update); + smlua_bind_function(L, "bhv_enemy_lakitu_update", smlua_func_bhv_enemy_lakitu_update); + smlua_bind_function(L, "bhv_camera_lakitu_init", smlua_func_bhv_camera_lakitu_init); + smlua_bind_function(L, "bhv_camera_lakitu_update", smlua_func_bhv_camera_lakitu_update); + smlua_bind_function(L, "bhv_cloud_update", smlua_func_bhv_cloud_update); + smlua_bind_function(L, "bhv_cloud_part_update", smlua_func_bhv_cloud_part_update); + smlua_bind_function(L, "bhv_spiny_update", smlua_func_bhv_spiny_update); + smlua_bind_function(L, "bhv_monty_mole_init", smlua_func_bhv_monty_mole_init); + smlua_bind_function(L, "bhv_monty_mole_update", smlua_func_bhv_monty_mole_update); + smlua_bind_function(L, "bhv_monty_mole_hole_update", smlua_func_bhv_monty_mole_hole_update); + smlua_bind_function(L, "bhv_monty_mole_rock_update", smlua_func_bhv_monty_mole_rock_update); + smlua_bind_function(L, "bhv_platform_on_track_init", smlua_func_bhv_platform_on_track_init); + smlua_bind_function(L, "bhv_platform_on_track_update", smlua_func_bhv_platform_on_track_update); + smlua_bind_function(L, "bhv_track_ball_update", smlua_func_bhv_track_ball_update); + smlua_bind_function(L, "bhv_seesaw_platform_init", smlua_func_bhv_seesaw_platform_init); + smlua_bind_function(L, "bhv_seesaw_platform_update", smlua_func_bhv_seesaw_platform_update); + smlua_bind_function(L, "bhv_ferris_wheel_axle_init", smlua_func_bhv_ferris_wheel_axle_init); + smlua_bind_function(L, "bhv_ferris_wheel_platform_init", smlua_func_bhv_ferris_wheel_platform_init); + smlua_bind_function(L, "bhv_ferris_wheel_platform_update", smlua_func_bhv_ferris_wheel_platform_update); + smlua_bind_function(L, "bhv_water_bomb_spawner_update", smlua_func_bhv_water_bomb_spawner_update); + smlua_bind_function(L, "bhv_water_bomb_update", smlua_func_bhv_water_bomb_update); + smlua_bind_function(L, "bhv_water_bomb_shadow_update", smlua_func_bhv_water_bomb_shadow_update); smlua_bind_function(L, "bhv_ttc_rotating_solid_init", smlua_func_bhv_ttc_rotating_solid_init); smlua_bind_function(L, "bhv_ttc_rotating_solid_update", smlua_func_bhv_ttc_rotating_solid_update); - smlua_bind_function(L, "bhv_ttc_spinner_update", smlua_func_bhv_ttc_spinner_update); + smlua_bind_function(L, "bhv_ttc_pendulum_init", smlua_func_bhv_ttc_pendulum_init); + smlua_bind_function(L, "bhv_ttc_pendulum_update", smlua_func_bhv_ttc_pendulum_update); smlua_bind_function(L, "bhv_ttc_treadmill_init", smlua_func_bhv_ttc_treadmill_init); smlua_bind_function(L, "bhv_ttc_treadmill_update", smlua_func_bhv_ttc_treadmill_update); - smlua_bind_function(L, "bhv_ttm_rolling_log_init", smlua_func_bhv_ttm_rolling_log_init); - smlua_bind_function(L, "bhv_tumbling_bridge_loop", smlua_func_bhv_tumbling_bridge_loop); - smlua_bind_function(L, "bhv_tumbling_bridge_platform_loop", smlua_func_bhv_tumbling_bridge_platform_loop); - smlua_bind_function(L, "bhv_tuxies_mother_loop", smlua_func_bhv_tuxies_mother_loop); - smlua_bind_function(L, "bhv_tweester_loop", smlua_func_bhv_tweester_loop); - smlua_bind_function(L, "bhv_tweester_sand_particle_loop", smlua_func_bhv_tweester_sand_particle_loop); - smlua_bind_function(L, "bhv_ukiki_cage_loop", smlua_func_bhv_ukiki_cage_loop); - smlua_bind_function(L, "bhv_ukiki_cage_star_loop", smlua_func_bhv_ukiki_cage_star_loop); - smlua_bind_function(L, "bhv_ukiki_init", smlua_func_bhv_ukiki_init); - smlua_bind_function(L, "bhv_ukiki_loop", smlua_func_bhv_ukiki_loop); + smlua_bind_function(L, "bhv_ttc_moving_bar_init", smlua_func_bhv_ttc_moving_bar_init); + smlua_bind_function(L, "bhv_ttc_moving_bar_update", smlua_func_bhv_ttc_moving_bar_update); + smlua_bind_function(L, "bhv_ttc_cog_init", smlua_func_bhv_ttc_cog_init); + smlua_bind_function(L, "bhv_ttc_cog_update", smlua_func_bhv_ttc_cog_update); + smlua_bind_function(L, "bhv_ttc_pit_block_init", smlua_func_bhv_ttc_pit_block_init); + smlua_bind_function(L, "bhv_ttc_pit_block_update", smlua_func_bhv_ttc_pit_block_update); + smlua_bind_function(L, "bhv_ttc_elevator_init", smlua_func_bhv_ttc_elevator_init); + smlua_bind_function(L, "bhv_ttc_elevator_update", smlua_func_bhv_ttc_elevator_update); + smlua_bind_function(L, "bhv_ttc_2d_rotator_init", smlua_func_bhv_ttc_2d_rotator_init); + smlua_bind_function(L, "bhv_ttc_2d_rotator_update", smlua_func_bhv_ttc_2d_rotator_update); + smlua_bind_function(L, "bhv_ttc_spinner_update", smlua_func_bhv_ttc_spinner_update); + smlua_bind_function(L, "bhv_mr_blizzard_init", smlua_func_bhv_mr_blizzard_init); + smlua_bind_function(L, "bhv_mr_blizzard_update", smlua_func_bhv_mr_blizzard_update); + smlua_bind_function(L, "bhv_mr_blizzard_snowball", smlua_func_bhv_mr_blizzard_snowball); + smlua_bind_function(L, "bhv_sliding_plat_2_init", smlua_func_bhv_sliding_plat_2_init); + smlua_bind_function(L, "bhv_sliding_plat_2_loop", smlua_func_bhv_sliding_plat_2_loop); + smlua_bind_function(L, "bhv_rotating_octagonal_plat_init", smlua_func_bhv_rotating_octagonal_plat_init); + smlua_bind_function(L, "bhv_rotating_octagonal_plat_loop", smlua_func_bhv_rotating_octagonal_plat_loop); + smlua_bind_function(L, "bhv_animates_on_floor_switch_press_init", smlua_func_bhv_animates_on_floor_switch_press_init); + smlua_bind_function(L, "bhv_animates_on_floor_switch_press_loop", smlua_func_bhv_animates_on_floor_switch_press_loop); + smlua_bind_function(L, "bhv_activated_back_and_forth_platform_init", smlua_func_bhv_activated_back_and_forth_platform_init); + smlua_bind_function(L, "bhv_activated_back_and_forth_platform_update", smlua_func_bhv_activated_back_and_forth_platform_update); + smlua_bind_function(L, "bhv_recovery_heart_loop", smlua_func_bhv_recovery_heart_loop); + smlua_bind_function(L, "bhv_water_bomb_cannon_loop", smlua_func_bhv_water_bomb_cannon_loop); + smlua_bind_function(L, "bhv_bubble_cannon_barrel_loop", smlua_func_bhv_bubble_cannon_barrel_loop); smlua_bind_function(L, "bhv_unagi_init", smlua_func_bhv_unagi_init); smlua_bind_function(L, "bhv_unagi_loop", smlua_func_bhv_unagi_loop); smlua_bind_function(L, "bhv_unagi_subobject_loop", smlua_func_bhv_unagi_subobject_loop); - smlua_bind_function(L, "bhv_unused_particle_spawn_loop", smlua_func_bhv_unused_particle_spawn_loop); - smlua_bind_function(L, "bhv_unused_poundable_platform", smlua_func_bhv_unused_poundable_platform); - smlua_bind_function(L, "bhv_vanish_cap_init", smlua_func_bhv_vanish_cap_init); - smlua_bind_function(L, "bhv_volcano_flames_loop", smlua_func_bhv_volcano_flames_loop); - smlua_bind_function(L, "bhv_volcano_sound_loop", smlua_func_bhv_volcano_sound_loop); - smlua_bind_function(L, "bhv_volcano_trap_loop", smlua_func_bhv_volcano_trap_loop); - smlua_bind_function(L, "bhv_wall_tiny_star_particle_loop", smlua_func_bhv_wall_tiny_star_particle_loop); - smlua_bind_function(L, "bhv_warp_loop", smlua_func_bhv_warp_loop); - smlua_bind_function(L, "bhv_water_air_bubble_init", smlua_func_bhv_water_air_bubble_init); - smlua_bind_function(L, "bhv_water_air_bubble_loop", smlua_func_bhv_water_air_bubble_loop); - smlua_bind_function(L, "bhv_water_bomb_cannon_loop", smlua_func_bhv_water_bomb_cannon_loop); - smlua_bind_function(L, "bhv_water_bomb_shadow_update", smlua_func_bhv_water_bomb_shadow_update); - smlua_bind_function(L, "bhv_water_bomb_spawner_update", smlua_func_bhv_water_bomb_spawner_update); - smlua_bind_function(L, "bhv_water_bomb_update", smlua_func_bhv_water_bomb_update); - smlua_bind_function(L, "bhv_water_droplet_loop", smlua_func_bhv_water_droplet_loop); - smlua_bind_function(L, "bhv_water_droplet_splash_init", smlua_func_bhv_water_droplet_splash_init); - smlua_bind_function(L, "bhv_water_level_diamond_loop", smlua_func_bhv_water_level_diamond_loop); - smlua_bind_function(L, "bhv_water_level_pillar_init", smlua_func_bhv_water_level_pillar_init); - smlua_bind_function(L, "bhv_water_level_pillar_loop", smlua_func_bhv_water_level_pillar_loop); - smlua_bind_function(L, "bhv_water_mist_2_loop", smlua_func_bhv_water_mist_2_loop); - smlua_bind_function(L, "bhv_water_mist_loop", smlua_func_bhv_water_mist_loop); - smlua_bind_function(L, "bhv_water_mist_spawn_loop", smlua_func_bhv_water_mist_spawn_loop); - smlua_bind_function(L, "bhv_water_splash_spawn_droplets", smlua_func_bhv_water_splash_spawn_droplets); - smlua_bind_function(L, "bhv_water_waves_init", smlua_func_bhv_water_waves_init); - smlua_bind_function(L, "bhv_waterfall_sound_loop", smlua_func_bhv_waterfall_sound_loop); - smlua_bind_function(L, "bhv_wave_trail_shrink", smlua_func_bhv_wave_trail_shrink); - smlua_bind_function(L, "bhv_wdw_express_elevator_loop", smlua_func_bhv_wdw_express_elevator_loop); - smlua_bind_function(L, "bhv_wf_breakable_wall_loop", smlua_func_bhv_wf_breakable_wall_loop); - smlua_bind_function(L, "bhv_wf_elevator_tower_platform_loop", smlua_func_bhv_wf_elevator_tower_platform_loop); - smlua_bind_function(L, "bhv_wf_rotating_wooden_platform_init", smlua_func_bhv_wf_rotating_wooden_platform_init); - smlua_bind_function(L, "bhv_wf_rotating_wooden_platform_loop", smlua_func_bhv_wf_rotating_wooden_platform_loop); - smlua_bind_function(L, "bhv_wf_sliding_platform_init", smlua_func_bhv_wf_sliding_platform_init); - smlua_bind_function(L, "bhv_wf_sliding_platform_loop", smlua_func_bhv_wf_sliding_platform_loop); - smlua_bind_function(L, "bhv_wf_sliding_tower_platform_loop", smlua_func_bhv_wf_sliding_tower_platform_loop); - smlua_bind_function(L, "bhv_wf_solid_tower_platform_loop", smlua_func_bhv_wf_solid_tower_platform_loop); - smlua_bind_function(L, "bhv_whirlpool_init", smlua_func_bhv_whirlpool_init); - smlua_bind_function(L, "bhv_whirlpool_loop", smlua_func_bhv_whirlpool_loop); - smlua_bind_function(L, "bhv_white_puff_1_loop", smlua_func_bhv_white_puff_1_loop); - smlua_bind_function(L, "bhv_white_puff_2_loop", smlua_func_bhv_white_puff_2_loop); - smlua_bind_function(L, "bhv_white_puff_exploding_loop", smlua_func_bhv_white_puff_exploding_loop); - smlua_bind_function(L, "bhv_white_puff_smoke_init", smlua_func_bhv_white_puff_smoke_init); - smlua_bind_function(L, "bhv_whomp_loop", smlua_func_bhv_whomp_loop); - smlua_bind_function(L, "bhv_wiggler_body_part_update", smlua_func_bhv_wiggler_body_part_update); - smlua_bind_function(L, "bhv_wiggler_update", smlua_func_bhv_wiggler_update); - smlua_bind_function(L, "bhv_wind_loop", smlua_func_bhv_wind_loop); - smlua_bind_function(L, "bhv_wing_cap_init", smlua_func_bhv_wing_cap_init); - smlua_bind_function(L, "bhv_wing_vanish_cap_loop", smlua_func_bhv_wing_vanish_cap_loop); - smlua_bind_function(L, "bhv_wooden_post_update", smlua_func_bhv_wooden_post_update); - smlua_bind_function(L, "bhv_yellow_coin_init", smlua_func_bhv_yellow_coin_init); - smlua_bind_function(L, "bhv_yellow_coin_loop", smlua_func_bhv_yellow_coin_loop); - smlua_bind_function(L, "bhv_yoshi_init", smlua_func_bhv_yoshi_init); + smlua_bind_function(L, "bhv_dorrie_update", smlua_func_bhv_dorrie_update); + smlua_bind_function(L, "bhv_haunted_chair_init", smlua_func_bhv_haunted_chair_init); + smlua_bind_function(L, "bhv_haunted_chair_loop", smlua_func_bhv_haunted_chair_loop); + smlua_bind_function(L, "bhv_mad_piano_update", smlua_func_bhv_mad_piano_update); + smlua_bind_function(L, "bhv_flying_bookend_loop", smlua_func_bhv_flying_bookend_loop); + smlua_bind_function(L, "bhv_bookend_spawn_loop", smlua_func_bhv_bookend_spawn_loop); + smlua_bind_function(L, "bhv_haunted_bookshelf_manager_loop", smlua_func_bhv_haunted_bookshelf_manager_loop); + smlua_bind_function(L, "bhv_book_switch_loop", smlua_func_bhv_book_switch_loop); + smlua_bind_function(L, "bhv_fire_piranha_plant_init", smlua_func_bhv_fire_piranha_plant_init); + smlua_bind_function(L, "bhv_fire_piranha_plant_update", smlua_func_bhv_fire_piranha_plant_update); + smlua_bind_function(L, "bhv_small_piranha_flame_loop", smlua_func_bhv_small_piranha_flame_loop); + smlua_bind_function(L, "bhv_fire_spitter_update", smlua_func_bhv_fire_spitter_update); + smlua_bind_function(L, "bhv_fly_guy_flame_loop", smlua_func_bhv_fly_guy_flame_loop); + smlua_bind_function(L, "bhv_snufit_loop", smlua_func_bhv_snufit_loop); + smlua_bind_function(L, "bhv_snufit_balls_loop", smlua_func_bhv_snufit_balls_loop); + smlua_bind_function(L, "bhv_horizontal_grindel_init", smlua_func_bhv_horizontal_grindel_init); + smlua_bind_function(L, "bhv_horizontal_grindel_update", smlua_func_bhv_horizontal_grindel_update); + smlua_bind_function(L, "bhv_eyerok_boss_init", smlua_func_bhv_eyerok_boss_init); + smlua_bind_function(L, "bhv_eyerok_boss_loop", smlua_func_bhv_eyerok_boss_loop); + smlua_bind_function(L, "bhv_eyerok_hand_loop", smlua_func_bhv_eyerok_hand_loop); + smlua_bind_function(L, "bhv_klepto_init", smlua_func_bhv_klepto_init); + smlua_bind_function(L, "bhv_klepto_update", smlua_func_bhv_klepto_update); + smlua_bind_function(L, "bhv_bird_update", smlua_func_bhv_bird_update); + smlua_bind_function(L, "bhv_racing_penguin_init", smlua_func_bhv_racing_penguin_init); + smlua_bind_function(L, "bhv_racing_penguin_update", smlua_func_bhv_racing_penguin_update); + smlua_bind_function(L, "bhv_penguin_race_finish_line_update", smlua_func_bhv_penguin_race_finish_line_update); + smlua_bind_function(L, "bhv_penguin_race_shortcut_check_update", smlua_func_bhv_penguin_race_shortcut_check_update); + smlua_bind_function(L, "bhv_coffin_spawner_loop", smlua_func_bhv_coffin_spawner_loop); + smlua_bind_function(L, "bhv_coffin_loop", smlua_func_bhv_coffin_loop); + smlua_bind_function(L, "bhv_clam_loop", smlua_func_bhv_clam_loop); + smlua_bind_function(L, "bhv_skeeter_update", smlua_func_bhv_skeeter_update); + smlua_bind_function(L, "bhv_skeeter_wave_update", smlua_func_bhv_skeeter_wave_update); + smlua_bind_function(L, "bhv_swing_platform_init", smlua_func_bhv_swing_platform_init); + smlua_bind_function(L, "bhv_swing_platform_update", smlua_func_bhv_swing_platform_update); + smlua_bind_function(L, "bhv_donut_platform_spawner_update", smlua_func_bhv_donut_platform_spawner_update); + smlua_bind_function(L, "bhv_donut_platform_update", smlua_func_bhv_donut_platform_update); + smlua_bind_function(L, "bhv_ddd_pole_init", smlua_func_bhv_ddd_pole_init); + smlua_bind_function(L, "bhv_ddd_pole_update", smlua_func_bhv_ddd_pole_update); + smlua_bind_function(L, "bhv_red_coin_star_marker_init", smlua_func_bhv_red_coin_star_marker_init); + smlua_bind_function(L, "bhv_triplet_butterfly_update", smlua_func_bhv_triplet_butterfly_update); + smlua_bind_function(L, "bhv_bubba_loop", smlua_func_bhv_bubba_loop); + smlua_bind_function(L, "bhv_intro_lakitu_loop", smlua_func_bhv_intro_lakitu_loop); + smlua_bind_function(L, "bhv_intro_peach_loop", smlua_func_bhv_intro_peach_loop); + smlua_bind_function(L, "bhv_end_birds_1_loop", smlua_func_bhv_end_birds_1_loop); + smlua_bind_function(L, "bhv_end_birds_2_loop", smlua_func_bhv_end_birds_2_loop); + smlua_bind_function(L, "bhv_intro_scene_loop", smlua_func_bhv_intro_scene_loop); smlua_bind_function(L, "bhv_yoshi_loop", smlua_func_bhv_yoshi_loop); - smlua_bind_function(L, "check_if_moving_over_floor", smlua_func_check_if_moving_over_floor); - smlua_bind_function(L, "clear_particle_flags", smlua_func_clear_particle_flags); - smlua_bind_function(L, "common_anchor_mario_behavior", smlua_func_common_anchor_mario_behavior); - smlua_bind_function(L, "cur_obj_spawn_strong_wind_particles", smlua_func_cur_obj_spawn_strong_wind_particles); - //smlua_bind_function(L, "geo_bits_bowser_coloring", smlua_func_geo_bits_bowser_coloring); <--- UNIMPLEMENTED + smlua_bind_function(L, "bhv_volcano_trap_loop", smlua_func_bhv_volcano_trap_loop); + smlua_bind_function(L, "uv_update_scroll", smlua_func_uv_update_scroll); + smlua_bind_function(L, "spawn_ambient_light", smlua_func_spawn_ambient_light); + smlua_bind_function(L, "spawn_point_light", smlua_func_spawn_point_light); + 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_scale_bowser_key", smlua_func_geo_scale_bowser_key); <--- 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_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_body_rot_from_parent", smlua_func_geo_update_body_rot_from_parent); <--- UNIMPLEMENTED //smlua_bind_function(L, "geo_update_held_mario_pos", smlua_func_geo_update_held_mario_pos); <--- UNIMPLEMENTED - smlua_bind_function(L, "mario_moving_fast_enough_to_make_piranha_plant_bite", smlua_func_mario_moving_fast_enough_to_make_piranha_plant_bite); - smlua_bind_function(L, "obj_set_secondary_camera_focus", smlua_func_obj_set_secondary_camera_focus); - smlua_bind_function(L, "play_penguin_walking_sound", smlua_func_play_penguin_walking_sound); - smlua_bind_function(L, "spawn_ambient_light", smlua_func_spawn_ambient_light); + //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_mist_from_global", smlua_func_spawn_mist_from_global); - smlua_bind_function(L, "spawn_mist_particles_variable", smlua_func_spawn_mist_particles_variable); - smlua_bind_function(L, "spawn_no_exit_star", smlua_func_spawn_no_exit_star); - smlua_bind_function(L, "spawn_point_light", smlua_func_spawn_point_light); smlua_bind_function(L, "spawn_red_coin_cutscene_star", smlua_func_spawn_red_coin_cutscene_star); - smlua_bind_function(L, "spawn_star_number", smlua_func_spawn_star_number); - smlua_bind_function(L, "spawn_triangle_break_particles", smlua_func_spawn_triangle_break_particles); - smlua_bind_function(L, "spawn_wind_particles", smlua_func_spawn_wind_particles); - smlua_bind_function(L, "tox_box_move", smlua_func_tox_box_move); - smlua_bind_function(L, "update_angle_from_move_flags", smlua_func_update_angle_from_move_flags); - smlua_bind_function(L, "uv_update_scroll", smlua_func_uv_update_scroll); - smlua_bind_function(L, "vec3f_copy_2", smlua_func_vec3f_copy_2); + smlua_bind_function(L, "spawn_no_exit_star", smlua_func_spawn_no_exit_star); // behavior_script.h - smlua_bind_function(L, "draw_distance_scalar", smlua_func_draw_distance_scalar); - smlua_bind_function(L, "obj_update_gfx_pos_and_angle", smlua_func_obj_update_gfx_pos_and_angle); - smlua_bind_function(L, "position_based_random_float_position", smlua_func_position_based_random_float_position); - smlua_bind_function(L, "position_based_random_u16", smlua_func_position_based_random_u16); + smlua_bind_function(L, "random_u16", smlua_func_random_u16); smlua_bind_function(L, "random_float", smlua_func_random_float); smlua_bind_function(L, "random_sign", smlua_func_random_sign); - smlua_bind_function(L, "random_u16", smlua_func_random_u16); + smlua_bind_function(L, "obj_update_gfx_pos_and_angle", smlua_func_obj_update_gfx_pos_and_angle); + smlua_bind_function(L, "position_based_random_u16", smlua_func_position_based_random_u16); + smlua_bind_function(L, "position_based_random_float_position", smlua_func_position_based_random_float_position); + smlua_bind_function(L, "draw_distance_scalar", smlua_func_draw_distance_scalar); // behavior_table.h + smlua_bind_function(L, "get_id_from_behavior", smlua_func_get_id_from_behavior); + smlua_bind_function(L, "get_id_from_vanilla_behavior", smlua_func_get_id_from_vanilla_behavior); smlua_bind_function(L, "get_behavior_from_id", smlua_func_get_behavior_from_id); smlua_bind_function(L, "get_behavior_name_from_id", smlua_func_get_behavior_name_from_id); - smlua_bind_function(L, "get_id_from_behavior", smlua_func_get_id_from_behavior); smlua_bind_function(L, "get_id_from_behavior_name", smlua_func_get_id_from_behavior_name); - smlua_bind_function(L, "get_id_from_vanilla_behavior", smlua_func_get_id_from_vanilla_behavior); // camera.h - smlua_bind_function(L, "approach_camera_height", smlua_func_approach_camera_height); - smlua_bind_function(L, "approach_f32_asymptotic", smlua_func_approach_f32_asymptotic); + smlua_bind_function(L, "skip_camera_interpolation", smlua_func_skip_camera_interpolation); + smlua_bind_function(L, "set_camera_shake_from_hit", smlua_func_set_camera_shake_from_hit); + smlua_bind_function(L, "set_environmental_camera_shake", smlua_func_set_environmental_camera_shake); + smlua_bind_function(L, "set_camera_shake_from_point", smlua_func_set_camera_shake_from_point); + smlua_bind_function(L, "move_mario_head_c_up", smlua_func_move_mario_head_c_up); + smlua_bind_function(L, "transition_next_state", smlua_func_transition_next_state); + smlua_bind_function(L, "set_camera_mode", smlua_func_set_camera_mode); + 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, "vec3f_sub", smlua_func_vec3f_sub); + 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, "cam_select_alt_mode", smlua_func_cam_select_alt_mode); + smlua_bind_function(L, "set_cam_angle", smlua_func_set_cam_angle); + smlua_bind_function(L, "set_handheld_shake", smlua_func_set_handheld_shake); + smlua_bind_function(L, "shake_camera_handheld", smlua_func_shake_camera_handheld); + smlua_bind_function(L, "find_c_buttons_pressed", smlua_func_find_c_buttons_pressed); + smlua_bind_function(L, "collide_with_walls", smlua_func_collide_with_walls); + smlua_bind_function(L, "clamp_pitch", smlua_func_clamp_pitch); + smlua_bind_function(L, "is_within_100_units_of_mario", smlua_func_is_within_100_units_of_mario); + smlua_bind_function(L, "set_or_approach_f32_asymptotic", smlua_func_set_or_approach_f32_asymptotic); smlua_bind_function(L, "approach_f32_asymptotic_bool", smlua_func_approach_f32_asymptotic_bool); - smlua_bind_function(L, "approach_s16_asymptotic", smlua_func_approach_s16_asymptotic); + smlua_bind_function(L, "approach_f32_asymptotic", smlua_func_approach_f32_asymptotic); smlua_bind_function(L, "approach_s16_asymptotic_bool", smlua_func_approach_s16_asymptotic_bool); + smlua_bind_function(L, "approach_s16_asymptotic", smlua_func_approach_s16_asymptotic); smlua_bind_function(L, "approach_vec3f_asymptotic", smlua_func_approach_vec3f_asymptotic); - smlua_bind_function(L, "calc_abs_dist", smlua_func_calc_abs_dist); - smlua_bind_function(L, "calc_hor_dist", smlua_func_calc_hor_dist); - smlua_bind_function(L, "calculate_angles", smlua_func_calculate_angles); + smlua_bind_function(L, "set_or_approach_vec3f_asymptotic", smlua_func_set_or_approach_vec3f_asymptotic); + smlua_bind_function(L, "camera_approach_s16_symmetric_bool", smlua_func_camera_approach_s16_symmetric_bool); + smlua_bind_function(L, "set_or_approach_s16_symmetric", smlua_func_set_or_approach_s16_symmetric); + smlua_bind_function(L, "camera_approach_f32_symmetric_bool", smlua_func_camera_approach_f32_symmetric_bool); + smlua_bind_function(L, "camera_approach_f32_symmetric", smlua_func_camera_approach_f32_symmetric); + smlua_bind_function(L, "random_vec3s", smlua_func_random_vec3s); + smlua_bind_function(L, "clamp_positions_and_find_yaw", smlua_func_clamp_positions_and_find_yaw); + smlua_bind_function(L, "is_range_behind_surface", smlua_func_is_range_behind_surface); + smlua_bind_function(L, "scale_along_line", smlua_func_scale_along_line); smlua_bind_function(L, "calculate_pitch", smlua_func_calculate_pitch); smlua_bind_function(L, "calculate_yaw", smlua_func_calculate_yaw); - smlua_bind_function(L, "cam_select_alt_mode", smlua_func_cam_select_alt_mode); - smlua_bind_function(L, "camera_approach_f32_symmetric", smlua_func_camera_approach_f32_symmetric); - smlua_bind_function(L, "camera_approach_f32_symmetric_bool", smlua_func_camera_approach_f32_symmetric_bool); - smlua_bind_function(L, "camera_approach_s16_symmetric_bool", smlua_func_camera_approach_s16_symmetric_bool); - smlua_bind_function(L, "camera_course_processing", smlua_func_camera_course_processing); - smlua_bind_function(L, "camera_set_use_course_specific_settings", smlua_func_camera_set_use_course_specific_settings); - smlua_bind_function(L, "center_rom_hack_camera", smlua_func_center_rom_hack_camera); - smlua_bind_function(L, "clamp_pitch", smlua_func_clamp_pitch); - smlua_bind_function(L, "clamp_positions_and_find_yaw", smlua_func_clamp_positions_and_find_yaw); - smlua_bind_function(L, "collide_with_walls", smlua_func_collide_with_walls); - //smlua_bind_function(L, "cutscene_event", smlua_func_cutscene_event); <--- UNIMPLEMENTED - smlua_bind_function(L, "cutscene_object", smlua_func_cutscene_object); - smlua_bind_function(L, "cutscene_object_with_dialog", smlua_func_cutscene_object_with_dialog); - smlua_bind_function(L, "cutscene_object_without_dialog", smlua_func_cutscene_object_without_dialog); - smlua_bind_function(L, "cutscene_set_fov_shake_preset", smlua_func_cutscene_set_fov_shake_preset); - smlua_bind_function(L, "cutscene_spawn_obj", smlua_func_cutscene_spawn_obj); - smlua_bind_function(L, "find_c_buttons_pressed", smlua_func_find_c_buttons_pressed); - smlua_bind_function(L, "find_mario_floor_and_ceil", smlua_func_find_mario_floor_and_ceil); - //smlua_bind_function(L, "geo_camera_fov", smlua_func_geo_camera_fov); <--- UNIMPLEMENTED - //smlua_bind_function(L, "geo_camera_main", smlua_func_geo_camera_main); <--- UNIMPLEMENTED - smlua_bind_function(L, "get_cutscene_from_mario_status", smlua_func_get_cutscene_from_mario_status); - smlua_bind_function(L, "handle_c_button_movement", smlua_func_handle_c_button_movement); - smlua_bind_function(L, "is_range_behind_surface", smlua_func_is_range_behind_surface); - smlua_bind_function(L, "is_within_100_units_of_mario", smlua_func_is_within_100_units_of_mario); - smlua_bind_function(L, "move_mario_head_c_up", smlua_func_move_mario_head_c_up); - smlua_bind_function(L, "next_lakitu_state", smlua_func_next_lakitu_state); - smlua_bind_function(L, "obj_rotate_towards_point", smlua_func_obj_rotate_towards_point); - smlua_bind_function(L, "object_pos_to_vec3f", smlua_func_object_pos_to_vec3f); - smlua_bind_function(L, "offset_rotated", smlua_func_offset_rotated); - smlua_bind_function(L, "offset_yaw_outward_radial", smlua_func_offset_yaw_outward_radial); - smlua_bind_function(L, "play_camera_buzz_if_c_sideways", smlua_func_play_camera_buzz_if_c_sideways); - smlua_bind_function(L, "play_camera_buzz_if_cbutton", smlua_func_play_camera_buzz_if_cbutton); - smlua_bind_function(L, "play_camera_buzz_if_cdown", smlua_func_play_camera_buzz_if_cdown); - smlua_bind_function(L, "play_cutscene", smlua_func_play_cutscene); - smlua_bind_function(L, "play_sound_button_change_blocked", smlua_func_play_sound_button_change_blocked); - smlua_bind_function(L, "play_sound_cbutton_down", smlua_func_play_sound_cbutton_down); - smlua_bind_function(L, "play_sound_cbutton_side", smlua_func_play_sound_cbutton_side); - smlua_bind_function(L, "play_sound_cbutton_up", smlua_func_play_sound_cbutton_up); - smlua_bind_function(L, "play_sound_if_cam_switched_to_lakitu_or_mario", smlua_func_play_sound_if_cam_switched_to_lakitu_or_mario); - smlua_bind_function(L, "play_sound_rbutton_changed", smlua_func_play_sound_rbutton_changed); - smlua_bind_function(L, "radial_camera_input", smlua_func_radial_camera_input); - smlua_bind_function(L, "random_vec3s", smlua_func_random_vec3s); - smlua_bind_function(L, "reset_camera", smlua_func_reset_camera); - smlua_bind_function(L, "resolve_geometry_collisions", smlua_func_resolve_geometry_collisions); - smlua_bind_function(L, "rotate_camera_around_walls", smlua_func_rotate_camera_around_walls); + smlua_bind_function(L, "calculate_angles", smlua_func_calculate_angles); + smlua_bind_function(L, "calc_abs_dist", smlua_func_calc_abs_dist); + smlua_bind_function(L, "calc_hor_dist", smlua_func_calc_hor_dist); smlua_bind_function(L, "rotate_in_xz", smlua_func_rotate_in_xz); smlua_bind_function(L, "rotate_in_yz", smlua_func_rotate_in_yz); - smlua_bind_function(L, "scale_along_line", smlua_func_scale_along_line); - smlua_bind_function(L, "select_mario_cam_mode", smlua_func_select_mario_cam_mode); - smlua_bind_function(L, "set_cam_angle", smlua_func_set_cam_angle); - smlua_bind_function(L, "set_camera_mode", smlua_func_set_camera_mode); - smlua_bind_function(L, "set_camera_mode_fixed", smlua_func_set_camera_mode_fixed); smlua_bind_function(L, "set_camera_pitch_shake", smlua_func_set_camera_pitch_shake); - smlua_bind_function(L, "set_camera_roll_shake", smlua_func_set_camera_roll_shake); - smlua_bind_function(L, "set_camera_shake_from_hit", smlua_func_set_camera_shake_from_hit); - smlua_bind_function(L, "set_camera_shake_from_point", smlua_func_set_camera_shake_from_point); smlua_bind_function(L, "set_camera_yaw_shake", smlua_func_set_camera_yaw_shake); - smlua_bind_function(L, "set_environmental_camera_shake", smlua_func_set_environmental_camera_shake); - smlua_bind_function(L, "set_fixed_cam_axis_sa_lobby", smlua_func_set_fixed_cam_axis_sa_lobby); - smlua_bind_function(L, "set_fov_function", smlua_func_set_fov_function); - smlua_bind_function(L, "set_fov_shake", smlua_func_set_fov_shake); - smlua_bind_function(L, "set_fov_shake_from_point_preset", smlua_func_set_fov_shake_from_point_preset); - smlua_bind_function(L, "set_handheld_shake", smlua_func_set_handheld_shake); - smlua_bind_function(L, "set_or_approach_f32_asymptotic", smlua_func_set_or_approach_f32_asymptotic); - smlua_bind_function(L, "set_or_approach_s16_symmetric", smlua_func_set_or_approach_s16_symmetric); - smlua_bind_function(L, "set_or_approach_vec3f_asymptotic", smlua_func_set_or_approach_vec3f_asymptotic); + smlua_bind_function(L, "set_camera_roll_shake", smlua_func_set_camera_roll_shake); smlua_bind_function(L, "set_pitch_shake_from_point", smlua_func_set_pitch_shake_from_point); - smlua_bind_function(L, "shake_camera_handheld", smlua_func_shake_camera_handheld); smlua_bind_function(L, "shake_camera_pitch", smlua_func_shake_camera_pitch); - smlua_bind_function(L, "shake_camera_roll", smlua_func_shake_camera_roll); smlua_bind_function(L, "shake_camera_yaw", smlua_func_shake_camera_yaw); - smlua_bind_function(L, "skip_camera_interpolation", smlua_func_skip_camera_interpolation); - smlua_bind_function(L, "snap_to_45_degrees", smlua_func_snap_to_45_degrees); - smlua_bind_function(L, "soft_reset_camera", smlua_func_soft_reset_camera); - smlua_bind_function(L, "start_cutscene", smlua_func_start_cutscene); - smlua_bind_function(L, "start_object_cutscene_without_focus", smlua_func_start_object_cutscene_without_focus); - smlua_bind_function(L, "transition_next_state", smlua_func_transition_next_state); + smlua_bind_function(L, "shake_camera_roll", smlua_func_shake_camera_roll); + smlua_bind_function(L, "offset_yaw_outward_radial", smlua_func_offset_yaw_outward_radial); + smlua_bind_function(L, "play_camera_buzz_if_cdown", smlua_func_play_camera_buzz_if_cdown); + smlua_bind_function(L, "play_camera_buzz_if_cbutton", smlua_func_play_camera_buzz_if_cbutton); + smlua_bind_function(L, "play_camera_buzz_if_c_sideways", smlua_func_play_camera_buzz_if_c_sideways); + smlua_bind_function(L, "play_sound_cbutton_up", smlua_func_play_sound_cbutton_up); + smlua_bind_function(L, "play_sound_cbutton_down", smlua_func_play_sound_cbutton_down); + smlua_bind_function(L, "play_sound_cbutton_side", smlua_func_play_sound_cbutton_side); + smlua_bind_function(L, "play_sound_button_change_blocked", smlua_func_play_sound_button_change_blocked); + smlua_bind_function(L, "play_sound_rbutton_changed", smlua_func_play_sound_rbutton_changed); + smlua_bind_function(L, "play_sound_if_cam_switched_to_lakitu_or_mario", smlua_func_play_sound_if_cam_switched_to_lakitu_or_mario); + smlua_bind_function(L, "radial_camera_input", smlua_func_radial_camera_input); smlua_bind_function(L, "trigger_cutscene_dialog", smlua_func_trigger_cutscene_dialog); - smlua_bind_function(L, "vec3f_sub", smlua_func_vec3f_sub); - smlua_bind_function(L, "vec3f_to_object_pos", smlua_func_vec3f_to_object_pos); + smlua_bind_function(L, "handle_c_button_movement", smlua_func_handle_c_button_movement); + smlua_bind_function(L, "start_cutscene", smlua_func_start_cutscene); + smlua_bind_function(L, "get_cutscene_from_mario_status", smlua_func_get_cutscene_from_mario_status); smlua_bind_function(L, "warp_camera", smlua_func_warp_camera); + smlua_bind_function(L, "approach_camera_height", smlua_func_approach_camera_height); + smlua_bind_function(L, "offset_rotated", smlua_func_offset_rotated); + smlua_bind_function(L, "next_lakitu_state", smlua_func_next_lakitu_state); + smlua_bind_function(L, "set_fixed_cam_axis_sa_lobby", smlua_func_set_fixed_cam_axis_sa_lobby); + smlua_bind_function(L, "camera_course_processing", smlua_func_camera_course_processing); + smlua_bind_function(L, "resolve_geometry_collisions", smlua_func_resolve_geometry_collisions); + smlua_bind_function(L, "rotate_camera_around_walls", smlua_func_rotate_camera_around_walls); + smlua_bind_function(L, "find_mario_floor_and_ceil", smlua_func_find_mario_floor_and_ceil); + smlua_bind_function(L, "start_object_cutscene_without_focus", smlua_func_start_object_cutscene_without_focus); + smlua_bind_function(L, "cutscene_object_with_dialog", smlua_func_cutscene_object_with_dialog); + smlua_bind_function(L, "cutscene_object_without_dialog", smlua_func_cutscene_object_without_dialog); + smlua_bind_function(L, "cutscene_object", smlua_func_cutscene_object); + smlua_bind_function(L, "play_cutscene", smlua_func_play_cutscene); + //smlua_bind_function(L, "cutscene_event", smlua_func_cutscene_event); <--- UNIMPLEMENTED + smlua_bind_function(L, "cutscene_spawn_obj", smlua_func_cutscene_spawn_obj); + smlua_bind_function(L, "set_fov_shake", smlua_func_set_fov_shake); + smlua_bind_function(L, "set_fov_function", smlua_func_set_fov_function); + 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); + smlua_bind_function(L, "center_rom_hack_camera", smlua_func_center_rom_hack_camera); // characters.h smlua_bind_function(L, "get_character", smlua_func_get_character); - smlua_bind_function(L, "get_character_anim", smlua_func_get_character_anim); - smlua_bind_function(L, "get_character_anim_offset", smlua_func_get_character_anim_offset); smlua_bind_function(L, "play_character_sound", smlua_func_play_character_sound); - smlua_bind_function(L, "play_character_sound_if_no_flag", smlua_func_play_character_sound_if_no_flag); smlua_bind_function(L, "play_character_sound_offset", smlua_func_play_character_sound_offset); + smlua_bind_function(L, "play_character_sound_if_no_flag", smlua_func_play_character_sound_if_no_flag); + smlua_bind_function(L, "get_character_anim_offset", smlua_func_get_character_anim_offset); + smlua_bind_function(L, "get_character_anim", smlua_func_get_character_anim); smlua_bind_function(L, "update_character_anim_offset", smlua_func_update_character_anim_offset); // djui_chat_message.h @@ -34430,35 +34571,40 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "djui_console_toggle", smlua_func_djui_console_toggle); // djui_hud_utils.h - smlua_bind_function(L, "djui_hud_get_color", smlua_func_djui_hud_get_color); + smlua_bind_function(L, "djui_hud_get_resolution", smlua_func_djui_hud_get_resolution); + smlua_bind_function(L, "djui_hud_set_resolution", smlua_func_djui_hud_set_resolution); smlua_bind_function(L, "djui_hud_get_filter", smlua_func_djui_hud_get_filter); + smlua_bind_function(L, "djui_hud_set_filter", smlua_func_djui_hud_set_filter); smlua_bind_function(L, "djui_hud_get_font", smlua_func_djui_hud_get_font); - smlua_bind_function(L, "djui_hud_get_fov_coeff", smlua_func_djui_hud_get_fov_coeff); + smlua_bind_function(L, "djui_hud_set_font", smlua_func_djui_hud_set_font); + smlua_bind_function(L, "djui_hud_get_color", smlua_func_djui_hud_get_color); + smlua_bind_function(L, "djui_hud_set_color", smlua_func_djui_hud_set_color); + smlua_bind_function(L, "djui_hud_reset_color", smlua_func_djui_hud_reset_color); + smlua_bind_function(L, "djui_hud_get_rotation", smlua_func_djui_hud_get_rotation); + smlua_bind_function(L, "djui_hud_set_rotation", smlua_func_djui_hud_set_rotation); + smlua_bind_function(L, "djui_hud_set_rotation_interpolated", smlua_func_djui_hud_set_rotation_interpolated); + smlua_bind_function(L, "djui_hud_get_screen_width", smlua_func_djui_hud_get_screen_width); + smlua_bind_function(L, "djui_hud_get_screen_height", smlua_func_djui_hud_get_screen_height); smlua_bind_function(L, "djui_hud_get_mouse_x", smlua_func_djui_hud_get_mouse_x); smlua_bind_function(L, "djui_hud_get_mouse_y", smlua_func_djui_hud_get_mouse_y); smlua_bind_function(L, "djui_hud_get_raw_mouse_x", smlua_func_djui_hud_get_raw_mouse_x); smlua_bind_function(L, "djui_hud_get_raw_mouse_y", smlua_func_djui_hud_get_raw_mouse_y); - smlua_bind_function(L, "djui_hud_get_resolution", smlua_func_djui_hud_get_resolution); - smlua_bind_function(L, "djui_hud_get_rotation", smlua_func_djui_hud_get_rotation); - smlua_bind_function(L, "djui_hud_get_screen_height", smlua_func_djui_hud_get_screen_height); - smlua_bind_function(L, "djui_hud_get_screen_width", smlua_func_djui_hud_get_screen_width); - smlua_bind_function(L, "djui_hud_is_pause_menu_created", smlua_func_djui_hud_is_pause_menu_created); + smlua_bind_function(L, "djui_hud_set_mouse_locked", smlua_func_djui_hud_set_mouse_locked); + smlua_bind_function(L, "djui_hud_get_mouse_buttons_down", smlua_func_djui_hud_get_mouse_buttons_down); + smlua_bind_function(L, "djui_hud_get_mouse_buttons_pressed", smlua_func_djui_hud_get_mouse_buttons_pressed); + smlua_bind_function(L, "djui_hud_get_mouse_buttons_released", smlua_func_djui_hud_get_mouse_buttons_released); + smlua_bind_function(L, "djui_hud_get_mouse_scroll_x", smlua_func_djui_hud_get_mouse_scroll_x); + smlua_bind_function(L, "djui_hud_get_mouse_scroll_y", smlua_func_djui_hud_get_mouse_scroll_y); smlua_bind_function(L, "djui_hud_measure_text", smlua_func_djui_hud_measure_text); smlua_bind_function(L, "djui_hud_print_text", smlua_func_djui_hud_print_text); smlua_bind_function(L, "djui_hud_print_text_interpolated", smlua_func_djui_hud_print_text_interpolated); smlua_bind_function(L, "djui_hud_render_rect", smlua_func_djui_hud_render_rect); smlua_bind_function(L, "djui_hud_render_rect_interpolated", smlua_func_djui_hud_render_rect_interpolated); - smlua_bind_function(L, "djui_hud_reset_color", smlua_func_djui_hud_reset_color); - smlua_bind_function(L, "djui_hud_set_color", smlua_func_djui_hud_set_color); - smlua_bind_function(L, "djui_hud_set_filter", smlua_func_djui_hud_set_filter); - smlua_bind_function(L, "djui_hud_set_font", smlua_func_djui_hud_set_font); - smlua_bind_function(L, "djui_hud_set_mouse_locked", smlua_func_djui_hud_set_mouse_locked); - smlua_bind_function(L, "djui_hud_set_resolution", smlua_func_djui_hud_set_resolution); - smlua_bind_function(L, "djui_hud_set_rotation", smlua_func_djui_hud_set_rotation); - smlua_bind_function(L, "djui_hud_set_rotation_interpolated", smlua_func_djui_hud_set_rotation_interpolated); - smlua_bind_function(L, "djui_hud_world_pos_to_screen_pos", smlua_func_djui_hud_world_pos_to_screen_pos); - smlua_bind_function(L, "djui_open_pause_menu", smlua_func_djui_open_pause_menu); smlua_bind_function(L, "get_current_fov", smlua_func_get_current_fov); + smlua_bind_function(L, "djui_hud_get_fov_coeff", smlua_func_djui_hud_get_fov_coeff); + smlua_bind_function(L, "djui_hud_world_pos_to_screen_pos", smlua_func_djui_hud_world_pos_to_screen_pos); + smlua_bind_function(L, "djui_hud_is_pause_menu_created", smlua_func_djui_hud_is_pause_menu_created); + smlua_bind_function(L, "djui_open_pause_menu", smlua_func_djui_open_pause_menu); // djui_language.h smlua_bind_function(L, "djui_language_get", smlua_func_djui_language_get); @@ -34470,399 +34616,401 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "djui_popup_create", smlua_func_djui_popup_create); // external.h - smlua_bind_function(L, "drop_queued_background_music", smlua_func_drop_queued_background_music); - smlua_bind_function(L, "fade_volume_scale", smlua_func_fade_volume_scale); - smlua_bind_function(L, "fadeout_background_music", smlua_func_fadeout_background_music); - smlua_bind_function(L, "get_current_background_music", smlua_func_get_current_background_music); - smlua_bind_function(L, "get_current_background_music_default_volume", smlua_func_get_current_background_music_default_volume); - smlua_bind_function(L, "get_current_background_music_max_target_volume", smlua_func_get_current_background_music_max_target_volume); - smlua_bind_function(L, "get_current_background_music_target_volume", smlua_func_get_current_background_music_target_volume); - smlua_bind_function(L, "get_sound_pan", smlua_func_get_sound_pan); - smlua_bind_function(L, "is_current_background_music_volume_lowered", smlua_func_is_current_background_music_volume_lowered); - smlua_bind_function(L, "play_course_clear", smlua_func_play_course_clear); - smlua_bind_function(L, "play_dialog_sound", smlua_func_play_dialog_sound); - smlua_bind_function(L, "play_music", smlua_func_play_music); - smlua_bind_function(L, "play_peachs_jingle", smlua_func_play_peachs_jingle); - smlua_bind_function(L, "play_power_star_jingle", smlua_func_play_power_star_jingle); - smlua_bind_function(L, "play_puzzle_jingle", smlua_func_play_puzzle_jingle); - smlua_bind_function(L, "play_race_fanfare", smlua_func_play_race_fanfare); - smlua_bind_function(L, "play_secondary_music", smlua_func_play_secondary_music); smlua_bind_function(L, "play_sound", smlua_func_play_sound); smlua_bind_function(L, "play_sound_with_freq_scale", smlua_func_play_sound_with_freq_scale); - smlua_bind_function(L, "play_star_fanfare", smlua_func_play_star_fanfare); - smlua_bind_function(L, "play_toads_jingle", smlua_func_play_toads_jingle); smlua_bind_function(L, "seq_player_fade_out", smlua_func_seq_player_fade_out); + smlua_bind_function(L, "fade_volume_scale", smlua_func_fade_volume_scale); smlua_bind_function(L, "seq_player_lower_volume", smlua_func_seq_player_lower_volume); smlua_bind_function(L, "seq_player_unlower_volume", smlua_func_seq_player_unlower_volume); - smlua_bind_function(L, "set_audio_fadeout", smlua_func_set_audio_fadeout); smlua_bind_function(L, "set_audio_muted", smlua_func_set_audio_muted); - smlua_bind_function(L, "set_sound_moving_speed", smlua_func_set_sound_moving_speed); - smlua_bind_function(L, "sound_banks_disable", smlua_func_sound_banks_disable); - smlua_bind_function(L, "sound_banks_enable", smlua_func_sound_banks_enable); - smlua_bind_function(L, "sound_get_level_intensity", smlua_func_sound_get_level_intensity); - smlua_bind_function(L, "sound_reset_background_music_default_volume", smlua_func_sound_reset_background_music_default_volume); - smlua_bind_function(L, "sound_set_background_music_default_volume", smlua_func_sound_set_background_music_default_volume); - smlua_bind_function(L, "stop_background_music", smlua_func_stop_background_music); - smlua_bind_function(L, "stop_secondary_music", smlua_func_stop_secondary_music); smlua_bind_function(L, "stop_sound", smlua_func_stop_sound); smlua_bind_function(L, "stop_sounds_from_source", smlua_func_stop_sounds_from_source); smlua_bind_function(L, "stop_sounds_in_continuous_banks", smlua_func_stop_sounds_in_continuous_banks); + smlua_bind_function(L, "sound_banks_disable", smlua_func_sound_banks_disable); + smlua_bind_function(L, "sound_banks_enable", smlua_func_sound_banks_enable); + smlua_bind_function(L, "set_sound_moving_speed", smlua_func_set_sound_moving_speed); + smlua_bind_function(L, "play_dialog_sound", smlua_func_play_dialog_sound); + smlua_bind_function(L, "play_music", smlua_func_play_music); + smlua_bind_function(L, "stop_background_music", smlua_func_stop_background_music); + smlua_bind_function(L, "fadeout_background_music", smlua_func_fadeout_background_music); + smlua_bind_function(L, "drop_queued_background_music", smlua_func_drop_queued_background_music); + smlua_bind_function(L, "get_current_background_music", smlua_func_get_current_background_music); + smlua_bind_function(L, "get_current_background_music_default_volume", smlua_func_get_current_background_music_default_volume); + smlua_bind_function(L, "get_current_background_music_target_volume", smlua_func_get_current_background_music_target_volume); + smlua_bind_function(L, "get_current_background_music_max_target_volume", smlua_func_get_current_background_music_max_target_volume); + smlua_bind_function(L, "is_current_background_music_volume_lowered", smlua_func_is_current_background_music_volume_lowered); + smlua_bind_function(L, "play_secondary_music", smlua_func_play_secondary_music); + smlua_bind_function(L, "stop_secondary_music", smlua_func_stop_secondary_music); + smlua_bind_function(L, "set_audio_fadeout", smlua_func_set_audio_fadeout); + smlua_bind_function(L, "play_course_clear", smlua_func_play_course_clear); + smlua_bind_function(L, "play_peachs_jingle", smlua_func_play_peachs_jingle); + smlua_bind_function(L, "play_puzzle_jingle", smlua_func_play_puzzle_jingle); + smlua_bind_function(L, "play_star_fanfare", smlua_func_play_star_fanfare); + smlua_bind_function(L, "play_power_star_jingle", smlua_func_play_power_star_jingle); + smlua_bind_function(L, "play_race_fanfare", smlua_func_play_race_fanfare); + smlua_bind_function(L, "play_toads_jingle", smlua_func_play_toads_jingle); + smlua_bind_function(L, "sound_reset_background_music_default_volume", smlua_func_sound_reset_background_music_default_volume); + smlua_bind_function(L, "sound_set_background_music_default_volume", smlua_func_sound_set_background_music_default_volume); + smlua_bind_function(L, "get_sound_pan", smlua_func_get_sound_pan); + smlua_bind_function(L, "sound_get_level_intensity", smlua_func_sound_get_level_intensity); // first_person_cam.h smlua_bind_function(L, "first_person_check_cancels", smlua_func_first_person_check_cancels); - smlua_bind_function(L, "first_person_reset", smlua_func_first_person_reset); smlua_bind_function(L, "get_first_person_enabled", smlua_func_get_first_person_enabled); smlua_bind_function(L, "set_first_person_enabled", smlua_func_set_first_person_enabled); + smlua_bind_function(L, "first_person_reset", smlua_func_first_person_reset); // ingame_menu.h smlua_bind_function(L, "create_dialog_box", smlua_func_create_dialog_box); - smlua_bind_function(L, "create_dialog_box_with_response", smlua_func_create_dialog_box_with_response); smlua_bind_function(L, "create_dialog_box_with_var", smlua_func_create_dialog_box_with_var); smlua_bind_function(L, "create_dialog_inverted_box", smlua_func_create_dialog_inverted_box); - smlua_bind_function(L, "reset_dialog_override_color", smlua_func_reset_dialog_override_color); - smlua_bind_function(L, "reset_dialog_override_pos", smlua_func_reset_dialog_override_pos); + smlua_bind_function(L, "create_dialog_box_with_response", smlua_func_create_dialog_box_with_response); smlua_bind_function(L, "reset_dialog_render_state", smlua_func_reset_dialog_render_state); - smlua_bind_function(L, "set_dialog_box_state", smlua_func_set_dialog_box_state); - smlua_bind_function(L, "set_dialog_override_color", smlua_func_set_dialog_override_color); - smlua_bind_function(L, "set_dialog_override_pos", smlua_func_set_dialog_override_pos); smlua_bind_function(L, "set_menu_mode", smlua_func_set_menu_mode); smlua_bind_function(L, "set_min_dialog_width", smlua_func_set_min_dialog_width); + smlua_bind_function(L, "set_dialog_override_pos", smlua_func_set_dialog_override_pos); + smlua_bind_function(L, "reset_dialog_override_pos", smlua_func_reset_dialog_override_pos); + smlua_bind_function(L, "set_dialog_override_color", smlua_func_set_dialog_override_color); + smlua_bind_function(L, "reset_dialog_override_color", smlua_func_reset_dialog_override_color); + smlua_bind_function(L, "set_dialog_box_state", smlua_func_set_dialog_box_state); // interaction.h - smlua_bind_function(L, "determine_interaction", smlua_func_determine_interaction); - smlua_bind_function(L, "does_mario_have_normal_cap_on_head", smlua_func_does_mario_have_normal_cap_on_head); - smlua_bind_function(L, "get_door_save_file_flag", smlua_func_get_door_save_file_flag); - smlua_bind_function(L, "get_mario_cap_flag", smlua_func_get_mario_cap_flag); - smlua_bind_function(L, "interact_bbh_entrance", smlua_func_interact_bbh_entrance); - smlua_bind_function(L, "interact_bounce_top", smlua_func_interact_bounce_top); - smlua_bind_function(L, "interact_breakable", smlua_func_interact_breakable); - smlua_bind_function(L, "interact_bully", smlua_func_interact_bully); - smlua_bind_function(L, "interact_cannon_base", smlua_func_interact_cannon_base); - smlua_bind_function(L, "interact_cap", smlua_func_interact_cap); - smlua_bind_function(L, "interact_clam_or_bubba", smlua_func_interact_clam_or_bubba); smlua_bind_function(L, "interact_coin", smlua_func_interact_coin); - smlua_bind_function(L, "interact_damage", smlua_func_interact_damage); - smlua_bind_function(L, "interact_door", smlua_func_interact_door); - smlua_bind_function(L, "interact_flame", smlua_func_interact_flame); - smlua_bind_function(L, "interact_grabbable", smlua_func_interact_grabbable); - smlua_bind_function(L, "interact_hit_from_below", smlua_func_interact_hit_from_below); - smlua_bind_function(L, "interact_hoot", smlua_func_interact_hoot); - smlua_bind_function(L, "interact_igloo_barrier", smlua_func_interact_igloo_barrier); - smlua_bind_function(L, "interact_koopa_shell", smlua_func_interact_koopa_shell); - smlua_bind_function(L, "interact_mr_blizzard", smlua_func_interact_mr_blizzard); - smlua_bind_function(L, "interact_player", smlua_func_interact_player); - smlua_bind_function(L, "interact_pole", smlua_func_interact_pole); - smlua_bind_function(L, "interact_shock", smlua_func_interact_shock); - smlua_bind_function(L, "interact_snufit_bullet", smlua_func_interact_snufit_bullet); - smlua_bind_function(L, "interact_spiny_walking", smlua_func_interact_spiny_walking); + smlua_bind_function(L, "interact_water_ring", smlua_func_interact_water_ring); smlua_bind_function(L, "interact_star_or_key", smlua_func_interact_star_or_key); - smlua_bind_function(L, "interact_strong_wind", smlua_func_interact_strong_wind); - smlua_bind_function(L, "interact_text", smlua_func_interact_text); - smlua_bind_function(L, "interact_tornado", smlua_func_interact_tornado); + smlua_bind_function(L, "interact_bbh_entrance", smlua_func_interact_bbh_entrance); smlua_bind_function(L, "interact_warp", smlua_func_interact_warp); smlua_bind_function(L, "interact_warp_door", smlua_func_interact_warp_door); - smlua_bind_function(L, "interact_water_ring", smlua_func_interact_water_ring); + smlua_bind_function(L, "interact_door", smlua_func_interact_door); + smlua_bind_function(L, "interact_cannon_base", smlua_func_interact_cannon_base); + smlua_bind_function(L, "interact_player", smlua_func_interact_player); + smlua_bind_function(L, "interact_igloo_barrier", smlua_func_interact_igloo_barrier); + smlua_bind_function(L, "interact_tornado", smlua_func_interact_tornado); smlua_bind_function(L, "interact_whirlpool", smlua_func_interact_whirlpool); - smlua_bind_function(L, "mario_blow_off_cap", smlua_func_mario_blow_off_cap); - smlua_bind_function(L, "mario_check_object_grab", smlua_func_mario_check_object_grab); - smlua_bind_function(L, "mario_drop_held_object", smlua_func_mario_drop_held_object); - smlua_bind_function(L, "mario_get_collided_object", smlua_func_mario_get_collided_object); - smlua_bind_function(L, "mario_grab_used_object", smlua_func_mario_grab_used_object); - smlua_bind_function(L, "mario_lose_cap_to_enemy", smlua_func_mario_lose_cap_to_enemy); + smlua_bind_function(L, "interact_strong_wind", smlua_func_interact_strong_wind); + smlua_bind_function(L, "interact_flame", smlua_func_interact_flame); + smlua_bind_function(L, "interact_snufit_bullet", smlua_func_interact_snufit_bullet); + smlua_bind_function(L, "interact_clam_or_bubba", smlua_func_interact_clam_or_bubba); + smlua_bind_function(L, "interact_bully", smlua_func_interact_bully); + smlua_bind_function(L, "interact_shock", smlua_func_interact_shock); + smlua_bind_function(L, "interact_mr_blizzard", smlua_func_interact_mr_blizzard); + smlua_bind_function(L, "interact_hit_from_below", smlua_func_interact_hit_from_below); + smlua_bind_function(L, "interact_bounce_top", smlua_func_interact_bounce_top); + smlua_bind_function(L, "interact_spiny_walking", smlua_func_interact_spiny_walking); + smlua_bind_function(L, "interact_damage", smlua_func_interact_damage); + smlua_bind_function(L, "interact_breakable", smlua_func_interact_breakable); + smlua_bind_function(L, "interact_koopa_shell", smlua_func_interact_koopa_shell); + smlua_bind_function(L, "interact_pole", smlua_func_interact_pole); + smlua_bind_function(L, "interact_hoot", smlua_func_interact_hoot); + smlua_bind_function(L, "interact_cap", smlua_func_interact_cap); + smlua_bind_function(L, "interact_grabbable", smlua_func_interact_grabbable); + smlua_bind_function(L, "interact_text", smlua_func_interact_text); smlua_bind_function(L, "mario_obj_angle_to_object", smlua_func_mario_obj_angle_to_object); - smlua_bind_function(L, "mario_retrieve_cap", smlua_func_mario_retrieve_cap); - smlua_bind_function(L, "mario_stop_riding_and_holding", smlua_func_mario_stop_riding_and_holding); smlua_bind_function(L, "mario_stop_riding_object", smlua_func_mario_stop_riding_object); + smlua_bind_function(L, "mario_grab_used_object", smlua_func_mario_grab_used_object); + smlua_bind_function(L, "mario_drop_held_object", smlua_func_mario_drop_held_object); smlua_bind_function(L, "mario_throw_held_object", smlua_func_mario_throw_held_object); + smlua_bind_function(L, "mario_stop_riding_and_holding", smlua_func_mario_stop_riding_and_holding); + smlua_bind_function(L, "does_mario_have_normal_cap_on_head", smlua_func_does_mario_have_normal_cap_on_head); + smlua_bind_function(L, "mario_blow_off_cap", smlua_func_mario_blow_off_cap); + smlua_bind_function(L, "mario_lose_cap_to_enemy", smlua_func_mario_lose_cap_to_enemy); + smlua_bind_function(L, "mario_retrieve_cap", smlua_func_mario_retrieve_cap); + smlua_bind_function(L, "mario_get_collided_object", smlua_func_mario_get_collided_object); + smlua_bind_function(L, "mario_check_object_grab", smlua_func_mario_check_object_grab); + smlua_bind_function(L, "get_door_save_file_flag", smlua_func_get_door_save_file_flag); smlua_bind_function(L, "passes_pvp_interaction_checks", smlua_func_passes_pvp_interaction_checks); smlua_bind_function(L, "should_push_or_pull_door", smlua_func_should_push_or_pull_door); smlua_bind_function(L, "take_damage_and_knock_back", smlua_func_take_damage_and_knock_back); + smlua_bind_function(L, "get_mario_cap_flag", smlua_func_get_mario_cap_flag); + smlua_bind_function(L, "determine_interaction", smlua_func_determine_interaction); // lag_compensation.h - smlua_bind_function(L, "lag_compensation_get_local_state", smlua_func_lag_compensation_get_local_state); - smlua_bind_function(L, "lag_compensation_get_local_state_index", smlua_func_lag_compensation_get_local_state_index); - smlua_bind_function(L, "lag_compensation_get_local_state_ready", smlua_func_lag_compensation_get_local_state_ready); smlua_bind_function(L, "lag_compensation_store", smlua_func_lag_compensation_store); + smlua_bind_function(L, "lag_compensation_get_local_state", smlua_func_lag_compensation_get_local_state); + smlua_bind_function(L, "lag_compensation_get_local_state_ready", smlua_func_lag_compensation_get_local_state_ready); + 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, "get_level_name", smlua_func_get_level_name); 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_star_name", smlua_func_get_star_name); + smlua_bind_function(L, "get_level_name", smlua_func_get_level_name); smlua_bind_function(L, "get_star_name_ascii", smlua_func_get_star_name_ascii); smlua_bind_function(L, "get_star_name_sm64", smlua_func_get_star_name_sm64); + smlua_bind_function(L, "get_star_name", smlua_func_get_star_name); // level_script.h smlua_bind_function(L, "area_create_warp_node", smlua_func_area_create_warp_node); // level_update.h + smlua_bind_function(L, "level_control_timer_running", smlua_func_level_control_timer_running); smlua_bind_function(L, "fade_into_special_warp", smlua_func_fade_into_special_warp); smlua_bind_function(L, "get_instant_warp", smlua_func_get_instant_warp); smlua_bind_function(L, "get_painting_warp_node", smlua_func_get_painting_warp_node); smlua_bind_function(L, "initiate_painting_warp", smlua_func_initiate_painting_warp); - smlua_bind_function(L, "level_control_timer_running", smlua_func_level_control_timer_running); smlua_bind_function(L, "level_trigger_warp", smlua_func_level_trigger_warp); - smlua_bind_function(L, "lvl_set_current_level", smlua_func_lvl_set_current_level); smlua_bind_function(L, "warp_special", smlua_func_warp_special); + smlua_bind_function(L, "lvl_set_current_level", smlua_func_lvl_set_current_level); // lighting_engine.h - smlua_bind_function(L, "le_add_light", smlua_func_le_add_light); smlua_bind_function(L, "le_calculate_lighting_color", smlua_func_le_calculate_lighting_color); smlua_bind_function(L, "le_calculate_lighting_dir", smlua_func_le_calculate_lighting_dir); - smlua_bind_function(L, "le_get_light_count", smlua_func_le_get_light_count); + smlua_bind_function(L, "le_add_light", smlua_func_le_add_light); smlua_bind_function(L, "le_remove_light", smlua_func_le_remove_light); + smlua_bind_function(L, "le_get_light_count", smlua_func_le_get_light_count); smlua_bind_function(L, "le_set_ambient_color", smlua_func_le_set_ambient_color); - smlua_bind_function(L, "le_set_light_color", smlua_func_le_set_light_color); - smlua_bind_function(L, "le_set_light_intensity", smlua_func_le_set_light_intensity); smlua_bind_function(L, "le_set_light_pos", smlua_func_le_set_light_pos); + smlua_bind_function(L, "le_set_light_color", smlua_func_le_set_light_color); smlua_bind_function(L, "le_set_light_radius", smlua_func_le_set_light_radius); + smlua_bind_function(L, "le_set_light_intensity", smlua_func_le_set_light_intensity); // mario.h - smlua_bind_function(L, "adjust_sound_for_speed", smlua_func_adjust_sound_for_speed); - smlua_bind_function(L, "check_common_action_exits", smlua_func_check_common_action_exits); - smlua_bind_function(L, "check_common_hold_action_exits", smlua_func_check_common_hold_action_exits); - smlua_bind_function(L, "drop_and_set_mario_action", smlua_func_drop_and_set_mario_action); - smlua_bind_function(L, "execute_mario_action", smlua_func_execute_mario_action); - smlua_bind_function(L, "find_floor_height_relative_polar", smlua_func_find_floor_height_relative_polar); - smlua_bind_function(L, "find_floor_slope", smlua_func_find_floor_slope); - smlua_bind_function(L, "find_mario_anim_flags_and_translation", smlua_func_find_mario_anim_flags_and_translation); - smlua_bind_function(L, "force_idle_state", smlua_func_force_idle_state); - smlua_bind_function(L, "hurt_and_set_mario_action", smlua_func_hurt_and_set_mario_action); - smlua_bind_function(L, "init_single_mario", smlua_func_init_single_mario); smlua_bind_function(L, "is_anim_at_end", smlua_func_is_anim_at_end); smlua_bind_function(L, "is_anim_past_end", smlua_func_is_anim_past_end); + smlua_bind_function(L, "set_mario_animation", smlua_func_set_mario_animation); + smlua_bind_function(L, "set_mario_anim_with_accel", smlua_func_set_mario_anim_with_accel); + smlua_bind_function(L, "set_character_animation", smlua_func_set_character_animation); + smlua_bind_function(L, "set_character_anim_with_accel", smlua_func_set_character_anim_with_accel); + smlua_bind_function(L, "set_anim_to_frame", smlua_func_set_anim_to_frame); smlua_bind_function(L, "is_anim_past_frame", smlua_func_is_anim_past_frame); + smlua_bind_function(L, "find_mario_anim_flags_and_translation", smlua_func_find_mario_anim_flags_and_translation); + smlua_bind_function(L, "update_mario_pos_for_anim", smlua_func_update_mario_pos_for_anim); + smlua_bind_function(L, "return_mario_anim_y_translation", smlua_func_return_mario_anim_y_translation); + smlua_bind_function(L, "play_sound_if_no_flag", smlua_func_play_sound_if_no_flag); + smlua_bind_function(L, "play_mario_jump_sound", smlua_func_play_mario_jump_sound); + smlua_bind_function(L, "adjust_sound_for_speed", smlua_func_adjust_sound_for_speed); + smlua_bind_function(L, "play_sound_and_spawn_particles", smlua_func_play_sound_and_spawn_particles); + smlua_bind_function(L, "play_mario_action_sound", smlua_func_play_mario_action_sound); + smlua_bind_function(L, "play_mario_landing_sound", smlua_func_play_mario_landing_sound); + smlua_bind_function(L, "play_mario_landing_sound_once", smlua_func_play_mario_landing_sound_once); + smlua_bind_function(L, "play_mario_heavy_landing_sound", smlua_func_play_mario_heavy_landing_sound); + smlua_bind_function(L, "play_mario_heavy_landing_sound_once", smlua_func_play_mario_heavy_landing_sound_once); + smlua_bind_function(L, "play_mario_sound", smlua_func_play_mario_sound); + smlua_bind_function(L, "mario_is_crouching", smlua_func_mario_is_crouching); smlua_bind_function(L, "mario_can_bubble", smlua_func_mario_can_bubble); + smlua_bind_function(L, "mario_set_bubbled", smlua_func_mario_set_bubbled); + smlua_bind_function(L, "mario_set_forward_vel", smlua_func_mario_set_forward_vel); + smlua_bind_function(L, "mario_get_floor_class", smlua_func_mario_get_floor_class); + smlua_bind_function(L, "mario_get_terrain_sound_addend", smlua_func_mario_get_terrain_sound_addend); + smlua_bind_function(L, "resolve_and_return_wall_collisions", smlua_func_resolve_and_return_wall_collisions); + smlua_bind_function(L, "resolve_and_return_wall_collisions_data", smlua_func_resolve_and_return_wall_collisions_data); + //smlua_bind_function(L, "vec3f_find_ceil", smlua_func_vec3f_find_ceil); <--- UNIMPLEMENTED + //smlua_bind_function(L, "vec3f_mario_ceil", smlua_func_vec3f_mario_ceil); <--- UNIMPLEMENTED smlua_bind_function(L, "mario_facing_downhill", smlua_func_mario_facing_downhill); smlua_bind_function(L, "mario_floor_is_slippery", smlua_func_mario_floor_is_slippery); smlua_bind_function(L, "mario_floor_is_slope", smlua_func_mario_floor_is_slope); smlua_bind_function(L, "mario_floor_is_steep", smlua_func_mario_floor_is_steep); - smlua_bind_function(L, "mario_get_floor_class", smlua_func_mario_get_floor_class); - smlua_bind_function(L, "mario_get_terrain_sound_addend", smlua_func_mario_get_terrain_sound_addend); - smlua_bind_function(L, "mario_is_crouching", smlua_func_mario_is_crouching); - smlua_bind_function(L, "mario_set_bubbled", smlua_func_mario_set_bubbled); - smlua_bind_function(L, "mario_set_forward_vel", smlua_func_mario_set_forward_vel); - smlua_bind_function(L, "mario_update_wall", smlua_func_mario_update_wall); - smlua_bind_function(L, "play_mario_action_sound", smlua_func_play_mario_action_sound); - smlua_bind_function(L, "play_mario_heavy_landing_sound", smlua_func_play_mario_heavy_landing_sound); - smlua_bind_function(L, "play_mario_heavy_landing_sound_once", smlua_func_play_mario_heavy_landing_sound_once); - smlua_bind_function(L, "play_mario_jump_sound", smlua_func_play_mario_jump_sound); - smlua_bind_function(L, "play_mario_landing_sound", smlua_func_play_mario_landing_sound); - smlua_bind_function(L, "play_mario_landing_sound_once", smlua_func_play_mario_landing_sound_once); - smlua_bind_function(L, "play_mario_sound", smlua_func_play_mario_sound); - smlua_bind_function(L, "play_sound_and_spawn_particles", smlua_func_play_sound_and_spawn_particles); - smlua_bind_function(L, "play_sound_if_no_flag", smlua_func_play_sound_if_no_flag); - smlua_bind_function(L, "resolve_and_return_wall_collisions", smlua_func_resolve_and_return_wall_collisions); - smlua_bind_function(L, "resolve_and_return_wall_collisions_data", smlua_func_resolve_and_return_wall_collisions_data); - smlua_bind_function(L, "return_mario_anim_y_translation", smlua_func_return_mario_anim_y_translation); - smlua_bind_function(L, "set_anim_to_frame", smlua_func_set_anim_to_frame); - smlua_bind_function(L, "set_character_anim_with_accel", smlua_func_set_character_anim_with_accel); - smlua_bind_function(L, "set_character_animation", smlua_func_set_character_animation); + smlua_bind_function(L, "find_floor_height_relative_polar", smlua_func_find_floor_height_relative_polar); + smlua_bind_function(L, "find_floor_slope", smlua_func_find_floor_slope); + smlua_bind_function(L, "update_mario_sound_and_camera", smlua_func_update_mario_sound_and_camera); + smlua_bind_function(L, "set_steep_jump_action", smlua_func_set_steep_jump_action); + smlua_bind_function(L, "set_mario_y_vel_based_on_fspeed", smlua_func_set_mario_y_vel_based_on_fspeed); + smlua_bind_function(L, "set_mario_action", smlua_func_set_mario_action); smlua_bind_function(L, "set_jump_from_landing", smlua_func_set_jump_from_landing); smlua_bind_function(L, "set_jumping_action", smlua_func_set_jumping_action); - smlua_bind_function(L, "set_mario_action", smlua_func_set_mario_action); - smlua_bind_function(L, "set_mario_anim_with_accel", smlua_func_set_mario_anim_with_accel); - smlua_bind_function(L, "set_mario_animation", smlua_func_set_mario_animation); - smlua_bind_function(L, "set_mario_particle_flags", smlua_func_set_mario_particle_flags); - smlua_bind_function(L, "set_mario_y_vel_based_on_fspeed", smlua_func_set_mario_y_vel_based_on_fspeed); - smlua_bind_function(L, "set_steep_jump_action", smlua_func_set_steep_jump_action); - smlua_bind_function(L, "set_water_plunge_action", smlua_func_set_water_plunge_action); + smlua_bind_function(L, "drop_and_set_mario_action", smlua_func_drop_and_set_mario_action); + smlua_bind_function(L, "hurt_and_set_mario_action", smlua_func_hurt_and_set_mario_action); + smlua_bind_function(L, "check_common_action_exits", smlua_func_check_common_action_exits); + smlua_bind_function(L, "check_common_hold_action_exits", smlua_func_check_common_hold_action_exits); smlua_bind_function(L, "transition_submerged_to_walking", smlua_func_transition_submerged_to_walking); - smlua_bind_function(L, "update_mario_pos_for_anim", smlua_func_update_mario_pos_for_anim); - smlua_bind_function(L, "update_mario_sound_and_camera", smlua_func_update_mario_sound_and_camera); - //smlua_bind_function(L, "vec3f_find_ceil", smlua_func_vec3f_find_ceil); <--- UNIMPLEMENTED - //smlua_bind_function(L, "vec3f_mario_ceil", smlua_func_vec3f_mario_ceil); <--- UNIMPLEMENTED + smlua_bind_function(L, "set_water_plunge_action", smlua_func_set_water_plunge_action); + smlua_bind_function(L, "execute_mario_action", smlua_func_execute_mario_action); + smlua_bind_function(L, "force_idle_state", smlua_func_force_idle_state); + smlua_bind_function(L, "init_single_mario", smlua_func_init_single_mario); + smlua_bind_function(L, "set_mario_particle_flags", smlua_func_set_mario_particle_flags); + smlua_bind_function(L, "mario_update_wall", smlua_func_mario_update_wall); // mario_actions_airborne.c - smlua_bind_function(L, "check_common_airborne_cancels", smlua_func_check_common_airborne_cancels); - smlua_bind_function(L, "check_fall_damage", smlua_func_check_fall_damage); - smlua_bind_function(L, "check_fall_damage_or_get_stuck", smlua_func_check_fall_damage_or_get_stuck); - smlua_bind_function(L, "check_horizontal_wind", smlua_func_check_horizontal_wind); - smlua_bind_function(L, "check_kick_or_dive_in_air", smlua_func_check_kick_or_dive_in_air); - smlua_bind_function(L, "check_wall_kick", smlua_func_check_wall_kick); - smlua_bind_function(L, "common_air_action_step", smlua_func_common_air_action_step); - smlua_bind_function(L, "common_air_knockback_step", smlua_func_common_air_knockback_step); - smlua_bind_function(L, "lava_boost_on_wall", smlua_func_lava_boost_on_wall); - smlua_bind_function(L, "mario_execute_airborne_action", smlua_func_mario_execute_airborne_action); - smlua_bind_function(L, "play_far_fall_sound", smlua_func_play_far_fall_sound); smlua_bind_function(L, "play_flip_sounds", smlua_func_play_flip_sounds); + smlua_bind_function(L, "play_far_fall_sound", smlua_func_play_far_fall_sound); #ifndef VERSION_JP smlua_bind_function(L, "play_knockback_sound", smlua_func_play_knockback_sound); #endif + smlua_bind_function(L, "lava_boost_on_wall", smlua_func_lava_boost_on_wall); + smlua_bind_function(L, "check_fall_damage", smlua_func_check_fall_damage); + smlua_bind_function(L, "check_kick_or_dive_in_air", smlua_func_check_kick_or_dive_in_air); smlua_bind_function(L, "should_get_stuck_in_ground", smlua_func_should_get_stuck_in_ground); + smlua_bind_function(L, "check_fall_damage_or_get_stuck", smlua_func_check_fall_damage_or_get_stuck); + smlua_bind_function(L, "check_horizontal_wind", smlua_func_check_horizontal_wind); smlua_bind_function(L, "update_air_with_turn", smlua_func_update_air_with_turn); smlua_bind_function(L, "update_air_without_turn", smlua_func_update_air_without_turn); - smlua_bind_function(L, "update_flying", smlua_func_update_flying); - smlua_bind_function(L, "update_flying_pitch", smlua_func_update_flying_pitch); - smlua_bind_function(L, "update_flying_yaw", smlua_func_update_flying_yaw); smlua_bind_function(L, "update_lava_boost_or_twirling", smlua_func_update_lava_boost_or_twirling); + smlua_bind_function(L, "update_flying_yaw", smlua_func_update_flying_yaw); + smlua_bind_function(L, "update_flying_pitch", smlua_func_update_flying_pitch); + smlua_bind_function(L, "update_flying", smlua_func_update_flying); + smlua_bind_function(L, "common_air_action_step", smlua_func_common_air_action_step); + smlua_bind_function(L, "common_air_knockback_step", smlua_func_common_air_knockback_step); + smlua_bind_function(L, "check_wall_kick", smlua_func_check_wall_kick); + smlua_bind_function(L, "check_common_airborne_cancels", smlua_func_check_common_airborne_cancels); + smlua_bind_function(L, "mario_execute_airborne_action", smlua_func_mario_execute_airborne_action); // mario_actions_automatic.c smlua_bind_function(L, "add_tree_leaf_particles", smlua_func_add_tree_leaf_particles); - smlua_bind_function(L, "check_common_automatic_cancels", smlua_func_check_common_automatic_cancels); - smlua_bind_function(L, "climb_up_ledge", smlua_func_climb_up_ledge); - smlua_bind_function(L, "let_go_of_ledge", smlua_func_let_go_of_ledge); - smlua_bind_function(L, "mario_execute_automatic_action", smlua_func_mario_execute_automatic_action); - smlua_bind_function(L, "perform_hanging_step", smlua_func_perform_hanging_step); smlua_bind_function(L, "play_climbing_sounds", smlua_func_play_climbing_sounds); smlua_bind_function(L, "set_pole_position", smlua_func_set_pole_position); + smlua_bind_function(L, "perform_hanging_step", smlua_func_perform_hanging_step); smlua_bind_function(L, "update_hang_moving", smlua_func_update_hang_moving); smlua_bind_function(L, "update_hang_stationary", smlua_func_update_hang_stationary); - smlua_bind_function(L, "update_ledge_climb", smlua_func_update_ledge_climb); + smlua_bind_function(L, "let_go_of_ledge", smlua_func_let_go_of_ledge); + smlua_bind_function(L, "climb_up_ledge", smlua_func_climb_up_ledge); smlua_bind_function(L, "update_ledge_climb_camera", smlua_func_update_ledge_climb_camera); + smlua_bind_function(L, "update_ledge_climb", smlua_func_update_ledge_climb); + smlua_bind_function(L, "check_common_automatic_cancels", smlua_func_check_common_automatic_cancels); + smlua_bind_function(L, "mario_execute_automatic_action", smlua_func_mario_execute_automatic_action); // mario_actions_cutscene.c + smlua_bind_function(L, "get_credits_str_width", smlua_func_get_credits_str_width); smlua_bind_function(L, "bhv_end_peach_loop", smlua_func_bhv_end_peach_loop); smlua_bind_function(L, "bhv_end_toad_loop", smlua_func_bhv_end_toad_loop); - smlua_bind_function(L, "common_death_handler", smlua_func_common_death_handler); - smlua_bind_function(L, "cutscene_put_cap_on", smlua_func_cutscene_put_cap_on); - smlua_bind_function(L, "cutscene_take_cap_off", smlua_func_cutscene_take_cap_off); - smlua_bind_function(L, "general_star_dance_handler", smlua_func_general_star_dance_handler); - smlua_bind_function(L, "generate_yellow_sparkles", smlua_func_generate_yellow_sparkles); - smlua_bind_function(L, "get_credits_str_width", smlua_func_get_credits_str_width); smlua_bind_function(L, "get_star_collection_dialog", smlua_func_get_star_collection_dialog); smlua_bind_function(L, "handle_save_menu", smlua_func_handle_save_menu); - smlua_bind_function(L, "launch_mario_until_land", smlua_func_launch_mario_until_land); - smlua_bind_function(L, "mario_execute_cutscene_action", smlua_func_mario_execute_cutscene_action); + smlua_bind_function(L, "cutscene_take_cap_off", smlua_func_cutscene_take_cap_off); + smlua_bind_function(L, "cutscene_put_cap_on", smlua_func_cutscene_put_cap_on); smlua_bind_function(L, "mario_ready_to_speak", smlua_func_mario_ready_to_speak); smlua_bind_function(L, "should_start_or_continue_dialog", smlua_func_should_start_or_continue_dialog); + smlua_bind_function(L, "general_star_dance_handler", smlua_func_general_star_dance_handler); + smlua_bind_function(L, "common_death_handler", smlua_func_common_death_handler); + smlua_bind_function(L, "launch_mario_until_land", smlua_func_launch_mario_until_land); smlua_bind_function(L, "stuck_in_ground_handler", smlua_func_stuck_in_ground_handler); + smlua_bind_function(L, "generate_yellow_sparkles", smlua_func_generate_yellow_sparkles); + smlua_bind_function(L, "mario_execute_cutscene_action", smlua_func_mario_execute_cutscene_action); // mario_actions_moving.c + smlua_bind_function(L, "tilt_body_running", smlua_func_tilt_body_running); + smlua_bind_function(L, "play_step_sound", smlua_func_play_step_sound); smlua_bind_function(L, "align_with_floor", smlua_func_align_with_floor); - smlua_bind_function(L, "analog_stick_held_back", smlua_func_analog_stick_held_back); - smlua_bind_function(L, "anim_and_audio_for_heavy_walk", smlua_func_anim_and_audio_for_heavy_walk); - smlua_bind_function(L, "anim_and_audio_for_hold_walk", smlua_func_anim_and_audio_for_hold_walk); - smlua_bind_function(L, "anim_and_audio_for_walk", smlua_func_anim_and_audio_for_walk); - smlua_bind_function(L, "apply_landing_accel", smlua_func_apply_landing_accel); - smlua_bind_function(L, "apply_slope_accel", smlua_func_apply_slope_accel); - smlua_bind_function(L, "apply_slope_decel", smlua_func_apply_slope_decel); - smlua_bind_function(L, "begin_braking_action", smlua_func_begin_braking_action); smlua_bind_function(L, "begin_walking_action", smlua_func_begin_walking_action); - smlua_bind_function(L, "check_common_moving_cancels", smlua_func_check_common_moving_cancels); - smlua_bind_function(L, "check_ground_dive_or_punch", smlua_func_check_ground_dive_or_punch); smlua_bind_function(L, "check_ledge_climb_down", smlua_func_check_ledge_climb_down); + smlua_bind_function(L, "slide_bonk", smlua_func_slide_bonk); + smlua_bind_function(L, "set_triple_jump_action", smlua_func_set_triple_jump_action); + smlua_bind_function(L, "update_sliding_angle", smlua_func_update_sliding_angle); + smlua_bind_function(L, "update_sliding", smlua_func_update_sliding); + smlua_bind_function(L, "apply_slope_accel", smlua_func_apply_slope_accel); + smlua_bind_function(L, "apply_landing_accel", smlua_func_apply_landing_accel); + smlua_bind_function(L, "update_shell_speed", smlua_func_update_shell_speed); + smlua_bind_function(L, "apply_slope_decel", smlua_func_apply_slope_decel); + smlua_bind_function(L, "update_decelerating_speed", smlua_func_update_decelerating_speed); + smlua_bind_function(L, "update_walking_speed", smlua_func_update_walking_speed); + smlua_bind_function(L, "should_begin_sliding", smlua_func_should_begin_sliding); + smlua_bind_function(L, "analog_stick_held_back", smlua_func_analog_stick_held_back); + smlua_bind_function(L, "check_ground_dive_or_punch", smlua_func_check_ground_dive_or_punch); + smlua_bind_function(L, "begin_braking_action", smlua_func_begin_braking_action); + smlua_bind_function(L, "anim_and_audio_for_walk", smlua_func_anim_and_audio_for_walk); + smlua_bind_function(L, "anim_and_audio_for_hold_walk", smlua_func_anim_and_audio_for_hold_walk); + smlua_bind_function(L, "anim_and_audio_for_heavy_walk", smlua_func_anim_and_audio_for_heavy_walk); + smlua_bind_function(L, "push_or_sidle_wall", smlua_func_push_or_sidle_wall); + smlua_bind_function(L, "tilt_body_walking", smlua_func_tilt_body_walking); + smlua_bind_function(L, "tilt_body_ground_shell", smlua_func_tilt_body_ground_shell); + smlua_bind_function(L, "tilt_body_butt_slide", smlua_func_tilt_body_butt_slide); + smlua_bind_function(L, "common_slide_action", smlua_func_common_slide_action); + smlua_bind_function(L, "common_slide_action_with_jump", smlua_func_common_slide_action_with_jump); + smlua_bind_function(L, "stomach_slide_action", smlua_func_stomach_slide_action); smlua_bind_function(L, "common_ground_knockback_action", smlua_func_common_ground_knockback_action); smlua_bind_function(L, "common_landing_action", smlua_func_common_landing_action); //smlua_bind_function(L, "common_landing_cancels", smlua_func_common_landing_cancels); <--- UNIMPLEMENTED - smlua_bind_function(L, "common_slide_action", smlua_func_common_slide_action); - smlua_bind_function(L, "common_slide_action_with_jump", smlua_func_common_slide_action_with_jump); - smlua_bind_function(L, "mario_execute_moving_action", smlua_func_mario_execute_moving_action); - smlua_bind_function(L, "play_step_sound", smlua_func_play_step_sound); - smlua_bind_function(L, "push_or_sidle_wall", smlua_func_push_or_sidle_wall); smlua_bind_function(L, "quicksand_jump_land_action", smlua_func_quicksand_jump_land_action); - smlua_bind_function(L, "set_triple_jump_action", smlua_func_set_triple_jump_action); - smlua_bind_function(L, "should_begin_sliding", smlua_func_should_begin_sliding); - smlua_bind_function(L, "slide_bonk", smlua_func_slide_bonk); - smlua_bind_function(L, "stomach_slide_action", smlua_func_stomach_slide_action); - smlua_bind_function(L, "tilt_body_butt_slide", smlua_func_tilt_body_butt_slide); - smlua_bind_function(L, "tilt_body_ground_shell", smlua_func_tilt_body_ground_shell); - smlua_bind_function(L, "tilt_body_running", smlua_func_tilt_body_running); - smlua_bind_function(L, "tilt_body_walking", smlua_func_tilt_body_walking); - smlua_bind_function(L, "update_decelerating_speed", smlua_func_update_decelerating_speed); - smlua_bind_function(L, "update_shell_speed", smlua_func_update_shell_speed); - smlua_bind_function(L, "update_sliding", smlua_func_update_sliding); - smlua_bind_function(L, "update_sliding_angle", smlua_func_update_sliding_angle); - smlua_bind_function(L, "update_walking_speed", smlua_func_update_walking_speed); + smlua_bind_function(L, "check_common_moving_cancels", smlua_func_check_common_moving_cancels); + smlua_bind_function(L, "mario_execute_moving_action", smlua_func_mario_execute_moving_action); // mario_actions_object.c smlua_bind_function(L, "animated_stationary_ground_step", smlua_func_animated_stationary_ground_step); + smlua_bind_function(L, "mario_update_punch_sequence", smlua_func_mario_update_punch_sequence); smlua_bind_function(L, "check_common_object_cancels", smlua_func_check_common_object_cancels); smlua_bind_function(L, "mario_execute_object_action", smlua_func_mario_execute_object_action); - smlua_bind_function(L, "mario_update_punch_sequence", smlua_func_mario_update_punch_sequence); // mario_actions_stationary.c - smlua_bind_function(L, "check_common_hold_idle_cancels", smlua_func_check_common_hold_idle_cancels); smlua_bind_function(L, "check_common_idle_cancels", smlua_func_check_common_idle_cancels); - smlua_bind_function(L, "check_common_landing_cancels", smlua_func_check_common_landing_cancels); - smlua_bind_function(L, "check_common_stationary_cancels", smlua_func_check_common_stationary_cancels); - smlua_bind_function(L, "landing_step", smlua_func_landing_step); - smlua_bind_function(L, "mario_execute_stationary_action", smlua_func_mario_execute_stationary_action); + smlua_bind_function(L, "check_common_hold_idle_cancels", smlua_func_check_common_hold_idle_cancels); smlua_bind_function(L, "play_anim_sound", smlua_func_play_anim_sound); smlua_bind_function(L, "stopping_step", smlua_func_stopping_step); + smlua_bind_function(L, "landing_step", smlua_func_landing_step); + smlua_bind_function(L, "check_common_landing_cancels", smlua_func_check_common_landing_cancels); + smlua_bind_function(L, "check_common_stationary_cancels", smlua_func_check_common_stationary_cancels); + smlua_bind_function(L, "mario_execute_stationary_action", smlua_func_mario_execute_stationary_action); // mario_actions_submerged.c + smlua_bind_function(L, "set_swimming_at_surface_particles", smlua_func_set_swimming_at_surface_particles); + smlua_bind_function(L, "perform_water_full_step", smlua_func_perform_water_full_step); smlua_bind_function(L, "apply_water_current", smlua_func_apply_water_current); + smlua_bind_function(L, "perform_water_step", smlua_func_perform_water_step); smlua_bind_function(L, "float_surface_gfx", smlua_func_float_surface_gfx); smlua_bind_function(L, "mario_execute_submerged_action", smlua_func_mario_execute_submerged_action); - smlua_bind_function(L, "perform_water_full_step", smlua_func_perform_water_full_step); - smlua_bind_function(L, "perform_water_step", smlua_func_perform_water_step); - smlua_bind_function(L, "set_swimming_at_surface_particles", smlua_func_set_swimming_at_surface_particles); // mario_misc.h smlua_bind_function(L, "bhv_toad_message_init", smlua_func_bhv_toad_message_init); smlua_bind_function(L, "bhv_toad_message_loop", smlua_func_bhv_toad_message_loop); smlua_bind_function(L, "bhv_unlock_door_star_init", smlua_func_bhv_unlock_door_star_init); smlua_bind_function(L, "bhv_unlock_door_star_loop", smlua_func_bhv_unlock_door_star_loop); - smlua_bind_function(L, "geo_get_body_state", smlua_func_geo_get_body_state); smlua_bind_function(L, "geo_get_mario_state", smlua_func_geo_get_mario_state); + smlua_bind_function(L, "geo_get_body_state", smlua_func_geo_get_body_state); // mario_step.h smlua_bind_function(L, "get_additive_y_vel_for_jumps", smlua_func_get_additive_y_vel_for_jumps); - smlua_bind_function(L, "init_bully_collision_data", smlua_func_init_bully_collision_data); smlua_bind_function(L, "mario_bonk_reflection", smlua_func_mario_bonk_reflection); + smlua_bind_function(L, "init_bully_collision_data", smlua_func_init_bully_collision_data); + smlua_bind_function(L, "mario_update_quicksand", smlua_func_mario_update_quicksand); smlua_bind_function(L, "mario_push_off_steep_floor", smlua_func_mario_push_off_steep_floor); smlua_bind_function(L, "mario_update_moving_sand", smlua_func_mario_update_moving_sand); - smlua_bind_function(L, "mario_update_quicksand", smlua_func_mario_update_quicksand); smlua_bind_function(L, "mario_update_windy_ground", smlua_func_mario_update_windy_ground); - smlua_bind_function(L, "perform_air_step", smlua_func_perform_air_step); - smlua_bind_function(L, "perform_ground_step", smlua_func_perform_ground_step); - smlua_bind_function(L, "set_vel_from_pitch_and_yaw", smlua_func_set_vel_from_pitch_and_yaw); - smlua_bind_function(L, "stationary_ground_step", smlua_func_stationary_ground_step); smlua_bind_function(L, "stop_and_set_height_to_floor", smlua_func_stop_and_set_height_to_floor); + smlua_bind_function(L, "stationary_ground_step", smlua_func_stationary_ground_step); + smlua_bind_function(L, "perform_ground_step", smlua_func_perform_ground_step); + smlua_bind_function(L, "perform_air_step", smlua_func_perform_air_step); + smlua_bind_function(L, "set_vel_from_pitch_and_yaw", smlua_func_set_vel_from_pitch_and_yaw); // math_util.h - smlua_bind_function(L, "anim_spline_init", smlua_func_anim_spline_init); - smlua_bind_function(L, "anim_spline_poll", smlua_func_anim_spline_poll); - smlua_bind_function(L, "approach_f32", smlua_func_approach_f32); - smlua_bind_function(L, "approach_s32", smlua_func_approach_s32); - smlua_bind_function(L, "atan2s", smlua_func_atan2s); - smlua_bind_function(L, "coss", smlua_func_coss); - smlua_bind_function(L, "find_vector_perpendicular_to_plane", smlua_func_find_vector_perpendicular_to_plane); - smlua_bind_function(L, "get_pos_from_transform_mtx", smlua_func_get_pos_from_transform_mtx); - smlua_bind_function(L, "mtxf_align_terrain_normal", smlua_func_mtxf_align_terrain_normal); - smlua_bind_function(L, "mtxf_align_terrain_triangle", smlua_func_mtxf_align_terrain_triangle); - smlua_bind_function(L, "mtxf_billboard", smlua_func_mtxf_billboard); - smlua_bind_function(L, "mtxf_copy", smlua_func_mtxf_copy); - smlua_bind_function(L, "mtxf_cylboard", smlua_func_mtxf_cylboard); - smlua_bind_function(L, "mtxf_identity", smlua_func_mtxf_identity); - smlua_bind_function(L, "mtxf_inverse", smlua_func_mtxf_inverse); - smlua_bind_function(L, "mtxf_lookat", smlua_func_mtxf_lookat); - smlua_bind_function(L, "mtxf_mul", smlua_func_mtxf_mul); - smlua_bind_function(L, "mtxf_mul_vec3s", smlua_func_mtxf_mul_vec3s); - //smlua_bind_function(L, "mtxf_rotate_xy", smlua_func_mtxf_rotate_xy); <--- UNIMPLEMENTED - smlua_bind_function(L, "mtxf_rotate_xyz_and_translate", smlua_func_mtxf_rotate_xyz_and_translate); - smlua_bind_function(L, "mtxf_rotate_zxy_and_translate", smlua_func_mtxf_rotate_zxy_and_translate); - smlua_bind_function(L, "mtxf_scale_vec3f", smlua_func_mtxf_scale_vec3f); - //smlua_bind_function(L, "mtxf_to_mtx", smlua_func_mtxf_to_mtx); <--- UNIMPLEMENTED - smlua_bind_function(L, "mtxf_translate", smlua_func_mtxf_translate); - smlua_bind_function(L, "not_zero", smlua_func_not_zero); smlua_bind_function(L, "sins", smlua_func_sins); - smlua_bind_function(L, "spline_get_weights", smlua_func_spline_get_weights); - smlua_bind_function(L, "vec3f_add", smlua_func_vec3f_add); - smlua_bind_function(L, "vec3f_combine", smlua_func_vec3f_combine); + smlua_bind_function(L, "coss", smlua_func_coss); smlua_bind_function(L, "vec3f_copy", smlua_func_vec3f_copy); - smlua_bind_function(L, "vec3f_cross", smlua_func_vec3f_cross); - smlua_bind_function(L, "vec3f_dif", smlua_func_vec3f_dif); - smlua_bind_function(L, "vec3f_dist", smlua_func_vec3f_dist); - smlua_bind_function(L, "vec3f_dot", smlua_func_vec3f_dot); - smlua_bind_function(L, "vec3f_get_dist_and_angle", smlua_func_vec3f_get_dist_and_angle); - smlua_bind_function(L, "vec3f_length", smlua_func_vec3f_length); - smlua_bind_function(L, "vec3f_mul", smlua_func_vec3f_mul); - smlua_bind_function(L, "vec3f_normalize", smlua_func_vec3f_normalize); - smlua_bind_function(L, "vec3f_project", smlua_func_vec3f_project); - smlua_bind_function(L, "vec3f_rotate_zxy", smlua_func_vec3f_rotate_zxy); smlua_bind_function(L, "vec3f_set", smlua_func_vec3f_set); - smlua_bind_function(L, "vec3f_set_dist_and_angle", smlua_func_vec3f_set_dist_and_angle); + smlua_bind_function(L, "vec3f_add", smlua_func_vec3f_add); smlua_bind_function(L, "vec3f_sum", smlua_func_vec3f_sum); - smlua_bind_function(L, "vec3f_to_vec3s", smlua_func_vec3f_to_vec3s); - smlua_bind_function(L, "vec3s_add", smlua_func_vec3s_add); + smlua_bind_function(L, "vec3f_dif", smlua_func_vec3f_dif); + smlua_bind_function(L, "vec3f_mul", smlua_func_vec3f_mul); smlua_bind_function(L, "vec3s_copy", smlua_func_vec3s_copy); smlua_bind_function(L, "vec3s_set", smlua_func_vec3s_set); + smlua_bind_function(L, "vec3s_add", smlua_func_vec3s_add); smlua_bind_function(L, "vec3s_sum", smlua_func_vec3s_sum); smlua_bind_function(L, "vec3s_to_vec3f", smlua_func_vec3s_to_vec3f); + smlua_bind_function(L, "vec3f_to_vec3s", smlua_func_vec3f_to_vec3s); + smlua_bind_function(L, "find_vector_perpendicular_to_plane", smlua_func_find_vector_perpendicular_to_plane); + smlua_bind_function(L, "vec3f_cross", smlua_func_vec3f_cross); + smlua_bind_function(L, "vec3f_normalize", smlua_func_vec3f_normalize); + smlua_bind_function(L, "vec3f_length", smlua_func_vec3f_length); + smlua_bind_function(L, "vec3f_dot", smlua_func_vec3f_dot); + smlua_bind_function(L, "vec3f_combine", smlua_func_vec3f_combine); + smlua_bind_function(L, "vec3f_rotate_zxy", smlua_func_vec3f_rotate_zxy); + smlua_bind_function(L, "mtxf_copy", smlua_func_mtxf_copy); + smlua_bind_function(L, "mtxf_identity", smlua_func_mtxf_identity); + smlua_bind_function(L, "mtxf_translate", smlua_func_mtxf_translate); + smlua_bind_function(L, "mtxf_lookat", smlua_func_mtxf_lookat); + smlua_bind_function(L, "mtxf_rotate_zxy_and_translate", smlua_func_mtxf_rotate_zxy_and_translate); + smlua_bind_function(L, "mtxf_rotate_xyz_and_translate", smlua_func_mtxf_rotate_xyz_and_translate); + smlua_bind_function(L, "mtxf_billboard", smlua_func_mtxf_billboard); + smlua_bind_function(L, "mtxf_cylboard", smlua_func_mtxf_cylboard); + smlua_bind_function(L, "mtxf_align_terrain_normal", smlua_func_mtxf_align_terrain_normal); + smlua_bind_function(L, "mtxf_align_terrain_triangle", smlua_func_mtxf_align_terrain_triangle); + smlua_bind_function(L, "mtxf_mul", smlua_func_mtxf_mul); + smlua_bind_function(L, "mtxf_scale_vec3f", smlua_func_mtxf_scale_vec3f); + smlua_bind_function(L, "mtxf_mul_vec3s", smlua_func_mtxf_mul_vec3s); + //smlua_bind_function(L, "mtxf_to_mtx", smlua_func_mtxf_to_mtx); <--- UNIMPLEMENTED + //smlua_bind_function(L, "mtxf_rotate_xy", smlua_func_mtxf_rotate_xy); <--- UNIMPLEMENTED + smlua_bind_function(L, "mtxf_inverse", smlua_func_mtxf_inverse); + smlua_bind_function(L, "get_pos_from_transform_mtx", smlua_func_get_pos_from_transform_mtx); + smlua_bind_function(L, "vec3f_get_dist_and_angle", smlua_func_vec3f_get_dist_and_angle); + smlua_bind_function(L, "vec3f_set_dist_and_angle", smlua_func_vec3f_set_dist_and_angle); + smlua_bind_function(L, "approach_s32", smlua_func_approach_s32); + smlua_bind_function(L, "approach_f32", smlua_func_approach_f32); + smlua_bind_function(L, "atan2s", smlua_func_atan2s); + smlua_bind_function(L, "spline_get_weights", smlua_func_spline_get_weights); + smlua_bind_function(L, "anim_spline_init", smlua_func_anim_spline_init); + smlua_bind_function(L, "anim_spline_poll", smlua_func_anim_spline_poll); + smlua_bind_function(L, "not_zero", smlua_func_not_zero); + smlua_bind_function(L, "vec3f_project", smlua_func_vec3f_project); + smlua_bind_function(L, "vec3f_dist", smlua_func_vec3f_dist); // misc.h + smlua_bind_function(L, "smooth_step", smlua_func_smooth_step); + smlua_bind_function(L, "update_all_mario_stars", smlua_func_update_all_mario_stars); smlua_bind_function(L, "clock_elapsed", smlua_func_clock_elapsed); smlua_bind_function(L, "clock_elapsed_f64", smlua_func_clock_elapsed_f64); smlua_bind_function(L, "clock_elapsed_ticks", smlua_func_clock_elapsed_ticks); @@ -34871,666 +35019,675 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "delta_interpolate_s32", smlua_func_delta_interpolate_s32); smlua_bind_function(L, "delta_interpolate_vec3f", smlua_func_delta_interpolate_vec3f); smlua_bind_function(L, "delta_interpolate_vec3s", smlua_func_delta_interpolate_vec3s); - smlua_bind_function(L, "smooth_step", smlua_func_smooth_step); - smlua_bind_function(L, "update_all_mario_stars", smlua_func_update_all_mario_stars); // mod_storage.h - smlua_bind_function(L, "mod_storage_clear", smlua_func_mod_storage_clear); - smlua_bind_function(L, "mod_storage_exists", smlua_func_mod_storage_exists); - smlua_bind_function(L, "mod_storage_load", smlua_func_mod_storage_load); - smlua_bind_function(L, "mod_storage_load_bool", smlua_func_mod_storage_load_bool); - smlua_bind_function(L, "mod_storage_load_number", smlua_func_mod_storage_load_number); - smlua_bind_function(L, "mod_storage_remove", smlua_func_mod_storage_remove); smlua_bind_function(L, "mod_storage_save", smlua_func_mod_storage_save); - smlua_bind_function(L, "mod_storage_save_bool", smlua_func_mod_storage_save_bool); smlua_bind_function(L, "mod_storage_save_number", smlua_func_mod_storage_save_number); + smlua_bind_function(L, "mod_storage_save_bool", smlua_func_mod_storage_save_bool); + smlua_bind_function(L, "mod_storage_load", smlua_func_mod_storage_load); + smlua_bind_function(L, "mod_storage_load_number", smlua_func_mod_storage_load_number); + smlua_bind_function(L, "mod_storage_load_bool", smlua_func_mod_storage_load_bool); + smlua_bind_function(L, "mod_storage_exists", smlua_func_mod_storage_exists); + smlua_bind_function(L, "mod_storage_remove", smlua_func_mod_storage_remove); + smlua_bind_function(L, "mod_storage_clear", smlua_func_mod_storage_clear); // network_player.h - smlua_bind_function(L, "get_network_player_from_area", smlua_func_get_network_player_from_area); - smlua_bind_function(L, "get_network_player_from_level", smlua_func_get_network_player_from_level); - smlua_bind_function(L, "get_network_player_smallest_global", smlua_func_get_network_player_smallest_global); smlua_bind_function(L, "network_player_connected_count", smlua_func_network_player_connected_count); - smlua_bind_function(L, "network_player_from_global_index", smlua_func_network_player_from_global_index); - smlua_bind_function(L, "network_player_get_override_palette_color_channel", smlua_func_network_player_get_override_palette_color_channel); - smlua_bind_function(L, "network_player_get_palette_color_channel", smlua_func_network_player_get_palette_color_channel); - smlua_bind_function(L, "network_player_is_override_palette_same", smlua_func_network_player_is_override_palette_same); - smlua_bind_function(L, "network_player_reset_override_palette", smlua_func_network_player_reset_override_palette); smlua_bind_function(L, "network_player_set_description", smlua_func_network_player_set_description); smlua_bind_function(L, "network_player_set_override_location", smlua_func_network_player_set_override_location); + smlua_bind_function(L, "network_player_from_global_index", smlua_func_network_player_from_global_index); + smlua_bind_function(L, "get_network_player_from_level", smlua_func_get_network_player_from_level); + smlua_bind_function(L, "get_network_player_from_area", smlua_func_get_network_player_from_area); + smlua_bind_function(L, "get_network_player_smallest_global", smlua_func_get_network_player_smallest_global); + smlua_bind_function(L, "network_player_get_palette_color_channel", smlua_func_network_player_get_palette_color_channel); + smlua_bind_function(L, "network_player_get_override_palette_color_channel", smlua_func_network_player_get_override_palette_color_channel); smlua_bind_function(L, "network_player_set_override_palette_color", smlua_func_network_player_set_override_palette_color); + smlua_bind_function(L, "network_player_reset_override_palette", smlua_func_network_player_reset_override_palette); + smlua_bind_function(L, "network_player_is_override_palette_same", smlua_func_network_player_is_override_palette_same); // network_utils.h + smlua_bind_function(L, "network_global_index_from_local", smlua_func_network_global_index_from_local); + smlua_bind_function(L, "network_local_index_from_global", smlua_func_network_local_index_from_global); + smlua_bind_function(L, "network_is_server", smlua_func_network_is_server); + smlua_bind_function(L, "network_is_moderator", smlua_func_network_is_moderator); + smlua_bind_function(L, "network_get_player_text_color_string", smlua_func_network_get_player_text_color_string); smlua_bind_function(L, "network_check_singleplayer_pause", smlua_func_network_check_singleplayer_pause); smlua_bind_function(L, "network_discord_id_from_local_index", smlua_func_network_discord_id_from_local_index); - smlua_bind_function(L, "network_get_player_text_color_string", smlua_func_network_get_player_text_color_string); - smlua_bind_function(L, "network_global_index_from_local", smlua_func_network_global_index_from_local); - smlua_bind_function(L, "network_is_moderator", smlua_func_network_is_moderator); - smlua_bind_function(L, "network_is_server", smlua_func_network_is_server); - smlua_bind_function(L, "network_local_index_from_global", smlua_func_network_local_index_from_global); // 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, "turn_obj_away_from_surface", smlua_func_turn_obj_away_from_surface); + 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); + smlua_bind_function(L, "obj_orient_graph", smlua_func_obj_orient_graph); + smlua_bind_function(L, "calc_obj_friction", smlua_func_calc_obj_friction); smlua_bind_function(L, "calc_new_obj_vel_and_pos_y", smlua_func_calc_new_obj_vel_and_pos_y); smlua_bind_function(L, "calc_new_obj_vel_and_pos_y_underwater", smlua_func_calc_new_obj_vel_and_pos_y_underwater); - smlua_bind_function(L, "calc_obj_friction", smlua_func_calc_obj_friction); - smlua_bind_function(L, "current_mario_room_check", smlua_func_current_mario_room_check); - //smlua_bind_function(L, "geo_obj_transparency_something", smlua_func_geo_obj_transparency_something); <--- UNIMPLEMENTED - smlua_bind_function(L, "is_nearest_mario_state_to_object", smlua_func_is_nearest_mario_state_to_object); - smlua_bind_function(L, "is_nearest_player_to_object", smlua_func_is_nearest_player_to_object); - smlua_bind_function(L, "is_other_player_active", smlua_func_is_other_player_active); - smlua_bind_function(L, "is_player_active", smlua_func_is_player_active); - smlua_bind_function(L, "is_player_in_local_area", smlua_func_is_player_in_local_area); - smlua_bind_function(L, "is_point_close_to_object", smlua_func_is_point_close_to_object); - smlua_bind_function(L, "is_point_within_radius_of_any_player", smlua_func_is_point_within_radius_of_any_player); - smlua_bind_function(L, "is_point_within_radius_of_mario", smlua_func_is_point_within_radius_of_mario); - smlua_bind_function(L, "nearest_interacting_mario_state_to_object", smlua_func_nearest_interacting_mario_state_to_object); - smlua_bind_function(L, "nearest_interacting_player_to_object", smlua_func_nearest_interacting_player_to_object); - smlua_bind_function(L, "nearest_mario_state_to_object", smlua_func_nearest_mario_state_to_object); - smlua_bind_function(L, "nearest_player_to_object", smlua_func_nearest_player_to_object); - smlua_bind_function(L, "nearest_possible_mario_state_to_object", smlua_func_nearest_possible_mario_state_to_object); - smlua_bind_function(L, "obj_check_floor_death", smlua_func_obj_check_floor_death); - smlua_bind_function(L, "obj_check_if_facing_toward_angle", smlua_func_obj_check_if_facing_toward_angle); - smlua_bind_function(L, "obj_find_wall", smlua_func_obj_find_wall); - smlua_bind_function(L, "obj_find_wall_displacement", smlua_func_obj_find_wall_displacement); - smlua_bind_function(L, "obj_flicker_and_disappear", smlua_func_obj_flicker_and_disappear); - smlua_bind_function(L, "obj_lava_death", smlua_func_obj_lava_death); - smlua_bind_function(L, "obj_move_xyz_using_fvel_and_yaw", smlua_func_obj_move_xyz_using_fvel_and_yaw); - smlua_bind_function(L, "obj_orient_graph", smlua_func_obj_orient_graph); - smlua_bind_function(L, "obj_return_and_displace_home", smlua_func_obj_return_and_displace_home); - smlua_bind_function(L, "obj_return_home_if_safe", smlua_func_obj_return_home_if_safe); - smlua_bind_function(L, "obj_spawn_yellow_coins", smlua_func_obj_spawn_yellow_coins); - smlua_bind_function(L, "obj_splash", smlua_func_obj_splash); smlua_bind_function(L, "obj_update_pos_vel_xz", smlua_func_obj_update_pos_vel_xz); + smlua_bind_function(L, "obj_splash", smlua_func_obj_splash); smlua_bind_function(L, "object_step", smlua_func_object_step); smlua_bind_function(L, "object_step_without_floor_orient", smlua_func_object_step_without_floor_orient); + smlua_bind_function(L, "obj_move_xyz_using_fvel_and_yaw", smlua_func_obj_move_xyz_using_fvel_and_yaw); + smlua_bind_function(L, "is_point_within_radius_of_mario", smlua_func_is_point_within_radius_of_mario); + smlua_bind_function(L, "is_point_within_radius_of_any_player", smlua_func_is_point_within_radius_of_any_player); + smlua_bind_function(L, "is_player_active", smlua_func_is_player_active); + smlua_bind_function(L, "is_other_player_active", smlua_func_is_other_player_active); + smlua_bind_function(L, "is_player_in_local_area", smlua_func_is_player_in_local_area); + smlua_bind_function(L, "nearest_mario_state_to_object", smlua_func_nearest_mario_state_to_object); + smlua_bind_function(L, "nearest_possible_mario_state_to_object", smlua_func_nearest_possible_mario_state_to_object); + smlua_bind_function(L, "nearest_player_to_object", smlua_func_nearest_player_to_object); + smlua_bind_function(L, "nearest_interacting_mario_state_to_object", smlua_func_nearest_interacting_mario_state_to_object); + smlua_bind_function(L, "nearest_interacting_player_to_object", smlua_func_nearest_interacting_player_to_object); + smlua_bind_function(L, "is_nearest_mario_state_to_object", smlua_func_is_nearest_mario_state_to_object); + smlua_bind_function(L, "is_nearest_player_to_object", smlua_func_is_nearest_player_to_object); + smlua_bind_function(L, "is_point_close_to_object", smlua_func_is_point_close_to_object); smlua_bind_function(L, "set_object_visibility", smlua_func_set_object_visibility); - smlua_bind_function(L, "set_yoshi_as_not_dead", smlua_func_set_yoshi_as_not_dead); + smlua_bind_function(L, "obj_return_home_if_safe", smlua_func_obj_return_home_if_safe); + smlua_bind_function(L, "obj_return_and_displace_home", smlua_func_obj_return_and_displace_home); + smlua_bind_function(L, "obj_check_if_facing_toward_angle", smlua_func_obj_check_if_facing_toward_angle); + smlua_bind_function(L, "obj_find_wall_displacement", smlua_func_obj_find_wall_displacement); + smlua_bind_function(L, "obj_spawn_yellow_coins", smlua_func_obj_spawn_yellow_coins); + smlua_bind_function(L, "obj_flicker_and_disappear", smlua_func_obj_flicker_and_disappear); + smlua_bind_function(L, "current_mario_room_check", smlua_func_current_mario_room_check); + smlua_bind_function(L, "obj_check_floor_death", smlua_func_obj_check_floor_death); + smlua_bind_function(L, "obj_lava_death", smlua_func_obj_lava_death); smlua_bind_function(L, "spawn_orange_number", smlua_func_spawn_orange_number); - smlua_bind_function(L, "turn_obj_away_from_steep_floor", smlua_func_turn_obj_away_from_steep_floor); - smlua_bind_function(L, "turn_obj_away_from_surface", smlua_func_turn_obj_away_from_surface); // obj_behaviors_2.c - smlua_bind_function(L, "approach_f32_ptr", smlua_func_approach_f32_ptr); + smlua_bind_function(L, "obj_is_rendering_enabled", smlua_func_obj_is_rendering_enabled); + smlua_bind_function(L, "obj_get_pitch_from_vel", smlua_func_obj_get_pitch_from_vel); + smlua_bind_function(L, "obj_set_dist_from_home", smlua_func_obj_set_dist_from_home); + smlua_bind_function(L, "obj_is_near_to_and_facing_mario", smlua_func_obj_is_near_to_and_facing_mario); + smlua_bind_function(L, "platform_on_track_update_pos_or_spawn_ball", smlua_func_platform_on_track_update_pos_or_spawn_ball); + smlua_bind_function(L, "cur_obj_spin_all_dimensions", smlua_func_cur_obj_spin_all_dimensions); + smlua_bind_function(L, "obj_rotate_yaw_and_bounce_off_walls", smlua_func_obj_rotate_yaw_and_bounce_off_walls); + smlua_bind_function(L, "obj_get_pitch_to_home", smlua_func_obj_get_pitch_to_home); + smlua_bind_function(L, "obj_compute_vel_from_move_pitch", smlua_func_obj_compute_vel_from_move_pitch); + smlua_bind_function(L, "cur_obj_init_anim_extend", smlua_func_cur_obj_init_anim_extend); smlua_bind_function(L, "cur_obj_init_anim_and_check_if_end", smlua_func_cur_obj_init_anim_and_check_if_end); smlua_bind_function(L, "cur_obj_init_anim_check_frame", smlua_func_cur_obj_init_anim_check_frame); - smlua_bind_function(L, "cur_obj_init_anim_extend", smlua_func_cur_obj_init_anim_extend); - smlua_bind_function(L, "cur_obj_play_sound_at_anim_range", smlua_func_cur_obj_play_sound_at_anim_range); smlua_bind_function(L, "cur_obj_set_anim_if_at_end", smlua_func_cur_obj_set_anim_if_at_end); - smlua_bind_function(L, "cur_obj_spin_all_dimensions", smlua_func_cur_obj_spin_all_dimensions); - smlua_bind_function(L, "obj_act_knockback", smlua_func_obj_act_knockback); - smlua_bind_function(L, "obj_act_squished", smlua_func_obj_act_squished); - smlua_bind_function(L, "obj_bounce_off_walls_edges_objects", smlua_func_obj_bounce_off_walls_edges_objects); - smlua_bind_function(L, "obj_check_attacks", smlua_func_obj_check_attacks); - smlua_bind_function(L, "obj_compute_vel_from_move_pitch", smlua_func_obj_compute_vel_from_move_pitch); - smlua_bind_function(L, "obj_die_if_above_lava_and_health_non_positive", smlua_func_obj_die_if_above_lava_and_health_non_positive); - smlua_bind_function(L, "obj_die_if_health_non_positive", smlua_func_obj_die_if_health_non_positive); - smlua_bind_function(L, "obj_face_pitch_approach", smlua_func_obj_face_pitch_approach); - smlua_bind_function(L, "obj_face_roll_approach", smlua_func_obj_face_roll_approach); - smlua_bind_function(L, "obj_face_yaw_approach", smlua_func_obj_face_yaw_approach); - smlua_bind_function(L, "obj_forward_vel_approach", smlua_func_obj_forward_vel_approach); - smlua_bind_function(L, "obj_get_pitch_from_vel", smlua_func_obj_get_pitch_from_vel); - smlua_bind_function(L, "obj_get_pitch_to_home", smlua_func_obj_get_pitch_to_home); - smlua_bind_function(L, "obj_grow_then_shrink", smlua_func_obj_grow_then_shrink); - smlua_bind_function(L, "obj_handle_attacks", smlua_func_obj_handle_attacks); - smlua_bind_function(L, "obj_is_near_to_and_facing_mario", smlua_func_obj_is_near_to_and_facing_mario); - smlua_bind_function(L, "obj_is_rendering_enabled", smlua_func_obj_is_rendering_enabled); - smlua_bind_function(L, "obj_move_for_one_second", smlua_func_obj_move_for_one_second); - smlua_bind_function(L, "obj_move_pitch_approach", smlua_func_obj_move_pitch_approach); - smlua_bind_function(L, "obj_random_fixed_turn", smlua_func_obj_random_fixed_turn); - smlua_bind_function(L, "obj_resolve_collisions_and_turn", smlua_func_obj_resolve_collisions_and_turn); - smlua_bind_function(L, "obj_resolve_object_collisions", smlua_func_obj_resolve_object_collisions); - smlua_bind_function(L, "obj_roll_to_match_yaw_turn", smlua_func_obj_roll_to_match_yaw_turn); - smlua_bind_function(L, "obj_rotate_yaw_and_bounce_off_walls", smlua_func_obj_rotate_yaw_and_bounce_off_walls); - smlua_bind_function(L, "obj_set_dist_from_home", smlua_func_obj_set_dist_from_home); - smlua_bind_function(L, "obj_set_knockback_action", smlua_func_obj_set_knockback_action); - smlua_bind_function(L, "obj_set_squished_action", smlua_func_obj_set_squished_action); - smlua_bind_function(L, "obj_smooth_turn", smlua_func_obj_smooth_turn); - smlua_bind_function(L, "obj_spit_fire", smlua_func_obj_spit_fire); + smlua_bind_function(L, "cur_obj_play_sound_at_anim_range", smlua_func_cur_obj_play_sound_at_anim_range); smlua_bind_function(L, "obj_turn_pitch_toward_mario", smlua_func_obj_turn_pitch_toward_mario); - smlua_bind_function(L, "obj_unused_die", smlua_func_obj_unused_die); - smlua_bind_function(L, "obj_update_blinking", smlua_func_obj_update_blinking); - smlua_bind_function(L, "obj_update_standard_actions", smlua_func_obj_update_standard_actions); + smlua_bind_function(L, "approach_f32_ptr", smlua_func_approach_f32_ptr); + smlua_bind_function(L, "obj_forward_vel_approach", smlua_func_obj_forward_vel_approach); smlua_bind_function(L, "obj_y_vel_approach", smlua_func_obj_y_vel_approach); - smlua_bind_function(L, "oscillate_toward", smlua_func_oscillate_toward); - smlua_bind_function(L, "platform_on_track_update_pos_or_spawn_ball", smlua_func_platform_on_track_update_pos_or_spawn_ball); + smlua_bind_function(L, "obj_move_pitch_approach", smlua_func_obj_move_pitch_approach); + smlua_bind_function(L, "obj_face_pitch_approach", smlua_func_obj_face_pitch_approach); + smlua_bind_function(L, "obj_face_yaw_approach", smlua_func_obj_face_yaw_approach); + smlua_bind_function(L, "obj_face_roll_approach", smlua_func_obj_face_roll_approach); + smlua_bind_function(L, "obj_smooth_turn", smlua_func_obj_smooth_turn); + smlua_bind_function(L, "obj_roll_to_match_yaw_turn", smlua_func_obj_roll_to_match_yaw_turn); smlua_bind_function(L, "random_linear_offset", smlua_func_random_linear_offset); smlua_bind_function(L, "random_mod_offset", smlua_func_random_mod_offset); + smlua_bind_function(L, "obj_random_fixed_turn", smlua_func_obj_random_fixed_turn); + smlua_bind_function(L, "obj_grow_then_shrink", smlua_func_obj_grow_then_shrink); + smlua_bind_function(L, "oscillate_toward", smlua_func_oscillate_toward); + smlua_bind_function(L, "obj_update_blinking", smlua_func_obj_update_blinking); + smlua_bind_function(L, "obj_resolve_object_collisions", smlua_func_obj_resolve_object_collisions); + smlua_bind_function(L, "obj_bounce_off_walls_edges_objects", smlua_func_obj_bounce_off_walls_edges_objects); + smlua_bind_function(L, "obj_resolve_collisions_and_turn", smlua_func_obj_resolve_collisions_and_turn); + smlua_bind_function(L, "obj_die_if_health_non_positive", smlua_func_obj_die_if_health_non_positive); + smlua_bind_function(L, "obj_unused_die", smlua_func_obj_unused_die); + smlua_bind_function(L, "obj_set_knockback_action", smlua_func_obj_set_knockback_action); + smlua_bind_function(L, "obj_set_squished_action", smlua_func_obj_set_squished_action); + smlua_bind_function(L, "obj_die_if_above_lava_and_health_non_positive", smlua_func_obj_die_if_above_lava_and_health_non_positive); + smlua_bind_function(L, "obj_handle_attacks", smlua_func_obj_handle_attacks); + smlua_bind_function(L, "obj_act_knockback", smlua_func_obj_act_knockback); + smlua_bind_function(L, "obj_act_squished", smlua_func_obj_act_squished); + smlua_bind_function(L, "obj_update_standard_actions", smlua_func_obj_update_standard_actions); + smlua_bind_function(L, "obj_check_attacks", smlua_func_obj_check_attacks); + smlua_bind_function(L, "obj_move_for_one_second", smlua_func_obj_move_for_one_second); smlua_bind_function(L, "treat_far_home_as_mario", smlua_func_treat_far_home_as_mario); + smlua_bind_function(L, "obj_spit_fire", smlua_func_obj_spit_fire); // object_helpers.c - smlua_bind_function(L, "abs_angle_diff", smlua_func_abs_angle_diff); - smlua_bind_function(L, "apply_drag_to_value", smlua_func_apply_drag_to_value); + 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); + smlua_bind_function(L, "obj_set_held_state", smlua_func_obj_set_held_state); + smlua_bind_function(L, "lateral_dist_between_objects", smlua_func_lateral_dist_between_objects); + smlua_bind_function(L, "dist_between_objects", smlua_func_dist_between_objects); + smlua_bind_function(L, "dist_between_object_and_point", smlua_func_dist_between_object_and_point); + smlua_bind_function(L, "cur_obj_forward_vel_approach_upward", smlua_func_cur_obj_forward_vel_approach_upward); smlua_bind_function(L, "approach_f32_signed", smlua_func_approach_f32_signed); smlua_bind_function(L, "approach_f32_symmetric", smlua_func_approach_f32_symmetric); smlua_bind_function(L, "approach_s16_symmetric", smlua_func_approach_s16_symmetric); - smlua_bind_function(L, "bhv_dust_smoke_loop", smlua_func_bhv_dust_smoke_loop); - smlua_bind_function(L, "bhv_init_room", smlua_func_bhv_init_room); - smlua_bind_function(L, "bit_shift_left", smlua_func_bit_shift_left); - smlua_bind_function(L, "chain_segment_init", smlua_func_chain_segment_init); - smlua_bind_function(L, "clear_move_flag", smlua_func_clear_move_flag); - smlua_bind_function(L, "clear_time_stop_flags", smlua_func_clear_time_stop_flags); - smlua_bind_function(L, "count_objects_with_behavior", smlua_func_count_objects_with_behavior); + smlua_bind_function(L, "cur_obj_rotate_yaw_toward", smlua_func_cur_obj_rotate_yaw_toward); + smlua_bind_function(L, "obj_angle_to_object", smlua_func_obj_angle_to_object); + smlua_bind_function(L, "obj_pitch_to_object", smlua_func_obj_pitch_to_object); + smlua_bind_function(L, "obj_angle_to_point", smlua_func_obj_angle_to_point); + smlua_bind_function(L, "obj_turn_toward_object", smlua_func_obj_turn_toward_object); + smlua_bind_function(L, "obj_set_parent_relative_pos", smlua_func_obj_set_parent_relative_pos); + smlua_bind_function(L, "obj_set_pos", smlua_func_obj_set_pos); + smlua_bind_function(L, "obj_set_angle", smlua_func_obj_set_angle); + smlua_bind_function(L, "obj_set_move_angle", smlua_func_obj_set_move_angle); + smlua_bind_function(L, "obj_set_face_angle", smlua_func_obj_set_face_angle); + smlua_bind_function(L, "obj_set_gfx_angle", smlua_func_obj_set_gfx_angle); + smlua_bind_function(L, "obj_set_gfx_pos", smlua_func_obj_set_gfx_pos); + smlua_bind_function(L, "obj_set_gfx_scale", smlua_func_obj_set_gfx_scale); + smlua_bind_function(L, "spawn_water_droplet", smlua_func_spawn_water_droplet); + smlua_bind_function(L, "obj_build_relative_transform", smlua_func_obj_build_relative_transform); + smlua_bind_function(L, "cur_obj_move_using_vel", smlua_func_cur_obj_move_using_vel); + smlua_bind_function(L, "obj_copy_graph_y_offset", smlua_func_obj_copy_graph_y_offset); + smlua_bind_function(L, "obj_copy_pos_and_angle", smlua_func_obj_copy_pos_and_angle); + smlua_bind_function(L, "obj_copy_pos", smlua_func_obj_copy_pos); + smlua_bind_function(L, "obj_copy_angle", smlua_func_obj_copy_angle); + smlua_bind_function(L, "obj_set_gfx_pos_from_pos", smlua_func_obj_set_gfx_pos_from_pos); + smlua_bind_function(L, "obj_init_animation", smlua_func_obj_init_animation); + smlua_bind_function(L, "linear_mtxf_mul_vec3f", smlua_func_linear_mtxf_mul_vec3f); + smlua_bind_function(L, "linear_mtxf_transpose_mul_vec3f", smlua_func_linear_mtxf_transpose_mul_vec3f); + smlua_bind_function(L, "obj_apply_scale_to_transform", smlua_func_obj_apply_scale_to_transform); + smlua_bind_function(L, "obj_copy_scale", smlua_func_obj_copy_scale); + smlua_bind_function(L, "obj_scale_xyz", smlua_func_obj_scale_xyz); + smlua_bind_function(L, "obj_scale", smlua_func_obj_scale); + smlua_bind_function(L, "cur_obj_scale", smlua_func_cur_obj_scale); + smlua_bind_function(L, "cur_obj_init_animation", smlua_func_cur_obj_init_animation); + smlua_bind_function(L, "cur_obj_init_animation_with_sound", smlua_func_cur_obj_init_animation_with_sound); + smlua_bind_function(L, "obj_init_animation_with_accel_and_sound", smlua_func_obj_init_animation_with_accel_and_sound); + smlua_bind_function(L, "cur_obj_init_animation_with_accel_and_sound", smlua_func_cur_obj_init_animation_with_accel_and_sound); + smlua_bind_function(L, "obj_init_animation_with_sound", smlua_func_obj_init_animation_with_sound); + smlua_bind_function(L, "cur_obj_enable_rendering_and_become_tangible", smlua_func_cur_obj_enable_rendering_and_become_tangible); + smlua_bind_function(L, "cur_obj_enable_rendering", smlua_func_cur_obj_enable_rendering); + smlua_bind_function(L, "cur_obj_disable_rendering_and_become_intangible", smlua_func_cur_obj_disable_rendering_and_become_intangible); + smlua_bind_function(L, "cur_obj_disable_rendering", smlua_func_cur_obj_disable_rendering); + smlua_bind_function(L, "cur_obj_unhide", smlua_func_cur_obj_unhide); + smlua_bind_function(L, "cur_obj_hide", smlua_func_cur_obj_hide); + smlua_bind_function(L, "cur_obj_set_pos_relative", smlua_func_cur_obj_set_pos_relative); + smlua_bind_function(L, "cur_obj_set_pos_relative_to_parent", smlua_func_cur_obj_set_pos_relative_to_parent); + smlua_bind_function(L, "cur_obj_enable_rendering_2", smlua_func_cur_obj_enable_rendering_2); + smlua_bind_function(L, "cur_obj_unused_init_on_floor", smlua_func_cur_obj_unused_init_on_floor); + smlua_bind_function(L, "obj_set_face_angle_to_move_angle", smlua_func_obj_set_face_angle_to_move_angle); + smlua_bind_function(L, "get_object_list_from_behavior", smlua_func_get_object_list_from_behavior); + smlua_bind_function(L, "cur_obj_nearest_object_with_behavior", smlua_func_cur_obj_nearest_object_with_behavior); + smlua_bind_function(L, "cur_obj_dist_to_nearest_object_with_behavior", smlua_func_cur_obj_dist_to_nearest_object_with_behavior); + smlua_bind_function(L, "cur_obj_find_nearest_pole", smlua_func_cur_obj_find_nearest_pole); + smlua_bind_function(L, "cur_obj_find_nearest_object_with_behavior", smlua_func_cur_obj_find_nearest_object_with_behavior); + smlua_bind_function(L, "cur_obj_count_objects_with_behavior", smlua_func_cur_obj_count_objects_with_behavior); + smlua_bind_function(L, "find_unimportant_object", smlua_func_find_unimportant_object); smlua_bind_function(L, "count_unimportant_objects", smlua_func_count_unimportant_objects); - smlua_bind_function(L, "create_transformation_from_matrices", smlua_func_create_transformation_from_matrices); - smlua_bind_function(L, "cur_obj_abs_y_dist_to_home", smlua_func_cur_obj_abs_y_dist_to_home); - smlua_bind_function(L, "cur_obj_advance_looping_anim", smlua_func_cur_obj_advance_looping_anim); - smlua_bind_function(L, "cur_obj_align_gfx_with_floor", smlua_func_cur_obj_align_gfx_with_floor); - smlua_bind_function(L, "cur_obj_angle_to_home", smlua_func_cur_obj_angle_to_home); - smlua_bind_function(L, "cur_obj_apply_drag_xz", smlua_func_cur_obj_apply_drag_xz); - smlua_bind_function(L, "cur_obj_become_intangible", smlua_func_cur_obj_become_intangible); - smlua_bind_function(L, "cur_obj_become_tangible", smlua_func_cur_obj_become_tangible); - smlua_bind_function(L, "cur_obj_can_mario_activate_textbox", smlua_func_cur_obj_can_mario_activate_textbox); - smlua_bind_function(L, "cur_obj_can_mario_activate_textbox_2", smlua_func_cur_obj_can_mario_activate_textbox_2); + smlua_bind_function(L, "count_objects_with_behavior", smlua_func_count_objects_with_behavior); + smlua_bind_function(L, "find_object_with_behavior", smlua_func_find_object_with_behavior); + smlua_bind_function(L, "cur_obj_find_nearby_held_actor", smlua_func_cur_obj_find_nearby_held_actor); + smlua_bind_function(L, "cur_obj_reset_timer_and_subaction", smlua_func_cur_obj_reset_timer_and_subaction); smlua_bind_function(L, "cur_obj_change_action", smlua_func_cur_obj_change_action); + smlua_bind_function(L, "cur_obj_set_vel_from_mario_vel", smlua_func_cur_obj_set_vel_from_mario_vel); + smlua_bind_function(L, "cur_obj_reverse_animation", smlua_func_cur_obj_reverse_animation); + smlua_bind_function(L, "cur_obj_extend_animation_if_at_end", smlua_func_cur_obj_extend_animation_if_at_end); + smlua_bind_function(L, "cur_obj_check_if_near_animation_end", smlua_func_cur_obj_check_if_near_animation_end); + smlua_bind_function(L, "cur_obj_check_if_at_animation_end", smlua_func_cur_obj_check_if_at_animation_end); smlua_bind_function(L, "cur_obj_check_anim_frame", smlua_func_cur_obj_check_anim_frame); smlua_bind_function(L, "cur_obj_check_anim_frame_in_range", smlua_func_cur_obj_check_anim_frame_in_range); smlua_bind_function(L, "cur_obj_check_frame_prior_current_frame", smlua_func_cur_obj_check_frame_prior_current_frame); - smlua_bind_function(L, "cur_obj_check_grabbed_mario", smlua_func_cur_obj_check_grabbed_mario); - smlua_bind_function(L, "cur_obj_check_if_at_animation_end", smlua_func_cur_obj_check_if_at_animation_end); - smlua_bind_function(L, "cur_obj_check_if_near_animation_end", smlua_func_cur_obj_check_if_near_animation_end); - smlua_bind_function(L, "cur_obj_check_interacted", smlua_func_cur_obj_check_interacted); - smlua_bind_function(L, "cur_obj_clear_interact_status_flag", smlua_func_cur_obj_clear_interact_status_flag); - smlua_bind_function(L, "cur_obj_compute_vel_xz", smlua_func_cur_obj_compute_vel_xz); - smlua_bind_function(L, "cur_obj_count_objects_with_behavior", smlua_func_cur_obj_count_objects_with_behavior); - smlua_bind_function(L, "cur_obj_detect_steep_floor", smlua_func_cur_obj_detect_steep_floor); - smlua_bind_function(L, "cur_obj_disable", smlua_func_cur_obj_disable); - smlua_bind_function(L, "cur_obj_disable_rendering", smlua_func_cur_obj_disable_rendering); - smlua_bind_function(L, "cur_obj_disable_rendering_and_become_intangible", smlua_func_cur_obj_disable_rendering_and_become_intangible); - smlua_bind_function(L, "cur_obj_dist_to_nearest_object_with_behavior", smlua_func_cur_obj_dist_to_nearest_object_with_behavior); - smlua_bind_function(L, "cur_obj_enable_rendering", smlua_func_cur_obj_enable_rendering); - smlua_bind_function(L, "cur_obj_enable_rendering_2", smlua_func_cur_obj_enable_rendering_2); - smlua_bind_function(L, "cur_obj_enable_rendering_and_become_tangible", smlua_func_cur_obj_enable_rendering_and_become_tangible); - smlua_bind_function(L, "cur_obj_enable_rendering_if_mario_in_room", smlua_func_cur_obj_enable_rendering_if_mario_in_room); - smlua_bind_function(L, "cur_obj_end_dialog", smlua_func_cur_obj_end_dialog); - smlua_bind_function(L, "cur_obj_extend_animation_if_at_end", smlua_func_cur_obj_extend_animation_if_at_end); - smlua_bind_function(L, "cur_obj_find_nearby_held_actor", smlua_func_cur_obj_find_nearby_held_actor); - smlua_bind_function(L, "cur_obj_find_nearest_object_with_behavior", smlua_func_cur_obj_find_nearest_object_with_behavior); - smlua_bind_function(L, "cur_obj_find_nearest_pole", smlua_func_cur_obj_find_nearest_pole); - smlua_bind_function(L, "cur_obj_follow_path", smlua_func_cur_obj_follow_path); - smlua_bind_function(L, "cur_obj_forward_vel_approach_upward", smlua_func_cur_obj_forward_vel_approach_upward); - smlua_bind_function(L, "cur_obj_get_dropped", smlua_func_cur_obj_get_dropped); - smlua_bind_function(L, "cur_obj_get_thrown_or_placed", smlua_func_cur_obj_get_thrown_or_placed); - smlua_bind_function(L, "cur_obj_has_behavior", smlua_func_cur_obj_has_behavior); - smlua_bind_function(L, "cur_obj_has_model", smlua_func_cur_obj_has_model); - smlua_bind_function(L, "cur_obj_hide", smlua_func_cur_obj_hide); - 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, "cur_obj_if_hit_wall_bounce_away", smlua_func_cur_obj_if_hit_wall_bounce_away); - smlua_bind_function(L, "cur_obj_init_animation", smlua_func_cur_obj_init_animation); - smlua_bind_function(L, "cur_obj_init_animation_and_anim_frame", smlua_func_cur_obj_init_animation_and_anim_frame); - smlua_bind_function(L, "cur_obj_init_animation_and_check_if_near_end", smlua_func_cur_obj_init_animation_and_check_if_near_end); - smlua_bind_function(L, "cur_obj_init_animation_and_extend_if_at_end", smlua_func_cur_obj_init_animation_and_extend_if_at_end); - smlua_bind_function(L, "cur_obj_init_animation_with_accel_and_sound", smlua_func_cur_obj_init_animation_with_accel_and_sound); - smlua_bind_function(L, "cur_obj_init_animation_with_sound", smlua_func_cur_obj_init_animation_with_sound); - smlua_bind_function(L, "cur_obj_is_any_player_on_platform", smlua_func_cur_obj_is_any_player_on_platform); - smlua_bind_function(L, "cur_obj_is_mario_ground_pounding_platform", smlua_func_cur_obj_is_mario_ground_pounding_platform); - smlua_bind_function(L, "cur_obj_is_mario_on_platform", smlua_func_cur_obj_is_mario_on_platform); - smlua_bind_function(L, "cur_obj_lateral_dist_from_mario_to_home", smlua_func_cur_obj_lateral_dist_from_mario_to_home); - smlua_bind_function(L, "cur_obj_lateral_dist_from_obj_to_home", smlua_func_cur_obj_lateral_dist_from_obj_to_home); - smlua_bind_function(L, "cur_obj_lateral_dist_to_home", smlua_func_cur_obj_lateral_dist_to_home); - smlua_bind_function(L, "cur_obj_mario_far_away", smlua_func_cur_obj_mario_far_away); + smlua_bind_function(L, "mario_is_in_air_action", smlua_func_mario_is_in_air_action); + smlua_bind_function(L, "mario_is_dive_sliding", smlua_func_mario_is_dive_sliding); + smlua_bind_function(L, "cur_obj_set_y_vel_and_animation", smlua_func_cur_obj_set_y_vel_and_animation); + smlua_bind_function(L, "cur_obj_unrender_and_reset_state", smlua_func_cur_obj_unrender_and_reset_state); smlua_bind_function(L, "cur_obj_move_after_thrown_or_dropped", smlua_func_cur_obj_move_after_thrown_or_dropped); - smlua_bind_function(L, "cur_obj_move_standard", smlua_func_cur_obj_move_standard); - smlua_bind_function(L, "cur_obj_move_up_and_down", smlua_func_cur_obj_move_up_and_down); - smlua_bind_function(L, "cur_obj_move_update_ground_air_flags", smlua_func_cur_obj_move_update_ground_air_flags); - smlua_bind_function(L, "cur_obj_move_update_underwater_flags", smlua_func_cur_obj_move_update_underwater_flags); - smlua_bind_function(L, "cur_obj_move_using_fvel_and_gravity", smlua_func_cur_obj_move_using_fvel_and_gravity); - smlua_bind_function(L, "cur_obj_move_using_vel", smlua_func_cur_obj_move_using_vel); - smlua_bind_function(L, "cur_obj_move_using_vel_and_gravity", smlua_func_cur_obj_move_using_vel_and_gravity); + smlua_bind_function(L, "cur_obj_get_thrown_or_placed", smlua_func_cur_obj_get_thrown_or_placed); + smlua_bind_function(L, "cur_obj_get_dropped", smlua_func_cur_obj_get_dropped); + smlua_bind_function(L, "mario_set_flag", smlua_func_mario_set_flag); + smlua_bind_function(L, "cur_obj_clear_interact_status_flag", smlua_func_cur_obj_clear_interact_status_flag); + smlua_bind_function(L, "obj_mark_for_deletion", smlua_func_obj_mark_for_deletion); + smlua_bind_function(L, "cur_obj_disable", smlua_func_cur_obj_disable); + smlua_bind_function(L, "cur_obj_become_intangible", smlua_func_cur_obj_become_intangible); + smlua_bind_function(L, "cur_obj_become_tangible", smlua_func_cur_obj_become_tangible); + smlua_bind_function(L, "obj_become_tangible", smlua_func_obj_become_tangible); + smlua_bind_function(L, "cur_obj_update_floor_height", smlua_func_cur_obj_update_floor_height); + smlua_bind_function(L, "cur_obj_update_floor_height_and_get_floor", smlua_func_cur_obj_update_floor_height_and_get_floor); + smlua_bind_function(L, "apply_drag_to_value", smlua_func_apply_drag_to_value); + smlua_bind_function(L, "cur_obj_apply_drag_xz", smlua_func_cur_obj_apply_drag_xz); smlua_bind_function(L, "cur_obj_move_xz", smlua_func_cur_obj_move_xz); - smlua_bind_function(L, "cur_obj_move_xz_using_fvel_and_yaw", smlua_func_cur_obj_move_xz_using_fvel_and_yaw); - smlua_bind_function(L, "cur_obj_move_y", smlua_func_cur_obj_move_y); + smlua_bind_function(L, "cur_obj_move_update_underwater_flags", smlua_func_cur_obj_move_update_underwater_flags); + smlua_bind_function(L, "cur_obj_move_update_ground_air_flags", smlua_func_cur_obj_move_update_ground_air_flags); smlua_bind_function(L, "cur_obj_move_y_and_get_water_level", smlua_func_cur_obj_move_y_and_get_water_level); + smlua_bind_function(L, "cur_obj_move_y", smlua_func_cur_obj_move_y); + smlua_bind_function(L, "cur_obj_unused_resolve_wall_collisions", smlua_func_cur_obj_unused_resolve_wall_collisions); + smlua_bind_function(L, "abs_angle_diff", smlua_func_abs_angle_diff); + smlua_bind_function(L, "cur_obj_move_xz_using_fvel_and_yaw", smlua_func_cur_obj_move_xz_using_fvel_and_yaw); smlua_bind_function(L, "cur_obj_move_y_with_terminal_vel", smlua_func_cur_obj_move_y_with_terminal_vel); - smlua_bind_function(L, "cur_obj_nearest_object_with_behavior", smlua_func_cur_obj_nearest_object_with_behavior); - smlua_bind_function(L, "cur_obj_outside_home_rectangle", smlua_func_cur_obj_outside_home_rectangle); - smlua_bind_function(L, "cur_obj_outside_home_square", smlua_func_cur_obj_outside_home_square); - smlua_bind_function(L, "cur_obj_push_mario_away", smlua_func_cur_obj_push_mario_away); - smlua_bind_function(L, "cur_obj_push_mario_away_from_cylinder", smlua_func_cur_obj_push_mario_away_from_cylinder); - smlua_bind_function(L, "cur_obj_reflect_move_angle_off_wall", smlua_func_cur_obj_reflect_move_angle_off_wall); - smlua_bind_function(L, "cur_obj_reset_timer_and_subaction", smlua_func_cur_obj_reset_timer_and_subaction); - smlua_bind_function(L, "cur_obj_resolve_wall_collisions", smlua_func_cur_obj_resolve_wall_collisions); - smlua_bind_function(L, "cur_obj_reverse_animation", smlua_func_cur_obj_reverse_animation); - smlua_bind_function(L, "cur_obj_rotate_face_angle_using_vel", smlua_func_cur_obj_rotate_face_angle_using_vel); - smlua_bind_function(L, "cur_obj_rotate_move_angle_using_vel", smlua_func_cur_obj_rotate_move_angle_using_vel); - smlua_bind_function(L, "cur_obj_rotate_yaw_toward", smlua_func_cur_obj_rotate_yaw_toward); - smlua_bind_function(L, "cur_obj_scale", smlua_func_cur_obj_scale); - smlua_bind_function(L, "cur_obj_scale_over_time", smlua_func_cur_obj_scale_over_time); + smlua_bind_function(L, "cur_obj_compute_vel_xz", smlua_func_cur_obj_compute_vel_xz); + smlua_bind_function(L, "increment_velocity_toward_range", smlua_func_increment_velocity_toward_range); + smlua_bind_function(L, "obj_check_if_collided_with_object", smlua_func_obj_check_if_collided_with_object); smlua_bind_function(L, "cur_obj_set_behavior", smlua_func_cur_obj_set_behavior); - smlua_bind_function(L, "cur_obj_set_billboard_if_vanilla_cam", smlua_func_cur_obj_set_billboard_if_vanilla_cam); - smlua_bind_function(L, "cur_obj_set_face_angle_to_move_angle", smlua_func_cur_obj_set_face_angle_to_move_angle); - smlua_bind_function(L, "cur_obj_set_hitbox_and_die_if_attacked", smlua_func_cur_obj_set_hitbox_and_die_if_attacked); - smlua_bind_function(L, "cur_obj_set_hitbox_radius_and_height", smlua_func_cur_obj_set_hitbox_radius_and_height); - smlua_bind_function(L, "cur_obj_set_home_once", smlua_func_cur_obj_set_home_once); - smlua_bind_function(L, "cur_obj_set_hurtbox_radius_and_height", smlua_func_cur_obj_set_hurtbox_radius_and_height); - smlua_bind_function(L, "cur_obj_set_pos_relative", smlua_func_cur_obj_set_pos_relative); - smlua_bind_function(L, "cur_obj_set_pos_relative_to_parent", smlua_func_cur_obj_set_pos_relative_to_parent); + smlua_bind_function(L, "obj_set_behavior", smlua_func_obj_set_behavior); + smlua_bind_function(L, "cur_obj_has_behavior", smlua_func_cur_obj_has_behavior); + smlua_bind_function(L, "obj_has_behavior", smlua_func_obj_has_behavior); + smlua_bind_function(L, "cur_obj_lateral_dist_from_obj_to_home", smlua_func_cur_obj_lateral_dist_from_obj_to_home); + smlua_bind_function(L, "cur_obj_lateral_dist_from_mario_to_home", smlua_func_cur_obj_lateral_dist_from_mario_to_home); + smlua_bind_function(L, "cur_obj_lateral_dist_to_home", smlua_func_cur_obj_lateral_dist_to_home); + smlua_bind_function(L, "cur_obj_outside_home_square", smlua_func_cur_obj_outside_home_square); + smlua_bind_function(L, "cur_obj_outside_home_rectangle", smlua_func_cur_obj_outside_home_rectangle); smlua_bind_function(L, "cur_obj_set_pos_to_home", smlua_func_cur_obj_set_pos_to_home); smlua_bind_function(L, "cur_obj_set_pos_to_home_and_stop", smlua_func_cur_obj_set_pos_to_home_and_stop); - smlua_bind_function(L, "cur_obj_set_pos_to_home_with_debug", smlua_func_cur_obj_set_pos_to_home_with_debug); - smlua_bind_function(L, "cur_obj_set_pos_via_transform", smlua_func_cur_obj_set_pos_via_transform); - smlua_bind_function(L, "cur_obj_set_vel_from_mario_vel", smlua_func_cur_obj_set_vel_from_mario_vel); - smlua_bind_function(L, "cur_obj_set_y_vel_and_animation", smlua_func_cur_obj_set_y_vel_and_animation); - smlua_bind_function(L, "cur_obj_shake_screen", smlua_func_cur_obj_shake_screen); smlua_bind_function(L, "cur_obj_shake_y", smlua_func_cur_obj_shake_y); - smlua_bind_function(L, "cur_obj_shake_y_until", smlua_func_cur_obj_shake_y_until); - smlua_bind_function(L, "cur_obj_spawn_loot_blue_coin", smlua_func_cur_obj_spawn_loot_blue_coin); - smlua_bind_function(L, "cur_obj_spawn_loot_coin_at_mario_pos", smlua_func_cur_obj_spawn_loot_coin_at_mario_pos); - smlua_bind_function(L, "cur_obj_spawn_particles", smlua_func_cur_obj_spawn_particles); -#ifndef VERSION_JP - smlua_bind_function(L, "cur_obj_spawn_star_at_y_offset", smlua_func_cur_obj_spawn_star_at_y_offset); -#endif smlua_bind_function(L, "cur_obj_start_cam_event", smlua_func_cur_obj_start_cam_event); - smlua_bind_function(L, "cur_obj_unhide", smlua_func_cur_obj_unhide); - smlua_bind_function(L, "cur_obj_unrender_and_reset_state", smlua_func_cur_obj_unrender_and_reset_state); - smlua_bind_function(L, "cur_obj_unused_init_on_floor", smlua_func_cur_obj_unused_init_on_floor); - smlua_bind_function(L, "cur_obj_unused_play_footstep_sound", smlua_func_cur_obj_unused_play_footstep_sound); - smlua_bind_function(L, "cur_obj_unused_resolve_wall_collisions", smlua_func_cur_obj_unused_resolve_wall_collisions); + smlua_bind_function(L, "set_mario_interact_hoot_if_in_range", smlua_func_set_mario_interact_hoot_if_in_range); + smlua_bind_function(L, "obj_set_billboard", smlua_func_obj_set_billboard); + smlua_bind_function(L, "obj_set_cylboard", smlua_func_obj_set_cylboard); + smlua_bind_function(L, "cur_obj_set_billboard_if_vanilla_cam", smlua_func_cur_obj_set_billboard_if_vanilla_cam); + smlua_bind_function(L, "obj_set_hitbox_radius_and_height", smlua_func_obj_set_hitbox_radius_and_height); + smlua_bind_function(L, "obj_set_hurtbox_radius_and_height", smlua_func_obj_set_hurtbox_radius_and_height); + smlua_bind_function(L, "cur_obj_set_hitbox_radius_and_height", smlua_func_cur_obj_set_hitbox_radius_and_height); + smlua_bind_function(L, "cur_obj_set_hurtbox_radius_and_height", smlua_func_cur_obj_set_hurtbox_radius_and_height); + smlua_bind_function(L, "obj_spawn_loot_coins", smlua_func_obj_spawn_loot_coins); + smlua_bind_function(L, "obj_spawn_loot_blue_coins", smlua_func_obj_spawn_loot_blue_coins); + smlua_bind_function(L, "obj_spawn_loot_yellow_coins", smlua_func_obj_spawn_loot_yellow_coins); + smlua_bind_function(L, "cur_obj_spawn_loot_coin_at_mario_pos", smlua_func_cur_obj_spawn_loot_coin_at_mario_pos); + smlua_bind_function(L, "cur_obj_abs_y_dist_to_home", smlua_func_cur_obj_abs_y_dist_to_home); + smlua_bind_function(L, "cur_obj_advance_looping_anim", smlua_func_cur_obj_advance_looping_anim); + smlua_bind_function(L, "cur_obj_detect_steep_floor", smlua_func_cur_obj_detect_steep_floor); + smlua_bind_function(L, "cur_obj_resolve_wall_collisions", smlua_func_cur_obj_resolve_wall_collisions); smlua_bind_function(L, "cur_obj_update_floor", smlua_func_cur_obj_update_floor); smlua_bind_function(L, "cur_obj_update_floor_and_resolve_wall_collisions", smlua_func_cur_obj_update_floor_and_resolve_wall_collisions); smlua_bind_function(L, "cur_obj_update_floor_and_walls", smlua_func_cur_obj_update_floor_and_walls); - smlua_bind_function(L, "cur_obj_update_floor_height", smlua_func_cur_obj_update_floor_height); - smlua_bind_function(L, "cur_obj_update_floor_height_and_get_floor", smlua_func_cur_obj_update_floor_height_and_get_floor); - smlua_bind_function(L, "cur_obj_wait_then_blink", smlua_func_cur_obj_wait_then_blink); - smlua_bind_function(L, "cur_obj_was_attacked_or_ground_pounded", smlua_func_cur_obj_was_attacked_or_ground_pounded); + smlua_bind_function(L, "cur_obj_move_standard", smlua_func_cur_obj_move_standard); smlua_bind_function(L, "cur_obj_within_12k_bounds", smlua_func_cur_obj_within_12k_bounds); - smlua_bind_function(L, "disable_time_stop", smlua_func_disable_time_stop); - smlua_bind_function(L, "disable_time_stop_including_mario", smlua_func_disable_time_stop_including_mario); - smlua_bind_function(L, "dist_between_object_and_point", smlua_func_dist_between_object_and_point); - smlua_bind_function(L, "dist_between_objects", smlua_func_dist_between_objects); - 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); - smlua_bind_function(L, "enable_time_stop_including_mario", smlua_func_enable_time_stop_including_mario); - smlua_bind_function(L, "find_object_with_behavior", smlua_func_find_object_with_behavior); - smlua_bind_function(L, "find_unimportant_object", smlua_func_find_unimportant_object); - //smlua_bind_function(L, "geo_choose_area_ext", smlua_func_geo_choose_area_ext); <--- UNIMPLEMENTED - //smlua_bind_function(L, "geo_offset_klepto_debug", smlua_func_geo_offset_klepto_debug); <--- UNIMPLEMENTED - //smlua_bind_function(L, "geo_offset_klepto_held_object", smlua_func_geo_offset_klepto_held_object); <--- UNIMPLEMENTED - //smlua_bind_function(L, "geo_switch_anim_state", smlua_func_geo_switch_anim_state); <--- UNIMPLEMENTED - //smlua_bind_function(L, "geo_switch_area", smlua_func_geo_switch_area); <--- UNIMPLEMENTED - //smlua_bind_function(L, "geo_update_layer_transparency", smlua_func_geo_update_layer_transparency); <--- UNIMPLEMENTED - //smlua_bind_function(L, "geo_update_projectile_pos_from_parent", smlua_func_geo_update_projectile_pos_from_parent); <--- UNIMPLEMENTED - smlua_bind_function(L, "get_object_list_from_behavior", smlua_func_get_object_list_from_behavior); - smlua_bind_function(L, "get_trajectory_length", smlua_func_get_trajectory_length); - smlua_bind_function(L, "increment_velocity_toward_range", smlua_func_increment_velocity_toward_range); - smlua_bind_function(L, "is_item_in_array", smlua_func_is_item_in_array); - smlua_bind_function(L, "is_mario_moving_fast_or_in_air", smlua_func_is_mario_moving_fast_or_in_air); - smlua_bind_function(L, "lateral_dist_between_objects", smlua_func_lateral_dist_between_objects); - smlua_bind_function(L, "linear_mtxf_mul_vec3f", smlua_func_linear_mtxf_mul_vec3f); - smlua_bind_function(L, "linear_mtxf_transpose_mul_vec3f", smlua_func_linear_mtxf_transpose_mul_vec3f); - smlua_bind_function(L, "mario_is_dive_sliding", smlua_func_mario_is_dive_sliding); - smlua_bind_function(L, "mario_is_in_air_action", smlua_func_mario_is_in_air_action); - smlua_bind_function(L, "mario_is_within_rectangle", smlua_func_mario_is_within_rectangle); - smlua_bind_function(L, "mario_set_flag", smlua_func_mario_set_flag); - smlua_bind_function(L, "obj_angle_to_object", smlua_func_obj_angle_to_object); - smlua_bind_function(L, "obj_angle_to_point", smlua_func_obj_angle_to_point); - smlua_bind_function(L, "obj_apply_scale_to_matrix", smlua_func_obj_apply_scale_to_matrix); - smlua_bind_function(L, "obj_apply_scale_to_transform", smlua_func_obj_apply_scale_to_transform); - smlua_bind_function(L, "obj_attack_collided_from_other_object", smlua_func_obj_attack_collided_from_other_object); - smlua_bind_function(L, "obj_become_tangible", smlua_func_obj_become_tangible); - smlua_bind_function(L, "obj_build_relative_transform", smlua_func_obj_build_relative_transform); - smlua_bind_function(L, "obj_build_transform_from_pos_and_angle", smlua_func_obj_build_transform_from_pos_and_angle); - smlua_bind_function(L, "obj_build_transform_relative_to_parent", smlua_func_obj_build_transform_relative_to_parent); - smlua_bind_function(L, "obj_build_vel_from_transform", smlua_func_obj_build_vel_from_transform); - smlua_bind_function(L, "obj_check_if_collided_with_object", smlua_func_obj_check_if_collided_with_object); - smlua_bind_function(L, "obj_copy_angle", smlua_func_obj_copy_angle); - smlua_bind_function(L, "obj_copy_behavior_params", smlua_func_obj_copy_behavior_params); - smlua_bind_function(L, "obj_copy_graph_y_offset", smlua_func_obj_copy_graph_y_offset); - smlua_bind_function(L, "obj_copy_pos", smlua_func_obj_copy_pos); - smlua_bind_function(L, "obj_copy_pos_and_angle", smlua_func_obj_copy_pos_and_angle); - smlua_bind_function(L, "obj_copy_scale", smlua_func_obj_copy_scale); - smlua_bind_function(L, "obj_create_transform_from_self", smlua_func_obj_create_transform_from_self); - smlua_bind_function(L, "obj_explode_and_spawn_coins", smlua_func_obj_explode_and_spawn_coins); - smlua_bind_function(L, "obj_has_behavior", smlua_func_obj_has_behavior); - smlua_bind_function(L, "obj_init_animation", smlua_func_obj_init_animation); - smlua_bind_function(L, "obj_init_animation_with_accel_and_sound", smlua_func_obj_init_animation_with_accel_and_sound); - smlua_bind_function(L, "obj_init_animation_with_sound", smlua_func_obj_init_animation_with_sound); - smlua_bind_function(L, "obj_is_hidden", smlua_func_obj_is_hidden); - smlua_bind_function(L, "obj_mark_for_deletion", smlua_func_obj_mark_for_deletion); - smlua_bind_function(L, "obj_pitch_to_object", smlua_func_obj_pitch_to_object); - smlua_bind_function(L, "obj_scale", smlua_func_obj_scale); - smlua_bind_function(L, "obj_scale_random", smlua_func_obj_scale_random); - smlua_bind_function(L, "obj_scale_xyz", smlua_func_obj_scale_xyz); - smlua_bind_function(L, "obj_set_angle", smlua_func_obj_set_angle); - smlua_bind_function(L, "obj_set_behavior", smlua_func_obj_set_behavior); - smlua_bind_function(L, "obj_set_billboard", smlua_func_obj_set_billboard); - //smlua_bind_function(L, "obj_set_collision_data", smlua_func_obj_set_collision_data); <--- UNIMPLEMENTED - smlua_bind_function(L, "obj_set_cylboard", smlua_func_obj_set_cylboard); - smlua_bind_function(L, "obj_set_face_angle", smlua_func_obj_set_face_angle); - smlua_bind_function(L, "obj_set_face_angle_to_move_angle", smlua_func_obj_set_face_angle_to_move_angle); - smlua_bind_function(L, "obj_set_gfx_angle", smlua_func_obj_set_gfx_angle); - smlua_bind_function(L, "obj_set_gfx_pos", smlua_func_obj_set_gfx_pos); - smlua_bind_function(L, "obj_set_gfx_pos_at_obj_pos", smlua_func_obj_set_gfx_pos_at_obj_pos); - smlua_bind_function(L, "obj_set_gfx_pos_from_pos", smlua_func_obj_set_gfx_pos_from_pos); - smlua_bind_function(L, "obj_set_gfx_scale", smlua_func_obj_set_gfx_scale); - smlua_bind_function(L, "obj_set_held_state", smlua_func_obj_set_held_state); - smlua_bind_function(L, "obj_set_hitbox", smlua_func_obj_set_hitbox); - smlua_bind_function(L, "obj_set_hitbox_radius_and_height", smlua_func_obj_set_hitbox_radius_and_height); - smlua_bind_function(L, "obj_set_hurtbox_radius_and_height", smlua_func_obj_set_hurtbox_radius_and_height); - smlua_bind_function(L, "obj_set_move_angle", smlua_func_obj_set_move_angle); - smlua_bind_function(L, "obj_set_parent_relative_pos", smlua_func_obj_set_parent_relative_pos); - smlua_bind_function(L, "obj_set_pos", smlua_func_obj_set_pos); + smlua_bind_function(L, "cur_obj_move_using_vel_and_gravity", smlua_func_cur_obj_move_using_vel_and_gravity); + smlua_bind_function(L, "cur_obj_move_using_fvel_and_gravity", smlua_func_cur_obj_move_using_fvel_and_gravity); smlua_bind_function(L, "obj_set_pos_relative", smlua_func_obj_set_pos_relative); - smlua_bind_function(L, "obj_set_throw_matrix_from_transform", smlua_func_obj_set_throw_matrix_from_transform); - smlua_bind_function(L, "obj_spawn_loot_blue_coins", smlua_func_obj_spawn_loot_blue_coins); - smlua_bind_function(L, "obj_spawn_loot_coins", smlua_func_obj_spawn_loot_coins); - smlua_bind_function(L, "obj_spawn_loot_yellow_coins", smlua_func_obj_spawn_loot_yellow_coins); + smlua_bind_function(L, "cur_obj_angle_to_home", smlua_func_cur_obj_angle_to_home); + smlua_bind_function(L, "obj_set_gfx_pos_at_obj_pos", smlua_func_obj_set_gfx_pos_at_obj_pos); smlua_bind_function(L, "obj_translate_local", smlua_func_obj_translate_local); + smlua_bind_function(L, "obj_build_transform_from_pos_and_angle", smlua_func_obj_build_transform_from_pos_and_angle); + smlua_bind_function(L, "obj_set_throw_matrix_from_transform", smlua_func_obj_set_throw_matrix_from_transform); + smlua_bind_function(L, "obj_build_transform_relative_to_parent", smlua_func_obj_build_transform_relative_to_parent); + smlua_bind_function(L, "obj_create_transform_from_self", smlua_func_obj_create_transform_from_self); + smlua_bind_function(L, "cur_obj_rotate_move_angle_using_vel", smlua_func_cur_obj_rotate_move_angle_using_vel); + smlua_bind_function(L, "cur_obj_rotate_face_angle_using_vel", smlua_func_cur_obj_rotate_face_angle_using_vel); + smlua_bind_function(L, "cur_obj_set_face_angle_to_move_angle", smlua_func_cur_obj_set_face_angle_to_move_angle); + smlua_bind_function(L, "cur_obj_follow_path", smlua_func_cur_obj_follow_path); + smlua_bind_function(L, "chain_segment_init", smlua_func_chain_segment_init); + smlua_bind_function(L, "random_f32_around_zero", smlua_func_random_f32_around_zero); + smlua_bind_function(L, "obj_scale_random", smlua_func_obj_scale_random); smlua_bind_function(L, "obj_translate_xyz_random", smlua_func_obj_translate_xyz_random); smlua_bind_function(L, "obj_translate_xz_random", smlua_func_obj_translate_xz_random); - smlua_bind_function(L, "obj_turn_toward_object", smlua_func_obj_turn_toward_object); - smlua_bind_function(L, "obj_update_pos_from_parent_transformation", smlua_func_obj_update_pos_from_parent_transformation); - smlua_bind_function(L, "player_performed_grab_escape_action", smlua_func_player_performed_grab_escape_action); - smlua_bind_function(L, "random_f32_around_zero", smlua_func_random_f32_around_zero); - smlua_bind_function(L, "set_mario_interact_hoot_if_in_range", smlua_func_set_mario_interact_hoot_if_in_range); - smlua_bind_function(L, "set_room_override", smlua_func_set_room_override); - smlua_bind_function(L, "set_time_stop_flags", smlua_func_set_time_stop_flags); - smlua_bind_function(L, "set_time_stop_flags_if_alone", smlua_func_set_time_stop_flags_if_alone); + smlua_bind_function(L, "obj_build_vel_from_transform", smlua_func_obj_build_vel_from_transform); + smlua_bind_function(L, "cur_obj_set_pos_via_transform", smlua_func_cur_obj_set_pos_via_transform); + smlua_bind_function(L, "cur_obj_reflect_move_angle_off_wall", smlua_func_cur_obj_reflect_move_angle_off_wall); + smlua_bind_function(L, "cur_obj_spawn_particles", smlua_func_cur_obj_spawn_particles); + smlua_bind_function(L, "obj_set_hitbox", smlua_func_obj_set_hitbox); smlua_bind_function(L, "signum_positive", smlua_func_signum_positive); - smlua_bind_function(L, "spawn_base_star_with_no_lvl_exit", smlua_func_spawn_base_star_with_no_lvl_exit); + smlua_bind_function(L, "cur_obj_wait_then_blink", smlua_func_cur_obj_wait_then_blink); + smlua_bind_function(L, "cur_obj_is_mario_ground_pounding_platform", smlua_func_cur_obj_is_mario_ground_pounding_platform); smlua_bind_function(L, "spawn_mist_particles", smlua_func_spawn_mist_particles); smlua_bind_function(L, "spawn_mist_particles_with_sound", smlua_func_spawn_mist_particles_with_sound); - smlua_bind_function(L, "spawn_star_with_no_lvl_exit", smlua_func_spawn_star_with_no_lvl_exit); - smlua_bind_function(L, "spawn_water_droplet", smlua_func_spawn_water_droplet); + smlua_bind_function(L, "cur_obj_push_mario_away", smlua_func_cur_obj_push_mario_away); + smlua_bind_function(L, "cur_obj_push_mario_away_from_cylinder", smlua_func_cur_obj_push_mario_away_from_cylinder); + smlua_bind_function(L, "bhv_dust_smoke_loop", smlua_func_bhv_dust_smoke_loop); smlua_bind_function(L, "stub_obj_helpers_3", smlua_func_stub_obj_helpers_3); + smlua_bind_function(L, "cur_obj_scale_over_time", smlua_func_cur_obj_scale_over_time); + smlua_bind_function(L, "cur_obj_set_pos_to_home_with_debug", smlua_func_cur_obj_set_pos_to_home_with_debug); smlua_bind_function(L, "stub_obj_helpers_4", smlua_func_stub_obj_helpers_4); + smlua_bind_function(L, "cur_obj_is_mario_on_platform", smlua_func_cur_obj_is_mario_on_platform); + smlua_bind_function(L, "cur_obj_is_any_player_on_platform", smlua_func_cur_obj_is_any_player_on_platform); + smlua_bind_function(L, "cur_obj_shake_y_until", smlua_func_cur_obj_shake_y_until); + smlua_bind_function(L, "cur_obj_move_up_and_down", smlua_func_cur_obj_move_up_and_down); + smlua_bind_function(L, "spawn_star_with_no_lvl_exit", smlua_func_spawn_star_with_no_lvl_exit); + smlua_bind_function(L, "spawn_base_star_with_no_lvl_exit", smlua_func_spawn_base_star_with_no_lvl_exit); + smlua_bind_function(L, "bit_shift_left", smlua_func_bit_shift_left); + smlua_bind_function(L, "cur_obj_mario_far_away", smlua_func_cur_obj_mario_far_away); + smlua_bind_function(L, "is_mario_moving_fast_or_in_air", smlua_func_is_mario_moving_fast_or_in_air); + smlua_bind_function(L, "is_item_in_array", smlua_func_is_item_in_array); + smlua_bind_function(L, "bhv_init_room", smlua_func_bhv_init_room); + smlua_bind_function(L, "cur_obj_enable_rendering_if_mario_in_room", smlua_func_cur_obj_enable_rendering_if_mario_in_room); + smlua_bind_function(L, "cur_obj_set_hitbox_and_die_if_attacked", smlua_func_cur_obj_set_hitbox_and_die_if_attacked); + smlua_bind_function(L, "obj_explode_and_spawn_coins", smlua_func_obj_explode_and_spawn_coins); + //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); + smlua_bind_function(L, "disable_time_stop", smlua_func_disable_time_stop); + smlua_bind_function(L, "set_time_stop_flags", smlua_func_set_time_stop_flags); + smlua_bind_function(L, "set_time_stop_flags_if_alone", smlua_func_set_time_stop_flags_if_alone); + smlua_bind_function(L, "clear_time_stop_flags", smlua_func_clear_time_stop_flags); + smlua_bind_function(L, "cur_obj_can_mario_activate_textbox", smlua_func_cur_obj_can_mario_activate_textbox); + smlua_bind_function(L, "cur_obj_can_mario_activate_textbox_2", smlua_func_cur_obj_can_mario_activate_textbox_2); + smlua_bind_function(L, "cur_obj_end_dialog", smlua_func_cur_obj_end_dialog); + smlua_bind_function(L, "cur_obj_has_model", smlua_func_cur_obj_has_model); + smlua_bind_function(L, "cur_obj_align_gfx_with_floor", smlua_func_cur_obj_align_gfx_with_floor); + smlua_bind_function(L, "mario_is_within_rectangle", smlua_func_mario_is_within_rectangle); + smlua_bind_function(L, "cur_obj_shake_screen", smlua_func_cur_obj_shake_screen); + smlua_bind_function(L, "obj_attack_collided_from_other_object", smlua_func_obj_attack_collided_from_other_object); + smlua_bind_function(L, "cur_obj_was_attacked_or_ground_pounded", smlua_func_cur_obj_was_attacked_or_ground_pounded); + smlua_bind_function(L, "obj_copy_behavior_params", smlua_func_obj_copy_behavior_params); + smlua_bind_function(L, "cur_obj_init_animation_and_anim_frame", smlua_func_cur_obj_init_animation_and_anim_frame); + smlua_bind_function(L, "cur_obj_init_animation_and_check_if_near_end", smlua_func_cur_obj_init_animation_and_check_if_near_end); + smlua_bind_function(L, "cur_obj_init_animation_and_extend_if_at_end", smlua_func_cur_obj_init_animation_and_extend_if_at_end); + smlua_bind_function(L, "cur_obj_check_grabbed_mario", smlua_func_cur_obj_check_grabbed_mario); + smlua_bind_function(L, "player_performed_grab_escape_action", smlua_func_player_performed_grab_escape_action); + smlua_bind_function(L, "cur_obj_unused_play_footstep_sound", smlua_func_cur_obj_unused_play_footstep_sound); + smlua_bind_function(L, "enable_time_stop_including_mario", smlua_func_enable_time_stop_including_mario); + smlua_bind_function(L, "disable_time_stop_including_mario", smlua_func_disable_time_stop_including_mario); + smlua_bind_function(L, "cur_obj_check_interacted", smlua_func_cur_obj_check_interacted); + smlua_bind_function(L, "cur_obj_spawn_loot_blue_coin", smlua_func_cur_obj_spawn_loot_blue_coin); +#ifndef VERSION_JP + smlua_bind_function(L, "cur_obj_spawn_star_at_y_offset", smlua_func_cur_obj_spawn_star_at_y_offset); +#endif + smlua_bind_function(L, "cur_obj_set_home_once", smlua_func_cur_obj_set_home_once); + smlua_bind_function(L, "get_trajectory_length", smlua_func_get_trajectory_length); // object_list_processor.h smlua_bind_function(L, "set_object_respawn_info_bits", smlua_func_set_object_respawn_info_bits); // rumble_init.h smlua_bind_function(L, "queue_rumble_data", smlua_func_queue_rumble_data); - smlua_bind_function(L, "queue_rumble_data_mario", smlua_func_queue_rumble_data_mario); smlua_bind_function(L, "queue_rumble_data_object", smlua_func_queue_rumble_data_object); + smlua_bind_function(L, "queue_rumble_data_mario", smlua_func_queue_rumble_data_mario); smlua_bind_function(L, "reset_rumble_timers", smlua_func_reset_rumble_timers); smlua_bind_function(L, "reset_rumble_timers_2", smlua_func_reset_rumble_timers_2); // save_file.h - smlua_bind_function(L, "save_file_clear_flags", smlua_func_save_file_clear_flags); + smlua_bind_function(L, "touch_coin_score_age", smlua_func_touch_coin_score_age); smlua_bind_function(L, "save_file_do_save", smlua_func_save_file_do_save); smlua_bind_function(L, "save_file_erase", smlua_func_save_file_erase); smlua_bind_function(L, "save_file_erase_current_backup_save", smlua_func_save_file_erase_current_backup_save); - 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); - smlua_bind_function(L, "save_file_get_flags", smlua_func_save_file_get_flags); - smlua_bind_function(L, "save_file_get_max_coin_score", smlua_func_save_file_get_max_coin_score); - smlua_bind_function(L, "save_file_get_sound_mode", smlua_func_save_file_get_sound_mode); - smlua_bind_function(L, "save_file_get_star_flags", smlua_func_save_file_get_star_flags); - smlua_bind_function(L, "save_file_get_total_star_count", smlua_func_save_file_get_total_star_count); - smlua_bind_function(L, "save_file_is_cannon_unlocked", smlua_func_save_file_is_cannon_unlocked); smlua_bind_function(L, "save_file_reload", smlua_func_save_file_reload); - smlua_bind_function(L, "save_file_remove_star_flags", smlua_func_save_file_remove_star_flags); - smlua_bind_function(L, "save_file_set_course_coin_score", smlua_func_save_file_set_course_coin_score); + smlua_bind_function(L, "save_file_get_max_coin_score", smlua_func_save_file_get_max_coin_score); + smlua_bind_function(L, "save_file_get_course_star_count", smlua_func_save_file_get_course_star_count); + smlua_bind_function(L, "save_file_get_total_star_count", smlua_func_save_file_get_total_star_count); smlua_bind_function(L, "save_file_set_flags", smlua_func_save_file_set_flags); + smlua_bind_function(L, "save_file_clear_flags", smlua_func_save_file_clear_flags); + smlua_bind_function(L, "save_file_get_flags", smlua_func_save_file_get_flags); + smlua_bind_function(L, "save_file_get_star_flags", smlua_func_save_file_get_star_flags); smlua_bind_function(L, "save_file_set_star_flags", smlua_func_save_file_set_star_flags); - smlua_bind_function(L, "touch_coin_score_age", smlua_func_touch_coin_score_age); + smlua_bind_function(L, "save_file_remove_star_flags", smlua_func_save_file_remove_star_flags); + smlua_bind_function(L, "save_file_get_course_coin_score", smlua_func_save_file_get_course_coin_score); + smlua_bind_function(L, "save_file_set_course_coin_score", smlua_func_save_file_set_course_coin_score); + smlua_bind_function(L, "save_file_is_cannon_unlocked", smlua_func_save_file_is_cannon_unlocked); + smlua_bind_function(L, "save_file_get_cap_pos", smlua_func_save_file_get_cap_pos); + smlua_bind_function(L, "save_file_get_sound_mode", smlua_func_save_file_get_sound_mode); // seqplayer.h smlua_bind_function(L, "sequence_player_get_tempo", smlua_func_sequence_player_get_tempo); - smlua_bind_function(L, "sequence_player_get_tempo_acc", smlua_func_sequence_player_get_tempo_acc); - smlua_bind_function(L, "sequence_player_get_transposition", smlua_func_sequence_player_get_transposition); smlua_bind_function(L, "sequence_player_set_tempo", smlua_func_sequence_player_set_tempo); + smlua_bind_function(L, "sequence_player_get_tempo_acc", smlua_func_sequence_player_get_tempo_acc); smlua_bind_function(L, "sequence_player_set_tempo_acc", smlua_func_sequence_player_set_tempo_acc); + smlua_bind_function(L, "sequence_player_get_transposition", smlua_func_sequence_player_get_transposition); smlua_bind_function(L, "sequence_player_set_transposition", smlua_func_sequence_player_set_transposition); + smlua_bind_function(L, "sequence_player_get_volume", smlua_func_sequence_player_get_volume); + smlua_bind_function(L, "sequence_player_get_fade_volume", smlua_func_sequence_player_get_fade_volume); + smlua_bind_function(L, "sequence_player_get_mute_volume_scale", smlua_func_sequence_player_get_mute_volume_scale); // smlua_anim_utils.h smlua_bind_function(L, "get_mario_vanilla_animation", smlua_func_get_mario_vanilla_animation); - smlua_bind_function(L, "smlua_anim_util_get_current_animation_name", smlua_func_smlua_anim_util_get_current_animation_name); smlua_bind_function(L, "smlua_anim_util_set_animation", smlua_func_smlua_anim_util_set_animation); + smlua_bind_function(L, "smlua_anim_util_get_current_animation_name", smlua_func_smlua_anim_util_get_current_animation_name); // smlua_audio_utils.h - smlua_bind_function(L, "audio_sample_destroy", smlua_func_audio_sample_destroy); - smlua_bind_function(L, "audio_sample_load", smlua_func_audio_sample_load); - smlua_bind_function(L, "audio_sample_play", smlua_func_audio_sample_play); - smlua_bind_function(L, "audio_sample_stop", smlua_func_audio_sample_stop); - smlua_bind_function(L, "audio_stream_destroy", smlua_func_audio_stream_destroy); - smlua_bind_function(L, "audio_stream_get_frequency", smlua_func_audio_stream_get_frequency); - smlua_bind_function(L, "audio_stream_get_looping", smlua_func_audio_stream_get_looping); - smlua_bind_function(L, "audio_stream_get_position", smlua_func_audio_stream_get_position); - smlua_bind_function(L, "audio_stream_get_volume", smlua_func_audio_stream_get_volume); - smlua_bind_function(L, "audio_stream_load", smlua_func_audio_stream_load); - smlua_bind_function(L, "audio_stream_pause", smlua_func_audio_stream_pause); - smlua_bind_function(L, "audio_stream_play", smlua_func_audio_stream_play); - smlua_bind_function(L, "audio_stream_set_frequency", smlua_func_audio_stream_set_frequency); - smlua_bind_function(L, "audio_stream_set_loop_points", smlua_func_audio_stream_set_loop_points); - smlua_bind_function(L, "audio_stream_set_looping", smlua_func_audio_stream_set_looping); - smlua_bind_function(L, "audio_stream_set_position", smlua_func_audio_stream_set_position); - smlua_bind_function(L, "audio_stream_set_volume", smlua_func_audio_stream_set_volume); - smlua_bind_function(L, "audio_stream_stop", smlua_func_audio_stream_stop); - smlua_bind_function(L, "smlua_audio_utils_replace_sequence", smlua_func_smlua_audio_utils_replace_sequence); smlua_bind_function(L, "smlua_audio_utils_reset_all", smlua_func_smlua_audio_utils_reset_all); + smlua_bind_function(L, "smlua_audio_utils_replace_sequence", smlua_func_smlua_audio_utils_replace_sequence); + smlua_bind_function(L, "audio_stream_load", smlua_func_audio_stream_load); + smlua_bind_function(L, "audio_stream_destroy", smlua_func_audio_stream_destroy); + smlua_bind_function(L, "audio_stream_play", smlua_func_audio_stream_play); + smlua_bind_function(L, "audio_stream_pause", smlua_func_audio_stream_pause); + smlua_bind_function(L, "audio_stream_stop", smlua_func_audio_stream_stop); + smlua_bind_function(L, "audio_stream_get_position", smlua_func_audio_stream_get_position); + smlua_bind_function(L, "audio_stream_set_position", smlua_func_audio_stream_set_position); + smlua_bind_function(L, "audio_stream_get_looping", smlua_func_audio_stream_get_looping); + smlua_bind_function(L, "audio_stream_set_looping", smlua_func_audio_stream_set_looping); + smlua_bind_function(L, "audio_stream_set_loop_points", smlua_func_audio_stream_set_loop_points); + smlua_bind_function(L, "audio_stream_get_frequency", smlua_func_audio_stream_get_frequency); + smlua_bind_function(L, "audio_stream_set_frequency", smlua_func_audio_stream_set_frequency); + smlua_bind_function(L, "audio_stream_get_volume", smlua_func_audio_stream_get_volume); + smlua_bind_function(L, "audio_stream_set_volume", smlua_func_audio_stream_set_volume); + smlua_bind_function(L, "audio_sample_load", smlua_func_audio_sample_load); + smlua_bind_function(L, "audio_sample_destroy", smlua_func_audio_sample_destroy); + smlua_bind_function(L, "audio_sample_stop", smlua_func_audio_sample_stop); + smlua_bind_function(L, "audio_sample_play", smlua_func_audio_sample_play); // smlua_camera_utils.h + smlua_bind_function(L, "camera_reset_overrides", smlua_func_camera_reset_overrides); + smlua_bind_function(L, "camera_freeze", smlua_func_camera_freeze); + smlua_bind_function(L, "camera_unfreeze", smlua_func_camera_unfreeze); + smlua_bind_function(L, "camera_is_frozen", smlua_func_camera_is_frozen); + smlua_bind_function(L, "camera_romhack_allow_only_mods", smlua_func_camera_romhack_allow_only_mods); + smlua_bind_function(L, "camera_set_romhack_override", smlua_func_camera_set_romhack_override); + 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_config_enable_analog_cam", smlua_func_camera_config_enable_analog_cam); - smlua_bind_function(L, "camera_config_enable_centering", smlua_func_camera_config_enable_centering); - smlua_bind_function(L, "camera_config_enable_collisions", smlua_func_camera_config_enable_collisions); - smlua_bind_function(L, "camera_config_enable_dpad", smlua_func_camera_config_enable_dpad); - smlua_bind_function(L, "camera_config_enable_free_cam", smlua_func_camera_config_enable_free_cam); - smlua_bind_function(L, "camera_config_enable_mouse_look", smlua_func_camera_config_enable_mouse_look); - smlua_bind_function(L, "camera_config_get_aggression", smlua_func_camera_config_get_aggression); - smlua_bind_function(L, "camera_config_get_centering", smlua_func_camera_config_get_centering); - smlua_bind_function(L, "camera_config_get_deceleration", smlua_func_camera_config_get_deceleration); - smlua_bind_function(L, "camera_config_get_pan_level", smlua_func_camera_config_get_pan_level); - smlua_bind_function(L, "camera_config_get_x_sensitivity", smlua_func_camera_config_get_x_sensitivity); - smlua_bind_function(L, "camera_config_get_y_sensitivity", smlua_func_camera_config_get_y_sensitivity); - smlua_bind_function(L, "camera_config_invert_x", smlua_func_camera_config_invert_x); - smlua_bind_function(L, "camera_config_invert_y", smlua_func_camera_config_invert_y); - smlua_bind_function(L, "camera_config_is_analog_cam_enabled", smlua_func_camera_config_is_analog_cam_enabled); - smlua_bind_function(L, "camera_config_is_collision_enabled", smlua_func_camera_config_is_collision_enabled); - smlua_bind_function(L, "camera_config_is_dpad_enabled", smlua_func_camera_config_is_dpad_enabled); + 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_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); + smlua_bind_function(L, "camera_romhack_set_zoomed_out_height", smlua_func_camera_romhack_set_zoomed_out_height); + smlua_bind_function(L, "camera_romhack_get_zoomed_in_dist", smlua_func_camera_romhack_get_zoomed_in_dist); + smlua_bind_function(L, "camera_romhack_get_zoomed_out_dist", smlua_func_camera_romhack_get_zoomed_out_dist); + smlua_bind_function(L, "camera_romhack_get_zoomed_in_height", smlua_func_camera_romhack_get_zoomed_in_height); + smlua_bind_function(L, "camera_romhack_get_zoomed_out_height", smlua_func_camera_romhack_get_zoomed_out_height); + smlua_bind_function(L, "camera_get_romhack_override", smlua_func_camera_get_romhack_override); + smlua_bind_function(L, "camera_romhack_get_allow_centering", smlua_func_camera_romhack_get_allow_centering); + smlua_bind_function(L, "camera_get_allow_toxic_gas_camera", smlua_func_camera_get_allow_toxic_gas_camera); + smlua_bind_function(L, "camera_romhack_get_allow_dpad_usage", smlua_func_camera_romhack_get_allow_dpad_usage); + smlua_bind_function(L, "camera_romhack_get_collisions", smlua_func_camera_romhack_get_collisions); smlua_bind_function(L, "camera_config_is_free_cam_enabled", smlua_func_camera_config_is_free_cam_enabled); + smlua_bind_function(L, "camera_config_is_analog_cam_enabled", smlua_func_camera_config_is_analog_cam_enabled); + smlua_bind_function(L, "camera_config_is_dpad_enabled", smlua_func_camera_config_is_dpad_enabled); + smlua_bind_function(L, "camera_config_is_collision_enabled", smlua_func_camera_config_is_collision_enabled); smlua_bind_function(L, "camera_config_is_mouse_look_enabled", smlua_func_camera_config_is_mouse_look_enabled); smlua_bind_function(L, "camera_config_is_x_inverted", smlua_func_camera_config_is_x_inverted); smlua_bind_function(L, "camera_config_is_y_inverted", smlua_func_camera_config_is_y_inverted); - smlua_bind_function(L, "camera_config_set_aggression", smlua_func_camera_config_set_aggression); - smlua_bind_function(L, "camera_config_set_deceleration", smlua_func_camera_config_set_deceleration); - smlua_bind_function(L, "camera_config_set_pan_level", smlua_func_camera_config_set_pan_level); + smlua_bind_function(L, "camera_config_get_x_sensitivity", smlua_func_camera_config_get_x_sensitivity); + smlua_bind_function(L, "camera_config_get_y_sensitivity", smlua_func_camera_config_get_y_sensitivity); + smlua_bind_function(L, "camera_config_get_aggression", smlua_func_camera_config_get_aggression); + smlua_bind_function(L, "camera_config_get_pan_level", smlua_func_camera_config_get_pan_level); + smlua_bind_function(L, "camera_config_get_deceleration", smlua_func_camera_config_get_deceleration); + smlua_bind_function(L, "camera_config_get_centering", smlua_func_camera_config_get_centering); + smlua_bind_function(L, "camera_config_enable_free_cam", smlua_func_camera_config_enable_free_cam); + smlua_bind_function(L, "camera_config_enable_analog_cam", smlua_func_camera_config_enable_analog_cam); + smlua_bind_function(L, "camera_config_enable_centering", smlua_func_camera_config_enable_centering); + smlua_bind_function(L, "camera_config_enable_dpad", smlua_func_camera_config_enable_dpad); + smlua_bind_function(L, "camera_config_enable_collisions", smlua_func_camera_config_enable_collisions); + smlua_bind_function(L, "camera_config_enable_mouse_look", smlua_func_camera_config_enable_mouse_look); + smlua_bind_function(L, "camera_config_invert_x", smlua_func_camera_config_invert_x); + smlua_bind_function(L, "camera_config_invert_y", smlua_func_camera_config_invert_y); smlua_bind_function(L, "camera_config_set_x_sensitivity", smlua_func_camera_config_set_x_sensitivity); smlua_bind_function(L, "camera_config_set_y_sensitivity", smlua_func_camera_config_set_y_sensitivity); - smlua_bind_function(L, "camera_freeze", smlua_func_camera_freeze); - smlua_bind_function(L, "camera_get_allow_toxic_gas_camera", smlua_func_camera_get_allow_toxic_gas_camera); + smlua_bind_function(L, "camera_config_set_aggression", smlua_func_camera_config_set_aggression); + smlua_bind_function(L, "camera_config_set_pan_level", smlua_func_camera_config_set_pan_level); + smlua_bind_function(L, "camera_config_set_deceleration", smlua_func_camera_config_set_deceleration); smlua_bind_function(L, "camera_get_checking_surfaces", smlua_func_camera_get_checking_surfaces); - smlua_bind_function(L, "camera_get_romhack_override", smlua_func_camera_get_romhack_override); - smlua_bind_function(L, "camera_is_frozen", smlua_func_camera_is_frozen); - smlua_bind_function(L, "camera_reset_overrides", smlua_func_camera_reset_overrides); - smlua_bind_function(L, "camera_romhack_allow_centering", smlua_func_camera_romhack_allow_centering); - smlua_bind_function(L, "camera_romhack_allow_dpad_usage", smlua_func_camera_romhack_allow_dpad_usage); - smlua_bind_function(L, "camera_romhack_allow_only_mods", smlua_func_camera_romhack_allow_only_mods); - smlua_bind_function(L, "camera_romhack_get_allow_centering", smlua_func_camera_romhack_get_allow_centering); - smlua_bind_function(L, "camera_romhack_get_allow_dpad_usage", smlua_func_camera_romhack_get_allow_dpad_usage); - smlua_bind_function(L, "camera_romhack_get_collisions", smlua_func_camera_romhack_get_collisions); - smlua_bind_function(L, "camera_romhack_get_zoomed_in_dist", smlua_func_camera_romhack_get_zoomed_in_dist); - smlua_bind_function(L, "camera_romhack_get_zoomed_in_height", smlua_func_camera_romhack_get_zoomed_in_height); - smlua_bind_function(L, "camera_romhack_get_zoomed_out_dist", smlua_func_camera_romhack_get_zoomed_out_dist); - smlua_bind_function(L, "camera_romhack_get_zoomed_out_height", smlua_func_camera_romhack_get_zoomed_out_height); - 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_in_height", smlua_func_camera_romhack_set_zoomed_in_height); - 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_out_height", smlua_func_camera_romhack_set_zoomed_out_height); smlua_bind_function(L, "camera_set_checking_surfaces", smlua_func_camera_set_checking_surfaces); - smlua_bind_function(L, "camera_set_romhack_override", smlua_func_camera_set_romhack_override); - smlua_bind_function(L, "camera_unfreeze", smlua_func_camera_unfreeze); - smlua_bind_function(L, "rom_hack_cam_set_collisions", smlua_func_rom_hack_cam_set_collisions); // smlua_collision_utils.h - smlua_bind_function(L, "collision_find_ceil", smlua_func_collision_find_ceil); smlua_bind_function(L, "collision_find_floor", smlua_func_collision_find_floor); + smlua_bind_function(L, "collision_find_ceil", smlua_func_collision_find_ceil); + smlua_bind_function(L, "get_water_surface_pseudo_floor", smlua_func_get_water_surface_pseudo_floor); + smlua_bind_function(L, "smlua_collision_util_get", smlua_func_smlua_collision_util_get); smlua_bind_function(L, "collision_get_temp_wall_collision_data", smlua_func_collision_get_temp_wall_collision_data); smlua_bind_function(L, "get_surface_from_wcd_index", smlua_func_get_surface_from_wcd_index); - smlua_bind_function(L, "get_water_surface_pseudo_floor", smlua_func_get_water_surface_pseudo_floor); - smlua_bind_function(L, "smlua_collision_util_find_surface_types", smlua_func_smlua_collision_util_find_surface_types); - smlua_bind_function(L, "smlua_collision_util_get", smlua_func_smlua_collision_util_get); smlua_bind_function(L, "smlua_collision_util_get_current_terrain_collision", smlua_func_smlua_collision_util_get_current_terrain_collision); smlua_bind_function(L, "smlua_collision_util_get_level_collision", smlua_func_smlua_collision_util_get_level_collision); + smlua_bind_function(L, "smlua_collision_util_find_surface_types", smlua_func_smlua_collision_util_find_surface_types); // smlua_deprecated.h - smlua_bind_function(L, "audio_stream_get_tempo", smlua_func_audio_stream_get_tempo); - smlua_bind_function(L, "audio_stream_set_speed", smlua_func_audio_stream_set_speed); - smlua_bind_function(L, "audio_stream_set_tempo", smlua_func_audio_stream_set_tempo); smlua_bind_function(L, "djui_hud_set_render_behind_hud", smlua_func_djui_hud_set_render_behind_hud); + smlua_bind_function(L, "audio_stream_get_tempo", smlua_func_audio_stream_get_tempo); + smlua_bind_function(L, "audio_stream_set_tempo", smlua_func_audio_stream_set_tempo); + smlua_bind_function(L, "audio_stream_set_speed", smlua_func_audio_stream_set_speed); smlua_bind_function(L, "network_player_color_to_palette", smlua_func_network_player_color_to_palette); smlua_bind_function(L, "network_player_palette_to_color", smlua_func_network_player_palette_to_color); // smlua_gfx_utils.h - smlua_bind_function(L, "get_fog_color", smlua_func_get_fog_color); - smlua_bind_function(L, "get_fog_intensity", smlua_func_get_fog_intensity); - smlua_bind_function(L, "get_lighting_color", smlua_func_get_lighting_color); - smlua_bind_function(L, "get_lighting_color_ambient", smlua_func_get_lighting_color_ambient); - smlua_bind_function(L, "get_lighting_dir", smlua_func_get_lighting_dir); - smlua_bind_function(L, "get_skybox", smlua_func_get_skybox); - smlua_bind_function(L, "get_skybox_color", smlua_func_get_skybox_color); - smlua_bind_function(L, "get_vertex_color", smlua_func_get_vertex_color); - smlua_bind_function(L, "gfx_get_vtx", smlua_func_gfx_get_vtx); - smlua_bind_function(L, "gfx_get_vtx_count", smlua_func_gfx_get_vtx_count); - smlua_bind_function(L, "gfx_parse", smlua_func_gfx_parse); - smlua_bind_function(L, "gfx_set_combine_lerp", smlua_func_gfx_set_combine_lerp); - smlua_bind_function(L, "gfx_set_texture_image", smlua_func_gfx_set_texture_image); - smlua_bind_function(L, "set_fog_color", smlua_func_set_fog_color); - smlua_bind_function(L, "set_fog_intensity", smlua_func_set_fog_intensity); - smlua_bind_function(L, "set_lighting_color", smlua_func_set_lighting_color); - smlua_bind_function(L, "set_lighting_color_ambient", smlua_func_set_lighting_color_ambient); - smlua_bind_function(L, "set_lighting_dir", smlua_func_set_lighting_dir); - 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, "set_override_skybox", smlua_func_set_override_skybox); - smlua_bind_function(L, "set_skybox_color", smlua_func_set_skybox_color); + smlua_bind_function(L, "set_override_far", smlua_func_set_override_far); + smlua_bind_function(L, "get_lighting_dir", smlua_func_get_lighting_dir); + smlua_bind_function(L, "set_lighting_dir", smlua_func_set_lighting_dir); + smlua_bind_function(L, "get_lighting_color", smlua_func_get_lighting_color); + smlua_bind_function(L, "get_lighting_color_ambient", smlua_func_get_lighting_color_ambient); + smlua_bind_function(L, "set_lighting_color", smlua_func_set_lighting_color); + smlua_bind_function(L, "set_lighting_color_ambient", smlua_func_set_lighting_color_ambient); + smlua_bind_function(L, "get_vertex_color", smlua_func_get_vertex_color); smlua_bind_function(L, "set_vertex_color", smlua_func_set_vertex_color); + smlua_bind_function(L, "get_fog_color", smlua_func_get_fog_color); + smlua_bind_function(L, "set_fog_color", smlua_func_set_fog_color); + smlua_bind_function(L, "get_fog_intensity", smlua_func_get_fog_intensity); + smlua_bind_function(L, "set_fog_intensity", smlua_func_set_fog_intensity); + smlua_bind_function(L, "get_skybox", smlua_func_get_skybox); + smlua_bind_function(L, "set_override_skybox", smlua_func_set_override_skybox); + smlua_bind_function(L, "get_skybox_color", smlua_func_get_skybox_color); + smlua_bind_function(L, "set_skybox_color", smlua_func_set_skybox_color); + smlua_bind_function(L, "gfx_parse", smlua_func_gfx_parse); + smlua_bind_function(L, "gfx_get_vtx", smlua_func_gfx_get_vtx); + smlua_bind_function(L, "gfx_get_vtx_count", smlua_func_gfx_get_vtx_count); + smlua_bind_function(L, "gfx_set_combine_lerp", smlua_func_gfx_set_combine_lerp); + smlua_bind_function(L, "gfx_set_texture_image", smlua_func_gfx_set_texture_image); // smlua_level_utils.h - smlua_bind_function(L, "level_is_vanilla_level", smlua_func_level_is_vanilla_level); - smlua_bind_function(L, "level_register", smlua_func_level_register); smlua_bind_function(L, "smlua_level_util_change_area", smlua_func_smlua_level_util_change_area); smlua_bind_function(L, "smlua_level_util_get_info", smlua_func_smlua_level_util_get_info); - smlua_bind_function(L, "smlua_level_util_get_info_from_course_num", smlua_func_smlua_level_util_get_info_from_course_num); smlua_bind_function(L, "smlua_level_util_get_info_from_short_name", smlua_func_smlua_level_util_get_info_from_short_name); - smlua_bind_function(L, "warp_exit_level", smlua_func_warp_exit_level); - smlua_bind_function(L, "warp_restart_level", smlua_func_warp_restart_level); - smlua_bind_function(L, "warp_to_castle", smlua_func_warp_to_castle); - smlua_bind_function(L, "warp_to_level", smlua_func_warp_to_level); - smlua_bind_function(L, "warp_to_start_level", smlua_func_warp_to_start_level); + smlua_bind_function(L, "smlua_level_util_get_info_from_course_num", smlua_func_smlua_level_util_get_info_from_course_num); + smlua_bind_function(L, "level_register", smlua_func_level_register); + smlua_bind_function(L, "level_is_vanilla_level", smlua_func_level_is_vanilla_level); smlua_bind_function(L, "warp_to_warpnode", smlua_func_warp_to_warpnode); + smlua_bind_function(L, "warp_to_level", smlua_func_warp_to_level); + smlua_bind_function(L, "warp_restart_level", smlua_func_warp_restart_level); + smlua_bind_function(L, "warp_to_start_level", smlua_func_warp_to_start_level); + smlua_bind_function(L, "warp_exit_level", smlua_func_warp_exit_level); + smlua_bind_function(L, "warp_to_castle", smlua_func_warp_to_castle); // smlua_math_utils.h - smlua_bind_function(L, "clamp", smlua_func_clamp); - smlua_bind_function(L, "clampf", smlua_func_clampf); - smlua_bind_function(L, "degrees_to_sm64", smlua_func_degrees_to_sm64); - smlua_bind_function(L, "hypotf", smlua_func_hypotf); - smlua_bind_function(L, "max", smlua_func_max); - smlua_bind_function(L, "maxf", smlua_func_maxf); smlua_bind_function(L, "min", smlua_func_min); + smlua_bind_function(L, "max", smlua_func_max); + smlua_bind_function(L, "sqr", smlua_func_sqr); smlua_bind_function(L, "minf", smlua_func_minf); + smlua_bind_function(L, "maxf", smlua_func_maxf); + smlua_bind_function(L, "sqrf", smlua_func_sqrf); + smlua_bind_function(L, "sm64_to_radians", smlua_func_sm64_to_radians); smlua_bind_function(L, "radians_to_sm64", smlua_func_radians_to_sm64); smlua_bind_function(L, "sm64_to_degrees", smlua_func_sm64_to_degrees); - smlua_bind_function(L, "sm64_to_radians", smlua_func_sm64_to_radians); - smlua_bind_function(L, "sqr", smlua_func_sqr); - smlua_bind_function(L, "sqrf", smlua_func_sqrf); + smlua_bind_function(L, "degrees_to_sm64", smlua_func_degrees_to_sm64); + smlua_bind_function(L, "hypotf", smlua_func_hypotf); + smlua_bind_function(L, "clamp", smlua_func_clamp); + smlua_bind_function(L, "clampf", smlua_func_clampf); // smlua_misc_utils.h - smlua_bind_function(L, "allocate_mario_action", smlua_func_allocate_mario_action); - smlua_bind_function(L, "course_is_main_course", smlua_func_course_is_main_course); - smlua_bind_function(L, "djui_attempting_to_open_playerlist", smlua_func_djui_attempting_to_open_playerlist); - smlua_bind_function(L, "djui_is_playerlist_open", smlua_func_djui_is_playerlist_open); + smlua_bind_function(L, "get_network_area_timer", smlua_func_get_network_area_timer); + smlua_bind_function(L, "get_area_update_counter", smlua_func_get_area_update_counter); + smlua_bind_function(L, "djui_popup_create_global", smlua_func_djui_popup_create_global); smlua_bind_function(L, "djui_is_popup_disabled", smlua_func_djui_is_popup_disabled); + smlua_bind_function(L, "djui_set_popup_disabled_override", smlua_func_djui_set_popup_disabled_override); + smlua_bind_function(L, "djui_reset_popup_disabled_override", smlua_func_djui_reset_popup_disabled_override); + smlua_bind_function(L, "djui_is_playerlist_open", smlua_func_djui_is_playerlist_open); + smlua_bind_function(L, "djui_attempting_to_open_playerlist", smlua_func_djui_attempting_to_open_playerlist); + smlua_bind_function(L, "djui_get_playerlist_page_index", smlua_func_djui_get_playerlist_page_index); smlua_bind_function(L, "djui_menu_get_font", smlua_func_djui_menu_get_font); smlua_bind_function(L, "djui_menu_get_theme", smlua_func_djui_menu_get_theme); - smlua_bind_function(L, "djui_popup_create_global", smlua_func_djui_popup_create_global); - smlua_bind_function(L, "djui_reset_popup_disabled_override", smlua_func_djui_reset_popup_disabled_override); - smlua_bind_function(L, "djui_set_popup_disabled_override", smlua_func_djui_set_popup_disabled_override); - smlua_bind_function(L, "get_active_mod", smlua_func_get_active_mod); - smlua_bind_function(L, "get_area_update_counter", smlua_func_get_area_update_counter); - smlua_bind_function(L, "get_coopnet_id", smlua_func_get_coopnet_id); - smlua_bind_function(L, "get_current_save_file_num", smlua_func_get_current_save_file_num); - smlua_bind_function(L, "get_date_and_time", smlua_func_get_date_and_time); smlua_bind_function(L, "get_dialog_box_state", smlua_func_get_dialog_box_state); smlua_bind_function(L, "get_dialog_id", smlua_func_get_dialog_id); - smlua_bind_function(L, "get_dialog_response", smlua_func_get_dialog_response); - smlua_bind_function(L, "get_envfx", smlua_func_get_envfx); - smlua_bind_function(L, "get_environment_region", smlua_func_get_environment_region); - smlua_bind_function(L, "get_global_timer", smlua_func_get_global_timer); + smlua_bind_function(L, "get_last_star_or_key", smlua_func_get_last_star_or_key); + smlua_bind_function(L, "set_last_star_or_key", smlua_func_set_last_star_or_key); + smlua_bind_function(L, "get_last_completed_course_num", smlua_func_get_last_completed_course_num); + smlua_bind_function(L, "set_last_completed_course_num", smlua_func_set_last_completed_course_num); + smlua_bind_function(L, "get_last_completed_star_num", smlua_func_get_last_completed_star_num); + smlua_bind_function(L, "set_last_completed_star_num", smlua_func_set_last_completed_star_num); smlua_bind_function(L, "get_got_file_coin_hi_score", smlua_func_get_got_file_coin_hi_score); + smlua_bind_function(L, "set_got_file_coin_hi_score", smlua_func_set_got_file_coin_hi_score); + smlua_bind_function(L, "get_save_file_modified", smlua_func_get_save_file_modified); + smlua_bind_function(L, "set_save_file_modified", smlua_func_set_save_file_modified); + smlua_bind_function(L, "hud_hide", smlua_func_hud_hide); + smlua_bind_function(L, "hud_show", smlua_func_hud_show); + smlua_bind_function(L, "hud_is_hidden", smlua_func_hud_is_hidden); + smlua_bind_function(L, "hud_get_value", smlua_func_hud_get_value); + smlua_bind_function(L, "hud_set_value", smlua_func_hud_set_value); + smlua_bind_function(L, "hud_render_power_meter", smlua_func_hud_render_power_meter); + smlua_bind_function(L, "hud_render_power_meter_interpolated", smlua_func_hud_render_power_meter_interpolated); + smlua_bind_function(L, "hud_get_flash", smlua_func_hud_get_flash); + smlua_bind_function(L, "hud_set_flash", smlua_func_hud_set_flash); + smlua_bind_function(L, "is_game_paused", smlua_func_is_game_paused); + smlua_bind_function(L, "is_transition_playing", smlua_func_is_transition_playing); + smlua_bind_function(L, "allocate_mario_action", smlua_func_allocate_mario_action); smlua_bind_function(L, "get_hand_foot_pos_x", smlua_func_get_hand_foot_pos_x); smlua_bind_function(L, "get_hand_foot_pos_y", smlua_func_get_hand_foot_pos_y); smlua_bind_function(L, "get_hand_foot_pos_z", smlua_func_get_hand_foot_pos_z); - smlua_bind_function(L, "get_last_completed_course_num", smlua_func_get_last_completed_course_num); - smlua_bind_function(L, "get_last_completed_star_num", smlua_func_get_last_completed_star_num); - smlua_bind_function(L, "get_last_star_or_key", smlua_func_get_last_star_or_key); - smlua_bind_function(L, "get_local_discord_id", smlua_func_get_local_discord_id); - smlua_bind_function(L, "get_network_area_timer", smlua_func_get_network_area_timer); - smlua_bind_function(L, "get_os_name", smlua_func_get_os_name); - smlua_bind_function(L, "get_save_file_modified", smlua_func_get_save_file_modified); - smlua_bind_function(L, "get_time", smlua_func_get_time); - smlua_bind_function(L, "get_ttc_speed_setting", smlua_func_get_ttc_speed_setting); - smlua_bind_function(L, "get_volume_env", smlua_func_get_volume_env); - smlua_bind_function(L, "get_volume_level", smlua_func_get_volume_level); - smlua_bind_function(L, "get_volume_master", smlua_func_get_volume_master); - smlua_bind_function(L, "get_volume_sfx", smlua_func_get_volume_sfx); - smlua_bind_function(L, "get_water_level", smlua_func_get_water_level); - smlua_bind_function(L, "hud_get_flash", smlua_func_hud_get_flash); - smlua_bind_function(L, "hud_get_value", smlua_func_hud_get_value); - smlua_bind_function(L, "hud_hide", smlua_func_hud_hide); - smlua_bind_function(L, "hud_is_hidden", smlua_func_hud_is_hidden); - smlua_bind_function(L, "hud_render_power_meter", smlua_func_hud_render_power_meter); - smlua_bind_function(L, "hud_render_power_meter_interpolated", smlua_func_hud_render_power_meter_interpolated); - smlua_bind_function(L, "hud_set_flash", smlua_func_hud_set_flash); - smlua_bind_function(L, "hud_set_value", smlua_func_hud_set_value); - smlua_bind_function(L, "hud_show", smlua_func_hud_show); - smlua_bind_function(L, "is_game_paused", smlua_func_is_game_paused); - smlua_bind_function(L, "is_transition_playing", smlua_func_is_transition_playing); - smlua_bind_function(L, "mod_file_exists", smlua_func_mod_file_exists); - smlua_bind_function(L, "movtexqc_register", smlua_func_movtexqc_register); - smlua_bind_function(L, "play_transition", smlua_func_play_transition); - smlua_bind_function(L, "reset_window_title", smlua_func_reset_window_title); + smlua_bind_function(L, "get_current_save_file_num", smlua_func_get_current_save_file_num); smlua_bind_function(L, "save_file_get_using_backup_slot", smlua_func_save_file_get_using_backup_slot); smlua_bind_function(L, "save_file_set_using_backup_slot", smlua_func_save_file_set_using_backup_slot); - smlua_bind_function(L, "set_environment_region", smlua_func_set_environment_region); - smlua_bind_function(L, "set_got_file_coin_hi_score", smlua_func_set_got_file_coin_hi_score); - smlua_bind_function(L, "set_last_completed_course_num", smlua_func_set_last_completed_course_num); - smlua_bind_function(L, "set_last_completed_star_num", smlua_func_set_last_completed_star_num); - smlua_bind_function(L, "set_last_star_or_key", smlua_func_set_last_star_or_key); - smlua_bind_function(L, "set_override_envfx", smlua_func_set_override_envfx); - smlua_bind_function(L, "set_save_file_modified", smlua_func_set_save_file_modified); - smlua_bind_function(L, "set_ttc_speed_setting", smlua_func_set_ttc_speed_setting); - smlua_bind_function(L, "set_volume_env", smlua_func_set_volume_env); - smlua_bind_function(L, "set_volume_level", smlua_func_set_volume_level); - smlua_bind_function(L, "set_volume_master", smlua_func_set_volume_master); - smlua_bind_function(L, "set_volume_sfx", smlua_func_set_volume_sfx); + smlua_bind_function(L, "movtexqc_register", smlua_func_movtexqc_register); + smlua_bind_function(L, "get_water_level", smlua_func_get_water_level); smlua_bind_function(L, "set_water_level", smlua_func_set_water_level); + smlua_bind_function(L, "play_transition", smlua_func_play_transition); + smlua_bind_function(L, "course_is_main_course", smlua_func_course_is_main_course); + smlua_bind_function(L, "get_ttc_speed_setting", smlua_func_get_ttc_speed_setting); + smlua_bind_function(L, "set_ttc_speed_setting", smlua_func_set_ttc_speed_setting); + smlua_bind_function(L, "get_time", smlua_func_get_time); + smlua_bind_function(L, "get_date_and_time", smlua_func_get_date_and_time); + smlua_bind_function(L, "get_envfx", smlua_func_get_envfx); + 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_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); + smlua_bind_function(L, "get_volume_level", smlua_func_get_volume_level); + smlua_bind_function(L, "get_volume_sfx", smlua_func_get_volume_sfx); + smlua_bind_function(L, "get_volume_env", smlua_func_get_volume_env); + smlua_bind_function(L, "set_volume_master", smlua_func_set_volume_master); + smlua_bind_function(L, "set_volume_level", smlua_func_set_volume_level); + smlua_bind_function(L, "set_volume_sfx", smlua_func_set_volume_sfx); + smlua_bind_function(L, "set_volume_env", smlua_func_set_volume_env); + smlua_bind_function(L, "get_environment_region", smlua_func_get_environment_region); + smlua_bind_function(L, "set_environment_region", smlua_func_set_environment_region); + smlua_bind_function(L, "mod_file_exists", smlua_func_mod_file_exists); + smlua_bind_function(L, "get_active_mod", smlua_func_get_active_mod); smlua_bind_function(L, "set_window_title", smlua_func_set_window_title); + smlua_bind_function(L, "reset_window_title", smlua_func_reset_window_title); + smlua_bind_function(L, "get_os_name", smlua_func_get_os_name); // smlua_model_utils.h smlua_bind_function(L, "smlua_model_util_get_id", smlua_func_smlua_model_util_get_id); // smlua_obj_utils.h - smlua_bind_function(L, "geo_get_current_object", smlua_func_geo_get_current_object); - smlua_bind_function(L, "get_current_object", smlua_func_get_current_object); - smlua_bind_function(L, "get_cutscene_focus", smlua_func_get_cutscene_focus); - smlua_bind_function(L, "get_dialog_object", smlua_func_get_dialog_object); - smlua_bind_function(L, "get_secondary_camera_focus", smlua_func_get_secondary_camera_focus); - smlua_bind_function(L, "get_temp_object_hitbox", smlua_func_get_temp_object_hitbox); - smlua_bind_function(L, "get_trajectory", smlua_func_get_trajectory); - smlua_bind_function(L, "obj_check_hitbox_overlap", smlua_func_obj_check_hitbox_overlap); - smlua_bind_function(L, "obj_check_overlap_with_hitbox_params", smlua_func_obj_check_overlap_with_hitbox_params); - smlua_bind_function(L, "obj_count_objects_with_behavior_id", smlua_func_obj_count_objects_with_behavior_id); - smlua_bind_function(L, "obj_get_collided_object", smlua_func_obj_get_collided_object); - smlua_bind_function(L, "obj_get_field_f32", smlua_func_obj_get_field_f32); - smlua_bind_function(L, "obj_get_field_s16", smlua_func_obj_get_field_s16); - smlua_bind_function(L, "obj_get_field_s32", smlua_func_obj_get_field_s32); - smlua_bind_function(L, "obj_get_field_u32", smlua_func_obj_get_field_u32); - smlua_bind_function(L, "obj_get_first", smlua_func_obj_get_first); - smlua_bind_function(L, "obj_get_first_with_behavior_id", smlua_func_obj_get_first_with_behavior_id); - smlua_bind_function(L, "obj_get_first_with_behavior_id_and_field_f32", smlua_func_obj_get_first_with_behavior_id_and_field_f32); - smlua_bind_function(L, "obj_get_first_with_behavior_id_and_field_s32", smlua_func_obj_get_first_with_behavior_id_and_field_s32); - smlua_bind_function(L, "obj_get_model_id_extended", smlua_func_obj_get_model_id_extended); - smlua_bind_function(L, "obj_get_nearest_object_with_behavior_id", smlua_func_obj_get_nearest_object_with_behavior_id); - smlua_bind_function(L, "obj_get_next", smlua_func_obj_get_next); - smlua_bind_function(L, "obj_get_next_with_same_behavior_id", smlua_func_obj_get_next_with_same_behavior_id); - smlua_bind_function(L, "obj_get_next_with_same_behavior_id_and_field_f32", smlua_func_obj_get_next_with_same_behavior_id_and_field_f32); - smlua_bind_function(L, "obj_get_next_with_same_behavior_id_and_field_s32", smlua_func_obj_get_next_with_same_behavior_id_and_field_s32); - smlua_bind_function(L, "obj_get_temp_spawn_particles_info", smlua_func_obj_get_temp_spawn_particles_info); + smlua_bind_function(L, "spawn_sync_object", smlua_func_spawn_sync_object); + smlua_bind_function(L, "spawn_non_sync_object", smlua_func_spawn_non_sync_object); smlua_bind_function(L, "obj_has_behavior_id", smlua_func_obj_has_behavior_id); smlua_bind_function(L, "obj_has_model_extended", smlua_func_obj_has_model_extended); + smlua_bind_function(L, "obj_get_model_id_extended", smlua_func_obj_get_model_id_extended); + smlua_bind_function(L, "obj_set_model_extended", smlua_func_obj_set_model_extended); + smlua_bind_function(L, "get_trajectory", smlua_func_get_trajectory); + smlua_bind_function(L, "geo_get_current_object", smlua_func_geo_get_current_object); + smlua_bind_function(L, "get_current_object", smlua_func_get_current_object); + smlua_bind_function(L, "get_dialog_object", smlua_func_get_dialog_object); + smlua_bind_function(L, "get_cutscene_focus", smlua_func_get_cutscene_focus); + smlua_bind_function(L, "get_secondary_camera_focus", smlua_func_get_secondary_camera_focus); + smlua_bind_function(L, "set_cutscene_focus", smlua_func_set_cutscene_focus); + smlua_bind_function(L, "set_secondary_camera_focus", smlua_func_set_secondary_camera_focus); + smlua_bind_function(L, "obj_get_first", smlua_func_obj_get_first); + smlua_bind_function(L, "obj_get_first_with_behavior_id", smlua_func_obj_get_first_with_behavior_id); + smlua_bind_function(L, "obj_get_first_with_behavior_id_and_field_s32", smlua_func_obj_get_first_with_behavior_id_and_field_s32); + smlua_bind_function(L, "obj_get_first_with_behavior_id_and_field_f32", smlua_func_obj_get_first_with_behavior_id_and_field_f32); + smlua_bind_function(L, "obj_get_next", smlua_func_obj_get_next); + smlua_bind_function(L, "obj_get_next_with_same_behavior_id", smlua_func_obj_get_next_with_same_behavior_id); + smlua_bind_function(L, "obj_get_next_with_same_behavior_id_and_field_s32", smlua_func_obj_get_next_with_same_behavior_id_and_field_s32); + smlua_bind_function(L, "obj_get_next_with_same_behavior_id_and_field_f32", smlua_func_obj_get_next_with_same_behavior_id_and_field_f32); + smlua_bind_function(L, "obj_get_nearest_object_with_behavior_id", smlua_func_obj_get_nearest_object_with_behavior_id); + smlua_bind_function(L, "obj_count_objects_with_behavior_id", smlua_func_obj_count_objects_with_behavior_id); + smlua_bind_function(L, "obj_get_collided_object", smlua_func_obj_get_collided_object); + smlua_bind_function(L, "obj_get_field_u32", smlua_func_obj_get_field_u32); + smlua_bind_function(L, "obj_get_field_s32", smlua_func_obj_get_field_s32); + smlua_bind_function(L, "obj_get_field_f32", smlua_func_obj_get_field_f32); + smlua_bind_function(L, "obj_get_field_s16", smlua_func_obj_get_field_s16); + smlua_bind_function(L, "obj_set_field_u32", smlua_func_obj_set_field_u32); + smlua_bind_function(L, "obj_set_field_s32", smlua_func_obj_set_field_s32); + smlua_bind_function(L, "obj_set_field_f32", smlua_func_obj_set_field_f32); + smlua_bind_function(L, "obj_set_field_s16", smlua_func_obj_set_field_s16); + smlua_bind_function(L, "obj_get_temp_spawn_particles_info", smlua_func_obj_get_temp_spawn_particles_info); + smlua_bind_function(L, "get_temp_object_hitbox", smlua_func_get_temp_object_hitbox); smlua_bind_function(L, "obj_is_attackable", smlua_func_obj_is_attackable); smlua_bind_function(L, "obj_is_breakable_object", smlua_func_obj_is_breakable_object); smlua_bind_function(L, "obj_is_bully", smlua_func_obj_is_bully); @@ -35540,73 +35697,66 @@ void smlua_bind_functions_autogen(void) { smlua_bind_function(L, "obj_is_mushroom_1up", smlua_func_obj_is_mushroom_1up); smlua_bind_function(L, "obj_is_secret", smlua_func_obj_is_secret); smlua_bind_function(L, "obj_is_valid_for_interaction", smlua_func_obj_is_valid_for_interaction); - smlua_bind_function(L, "obj_move_xyz", smlua_func_obj_move_xyz); - smlua_bind_function(L, "obj_set_field_f32", smlua_func_obj_set_field_f32); - smlua_bind_function(L, "obj_set_field_s16", smlua_func_obj_set_field_s16); - smlua_bind_function(L, "obj_set_field_s32", smlua_func_obj_set_field_s32); - smlua_bind_function(L, "obj_set_field_u32", smlua_func_obj_set_field_u32); - smlua_bind_function(L, "obj_set_model_extended", smlua_func_obj_set_model_extended); + smlua_bind_function(L, "obj_check_hitbox_overlap", smlua_func_obj_check_hitbox_overlap); + smlua_bind_function(L, "obj_check_overlap_with_hitbox_params", smlua_func_obj_check_overlap_with_hitbox_params); smlua_bind_function(L, "obj_set_vel", smlua_func_obj_set_vel); - smlua_bind_function(L, "set_cutscene_focus", smlua_func_set_cutscene_focus); - smlua_bind_function(L, "set_secondary_camera_focus", smlua_func_set_secondary_camera_focus); + 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, "spawn_non_sync_object", smlua_func_spawn_non_sync_object); - smlua_bind_function(L, "spawn_sync_object", smlua_func_spawn_sync_object); // smlua_text_utils.h - smlua_bind_function(L, "smlua_text_utils_act_name_get", smlua_func_smlua_text_utils_act_name_get); - smlua_bind_function(L, "smlua_text_utils_act_name_mod_index", smlua_func_smlua_text_utils_act_name_mod_index); - smlua_bind_function(L, "smlua_text_utils_act_name_replace", smlua_func_smlua_text_utils_act_name_replace); - smlua_bind_function(L, "smlua_text_utils_act_name_reset", smlua_func_smlua_text_utils_act_name_reset); - smlua_bind_function(L, "smlua_text_utils_castle_secret_stars_replace", smlua_func_smlua_text_utils_castle_secret_stars_replace); + smlua_bind_function(L, "smlua_text_utils_reset_all", smlua_func_smlua_text_utils_reset_all); + smlua_bind_function(L, "smlua_text_utils_dialog_replace", smlua_func_smlua_text_utils_dialog_replace); smlua_bind_function(L, "smlua_text_utils_course_acts_replace", smlua_func_smlua_text_utils_course_acts_replace); + smlua_bind_function(L, "smlua_text_utils_secret_star_replace", smlua_func_smlua_text_utils_secret_star_replace); + smlua_bind_function(L, "smlua_text_utils_course_name_replace", smlua_func_smlua_text_utils_course_name_replace); smlua_bind_function(L, "smlua_text_utils_course_name_get", smlua_func_smlua_text_utils_course_name_get); smlua_bind_function(L, "smlua_text_utils_course_name_mod_index", smlua_func_smlua_text_utils_course_name_mod_index); - smlua_bind_function(L, "smlua_text_utils_course_name_replace", smlua_func_smlua_text_utils_course_name_replace); smlua_bind_function(L, "smlua_text_utils_course_name_reset", smlua_func_smlua_text_utils_course_name_reset); - smlua_bind_function(L, "smlua_text_utils_dialog_replace", smlua_func_smlua_text_utils_dialog_replace); + smlua_bind_function(L, "smlua_text_utils_act_name_replace", smlua_func_smlua_text_utils_act_name_replace); + smlua_bind_function(L, "smlua_text_utils_act_name_get", smlua_func_smlua_text_utils_act_name_get); + smlua_bind_function(L, "smlua_text_utils_act_name_mod_index", smlua_func_smlua_text_utils_act_name_mod_index); + smlua_bind_function(L, "smlua_text_utils_act_name_reset", smlua_func_smlua_text_utils_act_name_reset); + smlua_bind_function(L, "smlua_text_utils_castle_secret_stars_replace", smlua_func_smlua_text_utils_castle_secret_stars_replace); smlua_bind_function(L, "smlua_text_utils_extra_text_replace", smlua_func_smlua_text_utils_extra_text_replace); smlua_bind_function(L, "smlua_text_utils_get_language", smlua_func_smlua_text_utils_get_language); - smlua_bind_function(L, "smlua_text_utils_reset_all", smlua_func_smlua_text_utils_reset_all); - smlua_bind_function(L, "smlua_text_utils_secret_star_replace", smlua_func_smlua_text_utils_secret_star_replace); // sound_init.h + smlua_bind_function(L, "reset_volume", smlua_func_reset_volume); + smlua_bind_function(L, "raise_background_noise", smlua_func_raise_background_noise); + smlua_bind_function(L, "lower_background_noise", smlua_func_lower_background_noise); smlua_bind_function(L, "disable_background_sound", smlua_func_disable_background_sound); smlua_bind_function(L, "enable_background_sound", smlua_func_enable_background_sound); - smlua_bind_function(L, "fadeout_cap_music", smlua_func_fadeout_cap_music); - smlua_bind_function(L, "fadeout_level_music", smlua_func_fadeout_level_music); - smlua_bind_function(L, "fadeout_music", smlua_func_fadeout_music); - smlua_bind_function(L, "lower_background_noise", smlua_func_lower_background_noise); - smlua_bind_function(L, "play_cap_music", smlua_func_play_cap_music); - smlua_bind_function(L, "play_cutscene_music", smlua_func_play_cutscene_music); - smlua_bind_function(L, "play_infinite_stairs_music", smlua_func_play_infinite_stairs_music); smlua_bind_function(L, "play_menu_sounds", smlua_func_play_menu_sounds); smlua_bind_function(L, "play_painting_eject_sound", smlua_func_play_painting_eject_sound); - smlua_bind_function(L, "play_shell_music", smlua_func_play_shell_music); - smlua_bind_function(L, "raise_background_noise", smlua_func_raise_background_noise); - smlua_bind_function(L, "reset_volume", smlua_func_reset_volume); + smlua_bind_function(L, "play_infinite_stairs_music", smlua_func_play_infinite_stairs_music); smlua_bind_function(L, "set_background_music", smlua_func_set_background_music); - smlua_bind_function(L, "stop_cap_music", smlua_func_stop_cap_music); + smlua_bind_function(L, "fadeout_music", smlua_func_fadeout_music); + smlua_bind_function(L, "fadeout_level_music", smlua_func_fadeout_level_music); + smlua_bind_function(L, "play_cutscene_music", smlua_func_play_cutscene_music); + smlua_bind_function(L, "play_shell_music", smlua_func_play_shell_music); smlua_bind_function(L, "stop_shell_music", smlua_func_stop_shell_music); + smlua_bind_function(L, "play_cap_music", smlua_func_play_cap_music); + smlua_bind_function(L, "fadeout_cap_music", smlua_func_fadeout_cap_music); + smlua_bind_function(L, "stop_cap_music", smlua_func_stop_cap_music); // spawn_sound.h - smlua_bind_function(L, "calc_dist_to_volume_range_1", smlua_func_calc_dist_to_volume_range_1); - smlua_bind_function(L, "calc_dist_to_volume_range_2", smlua_func_calc_dist_to_volume_range_2); - smlua_bind_function(L, "create_sound_spawner", smlua_func_create_sound_spawner); + smlua_bind_function(L, "exec_anim_sound_state", smlua_func_exec_anim_sound_state); smlua_bind_function(L, "cur_obj_play_sound_1", smlua_func_cur_obj_play_sound_1); smlua_bind_function(L, "cur_obj_play_sound_2", smlua_func_cur_obj_play_sound_2); - smlua_bind_function(L, "exec_anim_sound_state", smlua_func_exec_anim_sound_state); + smlua_bind_function(L, "create_sound_spawner", smlua_func_create_sound_spawner); + smlua_bind_function(L, "calc_dist_to_volume_range_1", smlua_func_calc_dist_to_volume_range_1); + smlua_bind_function(L, "calc_dist_to_volume_range_2", smlua_func_calc_dist_to_volume_range_2); // surface_collision.h + smlua_bind_function(L, "find_wall_collisions", smlua_func_find_wall_collisions); //smlua_bind_function(L, "find_ceil", smlua_func_find_ceil); <--- UNIMPLEMENTED smlua_bind_function(L, "find_ceil_height", smlua_func_find_ceil_height); - //smlua_bind_function(L, "find_floor", smlua_func_find_floor); <--- UNIMPLEMENTED - smlua_bind_function(L, "find_floor_height", smlua_func_find_floor_height); //smlua_bind_function(L, "find_floor_height_and_data", smlua_func_find_floor_height_and_data); <--- UNIMPLEMENTED + smlua_bind_function(L, "find_floor_height", smlua_func_find_floor_height); + //smlua_bind_function(L, "find_floor", smlua_func_find_floor); <--- UNIMPLEMENTED + smlua_bind_function(L, "find_water_level", smlua_func_find_water_level); smlua_bind_function(L, "find_poison_gas_level", smlua_func_find_poison_gas_level); //smlua_bind_function(L, "find_surface_on_ray", smlua_func_find_surface_on_ray); <--- UNIMPLEMENTED - smlua_bind_function(L, "find_wall_collisions", smlua_func_find_wall_collisions); - smlua_bind_function(L, "find_water_level", smlua_func_find_water_level); smlua_bind_function(L, "set_find_wall_direction", smlua_func_set_find_wall_direction); // surface_load.h diff --git a/src/pc/lua/utils/smlua_audio_utils.c b/src/pc/lua/utils/smlua_audio_utils.c index 3f2e92f96..2345b0878 100644 --- a/src/pc/lua/utils/smlua_audio_utils.c +++ b/src/pc/lua/utils/smlua_audio_utils.c @@ -17,7 +17,6 @@ #include "pc/debuglog.h" #include "pc/pc_main.h" #include "pc/fs/fmem.h" -#include "audio/external.h" struct AudioOverride { bool enabled; @@ -336,9 +335,8 @@ void audio_stream_play(struct ModAudio* audio, bool restart, f32 volume) { if (configMuteFocusLoss && !WAPI.has_focus()) { ma_sound_set_volume(&audio->sound, 0); } else { - f32 masterVolume = (f32)configMasterVolume / 127.0f * (f32)gLuaVolumeMaster / 127.0f; f32 musicVolume = (f32)configMusicVolume / 127.0f * (f32)gLuaVolumeLevel / 127.0f; - ma_sound_set_volume(&audio->sound, masterVolume * musicVolume * volume); + ma_sound_set_volume(&audio->sound, gMasterVolume * musicVolume * volume); } audio->baseVolume = volume; if (restart || !ma_sound_is_playing(&audio->sound)) { ma_sound_seek_to_pcm_frame(&audio->sound, 0); } @@ -430,9 +428,8 @@ void audio_stream_set_volume(struct ModAudio* audio, f32 volume) { if (configMuteFocusLoss && !WAPI.has_focus()) { ma_sound_set_volume(&audio->sound, 0); } else { - f32 masterVolume = (f32)configMasterVolume / 127.0f; - f32 musicVolume = (f32)configMusicVolume / 127.0f; - ma_sound_set_volume(&audio->sound, masterVolume * musicVolume * volume); + f32 musicVolume = (f32)configMusicVolume / 127.0f * (f32)gLuaVolumeLevel / 127.0f; + ma_sound_set_volume(&audio->sound, gMasterVolume * musicVolume * volume); } audio->baseVolume = volume; } @@ -445,14 +442,14 @@ void audio_stream_set_volume(struct ModAudio* audio, f32 volume) { ////////////////////////////////////// -// MA calls the end callback from it's audio thread +// MA calls the end callback from its audio thread // Use mutexes to be sure we don't try to delete the same memory at the same time #include static pthread_mutex_t sSampleCopyMutex = PTHREAD_MUTEX_INITIALIZER; static struct ModAudioSampleCopies *sSampleCopyFreeTail = NULL; // Called whenever a sample copy finishes playback (called from the miniaudio thread) -// removes the copy from it's linked list, and adds it to the pending list +// removes the copy from its linked list, and adds it to the pending list static void audio_sample_copy_end_callback(void* userData, UNUSED ma_sound* sound) { pthread_mutex_lock(&sSampleCopyMutex); @@ -570,9 +567,8 @@ void audio_sample_play(struct ModAudio* audio, Vec3f position, f32 volume) { ma_sound_set_volume(sound, 0); } else { f32 intensity = sound_get_level_intensity(dist); - f32 masterVolume = (f32)configMasterVolume / 127.0f * (f32)gLuaVolumeMaster / 127.0f; f32 sfxVolume = (f32)configSfxVolume / 127.0f * (f32)gLuaVolumeSfx / 127.0f; - ma_sound_set_volume(sound, masterVolume * sfxVolume * volume * intensity); + ma_sound_set_volume(sound, gMasterVolume * sfxVolume * volume * intensity); } ma_sound_set_pan(sound, pan); audio->baseVolume = volume; @@ -581,7 +577,9 @@ void audio_sample_play(struct ModAudio* audio, Vec3f position, f32 volume) { } void audio_custom_update_volume(void) { + gMasterVolume = (f32)configMasterVolume / 127.0f * (f32)gLuaVolumeMaster / 127.0f; if (!sModAudioPool) { return; } + f32 musicVolume = (f32)configMusicVolume / 127.0f * (f32)gLuaVolumeLevel / 127.0f; struct DynamicPoolNode* node = sModAudioPool->tail; while (node) { struct DynamicPoolNode* prev = node->prev; @@ -589,9 +587,7 @@ void audio_custom_update_volume(void) { if (configMuteFocusLoss && !WAPI.has_focus()) { ma_sound_set_volume(&audio->sound, 0); } else if (audio->isStream) { - f32 masterVolume = (f32)configMasterVolume / 127.0f * (f32)gLuaVolumeMaster / 127.0f; - f32 musicVolume = (f32)configMusicVolume / 127.0f * (f32)gLuaVolumeLevel / 127.0f; - ma_sound_set_volume(&audio->sound, masterVolume * musicVolume * audio->baseVolume); + ma_sound_set_volume(&audio->sound, gMasterVolume * musicVolume * audio->baseVolume); } node = prev; } diff --git a/src/pc/lua/utils/smlua_misc_utils.c b/src/pc/lua/utils/smlua_misc_utils.c index 7a475b8e6..d100b2d05 100644 --- a/src/pc/lua/utils/smlua_misc_utils.c +++ b/src/pc/lua/utils/smlua_misc_utils.c @@ -88,6 +88,11 @@ bool djui_attempting_to_open_playerlist(void) { return gAttemptingToOpenPlayerlist; } +u8 djui_get_playerlist_page_index(void) { + extern u8 sPageIndex; + return sPageIndex; +} + enum DjuiFontType djui_menu_get_font(void) { return configDjuiThemeFont == 0 ? FONT_NORMAL : FONT_ALIASED; } diff --git a/src/pc/lua/utils/smlua_misc_utils.h b/src/pc/lua/utils/smlua_misc_utils.h index 3f78256d4..3fda24b89 100644 --- a/src/pc/lua/utils/smlua_misc_utils.h +++ b/src/pc/lua/utils/smlua_misc_utils.h @@ -56,6 +56,8 @@ void djui_reset_popup_disabled_override(void); bool djui_is_playerlist_open(void); /* |description|Checks if the DJUI playerlist is attempting to be opened|descriptionEnd| */ bool djui_attempting_to_open_playerlist(void); +/* |description|Gets the DJUI playerlist's page index|descriptionEnd| */ +u8 djui_get_playerlist_page_index(void); /* |description|Gets the DJUI menu font|descriptionEnd| */ enum DjuiFontType djui_menu_get_font(void); /* |description|Gets the DJUI menu theme|descriptionEnd| */ diff --git a/src/pc/mumble/mumble.c b/src/pc/mumble/mumble.c index 57f9576d8..dfe814601 100644 --- a/src/pc/mumble/mumble.c +++ b/src/pc/mumble/mumble.c @@ -73,14 +73,13 @@ void mumble_init(void) { void mumble_update(void) { - if (! lm) { + if (!lm) { return; } lm->uiTick++; - if (gDjuiInMainMenu) - { + if (gDjuiInMainMenu) { mumble_update_menu(); return; } @@ -173,7 +172,7 @@ bool should_update_context() { if (gCurrLevelNum == LEVEL_CASTLE) { // main floor if (gCurrAreaIndex == 1) { - return gMarioState->currentRoom < 10; + return gMarioState->currentRoom < 10; } // upstairs if (gCurrAreaIndex == 2) { diff --git a/src/pc/pc_main.c b/src/pc/pc_main.c index ed8508ba5..9c69e6c32 100644 --- a/src/pc/pc_main.c +++ b/src/pc/pc_main.c @@ -29,6 +29,7 @@ #include "thread.h" #include "controller/controller_api.h" #include "controller/controller_keyboard.h" +#include "controller/controller_mouse.h" #include "fs/fs.h" #include "game/display.h" // for gGlobalTimer @@ -96,6 +97,8 @@ static u32 sDrawnFrames = 0; bool gGameInited = false; bool gGfxInited = false; +f32 gMasterVolume; + u8 gLuaVolumeMaster = 127; u8 gLuaVolumeLevel = 127; u8 gLuaVolumeSfx = 127; @@ -256,18 +259,25 @@ void produce_interpolation_frames_and_delay(void) { static s16 sAudioBuffer[SAMPLES_HIGH * 2 * 2] = { 0 }; inline static void buffer_audio(void) { - bool shouldMute = configMuteFocusLoss && !WAPI.has_focus(); - const f32 masterMod = (f32)configMasterVolume / 127.0f * (f32)gLuaVolumeMaster / 127.0f; - set_sequence_player_volume(SEQ_PLAYER_LEVEL, shouldMute ? 0 : (f32)configMusicVolume / 127.0f * (f32)gLuaVolumeLevel / 127.0f * masterMod); - set_sequence_player_volume(SEQ_PLAYER_SFX, shouldMute ? 0 : (f32)configSfxVolume / 127.0f * (f32)gLuaVolumeSfx / 127.0f * masterMod); - set_sequence_player_volume(SEQ_PLAYER_ENV, shouldMute ? 0 : (f32)configEnvVolume / 127.0f * (f32)gLuaVolumeEnv / 127.0f * masterMod); + bool shouldMute = (configMuteFocusLoss && !WAPI.has_focus()) || (gMasterVolume == 0); + if (!shouldMute) { + set_sequence_player_volume(SEQ_PLAYER_LEVEL, (f32)configMusicVolume / 127.0f * (f32)gLuaVolumeLevel / 127.0f); + set_sequence_player_volume(SEQ_PLAYER_SFX, (f32)configSfxVolume / 127.0f * (f32)gLuaVolumeSfx / 127.0f); + set_sequence_player_volume(SEQ_PLAYER_ENV, (f32)configEnvVolume / 127.0f * (f32)gLuaVolumeEnv / 127.0f); + } int samplesLeft = audio_api->buffered(); u32 numAudioSamples = samplesLeft < audio_api->get_desired_buffered() ? SAMPLES_HIGH : SAMPLES_LOW; for (s32 i = 0; i < 2; i++) { create_next_audio_buffer(sAudioBuffer + i * (numAudioSamples * 2), numAudioSamples); } - audio_api->play((u8 *)sAudioBuffer, 2 * numAudioSamples * 4); + + if (!shouldMute) { + for (u16 i=0; i < ARRAY_COUNT(sAudioBuffer); i++) { + sAudioBuffer[i] *= gMasterVolume; + } + audio_api->play((u8 *)sAudioBuffer, 2 * numAudioSamples * 4); + } } void *audio_thread(UNUSED void *arg) { @@ -453,6 +463,7 @@ int main(int argc, char *argv[]) { gfx_init(&WAPI, &RAPI, TITLE); WAPI.set_keyboard_callbacks(keyboard_on_key_down, keyboard_on_key_up, keyboard_on_all_keys_up, keyboard_on_text_input, keyboard_on_text_editing); + WAPI.set_scroll_callback(mouse_on_scroll); } // render the rom setup screen diff --git a/src/pc/pc_main.h b/src/pc/pc_main.h index 6ad762d84..384bcc8dc 100644 --- a/src/pc/pc_main.h +++ b/src/pc/pc_main.h @@ -64,6 +64,8 @@ extern "C" { extern bool gGameInited; extern bool gGfxInited; +extern f32 gMasterVolume; + extern u8 gLuaVolumeMaster; extern u8 gLuaVolumeLevel; extern u8 gLuaVolumeSfx;