From e4eb5e27b375355202e228f2d3339a2439f68914 Mon Sep 17 00:00:00 2001 From: fig02 Date: Fri, 21 Jun 2024 19:04:06 -0400 Subject: [PATCH] Rename `ANIM_FLAG_0` to `ANIM_FLAG_UPDATE_XZ` (#1964) * rename anim flag 0 * review * missed a word --- include/z64animation.h | 26 ++++++++-- src/code/z_player_lib.c | 3 +- src/code/z_skelanime.c | 7 +++ src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c | 6 +-- src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c | 4 +- src/overlays/actors/ovl_En_In/z_en_in.c | 2 +- src/overlays/actors/ovl_En_Nb/z_en_nb.c | 2 +- src/overlays/actors/ovl_En_Ru1/z_en_ru1.c | 12 ++--- src/overlays/actors/ovl_En_Xc/z_en_xc.c | 8 +-- src/overlays/actors/ovl_En_Zl1/z_en_zl1.c | 2 +- src/overlays/actors/ovl_En_Zl4/z_en_zl4.c | 2 +- .../actors/ovl_player_actor/z_player.c | 50 ++++++++++--------- 12 files changed, 76 insertions(+), 48 deletions(-) diff --git a/include/z64animation.h b/include/z64animation.h index a0b4982b77..1851defc55 100644 --- a/include/z64animation.h +++ b/include/z64animation.h @@ -88,12 +88,30 @@ typedef enum { /* 1 */ ANIMTAPER_ACCEL } AnimationTapers; -#define ANIM_FLAG_0 (1 << 0) // (no effect outside of player) Related to scaling an animation from/to child/adult +// This flag seems like it was intended to be paired with `ANIM_FLAG_UPDATE_Y` to control +// XZ movement based on the current animation. +// However, this flag is not checked by the Skelanime system. XZ movement will always occur +// regardless of the current state of this flag, as long as the "Actor Move" Anim Task is in use. +// The name of this flag is speculative based on its usage in Player and in other actors. +// +// In practice, this flag only affects the scaling of Player's XZ position based on age. +#define ANIM_FLAG_UPDATE_XZ (1 << 0) + +// Enables the movement of an actor in the Y-axis based on the current animation. +// This only has an effect if the "Actor Move" Anim Task is in use. #define ANIM_FLAG_UPDATE_Y (1 << 1) -#define ANIM_FLAG_PLAYER_2 (1 << 2) // (player-only) Related to scaling an animation from/to child/adult -#define ANIM_FLAG_PLAYER_SETMOVE (1 << 3) // (player-only) Call AnimTaskQueue_AddActorMove + +// (player-only) Related to scaling an animation from/to child/adult +#define ANIM_FLAG_PLAYER_2 (1 << 2) + +// (player-only) Call AnimTaskQueue_AddActorMove +#define ANIM_FLAG_PLAYER_SETMOVE (1 << 3) + +// #define ANIM_FLAG_NO_MOVE (1 << 4) -#define ANIM_FLAG_PLAYER_7 (1 << 7) // (player-only) + +// (player-only) +#define ANIM_FLAG_PLAYER_7 (1 << 7) typedef struct SkelAnime { /* 0x00 */ u8 limbCount; // Number of limbs in the skeleton diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index 77f0cd0356..391407644d 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -1125,7 +1125,8 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx** sCurBodyPartPos = &this->bodyPartsPos[0] - 1; if (!LINK_IS_ADULT) { - if (!(this->skelAnime.moveFlags & ANIM_FLAG_PLAYER_2) || (this->skelAnime.moveFlags & ANIM_FLAG_0)) { + if (!(this->skelAnime.moveFlags & ANIM_FLAG_PLAYER_2) || + (this->skelAnime.moveFlags & ANIM_FLAG_UPDATE_XZ)) { pos->x *= 0.64f; pos->z *= 0.64f; } diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index acc01cb742..bef23de1ef 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -1838,6 +1838,7 @@ void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* diff, s16 angle) { f32 sin; f32 cos; + // If `ANIM_FLAG_UPDATE_XZ` behaved as expected, it would also be checked here if (skelAnime->moveFlags & ANIM_FLAG_NO_MOVE) { diff->x = diff->z = 0.0f; } else { @@ -1847,6 +1848,7 @@ void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* diff, s16 angle) { cos = Math_CosS(angle); diff->x = x * cos + z * sin; diff->z = z * cos - x * sin; + x = skelAnime->prevTransl.x; z = skelAnime->prevTransl.z; sin = Math_SinS(skelAnime->prevRot); @@ -1856,22 +1858,27 @@ void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* diff, s16 angle) { } skelAnime->prevRot = angle; + skelAnime->prevTransl.x = skelAnime->jointTable[0].x; skelAnime->jointTable[0].x = skelAnime->baseTransl.x; + skelAnime->prevTransl.z = skelAnime->jointTable[0].z; skelAnime->jointTable[0].z = skelAnime->baseTransl.z; + if (skelAnime->moveFlags & ANIM_FLAG_UPDATE_Y) { if (skelAnime->moveFlags & ANIM_FLAG_NO_MOVE) { diff->y = 0.0f; } else { diff->y = skelAnime->jointTable[0].y - skelAnime->prevTransl.y; } + skelAnime->prevTransl.y = skelAnime->jointTable[0].y; skelAnime->jointTable[0].y = skelAnime->baseTransl.y; } else { diff->y = 0.0f; skelAnime->prevTransl.y = skelAnime->jointTable[0].y; } + skelAnime->moveFlags &= ~ANIM_FLAG_NO_MOVE; } diff --git a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c index 1f4bcf362d..c3d0e6327b 100644 --- a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c +++ b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c @@ -176,19 +176,19 @@ void DemoEc_UpdateBgFlags(DemoEc* this, PlayState* play) { } void func_8096D594(DemoEc* this, PlayState* play) { - this->skelAnime.moveFlags |= ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y; + this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y; AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f); } void func_8096D5D4(DemoEc* this, PlayState* play) { this->skelAnime.baseTransl = this->skelAnime.jointTable[0]; this->skelAnime.prevTransl = this->skelAnime.jointTable[0]; - this->skelAnime.moveFlags |= ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y; + this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y; AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f); } void func_8096D64C(DemoEc* this, PlayState* play) { - this->skelAnime.moveFlags |= ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y; + this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y; AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f); } diff --git a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c index 0d2d7b24d2..fcb7817e65 100644 --- a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c +++ b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c @@ -54,12 +54,12 @@ s32 DemoIk_CheckForCue(PlayState* play, u16 cueId, s32 cueChannel) { } void DemoIk_SetMove(DemoIk* this, PlayState* play) { - this->skelAnime.moveFlags |= ANIM_FLAG_0; + this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ; AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f); } void DemoIk_EndMove(DemoIk* this) { - this->skelAnime.moveFlags &= ~ANIM_FLAG_0; + this->skelAnime.moveFlags &= ~ANIM_FLAG_UPDATE_XZ; } f32 DemoIk_GetCurFrame(DemoIk* this) { diff --git a/src/overlays/actors/ovl_En_In/z_en_in.c b/src/overlays/actors/ovl_En_In/z_en_in.c index ff1a9bda7b..5e63760b25 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -337,7 +337,7 @@ void func_80A795C8(EnIn* this, PlayState* play) { void func_80A79690(SkelAnime* skelAnime, EnIn* this, PlayState* play) { if (skelAnime->baseTransl.y < skelAnime->jointTable[0].y) { - skelAnime->moveFlags |= ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y; + skelAnime->moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y; AnimTaskQueue_AddActorMove(play, &this->actor, skelAnime, 1.0f); } } diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb.c b/src/overlays/actors/ovl_En_Nb/z_en_nb.c index 2421276bef..454c36a154 100644 --- a/src/overlays/actors/ovl_En_Nb/z_en_nb.c +++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.c @@ -756,7 +756,7 @@ void EnNb_InitDemo6KInConfrontation(EnNb* this, PlayState* play) { } void func_80AB2688(EnNb* this, PlayState* play) { - this->skelAnime.moveFlags |= ANIM_FLAG_0; + this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ; AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f); } diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c index e0549aca4f..d33d43917b 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -391,17 +391,17 @@ s32 EnRu1_UpdateSkelAnime(EnRu1* this) { } void func_80AEB364(EnRu1* this, PlayState* play) { - this->skelAnime.moveFlags |= ANIM_FLAG_0; + this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ; AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f); } void func_80AEB3A4(EnRu1* this, PlayState* play) { - this->skelAnime.moveFlags |= ANIM_FLAG_0; + this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ; func_80AEB364(this, play); } void func_80AEB3CC(EnRu1* this) { - this->skelAnime.moveFlags &= ~ANIM_FLAG_0; + this->skelAnime.moveFlags &= ~ANIM_FLAG_UPDATE_XZ; } void func_80AEB3DC(EnRu1* this, PlayState* play) { @@ -462,7 +462,7 @@ void func_80AEB6E0(EnRu1* this, PlayState* play) { SkelAnime* skelAnime = &this->skelAnime; if (skelAnime->baseTransl.y < skelAnime->jointTable[0].y) { - skelAnime->moveFlags |= ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y; + skelAnime->moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y; AnimTaskQueue_AddActorMove(play, &this->actor, skelAnime, 1.0f); } } @@ -473,13 +473,13 @@ void func_80AEB738(EnRu1* this, PlayState* play) { skelAnime->baseTransl = skelAnime->jointTable[0]; skelAnime->prevTransl = skelAnime->jointTable[0]; if (skelAnime->baseTransl.y < skelAnime->jointTable[0].y) { - skelAnime->moveFlags |= ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y; + skelAnime->moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y; AnimTaskQueue_AddActorMove(play, &this->actor, skelAnime, 1.0f); } } void func_80AEB7D0(EnRu1* this) { - this->skelAnime.moveFlags &= ~(ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y); + this->skelAnime.moveFlags &= ~(ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y); } f32 func_80AEB7E0(CsCmdActorCue* cue, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Xc/z_en_xc.c b/src/overlays/actors/ovl_En_Xc/z_en_xc.c index 826edcc722..1f3b1bca91 100644 --- a/src/overlays/actors/ovl_En_Xc/z_en_xc.c +++ b/src/overlays/actors/ovl_En_Xc/z_en_xc.c @@ -254,25 +254,25 @@ void func_80B3C8CC(EnXc* this, PlayState* play) { SkelAnime* skelAnime = &this->skelAnime; if (skelAnime->jointTable[0].y >= skelAnime->baseTransl.y) { - skelAnime->moveFlags |= ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y; + skelAnime->moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y; AnimTaskQueue_AddActorMove(play, &this->actor, skelAnime, 1.0f); } } void func_80B3C924(EnXc* this, PlayState* play) { - this->skelAnime.moveFlags |= ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y; + this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y; AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f); } void func_80B3C964(EnXc* this, PlayState* play) { this->skelAnime.baseTransl = this->skelAnime.jointTable[0]; this->skelAnime.prevTransl = this->skelAnime.jointTable[0]; - this->skelAnime.moveFlags |= ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y; + this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y; AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f); } void func_80B3C9DC(EnXc* this) { - this->skelAnime.moveFlags &= ~(ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y); + this->skelAnime.moveFlags &= ~(ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y); } void func_80B3C9EC(EnXc* this) { diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c index 2b1c7d3321..1780cc1c9b 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -345,7 +345,7 @@ void func_80B4B834(CsCmdActorCue* cue, Vec3f* dest) { } void func_80B4B874(EnZl1* this, PlayState* play) { - this->skelAnime.moveFlags |= ANIM_FLAG_0; + this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ; AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f); } diff --git a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c index 2cf5b1d2a3..fb6cbd9ec0 100644 --- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c +++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c @@ -298,7 +298,7 @@ void EnZl4_UpdateFace(EnZl4* this) { } void EnZl4_SetMove(EnZl4* this, PlayState* play) { - this->skelAnime.moveFlags |= ANIM_FLAG_0; + this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ; AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f); } diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index db42ef755d..c4eea92ed4 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -3399,8 +3399,8 @@ s32 Player_UpdateUpperBody(Player* this, PlayState* play) { this->stateFlags3 |= PLAYER_STATE3_7; Player_AnimPlayOnce(play, this, &gPlayerAnim_link_hook_fly_start); Player_AnimReplaceApplyFlags(play, this, - ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | - ANIM_FLAG_PLAYER_7); + ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE | + ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); func_80832224(this); this->yaw = this->actor.shape.rot.y; this->actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND; @@ -4144,7 +4144,8 @@ void func_80837948(PlayState* play, Player* this, s32 arg2) { Player_AnimPlayOnceAdjusted(play, this, D_80854190[arg2].unk_00); if ((arg2 != PLAYER_MWA_FLIPSLASH_START) && (arg2 != PLAYER_MWA_JUMPSLASH_START)) { - Player_AnimReplaceApplyFlags(play, this, ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_0 | ANIM_FLAG_PLAYER_SETMOVE); + Player_AnimReplaceApplyFlags(play, this, + ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_PLAYER_SETMOVE); } this->yaw = this->actor.shape.rot.y; @@ -4189,7 +4190,7 @@ s32 func_80837B18(PlayState* play, Player* this, s32 damage) { void func_80837B60(Player* this) { this->skelAnime.prevTransl = this->skelAnime.jointTable[0]; - func_80832E48(this, ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y); + func_80832E48(this, ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y); } void func_80837B9C(Player* this, PlayState* play) { @@ -5054,7 +5055,7 @@ s32 Player_ActionChange_1(Player* this, PlayState* play) { func_80832224(this); Player_AnimReplaceApplyFlags(play, this, - ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | + ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_PLAYER_7); // If this door is the second half of a double door (spawned as child) @@ -5365,7 +5366,7 @@ s32 func_8083A6AC(Player* this, PlayState* play) { this->stateFlags1 |= PLAYER_STATE1_21; Player_AnimReplaceApplyFlags(play, this, - ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_2 | + ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); this->av2.actionVar2 = -1; @@ -6720,8 +6721,8 @@ s32 Player_ActionChange_3(Player* this, PlayState* play) { Actor_MountHorse(play, this, &rideActor->actor); Player_AnimPlayOnce(play, this, D_80854578[temp].anim); Player_AnimReplaceApplyFlags(play, this, - ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | - ANIM_FLAG_PLAYER_7); + ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE | + ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); this->actor.parent = this->rideActor; func_80832224(this); @@ -6888,7 +6889,7 @@ s32 Player_ActionChange_2(Player* this, PlayState* play) { (Item_CheckObtainability(giEntry->itemId) == ITEM_NONE)) { Player_AnimPlayOnceAdjusted(play, this, this->ageProperties->unk_98); Player_AnimReplaceApplyFlags(play, this, - ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | + ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_PLAYER_7); chest->unk_1F4 = 1; @@ -7067,7 +7068,7 @@ s32 func_8083EC18(Player* this, PlayState* play, u32 wallFlags) { Math_Vec3f_Copy(&this->actor.prevPos, &this->actor.world.pos); Player_AnimPlayOnce(play, this, anim); Player_AnimReplaceApplyFlags(play, this, - ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_2 | + ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); return true; @@ -7148,7 +7149,7 @@ s32 Player_TryEnteringCrawlspace(Player* this, PlayState* play, u32 interactWall this->actor.prevPos = this->actor.world.pos; Player_AnimPlayOnce(play, this, &gPlayerAnim_link_child_tunnel_start); Player_AnimReplaceApplyFlags(play, this, - ANIM_FLAG_0 | ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | + ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); return true; @@ -7238,7 +7239,7 @@ s32 Player_TryLeavingCrawlspace(Player* this, PlayState* play) { this->actor.shape.rot.y = this->actor.wallYaw + 0x8000; Player_AnimPlayOnce(play, this, &gPlayerAnim_link_child_tunnel_end); Player_AnimReplaceApplyFlags(play, this, - ANIM_FLAG_0 | ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | + ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); OnePointCutscene_Init(play, 9601, 999, NULL, CAM_ID_MAIN); } else { @@ -7248,7 +7249,7 @@ s32 Player_TryLeavingCrawlspace(Player* this, PlayState* play) { Animation_GetLastFrame(&gPlayerAnim_link_child_tunnel_start), 0.0f, ANIMMODE_ONCE, 0.0f); Player_AnimReplaceApplyFlags(play, this, - ANIM_FLAG_0 | ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | + ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); OnePointCutscene_Init(play, 9602, 999, NULL, CAM_ID_MAIN); } @@ -9967,8 +9968,8 @@ void func_808467D4(PlayState* play, Player* this) { LinkAnimation_Change(play, &this->skelAnime, this->ageProperties->unk_A0, 2.0f / 3.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f); Player_AnimReplaceApplyFlags(play, this, - ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_2 | - ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_PLAYER_7); + ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | + ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_PLAYER_7); if (LINK_IS_ADULT) { func_80846720(play, this, 0); } @@ -9978,8 +9979,8 @@ void func_808467D4(PlayState* play, Player* this) { void func_808468A8(PlayState* play, Player* this) { Player_SetupAction(play, this, Player_Action_8084F9A0, 0); Player_AnimReplaceApplyFlags(play, this, - ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | - ANIM_FLAG_PLAYER_7); + ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE | + ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); } void func_808468E8(PlayState* play, Player* this) { @@ -11134,7 +11135,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { this->stateFlags1 |= PLAYER_STATE1_23; Player_AnimPlayOnce(play, this, &gPlayerAnim_link_uma_wait_1); Player_AnimReplaceApplyFlags(play, this, - ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE | + ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); this->av2.actionVar2 = 99; } @@ -12154,7 +12155,7 @@ void Player_Action_8084BDFC(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_6; if (LinkAnimation_Update(play, &this->skelAnime)) { - func_80832E48(this, ANIM_FLAG_0); + func_80832E48(this, ANIM_FLAG_UPDATE_XZ); func_8083C0E8(this, play); return; } @@ -14800,8 +14801,8 @@ void func_808519EC(PlayState* play, Player* this, CsCmdActorCue* cue) { this->actor.shape.rot.y = -0x8000; Player_AnimPlayOnceAdjusted(play, this, this->ageProperties->unk_9C); Player_AnimReplaceApplyFlags(play, this, - ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_2 | - ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_PLAYER_7); + ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | + ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_PLAYER_7); } static struct_808551A4 D_808551A4[] = { @@ -14977,8 +14978,8 @@ void func_80852048(PlayState* play, Player* this, CsCmdActorCue* cue) { void func_80852080(PlayState* play, Player* this, CsCmdActorCue* cue) { Player_AnimReplacePlayOnceAdjusted(play, this, &gPlayerAnim_clink_demo_futtobi, - ANIM_FLAG_0 | ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | - ANIM_FLAG_PLAYER_7); + ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | + ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); func_80832698(this, NA_SE_VO_LI_FALL_L); } @@ -15458,7 +15459,8 @@ void func_80853148(PlayState* play, Actor* actor) { } if (this->skelAnime.animation == &gPlayerAnim_link_normal_backspace) { - Player_AnimReplaceApplyFlags(play, this, ANIM_FLAG_0 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE); + Player_AnimReplaceApplyFlags(play, this, + ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE); } func_80832224(this);