diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 40bd111cba..8df75c676b 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -237,21 +237,21 @@ void Player_InitItemAction_SpawnExplosive(PlayState* play, Player* this); void Player_InitItemAction_SpawnHookshot(PlayState* play, Player* this); void Player_InitItemAction_5(PlayState* play, Player* this); -s32 Player_ActionChange_0(Player* this, PlayState* play); -s32 Player_ActionChange_1(Player* this, PlayState* play); -s32 Player_ActionChange_2(Player* this, PlayState* play); -s32 Player_ActionChange_3(Player* this, PlayState* play); -s32 Player_ActionChange_4(Player* this, PlayState* play); -s32 Player_ActionChange_5(Player* this, PlayState* play); -s32 Player_ActionChange_6(Player* this, PlayState* play); -s32 Player_ActionChange_7(Player* this, PlayState* play); -s32 Player_ActionChange_8(Player* this, PlayState* play); -s32 Player_ActionChange_9(Player* this, PlayState* play); -s32 Player_ActionChange_10(Player* this, PlayState* play); -s32 Player_ActionChange_11(Player* this, PlayState* play); -s32 Player_ActionChange_12(Player* this, PlayState* play); -s32 Player_ActionChange_13(Player* this, PlayState* play); -s32 Player_ActionChange_14(Player* this, PlayState* play); +s32 Player_ActionHandler_0(Player* this, PlayState* play); +s32 Player_ActionHandler_1(Player* this, PlayState* play); +s32 Player_ActionHandler_2(Player* this, PlayState* play); +s32 Player_ActionHandler_3(Player* this, PlayState* play); +s32 Player_ActionHandler_4(Player* this, PlayState* play); +s32 Player_ActionHandler_5(Player* this, PlayState* play); +s32 Player_ActionHandler_6(Player* this, PlayState* play); +s32 Player_ActionHandler_7(Player* this, PlayState* play); +s32 Player_ActionHandler_8(Player* this, PlayState* play); +s32 Player_ActionHandler_9(Player* this, PlayState* play); +s32 Player_ActionHandler_10(Player* this, PlayState* play); +s32 Player_ActionHandler_11(Player* this, PlayState* play); +s32 Player_ActionHandler_12(Player* this, PlayState* play); +s32 Player_ActionHandler_13(Player* this, PlayState* play); +s32 Player_ActionHandler_14(Player* this, PlayState* play); /* Init Mode functions */ void Player_InitMode_0(PlayState* play, Player* this); @@ -4978,197 +4978,201 @@ s32 Player_GetMovementSpeedAndYaw(Player* this, f32* outSpeedTarget, s16* outYaw return true; } -typedef enum ActionChangeIndex { - /* 0x0 */ PLAYER_ACTION_CHG_0, - /* 0x1 */ PLAYER_ACTION_CHG_1, - /* 0x2 */ PLAYER_ACTION_CHG_2, - /* 0x3 */ PLAYER_ACTION_CHG_3, - /* 0x4 */ PLAYER_ACTION_CHG_4, - /* 0x5 */ PLAYER_ACTION_CHG_5, - /* 0x6 */ PLAYER_ACTION_CHG_6, - /* 0x7 */ PLAYER_ACTION_CHG_7, - /* 0x8 */ PLAYER_ACTION_CHG_8, - /* 0x9 */ PLAYER_ACTION_CHG_9, - /* 0xA */ PLAYER_ACTION_CHG_10, - /* 0xB */ PLAYER_ACTION_CHG_11, - /* 0xC */ PLAYER_ACTION_CHG_12, - /* 0xD */ PLAYER_ACTION_CHG_13, - /* 0xE */ PLAYER_ACTION_CHG_14, - /* 0xF */ PLAYER_ACTION_CHG_MAX -} ActionChangeIndex; +typedef enum ActionHandlerIndex { + /* 0x0 */ PLAYER_ACTION_HANDLER_0, + /* 0x1 */ PLAYER_ACTION_HANDLER_1, + /* 0x2 */ PLAYER_ACTION_HANDLER_2, + /* 0x3 */ PLAYER_ACTION_HANDLER_3, + /* 0x4 */ PLAYER_ACTION_HANDLER_4, + /* 0x5 */ PLAYER_ACTION_HANDLER_5, + /* 0x6 */ PLAYER_ACTION_HANDLER_6, + /* 0x7 */ PLAYER_ACTION_HANDLER_7, + /* 0x8 */ PLAYER_ACTION_HANDLER_8, + /* 0x9 */ PLAYER_ACTION_HANDLER_9, + /* 0xA */ PLAYER_ACTION_HANDLER_10, + /* 0xB */ PLAYER_ACTION_HANDLER_11, + /* 0xC */ PLAYER_ACTION_HANDLER_12, + /* 0xD */ PLAYER_ACTION_HANDLER_13, + /* 0xE */ PLAYER_ACTION_HANDLER_14, + /* 0xF */ PLAYER_ACTION_HANDLER_MAX +} ActionHandlerIndex; /** - * The values of following arrays are used as indices for the `sPlayerActionChangeFuncs` array. + * The values of following arrays are used as indices for the `sActionHandlerFuncs` array. * Each index correspond to a function which will be called sequentially until any of them return `true`. * Negative marks the end of the array. */ -s8 sPlayerActionChangeList1[] = { - /* 0 */ PLAYER_ACTION_CHG_13, - /* 1 */ PLAYER_ACTION_CHG_2, - /* 2 */ PLAYER_ACTION_CHG_4, - /* 3 */ PLAYER_ACTION_CHG_9, - /* 4 */ PLAYER_ACTION_CHG_10, - /* 5 */ PLAYER_ACTION_CHG_11, - /* 6 */ PLAYER_ACTION_CHG_8, - /* 7 */ -PLAYER_ACTION_CHG_7, +s8 sActionHandlerList1[] = { + /* 0 */ PLAYER_ACTION_HANDLER_13, + /* 1 */ PLAYER_ACTION_HANDLER_2, + /* 2 */ PLAYER_ACTION_HANDLER_4, + /* 3 */ PLAYER_ACTION_HANDLER_9, + /* 4 */ PLAYER_ACTION_HANDLER_10, + /* 5 */ PLAYER_ACTION_HANDLER_11, + /* 6 */ PLAYER_ACTION_HANDLER_8, + /* 7 */ -PLAYER_ACTION_HANDLER_7, }; -s8 sPlayerActionChangeList2[] = { - /* 0 */ PLAYER_ACTION_CHG_13, - /* 1 */ PLAYER_ACTION_CHG_1, - /* 2 */ PLAYER_ACTION_CHG_2, - /* 3 */ PLAYER_ACTION_CHG_5, - /* 4 */ PLAYER_ACTION_CHG_3, - /* 5 */ PLAYER_ACTION_CHG_4, - /* 6 */ PLAYER_ACTION_CHG_9, - /* 7 */ PLAYER_ACTION_CHG_10, - /* 8 */ PLAYER_ACTION_CHG_11, - /* 9 */ PLAYER_ACTION_CHG_7, - /* 10 */ PLAYER_ACTION_CHG_8, - /* 11 */ -PLAYER_ACTION_CHG_6, +s8 sActionHandlerList2[] = { + /* 0 */ PLAYER_ACTION_HANDLER_13, + /* 1 */ PLAYER_ACTION_HANDLER_1, + /* 2 */ PLAYER_ACTION_HANDLER_2, + /* 3 */ PLAYER_ACTION_HANDLER_5, + /* 4 */ PLAYER_ACTION_HANDLER_3, + /* 5 */ PLAYER_ACTION_HANDLER_4, + /* 6 */ PLAYER_ACTION_HANDLER_9, + /* 7 */ PLAYER_ACTION_HANDLER_10, + /* 8 */ PLAYER_ACTION_HANDLER_11, + /* 9 */ PLAYER_ACTION_HANDLER_7, + /* 10 */ PLAYER_ACTION_HANDLER_8, + /* 11 */ -PLAYER_ACTION_HANDLER_6, }; -s8 sPlayerActionChangeList3[] = { - /* 0 */ PLAYER_ACTION_CHG_13, - /* 1 */ PLAYER_ACTION_CHG_1, - /* 2 */ PLAYER_ACTION_CHG_2, - /* 3 */ PLAYER_ACTION_CHG_3, - /* 4 */ PLAYER_ACTION_CHG_4, - /* 5 */ PLAYER_ACTION_CHG_9, - /* 6 */ PLAYER_ACTION_CHG_10, - /* 7 */ PLAYER_ACTION_CHG_11, - /* 8 */ PLAYER_ACTION_CHG_8, - /* 9 */ PLAYER_ACTION_CHG_7, - /* 10 */ -PLAYER_ACTION_CHG_6, +s8 sActionHandlerList3[] = { + /* 0 */ PLAYER_ACTION_HANDLER_13, + /* 1 */ PLAYER_ACTION_HANDLER_1, + /* 2 */ PLAYER_ACTION_HANDLER_2, + /* 3 */ PLAYER_ACTION_HANDLER_3, + /* 4 */ PLAYER_ACTION_HANDLER_4, + /* 5 */ PLAYER_ACTION_HANDLER_9, + /* 6 */ PLAYER_ACTION_HANDLER_10, + /* 7 */ PLAYER_ACTION_HANDLER_11, + /* 8 */ PLAYER_ACTION_HANDLER_8, + /* 9 */ PLAYER_ACTION_HANDLER_7, + /* 10 */ -PLAYER_ACTION_HANDLER_6, }; -s8 sPlayerActionChangeList4[] = { - /* 0 */ PLAYER_ACTION_CHG_13, - /* 1 */ PLAYER_ACTION_CHG_2, - /* 2 */ PLAYER_ACTION_CHG_4, - /* 3 */ PLAYER_ACTION_CHG_9, - /* 4 */ PLAYER_ACTION_CHG_10, - /* 5 */ PLAYER_ACTION_CHG_11, - /* 6 */ PLAYER_ACTION_CHG_8, - /* 7 */ -PLAYER_ACTION_CHG_7, +s8 sActionHandlerList4[] = { + /* 0 */ PLAYER_ACTION_HANDLER_13, + /* 1 */ PLAYER_ACTION_HANDLER_2, + /* 2 */ PLAYER_ACTION_HANDLER_4, + /* 3 */ PLAYER_ACTION_HANDLER_9, + /* 4 */ PLAYER_ACTION_HANDLER_10, + /* 5 */ PLAYER_ACTION_HANDLER_11, + /* 6 */ PLAYER_ACTION_HANDLER_8, + /* 7 */ -PLAYER_ACTION_HANDLER_7, }; -s8 sPlayerActionChangeList5[] = { - /* 0 */ PLAYER_ACTION_CHG_13, - /* 1 */ PLAYER_ACTION_CHG_2, - /* 2 */ PLAYER_ACTION_CHG_4, - /* 3 */ PLAYER_ACTION_CHG_9, - /* 4 */ PLAYER_ACTION_CHG_10, - /* 5 */ PLAYER_ACTION_CHG_11, - /* 6 */ PLAYER_ACTION_CHG_12, - /* 7 */ PLAYER_ACTION_CHG_8, - /* 8 */ -PLAYER_ACTION_CHG_7, +s8 sActionHandlerList5[] = { + /* 0 */ PLAYER_ACTION_HANDLER_13, + /* 1 */ PLAYER_ACTION_HANDLER_2, + /* 2 */ PLAYER_ACTION_HANDLER_4, + /* 3 */ PLAYER_ACTION_HANDLER_9, + /* 4 */ PLAYER_ACTION_HANDLER_10, + /* 5 */ PLAYER_ACTION_HANDLER_11, + /* 6 */ PLAYER_ACTION_HANDLER_12, + /* 7 */ PLAYER_ACTION_HANDLER_8, + /* 8 */ -PLAYER_ACTION_HANDLER_7, }; -s8 sPlayerActionChangeList6[] = { - /* 0 */ -PLAYER_ACTION_CHG_7, +s8 sActionHandlerList6[] = { + /* 0 */ -PLAYER_ACTION_HANDLER_7, }; -s8 sPlayerActionChangeList7[] = { - /* 0 */ PLAYER_ACTION_CHG_0, - /* 1 */ PLAYER_ACTION_CHG_11, - /* 2 */ PLAYER_ACTION_CHG_1, - /* 3 */ PLAYER_ACTION_CHG_2, - /* 4 */ PLAYER_ACTION_CHG_3, - /* 5 */ PLAYER_ACTION_CHG_5, - /* 6 */ PLAYER_ACTION_CHG_4, - /* 7 */ PLAYER_ACTION_CHG_9, - /* 8 */ PLAYER_ACTION_CHG_8, - /* 9 */ PLAYER_ACTION_CHG_7, - /* 10 */ -PLAYER_ACTION_CHG_6, +s8 sActionHandlerList7[] = { + /* 0 */ PLAYER_ACTION_HANDLER_0, + /* 1 */ PLAYER_ACTION_HANDLER_11, + /* 2 */ PLAYER_ACTION_HANDLER_1, + /* 3 */ PLAYER_ACTION_HANDLER_2, + /* 4 */ PLAYER_ACTION_HANDLER_3, + /* 5 */ PLAYER_ACTION_HANDLER_5, + /* 6 */ PLAYER_ACTION_HANDLER_4, + /* 7 */ PLAYER_ACTION_HANDLER_9, + /* 8 */ PLAYER_ACTION_HANDLER_8, + /* 9 */ PLAYER_ACTION_HANDLER_7, + /* 10 */ -PLAYER_ACTION_HANDLER_6, }; -s8 sPlayerActionChangeList8[] = { - /* 0 */ PLAYER_ACTION_CHG_0, - /* 1 */ PLAYER_ACTION_CHG_11, - /* 2 */ PLAYER_ACTION_CHG_1, - /* 3 */ PLAYER_ACTION_CHG_2, - /* 4 */ PLAYER_ACTION_CHG_3, - /* 5 */ PLAYER_ACTION_CHG_12, - /* 6 */ PLAYER_ACTION_CHG_5, - /* 7 */ PLAYER_ACTION_CHG_4, - /* 8 */ PLAYER_ACTION_CHG_9, - /* 9 */ PLAYER_ACTION_CHG_8, - /* 10 */ PLAYER_ACTION_CHG_7, - /* 11 */ -PLAYER_ACTION_CHG_6, +s8 sActionHandlerList8[] = { + /* 0 */ PLAYER_ACTION_HANDLER_0, + /* 1 */ PLAYER_ACTION_HANDLER_11, + /* 2 */ PLAYER_ACTION_HANDLER_1, + /* 3 */ PLAYER_ACTION_HANDLER_2, + /* 4 */ PLAYER_ACTION_HANDLER_3, + /* 5 */ PLAYER_ACTION_HANDLER_12, + /* 6 */ PLAYER_ACTION_HANDLER_5, + /* 7 */ PLAYER_ACTION_HANDLER_4, + /* 8 */ PLAYER_ACTION_HANDLER_9, + /* 9 */ PLAYER_ACTION_HANDLER_8, + /* 10 */ PLAYER_ACTION_HANDLER_7, + /* 11 */ -PLAYER_ACTION_HANDLER_6, }; -s8 sPlayerActionChangeList9[] = { - /* 0 */ PLAYER_ACTION_CHG_13, - /* 1 */ PLAYER_ACTION_CHG_1, - /* 2 */ PLAYER_ACTION_CHG_2, - /* 3 */ PLAYER_ACTION_CHG_3, - /* 4 */ PLAYER_ACTION_CHG_12, - /* 5 */ PLAYER_ACTION_CHG_5, - /* 6 */ PLAYER_ACTION_CHG_4, - /* 7 */ PLAYER_ACTION_CHG_9, - /* 8 */ PLAYER_ACTION_CHG_10, - /* 9 */ PLAYER_ACTION_CHG_11, - /* 10 */ PLAYER_ACTION_CHG_8, - /* 11 */ PLAYER_ACTION_CHG_7, - /* 12 */ -PLAYER_ACTION_CHG_6, +s8 sActionHandlerList9[] = { + /* 0 */ PLAYER_ACTION_HANDLER_13, + /* 1 */ PLAYER_ACTION_HANDLER_1, + /* 2 */ PLAYER_ACTION_HANDLER_2, + /* 3 */ PLAYER_ACTION_HANDLER_3, + /* 4 */ PLAYER_ACTION_HANDLER_12, + /* 5 */ PLAYER_ACTION_HANDLER_5, + /* 6 */ PLAYER_ACTION_HANDLER_4, + /* 7 */ PLAYER_ACTION_HANDLER_9, + /* 8 */ PLAYER_ACTION_HANDLER_10, + /* 9 */ PLAYER_ACTION_HANDLER_11, + /* 10 */ PLAYER_ACTION_HANDLER_8, + /* 11 */ PLAYER_ACTION_HANDLER_7, + /* 12 */ -PLAYER_ACTION_HANDLER_6, }; -s8 sPlayerActionChangeList10[] = { - /* 0 */ PLAYER_ACTION_CHG_10, - /* 1 */ PLAYER_ACTION_CHG_8, - /* 2 */ -PLAYER_ACTION_CHG_7, +s8 sActionHandlerList10[] = { + /* 0 */ PLAYER_ACTION_HANDLER_10, + /* 1 */ PLAYER_ACTION_HANDLER_8, + /* 2 */ -PLAYER_ACTION_HANDLER_7, }; -s8 sPlayerActionChangeList11[] = { - /* 0 */ PLAYER_ACTION_CHG_0, - /* 1 */ PLAYER_ACTION_CHG_12, - /* 2 */ PLAYER_ACTION_CHG_5, - /* 3 */ PLAYER_ACTION_CHG_4, - /* 4 */ -PLAYER_ACTION_CHG_14, +s8 sActionHandlerList11[] = { + /* 0 */ PLAYER_ACTION_HANDLER_0, + /* 1 */ PLAYER_ACTION_HANDLER_12, + /* 2 */ PLAYER_ACTION_HANDLER_5, + /* 3 */ PLAYER_ACTION_HANDLER_4, + /* 4 */ -PLAYER_ACTION_HANDLER_14, }; -s8 sPlayerActionChangeList12[] = { - /* 0 */ PLAYER_ACTION_CHG_13, - /* 1 */ PLAYER_ACTION_CHG_2, - /* 2 */ -PLAYER_ACTION_CHG_4, +s8 sActionHandlerList12[] = { + /* 0 */ PLAYER_ACTION_HANDLER_13, + /* 1 */ PLAYER_ACTION_HANDLER_2, + /* 2 */ -PLAYER_ACTION_HANDLER_4, }; -s32 (*sPlayerActionChangeFuncs[PLAYER_ACTION_CHG_MAX])(Player*, PlayState*) = { - Player_ActionChange_0, // PLAYER_ACTION_CHG_0 - Player_ActionChange_1, // PLAYER_ACTION_CHG_1 - Player_ActionChange_2, // PLAYER_ACTION_CHG_2 - Player_ActionChange_3, // PLAYER_ACTION_CHG_3 - Player_ActionChange_4, // PLAYER_ACTION_CHG_4 - Player_ActionChange_5, // PLAYER_ACTION_CHG_5 - Player_ActionChange_6, // PLAYER_ACTION_CHG_6 - Player_ActionChange_7, // PLAYER_ACTION_CHG_7 - Player_ActionChange_8, // PLAYER_ACTION_CHG_8 - Player_ActionChange_9, // PLAYER_ACTION_CHG_9 - Player_ActionChange_10, // PLAYER_ACTION_CHG_10 - Player_ActionChange_11, // PLAYER_ACTION_CHG_11 - Player_ActionChange_12, // PLAYER_ACTION_CHG_12 - Player_ActionChange_13, // PLAYER_ACTION_CHG_13 - Player_ActionChange_14, // PLAYER_ACTION_CHG_14 +s32 (*sActionHandlerFuncs[PLAYER_ACTION_HANDLER_MAX])(Player* this, PlayState* play) = { + Player_ActionHandler_0, // PLAYER_ACTION_HANDLER_0 + Player_ActionHandler_1, // PLAYER_ACTION_HANDLER_1 + Player_ActionHandler_2, // PLAYER_ACTION_HANDLER_2 + Player_ActionHandler_3, // PLAYER_ACTION_HANDLER_3 + Player_ActionHandler_4, // PLAYER_ACTION_HANDLER_4 + Player_ActionHandler_5, // PLAYER_ACTION_HANDLER_5 + Player_ActionHandler_6, // PLAYER_ACTION_HANDLER_6 + Player_ActionHandler_7, // PLAYER_ACTION_HANDLER_7 + Player_ActionHandler_8, // PLAYER_ACTION_HANDLER_8 + Player_ActionHandler_9, // PLAYER_ACTION_HANDLER_9 + Player_ActionHandler_10, // PLAYER_ACTION_HANDLER_10 + Player_ActionHandler_11, // PLAYER_ACTION_HANDLER_11 + Player_ActionHandler_12, // PLAYER_ACTION_HANDLER_12 + Player_ActionHandler_13, // PLAYER_ACTION_HANDLER_13 + Player_ActionHandler_14, // PLAYER_ACTION_HANDLER_14 }; /** - * This function processes "Action Change Lists", which run various functions that - * check if it is appropriate to change to a new action. + * This function processes "Action Handler Lists". * - * Action Change Lists are a list of indices for the `sPlayerActionChangeFuncs` array. - * The functions are ran in order until one of them returns true, or the end of the list is reached. - * An Action Change index having a negative value indicates that it is the last member in the list. + * An Action Handler is a function that "listens" for certain conditions or the right time + * to change to a certain action. These can include actions triggered manually by the player + * or actions that happen automatically, given some other condition(s). * - * Because these lists are processed sequentially, the order of the indices in the list determines its priority. + * Action Handler Lists are a list of indices for the `sActionHandlerFuncs` array. + * The Action Handlers are ran in order until one of them returns true, or the end of the list is reached. + * An Action Handler index having a negative value indicates that it is the last member in the list. * - * If the `updateUpperBody` argument is true, Player's upper body will update before the Action Change List - * is processed. This allows for Upper Action functions to run. + * Because these lists are processed sequentially, the order of the indices in the list + * determines an Action Handler's priority. + * + * If the `updateUpperBody` argument is true, Player's upper body will update before the Action Handler List + * is processed. This allows for Item Action functions to run, for example. * * @return true if a new action has been chosen * */ -s32 Player_TryActionChangeList(PlayState* play, Player* this, s8* actionChangeList, s32 updateUpperBody) { +s32 Player_TryActionHandlerList(PlayState* play, Player* this, s8* actionHandlerList, s32 updateUpperBody) { if (!(this->stateFlags1 & (PLAYER_STATE1_1 | PLAYER_STATE1_80 | PLAYER_STATE1_20000000)) && !func_8082DA90(play)) { if (updateUpperBody) { sUpperBodyIsBusy = Player_UpdateUpperBody(this, play); @@ -5184,16 +5188,16 @@ s32 Player_TryActionChangeList(PlayState* play, Player* this, s8* actionChangeLi if (!(this->stateFlags3 & PLAYER_STATE3_START_CHANGING_HELD_ITEM) && (Player_UpperAction_ChangeHeldItem != this->upperActionFunc)) { - // Process all entries in the Action Change List with a positive index - while (*actionChangeList >= 0) { - if (sPlayerActionChangeFuncs[*actionChangeList](this, play)) { + // Process all entries in the Action Handler List with a positive index + while (*actionHandlerList >= 0) { + if (sActionHandlerFuncs[*actionHandlerList](this, play)) { return true; } - actionChangeList++; + actionHandlerList++; } // Try the last entry in the list. Negate the index to make it positive again. - if (sPlayerActionChangeFuncs[-*actionChangeList](this, play)) { + if (sActionHandlerFuncs[-*actionHandlerList](this, play)) { return true; } } @@ -5217,14 +5221,14 @@ typedef enum PlayerActionInterruptResult { /** * An Action Interrupt allows for ending an action early, toward the end of an animation. * - * First, `sPlayerActionChangeList7` will be checked to see if any of those actions should be used. - * It should be noted that the `updateUpperBody` argument passed to `Player_TryActionChangeList` + * First, `sActionHandlerList7` will be checked to see if any of those actions should be used. + * It should be noted that the `updateUpperBody` argument passed to `Player_TryActionHandlerList` * is `true`. This means that an item can be used during the interrupt window. * - * If no actions from the Action Change List are used, then the control stick is checked to see if + * If no actions from the Action Handler List are used, then the control stick is checked to see if * any movement should occur. * - * Note that while this function can set up a new action with `sPlayerActionChangeList7`, this function + * Note that while this function can set up a new action with `sActionHandlerList7`, this function * will not set up an appropriate action for moving. * It is the callers responsibility to react accordingly to `PLAYER_INTERRUPT_MOVE`. * @@ -5237,7 +5241,7 @@ PlayerActionInterruptResult Player_TryActionInterrupt(PlayState* play, Player* t f32 speedTarget; s16 yawTarget; - if (Player_TryActionChangeList(play, this, sPlayerActionChangeList7, true)) { + if (Player_TryActionHandlerList(play, this, sActionHandlerList7, true)) { return PLAYER_INTERRUPT_NEW_ACTION; } @@ -5990,7 +5994,7 @@ void func_80834DB8(Player* this, PlayerAnimationHeader* anim, f32 speed, PlaySta func_80834D50(play, this, anim, speed, NA_SE_VO_LI_SWORD_N); } -s32 Player_ActionChange_12(Player* this, PlayState* play) { +s32 Player_ActionHandler_12(Player* this, PlayState* play) { if ((this->transformation != PLAYER_FORM_GORON) && ((this->transformation != PLAYER_FORM_DEKU) || func_801242B4(this) || (this->ledgeClimbType <= PLAYER_LEDGE_CLIMB_3)) && @@ -6582,7 +6586,7 @@ void Player_Door_Knob(PlayState* play, Player* this, Actor* door) { } // door stuff -s32 Player_ActionChange_1(Player* this, PlayState* play) { +s32 Player_ActionHandler_1(Player* this, PlayState* play) { if ((gSaveContext.save.saveInfo.playerData.health != 0) && (this->doorType != PLAYER_DOORTYPE_NONE)) { if ((this->actor.category != ACTORCAT_PLAYER) || ((((this->doorType <= PLAYER_DOORTYPE_TALKING) && CutsceneManager_IsNext(CS_ID_GLOBAL_TALK)) || @@ -7566,7 +7570,7 @@ PlayerAnimationHeader* D_8085D1F8[] = { &gPlayerAnim_link_normal_take_out, // Hold up cutscene item; "this item doesn't work here" }; -s32 Player_ActionChange_13(Player* this, PlayState* play) { +s32 Player_ActionHandler_13(Player* this, PlayState* play) { PlayerBottle bottleAction; if (this->unk_AA5 != PLAYER_UNKAA5_0) { @@ -7743,7 +7747,7 @@ s32 Player_ActionChange_13(Player* this, PlayState* play) { return false; } -s32 Player_ActionChange_4(Player* this, PlayState* play) { +s32 Player_ActionHandler_4(Player* this, PlayState* play) { if (gSaveContext.save.saveInfo.playerData.health != 0) { Actor* talkActor = this->talkActor; Actor* lockOnActor = this->focusActor; @@ -7829,9 +7833,9 @@ s32 Player_ActionChange_4(Player* this, PlayState* play) { return false; } -s32 Player_ActionChange_0(Player* this, PlayState* play) { +s32 Player_ActionHandler_0(Player* this, PlayState* play) { if (this->unk_AA5 != PLAYER_UNKAA5_0) { - Player_ActionChange_13(this, play); + Player_ActionHandler_13(this, play); return true; } else if ((this->focusActor != NULL) && (CHECK_FLAG_ALL(this->focusActor->flags, ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_40000) || @@ -7960,7 +7964,7 @@ s32 func_80839A84(PlayState* play, Player* this) { return true; } -s32 Player_ActionChange_10(Player* this, PlayState* play) { +s32 Player_ActionHandler_10(Player* this, PlayState* play) { if (CHECK_BTN_ALL(sPlayerControlInput->press.button, BTN_A) && (play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_2) && (sPlayerFloorType != FLOOR_TYPE_7) && (sPlayerFloorEffect != FLOOR_EFFECT_1)) { @@ -8080,14 +8084,14 @@ void func_8083A04C(Player* this) { } } -s32 Player_ActionChange_14(Player* this, PlayState* play) { +s32 Player_ActionHandler_14(Player* this, PlayState* play) { if (!sUpperBodyIsBusy && (this->transformation == PLAYER_FORM_ZORA)) { func_8083A04C(this); } return false; } -s32 Player_ActionChange_6(Player* this, PlayState* play) { +s32 Player_ActionHandler_6(Player* this, PlayState* play) { if (!sUpperBodyIsBusy && !(this->stateFlags1 & PLAYER_STATE1_800000) && !Player_UpdateHostileLockOn(this)) { if ((this->transformation == PLAYER_FORM_ZORA) && (this->stateFlags1 & PLAYER_STATE1_8000000)) { func_8083A04C(this); @@ -8112,7 +8116,7 @@ s32 Player_ActionChange_6(Player* this, PlayState* play) { return false; } -s32 Player_ActionChange_11(Player* this, PlayState* play) { +s32 Player_ActionHandler_11(Player* this, PlayState* play) { if (CHECK_BTN_ALL(sPlayerControlInput->cur.button, BTN_R) && (this->unk_AA5 == PLAYER_UNKAA5_0) && (play->bButtonAmmoPlusOne == 0)) { if (Player_IsGoronOrDeku(this) || @@ -8182,7 +8186,7 @@ void func_8083A548(Player* this) { } } -s32 Player_ActionChange_8(Player* this, PlayState* play) { +s32 Player_ActionHandler_8(Player* this, PlayState* play) { if (CHECK_BTN_ALL(sPlayerControlInput->cur.button, BTN_B)) { if (!(this->stateFlags1 & PLAYER_STATE1_400000) && (Player_GetMeleeWeaponHeld(this) != PLAYER_MELEEWEAPON_NONE)) { @@ -9019,7 +9023,7 @@ u16 D_8085D25C[] = { }; // Player_MountHorse -s32 Player_ActionChange_3(Player* this, PlayState* play) { +s32 Player_ActionHandler_3(Player* this, PlayState* play) { EnHorse* rideActor = (EnHorse*)this->rideActor; if (rideActor != NULL) { @@ -9160,7 +9164,7 @@ void func_8083D168(PlayState* play, Player* this, GetItemEntry* giEntry) { Audio_PlaySfx((this->getItemId < GI_NONE) ? NA_SE_SY_GET_BOXITEM : NA_SE_SY_GET_ITEM); } -s32 Player_ActionChange_2(Player* this, PlayState* play) { +s32 Player_ActionHandler_2(Player* this, PlayState* play) { if (gSaveContext.save.saveInfo.playerData.health != 0) { Actor* interactRangeActor = this->interactRangeActor; @@ -9289,7 +9293,7 @@ s32 func_8083D738(Player* this, Actor* heldActor) { return true; } -s32 Player_ActionChange_9(Player* this, PlayState* play) { +s32 Player_ActionHandler_9(Player* this, PlayState* play) { if (this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) { if ((this->heldActor != NULL) && CHECK_BTN_ANY(sPlayerControlInput->press.button, BTN_CRIGHT | BTN_CLEFT | BTN_CDOWN | BTN_B | BTN_A)) { @@ -9486,7 +9490,7 @@ void func_8083DF38(Player* this, PlayerAnimationHeader* anim, PlayState* play) { this->actor.shape.rot.y = this->currentYaw = this->actor.wallYaw + 0x8000; } -s32 Player_ActionChange_5(Player* this, PlayState* play) { +s32 Player_ActionHandler_5(Player* this, PlayState* play) { if (!(this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) && (this->actor.bgCheckFlags & BGCHECKFLAG_PLAYER_WALL_INTERACT) && (sPlayerShapeYawToTouchedWall < 0x3000)) { if ((this->linearVelocity > 0.0f) && func_8083D860(this, play)) { @@ -10096,7 +10100,8 @@ s32 func_8083FD80(Player* this, PlayState* play) { } bool func_8083FE38(Player* this, PlayState* play) { - return Player_ActionChange_13(this, play) || Player_ActionChange_4(this, play) || Player_ActionChange_2(this, play); + return Player_ActionHandler_13(this, play) || Player_ActionHandler_4(this, play) || + Player_ActionHandler_2(this, play); } void Player_RequestQuakeAndRumble(PlayState* play, Player* this, u16 sfxId) { @@ -13049,7 +13054,7 @@ s32 func_80847994(PlayState* play, Player* this) { this->stateFlags3 &= ~PLAYER_STATE3_20; this->itemAction = PLAYER_IA_OCARINA; this->unk_AA5 = PLAYER_UNKAA5_5; - Player_ActionChange_13(this, play); + Player_ActionHandler_13(this, play); return true; } return false; @@ -13353,7 +13358,7 @@ void func_808484F0(Player* this) { } } -s32 Player_ActionChange_7(Player* this, PlayState* play) { +s32 Player_ActionHandler_7(Player* this, PlayState* play) { if (!func_8083A6C0(play, this)) { if (func_808396B8(play, this)) { PlayerMeleeWeaponAnimation meleeWeaponAnim = func_808335F4(this); @@ -13888,7 +13893,7 @@ void Player_Action_2(Player* this, PlayState* play) { } func_80832F24(this); - if (Player_TryActionChangeList(play, this, sPlayerActionChangeList1, true)) { + if (Player_TryActionHandlerList(play, this, sActionHandlerList1, true)) { return; } @@ -13944,7 +13949,7 @@ void Player_Action_3(Player* this, PlayState* play) { } func_80832F24(this); - if (Player_TryActionChangeList(play, this, sPlayerActionChangeList2, true)) { + if (Player_TryActionHandlerList(play, this, sActionHandlerList2, true)) { return; } @@ -14014,7 +14019,7 @@ void Player_Action_4(Player* this, PlayState* play) { func_80832F24(this); if ((this->av2.actionVar2 == 0) && !func_80847880(play, this) && - !Player_TryActionChangeList(play, this, sPlayerActionChangeList7, true)) { + !Player_TryActionHandlerList(play, this, sActionHandlerList7, true)) { if (Player_UpdateHostileLockOn(this)) { func_8083B23C(this, play); return; @@ -14081,7 +14086,7 @@ void Player_Action_5(Player* this, PlayState* play) { Player_AnimSfx_PlayFloorWalk(this, this->linearVelocity); } - if (Player_TryActionChangeList(play, this, sPlayerActionChangeList3, true)) { + if (Player_TryActionHandlerList(play, this, sActionHandlerList3, true)) { return; } @@ -14133,7 +14138,7 @@ void Player_Action_6(Player* this, PlayState* play) { s32 sp2C; func_8083EE60(this, play); - if (Player_TryActionChangeList(play, this, sPlayerActionChangeList4, true)) { + if (Player_TryActionHandlerList(play, this, sActionHandlerList4, true)) { return; } @@ -14173,7 +14178,7 @@ void Player_Action_7(Player* this, PlayState* play) { func_80832F24(this); - if (Player_TryActionChangeList(play, this, sPlayerActionChangeList4, true)) { + if (Player_TryActionHandlerList(play, this, sActionHandlerList4, true)) { return; } @@ -14194,7 +14199,7 @@ void Player_Action_7(Player* this, PlayState* play) { void Player_Action_8(Player* this, PlayState* play) { s32 animFinished = PlayerAnimation_Update(play, &this->skelAnime); - if (Player_TryActionChangeList(play, this, sPlayerActionChangeList4, true)) { + if (Player_TryActionHandlerList(play, this, sActionHandlerList4, true)) { return; } @@ -14209,7 +14214,7 @@ void Player_Action_9(Player* this, PlayState* play) { s32 var_v0; func_8083F27C(play, this); - if (Player_TryActionChangeList(play, this, sPlayerActionChangeList5, true)) { + if (Player_TryActionHandlerList(play, this, sActionHandlerList5, true)) { return; } @@ -14279,7 +14284,7 @@ void Player_Action_10(Player* this, PlayState* play) { yawTarget = this->actor.home.rot.y; } - if (Player_TryActionChangeList(play, this, sPlayerActionChangeList6, true)) { + if (Player_TryActionHandlerList(play, this, sActionHandlerList6, true)) { return; } @@ -14302,7 +14307,7 @@ void Player_Action_11(Player* this, PlayState* play) { } PlayerAnimation_Update(play, &this->skelAnime); - if (!func_80847880(play, this) && (!Player_TryActionChangeList(play, this, sPlayerActionChangeList7, true) || + if (!func_80847880(play, this) && (!Player_TryActionHandlerList(play, this, sActionHandlerList7, true) || (Player_Action_11 == this->actionFunc))) { f32 speedTarget; f32 temp_fv0; @@ -14343,7 +14348,7 @@ void Player_Action_12(Player* this, PlayState* play) { PlayerAnimation_Update(play, &this->skelAnime); func_80832F24(this); if (!func_80847880(play, this)) { - if (!Player_TryActionChangeList(play, this, sPlayerActionChangeList7, false) || + if (!Player_TryActionHandlerList(play, this, sActionHandlerList7, false) || (Player_Action_12 == this->actionFunc)) { if (!CHECK_BTN_ALL(sPlayerControlInput->cur.button, BTN_B)) { func_80839E74(this, play); @@ -14358,7 +14363,7 @@ void Player_Action_13(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_20; func_8083F57C(this, play); - if (Player_TryActionChangeList(play, this, sPlayerActionChangeList8, true)) { + if (Player_TryActionHandlerList(play, this, sActionHandlerList8, true)) { return; } @@ -14389,7 +14394,7 @@ void Player_Action_14(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_20; func_8083F57C(this, play); - if (Player_TryActionChangeList(play, this, sPlayerActionChangeList9, true)) { + if (Player_TryActionHandlerList(play, this, sActionHandlerList9, true)) { return; } @@ -14419,7 +14424,7 @@ void Player_Action_15(Player* this, PlayState* play) { f32 speedTarget; s16 yawTarget; - if (Player_TryActionChangeList(play, this, sPlayerActionChangeList5, true)) { + if (Player_TryActionHandlerList(play, this, sActionHandlerList5, true)) { return; } @@ -14446,7 +14451,7 @@ void Player_Action_16(Player* this, PlayState* play) { s16 yawTarget; func_80832F24(this); - if (Player_TryActionChangeList(play, this, sPlayerActionChangeList10, true)) { + if (Player_TryActionHandlerList(play, this, sActionHandlerList10, true)) { return; } @@ -14473,7 +14478,7 @@ void Player_Action_17(Player* this, PlayState* play) { } if (DECR(this->av2.actionVar2) == 0) { - if (!Player_ActionChange_13(this, play)) { + if (!Player_ActionHandler_13(this, play)) { func_80836A98(this, D_8085BE84[PLAYER_ANIMGROUP_check_end][this->modelAnimType], play); } this->actor.flags &= ~ACTOR_FLAG_TALK; @@ -14489,7 +14494,7 @@ void Player_Action_18(Player* this, PlayState* play) { SkelAnime_Update(&this->unk_2C8); if (!func_8083FE38(this, play)) { - if (!Player_ActionChange_11(this, play)) { + if (!Player_ActionHandler_11(this, play)) { this->stateFlags1 &= ~PLAYER_STATE1_400000; if (this->itemAction <= PLAYER_IA_MINUS1) { @@ -14557,7 +14562,7 @@ void Player_Action_18(Player* this, PlayState* play) { this->av1.actionVar1 = 0; } } else if (!func_8083FE38(this, play)) { - if (Player_ActionChange_11(this, play)) { + if (Player_ActionHandler_11(this, play)) { func_8083FD80(this, play); } else { this->stateFlags1 &= ~PLAYER_STATE1_400000; @@ -14866,7 +14871,7 @@ void Player_Action_25(Player* this, PlayState* play) { Player_UpdateUpperBody(this, play); } - Player_ActionChange_13(this, play); + Player_ActionHandler_13(this, play); } // sPlayerRollingAnimSfx @@ -14914,7 +14919,7 @@ void Player_Action_26(Player* this, PlayState* play) { } } } else if (!func_80840A30(play, this, &this->linearVelocity, 6.0f)) { - if ((this->skelAnime.curFrame < 15.0f) || !Player_ActionChange_7(this, play)) { + if ((this->skelAnime.curFrame < 15.0f) || !Player_ActionHandler_7(this, play)) { f32 speedTarget; s16 yawTarget; @@ -15277,7 +15282,7 @@ void Player_Action_WaitForPutAway(Player* this, PlayState* play) { } void Player_Action_35(Player* this, PlayState* play) { - if (!Player_ActionChange_13(this, play)) { + if (!Player_ActionHandler_13(this, play)) { if ((this->stateFlags3 & PLAYER_STATE3_10) && !(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) { func_80833AA0(this, play); this->stateFlags1 |= PLAYER_STATE1_20000000; @@ -15431,7 +15436,7 @@ void Player_Action_35(Player* this, PlayState* play) { if (play->sceneId == SCENE_20SICHITAI) { play->bButtonAmmoPlusOne = 0; } - } else if (!Player_ActionChange_4(this, play)) { + } else if (!Player_ActionHandler_4(this, play)) { func_8083B2E4(this, play); } } @@ -15632,7 +15637,7 @@ void Player_Action_43(Player* this, PlayState* play) { ((this->unk_AA5 == PLAYER_UNKAA5_1) && CHECK_BTN_ANY(sPlayerControlInput->press.button, BTN_CRIGHT | BTN_CLEFT | BTN_CDOWN | BTN_CUP | BTN_R | BTN_B | BTN_A))) || - Player_ActionChange_4(this, play)))) { + Player_ActionHandler_4(this, play)))) { func_80839ED0(this, play); Audio_PlaySfx(NA_SE_SY_CAMERA_ZOOM_UP); } else if ((DECR(this->av2.actionVar2) == 0) || (this->unk_AA5 != PLAYER_UNKAA5_3)) { @@ -15665,7 +15670,7 @@ void Player_Action_44(Player* this, PlayState* play) { func_80837BD0(play, this); this->av2.actionVar2 = sp44; } else if (!func_80847994(play, this) && !func_80847880(play, this) && !Player_StartCsAction(play, this) && - ((this->talkActor != this->interactRangeActor) || !Player_ActionChange_2(this, play))) { + ((this->talkActor != this->interactRangeActor) || !Player_ActionHandler_2(this, play))) { if (func_801242B4(this)) { func_808353DC(play, this); } else { @@ -16323,8 +16328,8 @@ void Player_Action_52(Player* this, PlayState* play) { func_8084FD7C(play, this, &rideActor->actor); } } else if ((this->csAction != PLAYER_CSACTION_NONE) || - (!func_8082DAFC(play) && ((rideActor->actor.speed != 0.0f) || !Player_ActionChange_4(this, play)) && - !func_80847BF0(this, play) && !Player_ActionChange_13(this, play))) { + (!func_8082DAFC(play) && ((rideActor->actor.speed != 0.0f) || !Player_ActionHandler_4(this, play)) && + !func_80847BF0(this, play) && !Player_ActionHandler_13(this, play))) { if (this->focusActor != NULL) { if (func_800B7128(this)) { this->upperLimbRot.y = func_8083C62C(this, true) - this->actor.shape.rot.y; @@ -16437,7 +16442,7 @@ void Player_Action_54(Player* this, PlayState* play) { this->av2.actionVar2 = 0; } - if (!func_8082DAFC(play) && !Player_TryActionChangeList(play, this, sPlayerActionChangeList11, true) && + if (!func_8082DAFC(play) && !Player_TryActionHandlerList(play, this, sActionHandlerList11, true) && !func_8083B3B4(play, this, sPlayerControlInput) && ((this->av2.actionVar2 != 0) || !func_80850734(play, this))) { speedTarget = 0.0f; @@ -16475,7 +16480,7 @@ void Player_Action_54(Player* this, PlayState* play) { } void Player_Action_55(Player* this, PlayState* play) { - if (!Player_ActionChange_13(this, play)) { + if (!Player_ActionHandler_13(this, play)) { this->stateFlags2 |= PLAYER_STATE2_20; func_808477D0(play, this, NULL, this->linearVelocity); func_808475B4(this); @@ -16521,7 +16526,7 @@ void Player_Action_56(Player* this, PlayState* play) { func_808475B4(this); func_8082F164(this, BTN_R); - if (Player_TryActionChangeList(play, this, sPlayerActionChangeList11, false)) { + if (Player_TryActionHandlerList(play, this, sActionHandlerList11, false)) { return; } @@ -16648,7 +16653,7 @@ void Player_Action_57(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_20; func_808475B4(this); func_8082F164(this, BTN_R); - if (!Player_TryActionChangeList(play, this, sPlayerActionChangeList11, true) && + if (!Player_TryActionHandlerList(play, this, sActionHandlerList11, true) && !func_8083B3B4(play, this, sPlayerControlInput) && !func_80850854(play, this)) { func_808477D0(play, this, sPlayerControlInput, this->linearVelocity); if (func_8082DA90(play)) { @@ -16680,7 +16685,7 @@ void Player_Action_58(Player* this, PlayState* play) { func_808475B4(this); func_8082F164(this, BTN_R); - if (!Player_TryActionChangeList(play, this, sPlayerActionChangeList11, true) && + if (!Player_TryActionHandlerList(play, this, sActionHandlerList11, true) && !func_8083B3B4(play, this, sPlayerControlInput)) { Player_GetMovementSpeedAndYaw(this, &speedTarget, &yawTarget, SPEED_MODE_LINEAR, play); @@ -16703,7 +16708,7 @@ void Player_Action_59(Player* this, PlayState* play) { Player_UpdateUpperBody(this, play); func_8082F164(this, BTN_R); - if (Player_ActionChange_13(this, play)) { + if (Player_ActionHandler_13(this, play)) { return; } @@ -16724,7 +16729,7 @@ void Player_Action_59(Player* this, PlayState* play) { func_808477D0(play, this, sPlayerControlInput, this->actor.velocity.y); this->unk_AAA = 0x3E80; - if (CHECK_BTN_ALL(sPlayerControlInput->cur.button, BTN_A) && !Player_ActionChange_2(this, play) && + if (CHECK_BTN_ALL(sPlayerControlInput->cur.button, BTN_A) && !Player_ActionHandler_2(this, play) && !(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (this->actor.depthInWater < 120.0f)) { func_808481CC(play, this, -2.0f); } else { @@ -17032,7 +17037,7 @@ void Player_Action_63(Player* this, PlayState* play) { this->talkActor = this->tatlActor; this->tatlActor->textId = -this->tatlTextId; Player_TalkWithPlayer(play, this->talkActor); - } else if (!Player_ActionChange_13(this, play)) { + } else if (!Player_ActionHandler_13(this, play)) { func_80836A5C(this, play); Player_Anim_PlayOnceAdjustedReverse(play, this, D_8085D17C[this->transformation]); } @@ -17533,7 +17538,7 @@ void Player_Action_70(Player* this, PlayState* play) { if (PlayerAnimation_Update(play, &this->skelAnime)) { Player_StopCutscene(this); - if (!Player_ActionChange_13(this, play)) { + if (!Player_ActionHandler_13(this, play)) { func_80839E74(this, play); } } else if (PlayerAnimation_OnFrame(&this->skelAnime, 76.0f)) { @@ -17641,11 +17646,11 @@ void Player_Action_73(Player* this, PlayState* play) { Audio_PlaySfx_AtPosWithSyncedFreqAndVolume( &this->actor.projectedPos, Player_GetFloorSfx(this, NA_SE_PL_SLIP_LEVEL - SFX_FLAG), this->actor.speed); - if (Player_ActionChange_13(this, play)) { + if (Player_ActionHandler_13(this, play)) { return; } - if ((this->transformation == PLAYER_FORM_GORON) && Player_ActionChange_6(this, play)) { + if ((this->transformation == PLAYER_FORM_GORON) && Player_ActionHandler_6(this, play)) { return; } @@ -17770,7 +17775,7 @@ void Player_Action_77(Player* this, PlayState* play) { } void Player_Action_78(Player* this, PlayState* play) { - Player_ActionChange_1(this, play); + Player_ActionHandler_1(this, play); } void Player_Action_79(Player* this, PlayState* play) { @@ -17925,7 +17930,7 @@ void Player_Action_84(Player* this, PlayState* play) { func_808333CC(this))) { sPlayerUseHeldItem = this->av2.actionVar2; - if (!Player_ActionChange_7(this, play)) { + if (!Player_ActionHandler_7(this, play)) { PlayerAnimationHeader* anim = Player_CheckHostileLockOn(this) ? attackInfoEntry->unk_8 : attackInfoEntry->unk_4; @@ -17938,7 +17943,7 @@ void Player_Action_84(Player* this, PlayState* play) { u8 moveFlags = this->skelAnime.moveFlags; if (this->transformation == PLAYER_FORM_ZORA) { - if (Player_ActionChange_8(this, play)) { + if (Player_ActionHandler_8(this, play)) { anim = this->skelAnimeUpper.animation; } this->unk_ADC = 0; @@ -18471,7 +18476,7 @@ void Player_Action_93(Player* this, PlayState* play) { PlayerAnimation_Update(play, &this->skelAnime); - if (Player_ActionChange_13(this, play)) { + if (Player_ActionHandler_13(this, play)) { return; } @@ -18655,7 +18660,7 @@ void Player_Action_94(Player* this, PlayState* play) { this->boomerangActor = NULL; } - if (Player_ActionChange_13(this, play)) { + if (Player_ActionHandler_13(this, play)) { return; } @@ -18848,7 +18853,7 @@ void Player_Action_95(Player* this, PlayState* play) { PlayerAnimation_Update(play, &this->skelAnime); Player_SetCylinderForAttack(this, DMG_DEKU_SPIN, 1, 30); - if (!Player_ActionChange_13(this, play)) { + if (!Player_ActionHandler_13(this, play)) { s16 prevYaw = this->currentYaw; f32 speedTarget; s16 yawTarget; @@ -18998,7 +19003,7 @@ void func_80857AEC(PlayState* play, Player* this) { // Goron rolling related void Player_Action_96(Player* this, PlayState* play) { - if (Player_TryActionChangeList(play, this, sPlayerActionChangeList12, false)) { + if (Player_TryActionHandlerList(play, this, sActionHandlerList12, false)) { return; } @@ -19947,7 +19952,7 @@ void Player_CsAction_0(PlayState* play, Player* this, CsCmdActorCue* cue) { if (func_801240DC(this) || (this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR)) { Player_UpdateUpperBody(this, play); } else if ((this->interactRangeActor != NULL) && (this->interactRangeActor->textId == 0xFFFF)) { - Player_ActionChange_2(this, play); + Player_ActionHandler_2(this, play); } } } @@ -20366,7 +20371,7 @@ void Player_CsAction_38(PlayState* play, Player* this, CsCmdActorCue* cue) { void Player_CsAction_39(PlayState* play, Player* this, CsCmdActorCue* cue) { Player_CsAnim_Update(play, this, cue); - if (Player_ActionChange_2(this, play)) { + if (Player_ActionHandler_2(this, play)) { play->csCtx.state = CS_STATE_STOP; CutsceneManager_Stop(CutsceneManager_GetCurrentCsId()); } @@ -20456,8 +20461,8 @@ void Player_CsAction_End(PlayState* play, Player* this, CsCmdActorCue* cue) { func_8082DC64(play, this); } else { func_80839ED0(this, play); - if (!Player_ActionChange_4(this, play)) { - Player_ActionChange_2(this, play); + if (!Player_ActionHandler_4(this, play)) { + Player_ActionHandler_2(this, play); } } @@ -20525,7 +20530,7 @@ void Player_CsAction_48(PlayState* play, Player* this, CsCmdActorCue* cue) { if ((sPlayerCueToCsActionMap[this->cueId] == PLAYER_CSACTION_68) && (play->sceneId == SCENE_OKUJOU)) { this->unk_AA5 = PLAYER_UNKAA5_5; - if (Player_ActionChange_13(this, play)) { + if (Player_ActionHandler_13(this, play)) { this->csAction = PLAYER_CSACTION_NONE; } return; diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt index 64c72b97b9..bc1dd4df20 100644 --- a/tools/disasm/functions.txt +++ b/tools/disasm/functions.txt @@ -4383,7 +4383,7 @@ 0x80832CAC:("Player_CalcSpeedAndYawFromControlStick",), 0x80832F24:("func_80832F24",), 0x80832F78:("Player_GetMovementSpeedAndYaw",), - 0x80833058:("Player_TryActionChangeList",), + 0x80833058:("Player_TryActionHandlerList",), 0x808331FC:("Player_TryActionInterrupt",), 0x808332A0:("func_808332A0",), 0x808333CC:("func_808333CC",), @@ -4413,7 +4413,7 @@ 0x80834CD0:("func_80834CD0",), 0x80834D50:("func_80834D50",), 0x80834DB8:("func_80834DB8",), - 0x80834DFC:("Player_ActionChange_12",), + 0x80834DFC:("Player_ActionHandler_12",), 0x80835324:("func_80835324",), 0x808353DC:("func_808353DC",), 0x80835428:("func_80835428",), @@ -4430,7 +4430,7 @@ 0x80835EAC:("Player_Door_Staircase",), 0x8083604C:("Player_Door_Sliding",), 0x80836258:("Player_Door_Knob",), - 0x808365DC:("Player_ActionChange_1",), + 0x808365DC:("Player_ActionHandler_1",), 0x80836888:("func_80836888",), 0x8083692C:("func_8083692C",), 0x80836988:("func_80836988",), @@ -4470,9 +4470,9 @@ 0x808388B8:("func_808388B8",), 0x808389BC:("func_808389BC",), 0x80838A20:("func_80838A20",), - 0x80838A90:("Player_ActionChange_13",), - 0x808391D8:("Player_ActionChange_4",), - 0x80839518:("Player_ActionChange_0",), + 0x80838A90:("Player_ActionHandler_13",), + 0x808391D8:("Player_ActionHandler_4",), + 0x80839518:("Player_ActionHandler_0",), 0x808395F0:("func_808395F0",), 0x808396B8:("func_808396B8",), 0x80839770:("func_80839770",), @@ -4481,19 +4481,19 @@ 0x80839978:("func_80839978",), 0x80839A10:("func_80839A10",), 0x80839A84:("func_80839A84",), - 0x80839B18:("Player_ActionChange_10",), + 0x80839B18:("Player_ActionHandler_10",), 0x80839CD8:("func_80839CD8",), 0x80839E3C:("func_80839E3C",), 0x80839E74:("func_80839E74",), 0x80839ED0:("func_80839ED0",), 0x80839F98:("func_80839F98",), 0x8083A04C:("func_8083A04C",), - 0x8083A0CC:("Player_ActionChange_14",), - 0x8083A114:("Player_ActionChange_6",), - 0x8083A274:("Player_ActionChange_11",), + 0x8083A0CC:("Player_ActionHandler_14",), + 0x8083A114:("Player_ActionHandler_6",), + 0x8083A274:("Player_ActionHandler_11",), 0x8083A4A4:("func_8083A4A4",), 0x8083A548:("func_8083A548",), - 0x8083A580:("Player_ActionChange_8",), + 0x8083A580:("Player_ActionHandler_8",), 0x8083A658:("func_8083A658",), 0x8083A6C0:("func_8083A6C0",), 0x8083A794:("func_8083A794",), @@ -4531,19 +4531,19 @@ 0x8083CB04:("func_8083CB04",), 0x8083CB58:("func_8083CB58",), 0x8083CBC4:("func_8083CBC4",), - 0x8083CCB4:("Player_ActionChange_3",), + 0x8083CCB4:("Player_ActionHandler_3",), 0x8083CF68:("Player_HandleSlopes",), 0x8083D168:("func_8083D168",), - 0x8083D23C:("Player_ActionChange_2",), + 0x8083D23C:("Player_ActionHandler_2",), 0x8083D6DC:("func_8083D6DC",), 0x8083D738:("func_8083D738",), - 0x8083D78C:("Player_ActionChange_9",), + 0x8083D78C:("Player_ActionHandler_9",), 0x8083D860:("func_8083D860",), 0x8083DCC4:("func_8083DCC4",), 0x8083DD1C:("func_8083DD1C",), 0x8083DEE4:("func_8083DEE4",), 0x8083DF38:("func_8083DF38",), - 0x8083DFC4:("Player_ActionChange_5",), + 0x8083DFC4:("Player_ActionHandler_5",), 0x8083E14C:("func_8083E14C",), 0x8083E234:("func_8083E234",), 0x8083E28C:("func_8083E28C",), @@ -4642,7 +4642,7 @@ 0x808482E0:("func_808482E0",), 0x808484CC:("func_808484CC",), 0x808484F0:("func_808484F0",), - 0x80848570:("Player_ActionChange_7",), + 0x80848570:("Player_ActionHandler_7",), 0x80848640:("func_80848640",), 0x80848780:("Player_UpperAction_0",), 0x808487B8:("Player_UpperAction_1",), diff --git a/tools/disasm/variables.txt b/tools/disasm/variables.txt index 9b03869f79..0b6998f0a2 100644 --- a/tools/disasm/variables.txt +++ b/tools/disasm/variables.txt @@ -4849,19 +4849,19 @@ 0x8085CFCC:("D_8085CFCC","UNK_TYPE1","",0x1), 0x8085CFD4:("D_8085CFD4","UNK_TYPE1","",0x1), 0x8085CFDC:("D_8085CFDC","UNK_TYPE1","",0x1), - 0x8085CFE4:("sPlayerActionChangeList1","UNK_TYPE1","",0x1), - 0x8085CFEC:("sPlayerActionChangeList2","UNK_TYPE1","",0x1), - 0x8085CFF8:("sPlayerActionChangeList3","UNK_TYPE1","",0x1), - 0x8085D004:("sPlayerActionChangeList4","UNK_TYPE1","",0x1), - 0x8085D00C:("sPlayerActionChangeList5","UNK_TYPE1","",0x1), - 0x8085D018:("sPlayerActionChangeList6","UNK_TYPE1","",0x1), - 0x8085D01C:("sPlayerActionChangeList7","UNK_TYPE1","",0x1), - 0x8085D028:("sPlayerActionChangeList8","UNK_TYPE1","",0x1), - 0x8085D034:("sPlayerActionChangeList9","UNK_TYPE1","",0x1), - 0x8085D044:("sPlayerActionChangeList10","UNK_TYPE1","",0x1), - 0x8085D048:("sPlayerActionChangeList11","UNK_TYPE1","",0x1), - 0x8085D050:("sPlayerActionChangeList12","UNK_TYPE1","",0x1), - 0x8085D054:("sPlayerActionChangeFuncs","UNK_PTR","",0x4), + 0x8085CFE4:("sActionHandlerList1","UNK_TYPE1","",0x1), + 0x8085CFEC:("sActionHandlerList2","UNK_TYPE1","",0x1), + 0x8085CFF8:("sActionHandlerList3","UNK_TYPE1","",0x1), + 0x8085D004:("sActionHandlerList4","UNK_TYPE1","",0x1), + 0x8085D00C:("sActionHandlerList5","UNK_TYPE1","",0x1), + 0x8085D018:("sActionHandlerList6","UNK_TYPE1","",0x1), + 0x8085D01C:("sActionHandlerList7","UNK_TYPE1","",0x1), + 0x8085D028:("sActionHandlerList8","UNK_TYPE1","",0x1), + 0x8085D034:("sActionHandlerList9","UNK_TYPE1","",0x1), + 0x8085D044:("sActionHandlerList10","UNK_TYPE1","",0x1), + 0x8085D048:("sActionHandlerList11","UNK_TYPE1","",0x1), + 0x8085D050:("sActionHandlerList12","UNK_TYPE1","",0x1), + 0x8085D054:("sActionHandlerFuncs","UNK_PTR","",0x4), 0x8085D090:("D_8085D090","UNK_TYPE1","",0x1), 0x8085D094:("D_8085D094","UNK_TYPE1","",0x6), 0x8085D09C:("D_8085D09C","UNK_TYPE4","",0x4),