From 3825026faa216e82a4e1b22497c7ed78eb57eb95 Mon Sep 17 00:00:00 2001 From: MysterD Date: Tue, 11 Apr 2023 14:40:24 -0700 Subject: [PATCH] Made cur_obj_call_action_function safer --- src/game/behaviors/beta_boo_key.inc.c | 2 +- src/game/behaviors/boo.inc.c | 6 +++--- src/game/behaviors/bowser.inc.c | 6 +++--- src/game/behaviors/bowser_puzzle_piece.inc.c | 2 +- src/game/behaviors/bub.inc.c | 4 ++-- src/game/behaviors/bullet_bill.inc.c | 2 +- src/game/behaviors/cannon.inc.c | 2 +- src/game/behaviors/capswitch.inc.c | 2 +- src/game/behaviors/chuckya.inc.c | 2 +- src/game/behaviors/coin.inc.c | 2 +- src/game/behaviors/elevator.inc.c | 2 +- src/game/behaviors/exclamation_box.inc.c | 2 +- src/game/behaviors/fish.inc.c | 4 ++-- src/game/behaviors/heave_ho.inc.c | 2 +- src/game/behaviors/jumping_box.inc.c | 2 +- src/game/behaviors/king_bobomb.inc.c | 2 +- src/game/behaviors/lll_rotating_hex_flame.inc.c | 2 +- src/game/behaviors/mr_i.inc.c | 4 ++-- src/game/behaviors/piranha_plant.inc.c | 2 +- src/game/behaviors/thwomp.inc.c | 2 +- src/game/behaviors/tox_box.inc.c | 2 +- src/game/behaviors/tumbling_bridge.inc.c | 2 +- src/game/behaviors/tuxie.inc.c | 4 ++-- src/game/behaviors/tweester.inc.c | 2 +- src/game/behaviors/ukiki.inc.c | 2 +- src/game/behaviors/ukiki_cage.inc.c | 2 +- src/game/behaviors/whomp.inc.c | 2 +- src/game/object_helpers.c | 4 ++-- src/game/object_helpers.h | 4 +++- 29 files changed, 40 insertions(+), 38 deletions(-) diff --git a/src/game/behaviors/beta_boo_key.inc.c b/src/game/behaviors/beta_boo_key.inc.c index 27a85deee..2e81c7f0c 100644 --- a/src/game/behaviors/beta_boo_key.inc.c +++ b/src/game/behaviors/beta_boo_key.inc.c @@ -170,5 +170,5 @@ static void (*sBetaBooKeyActions[])(void) = { beta_boo_key_inside_boo_loop, beta * Update function for bhvBetaBooKey. */ void bhv_beta_boo_key_loop(void) { - cur_obj_call_action_function(sBetaBooKeyActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sBetaBooKeyActions); } diff --git a/src/game/behaviors/boo.inc.c b/src/game/behaviors/boo.inc.c index d799209f2..45e4a960a 100644 --- a/src/game/behaviors/boo.inc.c +++ b/src/game/behaviors/boo.inc.c @@ -555,7 +555,7 @@ void bhv_boo_loop(void) { //PARTIAL_UPDATE cur_obj_update_floor_and_walls(); - cur_obj_call_action_function(sBooActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sBooActions); cur_obj_move_standard(78); boo_approach_target_opacity_and_update_scale(); @@ -793,7 +793,7 @@ void bhv_big_boo_loop(void) { o->oGraphYOffset = o->oBooBaseScale * 60.0f; cur_obj_update_floor_and_walls(); - cur_obj_call_action_function(sBooGivingStarActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sBooGivingStarActions); cur_obj_move_standard(78); boo_approach_target_opacity_and_update_scale(); @@ -870,7 +870,7 @@ void bhv_boo_with_cage_loop(void) { //PARTIAL_UPDATE cur_obj_update_floor_and_walls(); - cur_obj_call_action_function(sBooWithCageActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sBooWithCageActions); cur_obj_move_standard(78); boo_approach_target_opacity_and_update_scale(); diff --git a/src/game/behaviors/bowser.inc.c b/src/game/behaviors/bowser.inc.c index 3b88896ab..8cf90add4 100644 --- a/src/game/behaviors/bowser.inc.c +++ b/src/game/behaviors/bowser.inc.c @@ -59,7 +59,7 @@ void bhv_bowser_tail_anchor_init(void) { } void bhv_bowser_tail_anchor_loop(void) { - cur_obj_call_action_function(sBowserTailAnchorActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sBowserTailAnchorActions); o->oParentRelativePosX = 90.0f; if (o->parentObj->oAction == 4) o->parentObj->oIntangibleTimer = -1; @@ -1204,7 +1204,7 @@ void bowser_free_update(void) { o->oBowserUnk10E = 0; cur_obj_update_floor_and_walls(); - cur_obj_call_action_function(sBowserActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sBowserActions); cur_obj_move_standard(-78); if (bowser_check_fallen_off_stage()) o->oAction = 2; // bowser go home? @@ -1657,7 +1657,7 @@ void bhv_falling_bowser_platform_loop(void) { } } - cur_obj_call_action_function(sFallingBowserPlatformActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sFallingBowserPlatformActions); } void bowser_flame_despawn(void) { diff --git a/src/game/behaviors/bowser_puzzle_piece.inc.c b/src/game/behaviors/bowser_puzzle_piece.inc.c index fa8250d97..c6eb63385 100644 --- a/src/game/behaviors/bowser_puzzle_piece.inc.c +++ b/src/game/behaviors/bowser_puzzle_piece.inc.c @@ -275,7 +275,7 @@ void (*sBowserPuzzlePieceActions[])(void) = { void bhv_lll_bowser_puzzle_piece_loop(void) { bhv_lll_bowser_puzzle_piece_update(); - cur_obj_call_action_function(sBowserPuzzlePieceActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sBowserPuzzlePieceActions); o->oPosX = o->oBowserPuzzlePieceOffsetX + o->oHomeX; o->oPosY = o->oBowserPuzzlePieceOffsetY + o->oHomeY; diff --git a/src/game/behaviors/bub.inc.c b/src/game/behaviors/bub.inc.c index bb4e83fbd..831b29166 100644 --- a/src/game/behaviors/bub.inc.c +++ b/src/game/behaviors/bub.inc.c @@ -28,7 +28,7 @@ void (*sBirdChirpChirpActions[])(void) = { bub_spawner_act_0, bub_spawner_act_1, bub_spawner_act_2, bub_spawner_act_3 }; void bhv_bub_spawner_loop(void) { - cur_obj_call_action_function(sBirdChirpChirpActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sBirdChirpChirpActions); } void bub_move_vertically(s32 a0) { @@ -136,7 +136,7 @@ void bhv_bub_loop(void) { } o->oWallHitboxRadius = 30.0f; cur_obj_update_floor_and_walls(); - cur_obj_call_action_function(sCheepCheepActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sCheepCheepActions); cur_obj_move_using_fvel_and_gravity(); if (o->parentObj->oAction == 2) obj_mark_for_deletion(o); diff --git a/src/game/behaviors/bullet_bill.inc.c b/src/game/behaviors/bullet_bill.inc.c index b1cf7ef01..8260f1fa5 100644 --- a/src/game/behaviors/bullet_bill.inc.c +++ b/src/game/behaviors/bullet_bill.inc.c @@ -86,7 +86,7 @@ void (*sBulletBillActions[])(void) = { bullet_bill_act_0, bullet_bill_act_1, bul bullet_bill_act_3, bullet_bill_act_4 }; void bhv_bullet_bill_loop(void) { - cur_obj_call_action_function(sBulletBillActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sBulletBillActions); if (cur_obj_check_interacted()) o->oAction = 4; } diff --git a/src/game/behaviors/cannon.inc.c b/src/game/behaviors/cannon.inc.c index a942bd099..c5d7bc6da 100644 --- a/src/game/behaviors/cannon.inc.c +++ b/src/game/behaviors/cannon.inc.c @@ -237,7 +237,7 @@ void bhv_cannon_base_loop(void) { cur_obj_push_mario_away_from_cylinder(220, 300); } - cur_obj_call_action_function(sOpenedCannonActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sOpenedCannonActions); if (o->oCannonUnkF8) o->oCannonUnkF8++; o->oInteractStatus = 0; diff --git a/src/game/behaviors/capswitch.inc.c b/src/game/behaviors/capswitch.inc.c index 2e1479635..dab3e6ad4 100644 --- a/src/game/behaviors/capswitch.inc.c +++ b/src/game/behaviors/capswitch.inc.c @@ -65,5 +65,5 @@ void bhv_cap_switch_loop(void) { sync_object_init_field(o, &capSwitchForcePress); } - cur_obj_call_action_function(sCapSwitchActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sCapSwitchActions); } diff --git a/src/game/behaviors/chuckya.inc.c b/src/game/behaviors/chuckya.inc.c index 443fef3df..798e5dc03 100644 --- a/src/game/behaviors/chuckya.inc.c +++ b/src/game/behaviors/chuckya.inc.c @@ -193,7 +193,7 @@ void (*sChuckyaActions[])(void) = { chuckya_act_0, chuckya_act_1, chuckya_act_2, void chuckya_move(void) { cur_obj_update_floor_and_walls(); - cur_obj_call_action_function(sChuckyaActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sChuckyaActions); cur_obj_move_standard(-30); if (o->oInteractStatus & INT_STATUS_GRABBED_MARIO) { o->oAction = 1; diff --git a/src/game/behaviors/coin.inc.c b/src/game/behaviors/coin.inc.c index 4733bcd70..b44835da7 100644 --- a/src/game/behaviors/coin.inc.c +++ b/src/game/behaviors/coin.inc.c @@ -255,7 +255,7 @@ void coin_inside_boo_act_0(void) { void (*sCoinInsideBooActions[])(void) = { coin_inside_boo_act_0, coin_inside_boo_act_1 }; void bhv_coin_inside_boo_loop(void) { - cur_obj_call_action_function(sCoinInsideBooActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sCoinInsideBooActions); } void bhv_coin_sparkles_loop(void) { diff --git a/src/game/behaviors/elevator.inc.c b/src/game/behaviors/elevator.inc.c index 19c78e49c..a0c028159 100644 --- a/src/game/behaviors/elevator.inc.c +++ b/src/game/behaviors/elevator.inc.c @@ -154,7 +154,7 @@ struct SpawnParticlesInfo D_8032F3FC = { 0, 5, MODEL_WHITE_PARTICLE_DL, 0, 2.0f, 2.0f }; void bhv_elevator_loop(void) { - cur_obj_call_action_function(sElevatorActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sElevatorActions); // allow bubbled players to pass through if (gMarioStates[0].action == ACT_BUBBLED) { diff --git a/src/game/behaviors/exclamation_box.inc.c b/src/game/behaviors/exclamation_box.inc.c index 8a1ea7896..01a2e7583 100644 --- a/src/game/behaviors/exclamation_box.inc.c +++ b/src/game/behaviors/exclamation_box.inc.c @@ -214,5 +214,5 @@ void bhv_exclamation_box_init(void) { void bhv_exclamation_box_loop(void) { cur_obj_scale(2.0f); - cur_obj_call_action_function(sExclamationBoxActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sExclamationBoxActions); } diff --git a/src/game/behaviors/fish.inc.c b/src/game/behaviors/fish.inc.c index 0c4e36c5d..330758f62 100644 --- a/src/game/behaviors/fish.inc.c +++ b/src/game/behaviors/fish.inc.c @@ -73,7 +73,7 @@ static void (*sFishSpawnerActions[])(void) = { }; void bhv_fish_spawner_loop(void) { - cur_obj_call_action_function(sFishSpawnerActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sFishSpawnerActions); } /** @@ -276,7 +276,7 @@ void bhv_fish_loop(void) } // Call fish action methods and apply physics engine. - cur_obj_call_action_function(sFishActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sFishActions); cur_obj_move_using_fvel_and_gravity(); // If the parent object has action set to two, then delete the fish object. diff --git a/src/game/behaviors/heave_ho.inc.c b/src/game/behaviors/heave_ho.inc.c index 7b84f977e..8e86f0571 100644 --- a/src/game/behaviors/heave_ho.inc.c +++ b/src/game/behaviors/heave_ho.inc.c @@ -99,7 +99,7 @@ void (*sHeaveHoActions[])(void) = { heave_ho_act_0, heave_ho_act_1, heave_ho_act void heave_ho_move(void) { cur_obj_update_floor_and_walls(); - cur_obj_call_action_function(sHeaveHoActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sHeaveHoActions); cur_obj_move_standard(-78); if (o->oMoveFlags & OBJ_MOVE_MASK_IN_WATER) o->oGraphYOffset = -15.0f; diff --git a/src/game/behaviors/jumping_box.inc.c b/src/game/behaviors/jumping_box.inc.c index 8dc8ef8fe..732348ac3 100644 --- a/src/game/behaviors/jumping_box.inc.c +++ b/src/game/behaviors/jumping_box.inc.c @@ -41,7 +41,7 @@ void jumping_box_free_update(void) { obj_set_hitbox(o, &sJumpingBoxHitbox); cur_obj_update_floor_and_walls(); cur_obj_move_standard(78); - cur_obj_call_action_function(sJumpingBoxActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sJumpingBoxActions); } void bhv_jumping_box_loop(void) { diff --git a/src/game/behaviors/king_bobomb.inc.c b/src/game/behaviors/king_bobomb.inc.c index 17710e01b..ffc786e10 100644 --- a/src/game/behaviors/king_bobomb.inc.c +++ b/src/game/behaviors/king_bobomb.inc.c @@ -365,7 +365,7 @@ void king_bobomb_move(void) { cur_obj_move_standard(-78); else cur_obj_move_using_fvel_and_gravity(); - cur_obj_call_action_function(sKingBobombActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sKingBobombActions); exec_anim_sound_state(sKingBobombSoundStates); s32 distanceToPlayer = dist_between_objects(o, gMarioStates[0].marioObj); if (distanceToPlayer < 5000.0f * draw_distance_scalar()) diff --git a/src/game/behaviors/lll_rotating_hex_flame.inc.c b/src/game/behaviors/lll_rotating_hex_flame.inc.c index a47d7ec58..02c55cd25 100644 --- a/src/game/behaviors/lll_rotating_hex_flame.inc.c +++ b/src/game/behaviors/lll_rotating_hex_flame.inc.c @@ -60,7 +60,7 @@ void bhv_lll_rotating_block_fire_bars_loop(void) { sync_object_init(o, 4000.0f); sync_object_init_field(o, &o->oAngleVelYaw); } - cur_obj_call_action_function(sRotatingCwFireBarsActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sRotatingCwFireBarsActions); if (o->oBehParams2ndByte == 0) load_object_collision_model(); } diff --git a/src/game/behaviors/mr_i.inc.c b/src/game/behaviors/mr_i.inc.c index 3202eefd1..3033d7176 100644 --- a/src/game/behaviors/mr_i.inc.c +++ b/src/game/behaviors/mr_i.inc.c @@ -33,7 +33,7 @@ void mr_i_piranha_particle_act_1(void) { void (*sMrIParticleActions[])(void) = { mr_i_piranha_particle_act_0, mr_i_piranha_particle_act_1 }; void bhv_mr_i_particle_loop(void) { - cur_obj_call_action_function(sMrIParticleActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sMrIParticleActions); } void spawn_mr_i_particle(void) { @@ -283,7 +283,7 @@ void bhv_mr_i_loop(void) { s32 distanceToPlayer = player ? dist_between_objects(o, player) : 10000; obj_set_hitbox(o, &sMrIHitbox); - cur_obj_call_action_function(sMrIActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sMrIActions); if (o->oAction != 3) { if (distanceToPlayer > 3000.0f || o->activeFlags & ACTIVE_FLAG_IN_DIFFERENT_ROOM) { o->oAction = 0; diff --git a/src/game/behaviors/piranha_plant.inc.c b/src/game/behaviors/piranha_plant.inc.c index e7db9cb0d..97569d241 100644 --- a/src/game/behaviors/piranha_plant.inc.c +++ b/src/game/behaviors/piranha_plant.inc.c @@ -369,7 +369,7 @@ void bhv_piranha_plant_loop(void) { cur_obj_set_hitbox_radius_and_height(150.0f, 100.0f); cur_obj_set_hurtbox_radius_and_height(150.0f, 100.0f); - cur_obj_call_action_function(TablePiranhaPlantActions); + CUR_OBJ_CALL_ACTION_FUNCTION(TablePiranhaPlantActions); // In WF, hide all Piranha Plants once high enough up. if (gCurrLevelNum == LEVEL_WF) { struct Object* player = gMarioStates[0].marioObj; diff --git a/src/game/behaviors/thwomp.inc.c b/src/game/behaviors/thwomp.inc.c index e016b67b1..51d711508 100644 --- a/src/game/behaviors/thwomp.inc.c +++ b/src/game/behaviors/thwomp.inc.c @@ -63,5 +63,5 @@ void bhv_grindel_thwomp_loop(void) { sync_object_init_field(o, &o->oTimer); sync_object_init_field(o, &o->oVelY); } - cur_obj_call_action_function(sGrindelThwompActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sGrindelThwompActions); } diff --git a/src/game/behaviors/tox_box.inc.c b/src/game/behaviors/tox_box.inc.c index 4bdb567bc..2a5bbd5d4 100644 --- a/src/game/behaviors/tox_box.inc.c +++ b/src/game/behaviors/tox_box.inc.c @@ -85,6 +85,6 @@ void bhv_tox_box_loop(void) { sync_object_init_field(o, &o->oToxBoxMovementStep); } } - cur_obj_call_action_function(sToxBoxActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sToxBoxActions); load_object_collision_model(); } diff --git a/src/game/behaviors/tumbling_bridge.inc.c b/src/game/behaviors/tumbling_bridge.inc.c index 7e2b21520..c8ce02b97 100644 --- a/src/game/behaviors/tumbling_bridge.inc.c +++ b/src/game/behaviors/tumbling_bridge.inc.c @@ -164,5 +164,5 @@ void bhv_tumbling_bridge_loop(void) { } } - cur_obj_call_action_function(sTumblingBridgeActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sTumblingBridgeActions); } diff --git a/src/game/behaviors/tuxie.inc.c b/src/game/behaviors/tuxie.inc.c index fe696cde8..0b1fe7a40 100644 --- a/src/game/behaviors/tuxie.inc.c +++ b/src/game/behaviors/tuxie.inc.c @@ -160,7 +160,7 @@ void bhv_tuxies_mother_loop(void) { } o->activeFlags |= ACTIVE_FLAG_UNK10; cur_obj_update_floor_and_walls(); - cur_obj_call_action_function(sTuxiesMotherActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sTuxiesMotherActions); cur_obj_move_standard(-78); play_penguin_walking_sound(PENGUIN_WALK_BIG); o->oInteractStatus = 0; @@ -289,7 +289,7 @@ void small_penguin_free_actions(void) { cur_obj_become_tangible(); cur_obj_enable_rendering(); cur_obj_update_floor_and_walls(); - cur_obj_call_action_function(sSmallPenguinActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sSmallPenguinActions); cur_obj_move_standard(-78); play_penguin_walking_sound(PENGUIN_WALK_BABY); } diff --git a/src/game/behaviors/tweester.inc.c b/src/game/behaviors/tweester.inc.c index 0f97a9fed..8ac1eadc1 100644 --- a/src/game/behaviors/tweester.inc.c +++ b/src/game/behaviors/tweester.inc.c @@ -149,7 +149,7 @@ void bhv_tweester_loop(void) { } obj_set_hitbox(o, &sTweesterHitbox); - cur_obj_call_action_function(sTweesterActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sTweesterActions); o->oInteractStatus = 0; } diff --git a/src/game/behaviors/ukiki.inc.c b/src/game/behaviors/ukiki.inc.c index 0e0e987be..1d437351e 100644 --- a/src/game/behaviors/ukiki.inc.c +++ b/src/game/behaviors/ukiki.inc.c @@ -504,7 +504,7 @@ void ukiki_free_loop(void) { s32 steepSlopeAngleDegrees; cur_obj_update_floor_and_walls(); - cur_obj_call_action_function(sUkikiActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sUkikiActions); if (o->oAction == UKIKI_ACT_GO_TO_CAGE || o->oAction == UKIKI_ACT_RETURN_HOME) { steepSlopeAngleDegrees = -88; diff --git a/src/game/behaviors/ukiki_cage.inc.c b/src/game/behaviors/ukiki_cage.inc.c index 6ef80bd1e..31b47d40c 100644 --- a/src/game/behaviors/ukiki_cage.inc.c +++ b/src/game/behaviors/ukiki_cage.inc.c @@ -103,5 +103,5 @@ void (*sUkikiCageActions[])(void) = { * Main behavior loop for the cage. Only calls the relevant action. */ void bhv_ukiki_cage_loop(void) { - cur_obj_call_action_function(sUkikiCageActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sUkikiCageActions); } diff --git a/src/game/behaviors/whomp.inc.c b/src/game/behaviors/whomp.inc.c index 67468d559..75abccbed 100644 --- a/src/game/behaviors/whomp.inc.c +++ b/src/game/behaviors/whomp.inc.c @@ -284,7 +284,7 @@ void bhv_whomp_loop(void) { } cur_obj_update_floor_and_walls(); - cur_obj_call_action_function(sWhompActions); + CUR_OBJ_CALL_ACTION_FUNCTION(sWhompActions); cur_obj_move_standard(-20); if (o->oAction != 9) { // o->oBehParams2ndByte here seems to be a flag diff --git a/src/game/object_helpers.c b/src/game/object_helpers.c index 42d5326ac..350b7e012 100644 --- a/src/game/object_helpers.c +++ b/src/game/object_helpers.c @@ -2663,9 +2663,9 @@ s32 cur_obj_move_up_and_down(s32 a0) { return FALSE; } -void cur_obj_call_action_function(void (*actionFunctions[])(void)) { +void cur_obj_call_action_function(void (*actionFunctions[])(void), uint32_t actionFunctionsLength) { if (!actionFunctions) { return; } - + if ((uint32_t)o->oAction >= actionFunctionsLength) { return; } void (*actionFunction)(void) = actionFunctions[o->oAction]; if (!actionFunction) { return; } actionFunction(); diff --git a/src/game/object_helpers.h b/src/game/object_helpers.h index 9e8ef5f3c..83c8c5313 100644 --- a/src/game/object_helpers.h +++ b/src/game/object_helpers.h @@ -256,6 +256,8 @@ struct GraphNode_802A45E4 { /*0x22*/ s16 unk22; }; +#define CUR_OBJ_CALL_ACTION_FUNCTION(_action_func) cur_obj_call_action_function(_action_func, (sizeof(_action_func) / sizeof(&_action_func[0]))) + void obj_set_hitbox(struct Object *obj, struct ObjectHitbox *hitbox); s32 signum_positive(s32 x); f32 absf(f32 x); @@ -273,7 +275,7 @@ void cur_obj_scale_over_time(s32 a0, s32 a1, f32 sp10, f32 sp14); void cur_obj_set_pos_to_home_with_debug(void); s32 cur_obj_is_mario_on_platform(void); s32 cur_obj_move_up_and_down(s32 a0); -void cur_obj_call_action_function(void (*actionFunctions[])(void)); +void cur_obj_call_action_function(void (*actionFunctions[])(void), uint32_t actionFunctionsLength); void spawn_base_star_with_no_lvl_exit(void); s32 bit_shift_left(s32 a0); s32 cur_obj_mario_far_away(void);