From d80da36cff26e88e1b3c24e2ce8763732b642862 Mon Sep 17 00:00:00 2001 From: Tharo Date: Wed, 25 Feb 2026 12:03:13 +0000 Subject: [PATCH] Make bool return values of SkelAnime_Update and LinkAnimation_Update clear (#2706) * Make bool return values of SkelAnime_Update and LinkAnimation_Update clear * formatting: empty line after decl --------- Co-authored-by: Dragorn421 --- src/code/z_skelanime.c | 14 ++-- src/overlays/actors/ovl_Demo_Go/z_demo_go.c | 6 +- src/overlays/actors/ovl_Demo_Im/z_demo_im.c | 30 ++++---- src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c | 6 +- src/overlays/actors/ovl_En_Bili/z_en_bili.c | 4 +- .../z_en_horse_link_child.c | 20 ++--- src/overlays/actors/ovl_En_Rl/z_en_rl.c | 22 +++--- src/overlays/actors/ovl_En_Ru1/z_en_ru1.c | 42 +++++------ src/overlays/actors/ovl_En_Ru2/z_en_ru2.c | 12 +-- .../actors/ovl_En_Viewer/z_en_viewer.c | 14 ++-- src/overlays/actors/ovl_En_Xc/z_en_xc.c | 74 +++++++++---------- src/overlays/actors/ovl_En_Zl3/z_en_zl3.c | 12 +-- .../actors/ovl_player_actor/z_player.c | 49 ++++++------ 13 files changed, 147 insertions(+), 158 deletions(-) diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index 10e0df1a44..8fbc70ae46 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -1223,7 +1223,7 @@ s32 LinkAnimation_Loop(PlayState* play, SkelAnime* skelAnime) { skelAnime->curFrame -= skelAnime->animLength; } LinkAnimation_AnimateFrame(play, skelAnime); - return 0; + return false; } /** @@ -1234,7 +1234,7 @@ s32 LinkAnimation_Once(PlayState* play, SkelAnime* skelAnime) { if (skelAnime->curFrame == skelAnime->endFrame) { LinkAnimation_AnimateFrame(play, skelAnime); - return 1; + return true; } skelAnime->curFrame += skelAnime->playSpeed * updateRate; if ((skelAnime->curFrame - skelAnime->endFrame) * skelAnime->playSpeed > 0.0f) { @@ -1245,7 +1245,7 @@ s32 LinkAnimation_Once(PlayState* play, SkelAnime* skelAnime) { skelAnime->curFrame -= skelAnime->animLength; } LinkAnimation_AnimateFrame(play, skelAnime); - return 0; + return false; } /** @@ -1641,7 +1641,7 @@ s32 SkelAnime_LoopFull(SkelAnime* skelAnime) { skelAnime->curFrame -= skelAnime->animLength; } SkelAnime_AnimateFrame(skelAnime); - return 0; + return false; } /** @@ -1658,7 +1658,7 @@ s32 SkelAnime_LoopPartial(SkelAnime* skelAnime) { } SkelAnime_AnimateFrame(skelAnime); - return 0; + return false; } /** @@ -1671,7 +1671,7 @@ s32 SkelAnime_Once(SkelAnime* skelAnime) { SkelAnime_GetFrameData(skelAnime->animation, (s32)skelAnime->curFrame, skelAnime->limbCount, skelAnime->jointTable); SkelAnime_AnimateFrame(skelAnime); - return 1; + return true; } skelAnime->curFrame += skelAnime->playSpeed * updateRate; @@ -1684,7 +1684,7 @@ s32 SkelAnime_Once(SkelAnime* skelAnime) { skelAnime->curFrame -= skelAnime->animLength; } SkelAnime_AnimateFrame(skelAnime); - return 0; + return false; } /** diff --git a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c index 2266a7c61e..32f31eec3f 100644 --- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c +++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c @@ -302,12 +302,12 @@ void func_8097D058(DemoGo* this, PlayState* play) { } void func_8097D088(DemoGo* this, PlayState* play) { - s32 something; + s32 animFinished; func_8097CA30(this, play); - something = DemoGo_UpdateSkelAnime(this); + animFinished = DemoGo_UpdateSkelAnime(this); func_8097C930(this); - func_8097CF20(this, play, something); + func_8097CF20(this, play, animFinished); } void func_8097D0D0(DemoGo* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c index 1c53402a6b..b3441b5ac6 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -427,12 +427,12 @@ void func_80985770(DemoIm* this, PlayState* play) { } void func_809857B0(DemoIm* this, PlayState* play) { - s32 sp1C; + s32 animFinished; DemoIm_UpdateBgCheckInfo(this, play); - sp1C = DemoIm_UpdateSkelAnime(this); + animFinished = DemoIm_UpdateSkelAnime(this); func_80984BE0(this); - func_80985640(this, sp1C); + func_80985640(this, animFinished); } void func_809857F0(DemoIm* this, PlayState* play) { @@ -716,13 +716,13 @@ void func_809863DC(DemoIm* this, PlayState* play) { } void func_80986430(DemoIm* this, PlayState* play) { - s32 sp24; + s32 animFinished; DemoIm_UpdateBgCheckInfo(this, play); - sp24 = DemoIm_UpdateSkelAnime(this); + animFinished = DemoIm_UpdateSkelAnime(this); func_80985EAC(this, play); func_80984BE0(this); - func_80985FE8(this, sp24); + func_80985FE8(this, animFinished); func_809862E0(this, play); } @@ -734,12 +734,12 @@ void func_80986494(DemoIm* this, PlayState* play) { } void func_809864D4(DemoIm* this, PlayState* play) { - s32 sp24; + s32 animFinished; DemoIm_UpdateBgCheckInfo(this, play); - sp24 = DemoIm_UpdateSkelAnime(this); + animFinished = DemoIm_UpdateSkelAnime(this); func_80984BE0(this); - func_809860DC(this, sp24); + func_809860DC(this, animFinished); func_8098629C(this, play); } @@ -843,13 +843,13 @@ void func_80986908(DemoIm* this, PlayState* play) { } void func_80986948(DemoIm* this, PlayState* play) { - s32 sp24; + s32 animFinished; DemoIm_UpdateBgCheckInfo(this, play); - sp24 = DemoIm_UpdateSkelAnime(this); + animFinished = DemoIm_UpdateSkelAnime(this); func_80986570(this, play); func_80984BE0(this); - func_809865F8(this, play, sp24); + func_809865F8(this, play, animFinished); func_8098680C(this, play); } @@ -1122,12 +1122,12 @@ void func_809872F0(DemoIm* this, PlayState* play) { } void func_80987330(DemoIm* this, PlayState* play) { - s32 sp1C; + s32 animFinished; DemoIm_UpdateBgCheckInfo(this, play); - sp1C = DemoIm_UpdateSkelAnime(this); + animFinished = DemoIm_UpdateSkelAnime(this); func_80984BE0(this); - func_809871B4(this, sp1C); + func_809871B4(this, animFinished); } void DemoIm_Update(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c index fb44ec0376..49bf8e2080 100644 --- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c +++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c @@ -627,12 +627,12 @@ void func_8098F7BC(DemoSa* this, PlayState* play) { } void func_8098F7FC(DemoSa* this, PlayState* play) { - s32 sp1C; + s32 animFinished; func_8098E5C8(this, play); - sp1C = DemoSa_UpdateSkelAnime(this); + animFinished = DemoSa_UpdateSkelAnime(this); func_8098E480(this); - func_8098F610(this, sp1C); + func_8098F610(this, animFinished); } void func_8098F83C(DemoSa* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Bili/z_en_bili.c b/src/overlays/actors/ovl_En_Bili/z_en_bili.c index 29571ca747..74b679b7e2 100644 --- a/src/overlays/actors/ovl_En_Bili/z_en_bili.c +++ b/src/overlays/actors/ovl_En_Bili/z_en_bili.c @@ -408,7 +408,7 @@ void EnBili_DischargeLightning(EnBili* this, PlayState* play) { } void EnBili_Climb(EnBili* this, PlayState* play) { - s32 skelAnimeUpdate = SkelAnime_Update(&this->skelAnime); + s32 animFinished = SkelAnime_Update(&this->skelAnime); f32 curFrame = this->skelAnime.curFrame; if (Animation_OnFrame(&this->skelAnime, 9.0f)) { @@ -420,7 +420,7 @@ void EnBili_Climb(EnBili* this, PlayState* play) { 5.0f); } - if (skelAnimeUpdate) { + if (animFinished) { EnBili_SetupSetNewHomeHeight(this); } } diff --git a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c index 6d8304ecad..5806ad203a 100644 --- a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c +++ b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c @@ -356,7 +356,7 @@ void func_80A69F5C(EnHorseLinkChild* this, PlayState* play) { void func_80A6A068(EnHorseLinkChild* this, PlayState* play) { Player* player; f32 distFromLink; - s32 animationEnded; + s32 animFinished; s32 newAnimationIdx; func_80A69F5C(this, play); @@ -377,8 +377,8 @@ void func_80A6A068(EnHorseLinkChild* this, PlayState* play) { } newAnimationIdx = this->animationIdx; - animationEnded = SkelAnime_Update(&this->skin.skelAnime); - if (animationEnded || (this->animationIdx == 1) || (this->animationIdx == 0)) { + animFinished = SkelAnime_Update(&this->skin.skelAnime); + if (animFinished || (this->animationIdx == 1) || (this->animationIdx == 0)) { if (GET_EVENTCHKINF(EVENTCHKINF_TALKED_TO_CHILD_MALON_AT_RANCH)) { f32 distFromHome = Math3D_Vec3f_DistXYZ(&this->actor.world.pos, &this->actor.home.pos); f32 distLinkFromHome = Math3D_Vec3f_DistXYZ(&player->actor.world.pos, &this->actor.home.pos); @@ -397,9 +397,9 @@ void func_80A6A068(EnHorseLinkChild* this, PlayState* play) { } else { this->actor.speed = 0.0f; if (this->animationIdx == 0) { - newAnimationIdx = animationEnded == true ? 1 : 0; + newAnimationIdx = animFinished == true ? 1 : 0; } else { - newAnimationIdx = animationEnded == true ? 0 : 1; + newAnimationIdx = animFinished == true ? 0 : 1; } } } else { @@ -416,23 +416,23 @@ void func_80A6A068(EnHorseLinkChild* this, PlayState* play) { } else { this->actor.speed = 0.0f; if (this->animationIdx == 0) { - newAnimationIdx = animationEnded == true ? 1 : 0; + newAnimationIdx = animFinished == true ? 1 : 0; } else { - newAnimationIdx = animationEnded == true ? 0 : 1; + newAnimationIdx = animFinished == true ? 0 : 1; } } } } else { this->actor.speed = 0.0f; if (this->animationIdx == 0) { - newAnimationIdx = animationEnded == true ? 1 : 0; + newAnimationIdx = animFinished == true ? 1 : 0; } else { - newAnimationIdx = animationEnded == true ? 0 : 1; + newAnimationIdx = animFinished == true ? 0 : 1; } } } - if ((this->animationIdx != newAnimationIdx) || (animationEnded == true)) { + if ((this->animationIdx != newAnimationIdx) || (animFinished == true)) { this->animationIdx = newAnimationIdx; Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A695A4(this), 0.0f, Animation_GetLastFrame(sAnimations[this->animationIdx]), ANIMMODE_ONCE, -5.0f); diff --git a/src/overlays/actors/ovl_En_Rl/z_en_rl.c b/src/overlays/actors/ovl_En_Rl/z_en_rl.c index 83b51453e5..16c9127f19 100644 --- a/src/overlays/actors/ovl_En_Rl/z_en_rl.c +++ b/src/overlays/actors/ovl_En_Rl/z_en_rl.c @@ -94,7 +94,7 @@ void func_80AE744C(EnRl* this, PlayState* play) { Actor_UpdateBgCheckInfo(play, &this->actor, 75.0f, 30.0f, 30.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2); } -s32 func_80AE7494(EnRl* this) { +s32 EnRl_UpdateSkelAnime(EnRl* this) { return SkelAnime_Update(&this->skelAnime); } @@ -183,23 +183,23 @@ void func_80AE7798(EnRl* this, PlayState* play) { void func_80AE77B8(EnRl* this, PlayState* play) { func_80AE744C(this, play); - func_80AE7494(this); + EnRl_UpdateSkelAnime(this); func_80AE72D0(this); func_80AE7698(this, play); } void func_80AE77F8(EnRl* this, PlayState* play) { - s32 temp; + s32 animFinished; func_80AE744C(this, play); - temp = func_80AE7494(this); + animFinished = EnRl_UpdateSkelAnime(this); func_80AE72D0(this); - func_80AE772C(this, temp); + func_80AE772C(this, animFinished); } void func_80AE7838(EnRl* this, PlayState* play) { func_80AE744C(this, play); - func_80AE7494(this); + EnRl_UpdateSkelAnime(this); func_80AE72D0(this); func_80AE7590(this, play); } @@ -291,7 +291,7 @@ void func_80AE7C64(EnRl* this, PlayState* play) { void func_80AE7C94(EnRl* this, PlayState* play) { func_80AE744C(this, play); - func_80AE7494(this); + EnRl_UpdateSkelAnime(this); func_80AE72D0(this); func_80AE79A4(this, play); #if DEBUG_FEATURES @@ -300,12 +300,12 @@ void func_80AE7C94(EnRl* this, PlayState* play) { } void func_80AE7CE8(EnRl* this, PlayState* play) { - s32 temp; + s32 animFinished; func_80AE744C(this, play); - temp = func_80AE7494(this); + animFinished = EnRl_UpdateSkelAnime(this); func_80AE72D0(this); - func_80AE7BF8(this, temp); + func_80AE7BF8(this, animFinished); #if DEBUG_FEATURES func_80AE73D8(this, play); #endif @@ -313,7 +313,7 @@ void func_80AE7CE8(EnRl* this, PlayState* play) { void func_80AE7D40(EnRl* this, PlayState* play) { func_80AE744C(this, play); - func_80AE7494(this); + EnRl_UpdateSkelAnime(this); func_80AE72D0(this); func_80AE7AF8(this, play); #if DEBUG_FEATURES 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 d9d537858f..0ebe3a9d98 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -794,11 +794,11 @@ void EnRu1_Fountain_Diving(EnRu1* this, PlayState* play) { } void EnRu1_Fountain_Resurfacing(EnRu1* this, PlayState* play) { - s32 doneAnim = EnRu1_UpdateSkelAnime(this); + s32 animFinished = EnRu1_UpdateSkelAnime(this); func_80AEAECC(this, play); EnRu1_PlayResurfacingSfx(this); - EnRu1_ResurfaceProgress(this, play, doneAnim); + EnRu1_ResurfaceProgress(this, play, animFinished); } void EnRu1_Fountain_TreadingWater(EnRu1* this, PlayState* play) { @@ -810,38 +810,35 @@ void EnRu1_Fountain_TreadingWater(EnRu1* this, PlayState* play) { } void EnRu1_Fountain_StartingSwimBack(EnRu1* this, PlayState* play) { - s32 doneAnim; + s32 animFinished = EnRu1_UpdateSkelAnime(this); - doneAnim = EnRu1_UpdateSkelAnime(this); func_80AEAECC(this, play); EnRu1_UpdateEyes(this); EnRu1_SpawnRippleTreading(this, play); - EnRu1_StartBackSwimming(this, doneAnim); + EnRu1_StartBackSwimming(this, animFinished); EnRu1_PlaySubmergeSfx(this); EnRu1_TransitionToBackSwimming(this, play); } void EnRu1_Fountain_SwimmingBack(EnRu1* this, PlayState* play) { - s32 doneAnim; + s32 animFinished = EnRu1_UpdateSkelAnime(this); - doneAnim = EnRu1_UpdateSkelAnime(this); EnRu1_SwimAwayFromLink(this, play); func_80AEAECC(this, play); EnRu1_UpdateEyes(this); EnRu1_SpawnRippleTreading(this, play); - EnRu1_StartBackSwimming(this, doneAnim); + EnRu1_StartBackSwimming(this, animFinished); EnRu1_PlaySwimStrokeSfx(this); EnRu1_EndSwimBack(this, play); } void EnRu1_Fountain_FinishingSwimBack(EnRu1* this, PlayState* play) { - s32 doneAnim; + s32 animFinished = EnRu1_UpdateSkelAnime(this); - doneAnim = EnRu1_UpdateSkelAnime(this); func_80AEAECC(this, play); EnRu1_UpdateEyes(this); EnRu1_SpawnRippleTreading(this, play); - EnRu1_EndGivingSapphire(this, play, doneAnim); + EnRu1_EndGivingSapphire(this, play, animFinished); } void EnRu1_InitInJabuJabuHolesRoom(EnRu1* this, PlayState* play) { @@ -1040,12 +1037,11 @@ void EnRu1_Meeting_FacingLink(EnRu1* this, PlayState* play) { } void EnRu1_Meeting_TurningAround(EnRu1* this, PlayState* play) { - s32 doneAnim; + s32 animFinished = EnRu1_UpdateSkelAnime(this); - doneAnim = EnRu1_UpdateSkelAnime(this); EnRu1_UpdateEyes(this); func_80AEAECC(this, play); - EnRu1_StartWalkingAway(this, doneAnim); + EnRu1_StartWalkingAway(this, animFinished); } void EnRu1_Meeting_WalkingAwayAccel(EnRu1* this, PlayState* play) { @@ -2008,14 +2004,14 @@ void EnRu1_SpeakableJabu_Talking(EnRu1* this, PlayState* play) { } void EnRu1_SpeakableJabu_TakingSeat(EnRu1* this, PlayState* play) { - s32 doneAnim; + s32 animFinished; func_80AED83C(this); - doneAnim = EnRu1_UpdateSkelAnime(this); + animFinished = EnRu1_UpdateSkelAnime(this); EnRu1_PlaySittingSfx(this); EnRu1_UpdateEyes(this); func_80AEAECC(this, play); - EnRu1_HoldSittingPose(this, play, doneAnim); + EnRu1_HoldSittingPose(this, play, animFinished); } void EnRu1_PlayStepSoundNearSapphire(EnRu1* this) { @@ -2174,16 +2170,16 @@ void EnRu1_SapphireRoom_ThrownOntoPlatform(EnRu1* this, PlayState* play) { } void EnRu1_SapphireRoom_Retrieving(EnRu1* this, PlayState* play) { - s32 doneAnim; + s32 animFinished; func_80AED83C(this); EnRu1_WalkTowardSapphire(this, play); func_80AEAECC(this, play); - doneAnim = EnRu1_UpdateSkelAnime(this); + animFinished = EnRu1_UpdateSkelAnime(this); EnRu1_PlayLaughingSfx(this); EnRu1_LookUpAtSapphire(this); EnRu1_PlayStepSoundNearSapphire(this); - EnRu1_HoldUpSapphire(this, doneAnim); + EnRu1_HoldUpSapphire(this, animFinished); #if DEBUG_FEATURES func_80AEB220(this, play); #endif @@ -2200,13 +2196,13 @@ void EnRu1_SapphireRoom_Holding(EnRu1* this, PlayState* play) { } void EnRu1_SapphireRoom_DoneHolding(EnRu1* this, PlayState* play) { - s32 doneAnim; + s32 animFinished; func_80AED83C(this); func_80AEAECC(this, play); - doneAnim = EnRu1_UpdateSkelAnime(this); + animFinished = EnRu1_UpdateSkelAnime(this); EnRu1_UpdateEyes(this); - EnRu1_KeepArmsDown(this, doneAnim); + EnRu1_KeepArmsDown(this, animFinished); #if DEBUG_FEATURES func_80AEB220(this, play); #endif diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c index ff5e3518a9..7bfc40627b 100644 --- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c +++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c @@ -470,12 +470,12 @@ void EnRu2_SageOfWaterDialog(EnRu2* this, PlayState* play) { } void EnRu2_RaiseArms(EnRu2* this, PlayState* play) { - s32 animDone; + s32 animFinished; EnRu2_UpdateBgCheckInfo(this, play); - animDone = EnRu2_UpdateSkelAnime(this); + animFinished = EnRu2_UpdateSkelAnime(this); EnRu2_UpdateEyes(this); - EnRu2_HoldArmsUp(this, animDone); + EnRu2_HoldArmsUp(this, animFinished); } void EnRu2_AwaitWaterMedallion(EnRu2* this, PlayState* play) { @@ -739,12 +739,12 @@ void EnRu2_CreditsVisible(EnRu2* this, PlayState* play) { } void EnRu2_CreditsTurnHeadDownLeft(EnRu2* this, PlayState* play) { - s32 animDone; + s32 animFinished; EnRu2_UpdateBgCheckInfo(this, play); - animDone = EnRu2_UpdateSkelAnime(this); + animFinished = EnRu2_UpdateSkelAnime(this); EnRu2_UpdateEyes(this); - EnRu2_HoldLookingDownLeftPose(this, animDone); + EnRu2_HoldLookingDownLeftPose(this, animFinished); } void EnRu2_SetEncounterSwitchFlag(EnRu2* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c index f496a96f6a..2244575349 100644 --- a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c +++ b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c @@ -216,7 +216,7 @@ static s16 sTimer = 0; void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) { u8 type = PARAMS_GET_NOMASK(this->actor.params, 8); u16 csCurFrame; - s32 animationEnded; + s32 animFinished; if (type == ENVIEWER_TYPE_2_ZELDA) { if (gSaveContext.sceneLayer == 5) { @@ -295,7 +295,7 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) { EnViewer_UpdatePosition(this, play); Actor_MoveXZGravity(&this->actor); // has no effect, speed/velocity and gravity are 0 - animationEnded = SkelAnime_Update(&this->skin.skelAnime); + animFinished = SkelAnime_Update(&this->skin.skelAnime); if (type == ENVIEWER_TYPE_3_GANONDORF || type == ENVIEWER_TYPE_4_HORSE_GANONDORF) { if (play->csCtx.state != CS_STATE_IDLE && play->csCtx.actorCues[1] != NULL) { if (play->csCtx.actorCues[1]->id == 2 && sTimer == 0) { @@ -325,7 +325,7 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) { } break; case 1: - if (animationEnded) { + if (animFinished) { Animation_MorphToLoop(&this->skin.skelAnime, &gYoungGanondorfHorsebackLookSidewaysLoopAnim, -5.0f); this->state++; @@ -339,7 +339,7 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) { } break; case 3: - if (animationEnded) { + if (animFinished) { Animation_MorphToLoop(&this->skin.skelAnime, &gYoungGanondorfHorsebackMagicChargeUpLoopAnim, -5.0f); this->state++; @@ -440,7 +440,7 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) { } break; case 2: - if (animationEnded) { + if (animFinished) { Animation_MorphToLoop(&this->skin.skelAnime, &object_opening_demo1_Anim_0048FC, -5.0f); this->state++; } @@ -460,7 +460,7 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) { } break; case 1: - if (animationEnded) { + if (animFinished) { Animation_MorphToLoop(&this->skin.skelAnime, &gYoungGanondorfLaughLoopAnim, -5.0f); this->state++; } @@ -483,7 +483,7 @@ void EnViewer_UpdateImpl(EnViewer* this, PlayState* play) { } break; case 2: - if (animationEnded) { + if (animFinished) { Animation_MorphToLoop(&this->skin.skelAnime, &gYoungGanondorfKneelLoopAnim, -5.0f); this->state++; } 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 e28d8f584f..b2aa276ec7 100644 --- a/src/overlays/actors/ovl_En_Xc/z_en_xc.c +++ b/src/overlays/actors/ovl_En_Xc/z_en_xc.c @@ -135,7 +135,7 @@ void EnXc_BgCheck(EnXc* this, PlayState* play) { Actor_UpdateBgCheckInfo(play, &this->actor, 75.0f, 30.0f, 30.0f, UPDBGCHECKINFO_FLAG_2); } -s32 EnXc_AnimIsFinished(EnXc* this) { +s32 EnXc_UpdateSkelAnime(EnXc* this) { return SkelAnime_Update(&this->skelAnime); } @@ -939,7 +939,7 @@ void EnXc_ActionFunc1(EnXc* this, PlayState* play) { } void EnXc_GracefulFall(EnXc* this, PlayState* play) { - s32 animFinished = EnXc_AnimIsFinished(this); + s32 animFinished = EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); @@ -951,7 +951,7 @@ void EnXc_GracefulFall(EnXc* this, PlayState* play) { void EnXc_Accelerate(EnXc* this, PlayState* play) { EnXc_CalcXZAccel(this); - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); EnXc_SetWalkingSFX(this, play); @@ -960,7 +960,7 @@ void EnXc_Accelerate(EnXc* this, PlayState* play) { void EnXc_Walk(EnXc* this, PlayState* play) { func_80B3D644(this); - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); EnXc_SetWalkingSFX(this, play); @@ -969,7 +969,7 @@ void EnXc_Walk(EnXc* this, PlayState* play) { void EnXc_Stopped(EnXc* this, PlayState* play) { EnXc_CalcXZSpeed(this); - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); EnXc_SetWalkingSFX(this, play); @@ -977,14 +977,14 @@ void EnXc_Stopped(EnXc* this, PlayState* play) { } void EnXc_ActionFunc6(EnXc* this, PlayState* play) { - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); func_80B3DAF0(this, play); } void EnXc_ActionFunc7(EnXc* this, PlayState* play) { - s32 animFinished = EnXc_AnimIsFinished(this); + s32 animFinished = EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); @@ -992,7 +992,7 @@ void EnXc_ActionFunc7(EnXc* this, PlayState* play) { } void EnXc_ActionFunc8(EnXc* this, PlayState* play) { - s32 animFinished = EnXc_AnimIsFinished(this); + s32 animFinished = EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); @@ -1000,21 +1000,21 @@ void EnXc_ActionFunc8(EnXc* this, PlayState* play) { } void EnXc_ActionFunc9(EnXc* this, PlayState* play) { - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); func_80B3DCA8(this, play); } void EnXc_ActionFunc10(EnXc* this, PlayState* play) { - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); EnXc_SetupHarpPutawayAction(this, play); } void EnXc_ActionFunc11(EnXc* this, PlayState* play) { - s32 animFinished = EnXc_AnimIsFinished(this); + s32 animFinished = EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); @@ -1022,7 +1022,7 @@ void EnXc_ActionFunc11(EnXc* this, PlayState* play) { } void EnXc_ActionFunc12(EnXc* this, PlayState* play) { - s32 animFinished = EnXc_AnimIsFinished(this); + s32 animFinished = EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); @@ -1030,7 +1030,7 @@ void EnXc_ActionFunc12(EnXc* this, PlayState* play) { } void EnXc_ActionFunc13(EnXc* this, PlayState* play) { - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); EnXc_InitFlame(this, play); @@ -1039,7 +1039,7 @@ void EnXc_ActionFunc13(EnXc* this, PlayState* play) { void EnXc_ReverseAccelerate(EnXc* this, PlayState* play) { func_80B3D6F0(this); - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); EnXc_SetWalkingSFX(this, play); @@ -1049,7 +1049,7 @@ void EnXc_ReverseAccelerate(EnXc* this, PlayState* play) { void EnXc_ActionFunc15(EnXc* this, PlayState* play) { func_80B3D710(this); - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); EnXc_SetWalkingSFX(this, play); @@ -1059,7 +1059,7 @@ void EnXc_ActionFunc15(EnXc* this, PlayState* play) { void EnXc_HaltAndWaitToThrowNut(EnXc* this, PlayState* play) { func_80B3D730(this); - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); EnXc_SetWalkingSFX(this, play); @@ -1068,7 +1068,7 @@ void EnXc_HaltAndWaitToThrowNut(EnXc* this, PlayState* play) { } void EnXc_ThrowNut(EnXc* this, PlayState* play) { - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); EnXc_SetNutThrowSFX(this, play); @@ -1077,7 +1077,7 @@ void EnXc_ThrowNut(EnXc* this, PlayState* play) { } void EnXc_Delete(EnXc* this, PlayState* play) { - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); EnXc_InitFlame(this, play); @@ -1222,7 +1222,7 @@ void EnXc_ActionFunc21(EnXc* this, PlayState* play) { } void EnXc_ActionFunc22(EnXc* this, PlayState* play) { - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); func_80B3EC90(this, play); @@ -1230,7 +1230,7 @@ void EnXc_ActionFunc22(EnXc* this, PlayState* play) { void EnXc_ActionFunc23(EnXc* this, PlayState* play) { func_80B3D6F0(this); - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); EnXc_SetWalkingSFX(this, play); @@ -1382,7 +1382,7 @@ void EnXc_ActionFunc39(EnXc* this, PlayState* play) { void EnXc_ActionFunc40(EnXc* this, PlayState* play) { func_80B3D710(this); - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); EnXc_SetWalkingSFX(this, play); @@ -1531,7 +1531,7 @@ void EnXc_ActionFunc46(EnXc* this, PlayState* play) { void EnXc_ActionFunc47(EnXc* this, PlayState* play) { func_80B3F534(play); - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); func_80B3C588(this, play, 4); func_80B3F668(this, play); @@ -1544,7 +1544,7 @@ void EnXc_ActionFunc48(EnXc* this, PlayState* play) { void EnXc_ActionFunc49(EnXc* this, PlayState* play) { func_80B3D710(this); - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); EnXc_SetWalkingSFX(this, play); @@ -1552,7 +1552,7 @@ void EnXc_ActionFunc49(EnXc* this, PlayState* play) { } void EnXc_Kneel(EnXc* this, PlayState* play) { - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); func_80B3F59C(this, play); func_80B3C588(this, play, 4); @@ -1560,7 +1560,7 @@ void EnXc_Kneel(EnXc* this, PlayState* play) { } void EnXc_ActionFunc51(EnXc* this, PlayState* play) { - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); func_80B3F59C(this, play); func_80B3C620(this, play, 4); @@ -1709,7 +1709,7 @@ void EnXc_ActionFunc53(EnXc* this, PlayState* play) { } void EnXc_ActionFunc54(EnXc* this, PlayState* play) { - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); EnXc_SetupShowTriforceAction(this, play); @@ -1719,7 +1719,7 @@ void EnXc_ActionFunc54(EnXc* this, PlayState* play) { } void EnXc_ShowTriforce(EnXc* this, PlayState* play) { - s32 animFinished = EnXc_AnimIsFinished(this); + s32 animFinished = EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); @@ -1732,7 +1732,7 @@ void EnXc_ShowTriforce(EnXc* this, PlayState* play) { } void EnXc_ShowTriforceIdle(EnXc* this, PlayState* play) { - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); EnXc_CalcTriforce(&this->actor, play); @@ -2061,13 +2061,13 @@ void EnXc_InitialNocturneAction(EnXc* this, PlayState* play) { void EnXc_IdleInNocturne(EnXc* this, PlayState* play) { func_80B3C588(this, play, 4); - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetupNocturneState(&this->actor, play); } void EnXc_DefenseStance(EnXc* this, PlayState* play) { - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); EnXc_SetupNocturneState(&this->actor, play); @@ -2075,7 +2075,7 @@ void EnXc_DefenseStance(EnXc* this, PlayState* play) { void EnXc_Contort(EnXc* this, PlayState* play) { EnXc_SetCrySFX(this, play); - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_SetEyePattern(this); if (!EnXc_SetupNocturneState(&this->actor, play)) { func_80B3C924(this, play); @@ -2084,7 +2084,7 @@ void EnXc_Contort(EnXc* this, PlayState* play) { } void EnXc_FallInNocturne(EnXc* this, PlayState* play) { - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_SetEyePattern(this); EnXc_SetThrownAroundSFX(this); if (!EnXc_SetupNocturneState(&this->actor, play)) { @@ -2100,7 +2100,7 @@ void EnXc_HitGroundInNocturne(EnXc* this, PlayState* play) { } void EnXc_ActionFunc63(EnXc* this, PlayState* play) { - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_PlayLinkScreamSFX(this, play); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); @@ -2108,7 +2108,7 @@ void EnXc_ActionFunc63(EnXc* this, PlayState* play) { } void EnXc_KneelInNocturneCS(EnXc* this, PlayState* play) { - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); EnXc_SetupNocturneState(&this->actor, play); @@ -2162,7 +2162,7 @@ void EnXc_ReverseAccelInNocturneCS(EnXc* this, PlayState* play) { void EnXc_ReverseWalkInNocturneCS(EnXc* this, PlayState* play) { func_80B3D710(this); - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_BgCheck(this, play); EnXc_SetEyePattern(this); EnXc_SetupReverseHaltInNocturneCS(this); @@ -2250,7 +2250,7 @@ void EnXc_BlockingPedestalAction(EnXc* this, PlayState* play) { EnXc_BgCheck(this, play); EnXc_UpdateCollider(&this->actor, play); EnXc_CalculateHeadTurn(this, play); - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_SetEyePattern(this); EnXc_SetupDialogueAction(this, play); } @@ -2259,7 +2259,7 @@ void EnXc_ActionFunc80(EnXc* this, PlayState* play) { EnXc_BgCheck(this, play); EnXc_UpdateCollider(&this->actor, play); EnXc_CalculateHeadTurn(this, play); - EnXc_AnimIsFinished(this); + EnXc_UpdateSkelAnime(this); EnXc_SetEyePattern(this); func_80B41798(this, play); } diff --git a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c index a071640323..1896521e5e 100644 --- a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c +++ b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c @@ -1422,14 +1422,14 @@ void func_80B5670C(EnZl3* this, PlayState* play) { } void func_80B5676C(EnZl3* this, PlayState* play) { - s32 something; + s32 animFinished; func_80B54DE0(this, play); func_80B5366C(this, play); EnZl3_UpdateEyes(this); - something = EnZl3_UpdateSkelAnime(this); + animFinished = EnZl3_UpdateSkelAnime(this); func_80B559C4(this); - func_80B55C4C(this, something); + func_80B55C4C(this, animFinished); } void func_80B567CC(EnZl3* this, PlayState* play) { @@ -1491,16 +1491,16 @@ void func_80B569E4(EnZl3* this, PlayState* play) { } void func_80B56A68(EnZl3* this, PlayState* play) { - s32 something; + s32 animFinished; func_80B54DE0(this, play); func_80B533FC(this, play); func_80B537E8(this); func_80B5366C(this, play); EnZl3_UpdateEyes(this); - something = EnZl3_UpdateSkelAnime(this); + animFinished = EnZl3_UpdateSkelAnime(this); func_80B564A8(this, play); - func_80B56090(this, something); + func_80B56090(this, animFinished); } void func_80B56AE0(EnZl3* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 9e752541b3..f124278706 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -8290,7 +8290,7 @@ void Player_ChooseNextIdleAnim(PlayState* play, Player* this) { void Player_Action_Idle(Player* this, PlayState* play) { s32 idleAnimResult = Player_CheckForIdleAnim(this); - s32 animDone = LinkAnimation_Update(play, &this->skelAnime); + s32 animFinished = LinkAnimation_Update(play, &this->skelAnime); f32 speedTarget; s16 yawTarget; s16 yawDiff; @@ -8299,7 +8299,7 @@ void Player_Action_Idle(Player* this, PlayState* play) { Player_ProcessFidgetAnimSfxList(this, idleAnimResult - 1); } - if (animDone) { + if (animFinished) { if (this->av2.fallDamageStunTimer != 0) { if (DECR(this->av2.fallDamageStunTimer) == 0) { this->skelAnime.endFrame = this->skelAnime.animLength - 1.0f; @@ -8554,11 +8554,10 @@ void func_808416C0(Player* this, PlayState* play) { } void Player_Action_8084170C(Player* this, PlayState* play) { - s32 sp34; + s32 animFinished = LinkAnimation_Update(play, &this->skelAnime); f32 speedTarget; s16 yawTarget; - sp34 = LinkAnimation_Update(play, &this->skelAnime); Player_DecelerateToZero(this); if (!Player_TryActionHandlerList(play, this, sActionHandlerList4, true)) { @@ -8569,7 +8568,7 @@ void Player_Action_8084170C(Player* this, PlayState* play) { if (func_8083FD78(this, &speedTarget, &yawTarget, play) > 0) { func_8083C858(this, play); - } else if ((speedTarget != 0.0f) || (sp34 != 0)) { + } else if ((speedTarget != 0.0f) || animFinished) { func_808416C0(this, play); } } @@ -8577,12 +8576,10 @@ void Player_Action_8084170C(Player* this, PlayState* play) { } void Player_Action_808417FC(Player* this, PlayState* play) { - s32 sp1C; - - sp1C = LinkAnimation_Update(play, &this->skelAnime); + s32 animFinished = LinkAnimation_Update(play, &this->skelAnime); if (!Player_TryActionHandlerList(play, this, sActionHandlerList4, true)) { - if (sp1C != 0) { + if (animFinished) { func_80839F30(this, play); } } @@ -8859,12 +8856,10 @@ void Player_Action_8084227C(Player* this, PlayState* play) { } void Player_Action_808423EC(Player* this, PlayState* play) { - s32 sp34; + s32 animFinished = LinkAnimation_Update(play, &this->skelAnime); f32 speedTarget; s16 yawTarget; - sp34 = LinkAnimation_Update(play, &this->skelAnime); - if (!Player_TryActionHandlerList(play, this, sActionHandlerList5, true)) { if (!Player_IsZTargetingWithHostileUpdate(this)) { func_8083C858(this, play); @@ -8881,7 +8876,7 @@ void Player_Action_808423EC(Player* this, PlayState* play) { return; } - if (sp34 != 0) { + if (animFinished) { func_8083CD00(this, play); } } @@ -8889,12 +8884,10 @@ void Player_Action_808423EC(Player* this, PlayState* play) { } void Player_Action_8084251C(Player* this, PlayState* play) { - s32 sp34; + s32 animFinished = LinkAnimation_Update(play, &this->skelAnime); f32 speedTarget; s16 yawTarget; - sp34 = LinkAnimation_Update(play, &this->skelAnime); - Player_DecelerateToZero(this); if (!Player_TryActionHandlerList(play, this, sActionHandlerList10, true)) { @@ -8908,7 +8901,7 @@ void Player_Action_8084251C(Player* this, PlayState* play) { return; } - if ((speedTarget != 0.0f) || (sp34 != 0)) { + if ((speedTarget != 0.0f) || animFinished) { func_80839F90(this, play); } } @@ -9690,7 +9683,7 @@ static AnimSfxEntry sRollAnimSfxList[] = { void Player_Action_Roll(Player* this, PlayState* play) { Actor* ocCollidedActor; s32 interruptResult; - s32 animDone; + s32 animFinished; DynaPolyActor* wallPolyActor; s32 pad; f32 speedTarget; @@ -9699,7 +9692,7 @@ void Player_Action_Roll(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_5; ocCollidedActor = NULL; - animDone = LinkAnimation_Update(play, &this->skelAnime); + animFinished = LinkAnimation_Update(play, &this->skelAnime); if (LinkAnimation_OnFrame(&this->skelAnime, 8.0f)) { Player_SetInvulnerability(this, FRAMERATE_CONST(-10, -8)); @@ -9712,7 +9705,7 @@ void Player_Action_Roll(Player* this, PlayState* play) { interruptResult = Player_TryActionInterrupt(play, this, &this->skelAnime, 5.0f); if ((interruptResult != PLAYER_INTERRUPT_NEW_ACTION) && - ((interruptResult >= PLAYER_INTERRUPT_MOVE) || animDone)) { + ((interruptResult >= PLAYER_INTERRUPT_MOVE) || animFinished)) { func_8083A060(this, play); } } else { @@ -10054,12 +10047,12 @@ void Player_Action_80845308(Player* this, PlayState* play) { } void Player_Action_80845668(Player* this, PlayState* play) { - s32 sp3C; + s32 animFinished; s32 interruptResult; f32 temp3; this->stateFlags2 |= PLAYER_STATE2_5; - sp3C = LinkAnimation_Update(play, &this->skelAnime); + animFinished = LinkAnimation_Update(play, &this->skelAnime); if (this->skelAnime.animation == &gPlayerAnim_link_normal_250jump_start) { this->speedXZ = 1.0f; @@ -10092,7 +10085,7 @@ void Player_Action_80845668(Player* this, PlayState* play) { return; } - if ((sp3C != 0) || (interruptResult >= PLAYER_INTERRUPT_MOVE)) { + if (animFinished || (interruptResult >= PLAYER_INTERRUPT_MOVE)) { func_8083C0E8(this, play); this->stateFlags1 &= ~(PLAYER_STATE1_14 | PLAYER_STATE1_18); return; @@ -10196,7 +10189,7 @@ s32 func_80845964(PlayState* play, Player* this, CsCmdActorCue* cue, f32 arg3, s func_8083BF50(this, play); } - return 0; + return false; } s32 func_80845BA0(PlayState* play, Player* this, f32* arg2, s32 arg3) { @@ -10287,14 +10280,14 @@ void Player_Action_80845CA4(Player* this, PlayState* play) { } void Player_Action_80845EF8(Player* this, PlayState* play) { - s32 sp2C; + s32 animFinished; this->stateFlags2 |= PLAYER_STATE2_5; - sp2C = LinkAnimation_Update(play, &this->skelAnime); + animFinished = LinkAnimation_Update(play, &this->skelAnime); Player_UpdateUpperBody(this, play); - if (sp2C) { + if (animFinished) { if (this->av2.actionVar2 == 0) { if (DECR(this->doorTimer) == 0) { this->av2.actionVar2 = 1; @@ -12886,7 +12879,7 @@ void Player_Action_8084BF1C(Player* this, PlayState* play) { } if ((this->av2.actionVar2 < 0) || !func_8083FBC0(this, play)) { - if (LinkAnimation_Update(play, &this->skelAnime) != 0) { + if (LinkAnimation_Update(play, &this->skelAnime)) { if (this->av2.actionVar2 < 0) { this->av2.actionVar2 = ABS(this->av2.actionVar2) & 1; return;