From 4dea0bfb26951a8a07ee4cbb9642d8bcd52ba71a Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Tue, 15 Aug 2023 22:23:53 +0200 Subject: [PATCH] Placeholder names for skelanime moveflags (#1489) * Add defines for all used animflags * Use named constants (and add two) for players `func_80832F54` flags * note which flags are player-only * Attempt at documenting but too FeelsUnkMan again * forgot something * ANIM_FLAG_PLAYER_0 -> ANIM_FLAG_0 and amend comment from "player-only" to "no effect outside player" * 1<bodyPartsPos[-1]; if (!LINK_IS_ADULT) { - if (!(this->skelAnime.moveFlags & 4) || (this->skelAnime.moveFlags & 1)) { + if (!(this->skelAnime.moveFlags & ANIM_FLAG_PLAYER_2) || (this->skelAnime.moveFlags & ANIM_FLAG_0)) { pos->x *= 0.64f; pos->z *= 0.64f; } - if (!(this->skelAnime.moveFlags & 4) || (this->skelAnime.moveFlags & 2)) { + if (!(this->skelAnime.moveFlags & ANIM_FLAG_PLAYER_2) || (this->skelAnime.moveFlags & ANIM_FLAG_UPDATE_Y)) { pos->y *= 0.64f; } } diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index bc8a9f392e..0efb58769d 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -914,13 +914,13 @@ void AnimationContext_SetCopyFalse(PlayState* play, s32 vecCount, Vec3s* dst, Ve /** * Requests moving an actor according to the translation of its root limb */ -void AnimationContext_SetMoveActor(PlayState* play, Actor* actor, SkelAnime* skelAnime, f32 arg3) { +void AnimationContext_SetMoveActor(PlayState* play, Actor* actor, SkelAnime* skelAnime, f32 moveDiffScaleY) { AnimationEntry* entry = AnimationContext_AddEntry(&play->animationCtx, ANIMENTRY_MOVEACTOR); if (entry != NULL) { entry->data.move.actor = actor; entry->data.move.skelAnime = skelAnime; - entry->data.move.unk_08 = arg3; + entry->data.move.diffScaleY = moveDiffScaleY; } } @@ -1011,7 +1011,7 @@ void AnimationContext_MoveActor(PlayState* play, AnimationEntryData* data) { SkelAnime_UpdateTranslation(entry->skelAnime, &diff, actor->shape.rot.y); actor->world.pos.x += diff.x * actor->scale.x; - actor->world.pos.y += diff.y * actor->scale.y * entry->unk_08; + actor->world.pos.y += diff.y * actor->scale.y * entry->diffScaleY; actor->world.pos.z += diff.z * actor->scale.z; } 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 8c46fd31dc..03eeee153e 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 |= 3; + this->skelAnime.moveFlags |= ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y; AnimationContext_SetMoveActor(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 |= 3; + this->skelAnime.moveFlags |= ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y; AnimationContext_SetMoveActor(play, &this->actor, &this->skelAnime, 1.0f); } void func_8096D64C(DemoEc* this, PlayState* play) { - this->skelAnime.moveFlags |= 3; + this->skelAnime.moveFlags |= ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y; AnimationContext_SetMoveActor(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 1ed4932ec6..42cbf7e4d1 100644 --- a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c +++ b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c @@ -51,12 +51,12 @@ s32 DemoIk_CheckForCue(PlayState* play, u16 cueId, s32 cueChannel) { } void DemoIk_SetMove(DemoIk* this, PlayState* play) { - this->skelAnime.moveFlags |= 1; + this->skelAnime.moveFlags |= ANIM_FLAG_0; AnimationContext_SetMoveActor(play, &this->actor, &this->skelAnime, 1.0f); } void DemoIk_EndMove(DemoIk* this) { - this->skelAnime.moveFlags &= ~1; + this->skelAnime.moveFlags &= ~ANIM_FLAG_0; } 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 f18b0cf7fe..9b31fbc2ff 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -339,7 +339,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 |= 3; + skelAnime->moveFlags |= ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y; AnimationContext_SetMoveActor(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 71778064f0..db81a98eee 100644 --- a/src/overlays/actors/ovl_En_Nb/z_en_nb.c +++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.c @@ -745,7 +745,7 @@ void EnNb_InitDemo6KInConfrontation(EnNb* this, PlayState* play) { } void func_80AB2688(EnNb* this, PlayState* play) { - this->skelAnime.moveFlags |= 1; + this->skelAnime.moveFlags |= ANIM_FLAG_0; AnimationContext_SetMoveActor(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 d58a4a443a..4ac7533203 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -390,17 +390,17 @@ s32 EnRu1_UpdateSkelAnime(EnRu1* this) { } void func_80AEB364(EnRu1* this, PlayState* play) { - this->skelAnime.moveFlags |= 1; + this->skelAnime.moveFlags |= ANIM_FLAG_0; AnimationContext_SetMoveActor(play, &this->actor, &this->skelAnime, 1.0f); } void func_80AEB3A4(EnRu1* this, PlayState* play) { - this->skelAnime.moveFlags |= 1; + this->skelAnime.moveFlags |= ANIM_FLAG_0; func_80AEB364(this, play); } void func_80AEB3CC(EnRu1* this) { - this->skelAnime.moveFlags &= ~0x1; + this->skelAnime.moveFlags &= ~ANIM_FLAG_0; } void func_80AEB3DC(EnRu1* this, PlayState* play) { @@ -461,7 +461,7 @@ void func_80AEB6E0(EnRu1* this, PlayState* play) { SkelAnime* skelAnime = &this->skelAnime; if (skelAnime->baseTransl.y < skelAnime->jointTable[0].y) { - skelAnime->moveFlags |= 3; + skelAnime->moveFlags |= ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y; AnimationContext_SetMoveActor(play, &this->actor, skelAnime, 1.0f); } } @@ -472,13 +472,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 |= 3; + skelAnime->moveFlags |= ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y; AnimationContext_SetMoveActor(play, &this->actor, skelAnime, 1.0f); } } void func_80AEB7D0(EnRu1* this) { - this->skelAnime.moveFlags &= ~0x3; + this->skelAnime.moveFlags &= ~(ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y); } f32 func_80AEB7E0(CsCmdActorCue* cue, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Test/z_en_test.c b/src/overlays/actors/ovl_En_Test/z_en_test.c index 9f6b744379..a51c4d133d 100644 --- a/src/overlays/actors/ovl_En_Test/z_en_test.c +++ b/src/overlays/actors/ovl_En_Test/z_en_test.c @@ -1592,7 +1592,7 @@ void func_8086318C(EnTest* this, PlayState* play) { void EnTest_SetupRecoil(EnTest* this) { this->swordState = 0; - this->skelAnime.moveFlags = 2; + this->skelAnime.moveFlags = ANIM_FLAG_UPDATE_Y; this->unk_7C8 = 0x13; this->skelAnime.playSpeed = -1.0f; this->skelAnime.startFrame = this->skelAnime.curFrame; 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 48c0159837..f6138cc691 100644 --- a/src/overlays/actors/ovl_En_Xc/z_en_xc.c +++ b/src/overlays/actors/ovl_En_Xc/z_en_xc.c @@ -249,25 +249,25 @@ void func_80B3C8CC(EnXc* this, PlayState* play) { SkelAnime* skelAnime = &this->skelAnime; if (skelAnime->jointTable[0].y >= skelAnime->baseTransl.y) { - skelAnime->moveFlags |= 3; + skelAnime->moveFlags |= ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y; AnimationContext_SetMoveActor(play, &this->actor, skelAnime, 1.0f); } } void func_80B3C924(EnXc* this, PlayState* play) { - this->skelAnime.moveFlags |= 3; + this->skelAnime.moveFlags |= ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y; AnimationContext_SetMoveActor(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 |= 3; + this->skelAnime.moveFlags |= ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y; AnimationContext_SetMoveActor(play, &this->actor, &this->skelAnime, 1.0f); } void func_80B3C9DC(EnXc* this) { - this->skelAnime.moveFlags &= ~0x3; + this->skelAnime.moveFlags &= ~(ANIM_FLAG_0 | 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 93e742927a..680d3183a3 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 |= 1; + this->skelAnime.moveFlags |= ANIM_FLAG_0; AnimationContext_SetMoveActor(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 af279524f8..1d4f87d0e2 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 |= 1; + this->skelAnime.moveFlags |= ANIM_FLAG_0; AnimationContext_SetMoveActor(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 9b6b3364a6..6c6c2f712b 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -1867,8 +1867,8 @@ void func_80832DBC(Player* this) { func_808322FC(this); this->skelAnime.jointTable[0].x = this->skelAnime.baseTransl.x; this->skelAnime.jointTable[0].z = this->skelAnime.baseTransl.z; - if (this->skelAnime.moveFlags & 8) { - if (this->skelAnime.moveFlags & 2) { + if (this->skelAnime.moveFlags & ANIM_FLAG_PLAYER_SETMOVE) { + if (this->skelAnime.moveFlags & ANIM_FLAG_UPDATE_Y) { this->skelAnime.jointTable[0].y = this->skelAnime.prevTransl.y; } } else { @@ -1905,17 +1905,20 @@ void func_80832E48(Player* this, s32 flags) { func_808322FC(this); } +#define FLAG_FUNC_80832F54_8 (1 << 8) +#define FLAG_FUNC_80832F54_9 (1 << 9) + void func_80832F54(PlayState* play, Player* this, s32 flags) { - if (flags & 0x200) { + if (flags & FLAG_FUNC_80832F54_9) { func_80832D20(this); - } else if ((flags & 0x100) || (this->skelAnime.moveFlags != 0)) { + } else if ((flags & FLAG_FUNC_80832F54_8) || (this->skelAnime.moveFlags != 0)) { func_80832CFC(this); } else { this->skelAnime.prevTransl = this->skelAnime.jointTable[0]; this->skelAnime.prevRot = this->actor.shape.rot.y; } - this->skelAnime.moveFlags = flags; + this->skelAnime.moveFlags = flags & 0xFF; Player_ZeroSpeedXZ(this); AnimationContext_DisableQueue(play); } @@ -1934,7 +1937,7 @@ void func_80833064(PlayState* play, Player* this, LinkAnimationHeader* anim, s32 } void func_8083308C(PlayState* play, Player* this, LinkAnimationHeader* anim) { - func_80833064(play, this, anim, 0x1C); + func_80833064(play, this, anim, ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE); } void func_808330AC(PlayState* play, Player* this, LinkAnimationHeader* anim, s32 flags, f32 playbackSpeed) { @@ -1951,7 +1954,7 @@ void func_80833114(PlayState* play, Player* this, LinkAnimationHeader* anim, s32 } void func_8083313C(PlayState* play, Player* this, LinkAnimationHeader* anim) { - func_80833114(play, this, anim, 0x1C); + func_80833114(play, this, anim, ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE); } void func_8083315C(PlayState* play, Player* this) { @@ -2884,8 +2887,8 @@ s32 func_80835588(Player* this, PlayState* play) { void func_808355DC(Player* this) { this->stateFlags1 |= PLAYER_STATE1_17; - if (!(this->skelAnime.moveFlags & 0x80) && (this->actor.bgCheckFlags & BGCHECKFLAG_PLAYER_WALL_INTERACT) && - (D_80853608 < 0x2000)) { + if (!(this->skelAnime.moveFlags & ANIM_FLAG_PLAYER_7) && + (this->actor.bgCheckFlags & BGCHECKFLAG_PLAYER_WALL_INTERACT) && (D_80853608 < 0x2000)) { this->yaw = this->actor.shape.rot.y = this->actor.wallYaw + 0x8000; } @@ -3263,7 +3266,9 @@ s32 func_80836670(Player* this, PlayState* play) { func_80835C58(play, this, func_80850AEC, 1); this->stateFlags3 |= PLAYER_STATE3_7; func_80832264(play, this, &gPlayerAnim_link_hook_fly_start); - func_80832F54(play, this, 0x9B); + func_80832F54(play, this, + ANIM_FLAG_0 | 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; @@ -3782,7 +3787,7 @@ void func_80837948(PlayState* play, Player* this, s32 arg2) { func_808322D0(play, this, D_80854190[arg2].unk_00); if ((arg2 != PLAYER_MWA_FLIPSLASH_START) && (arg2 != PLAYER_MWA_JUMPSLASH_START)) { - func_80832F54(play, this, 0x209); + func_80832F54(play, this, FLAG_FUNC_80832F54_9 | ANIM_FLAG_0 | ANIM_FLAG_PLAYER_SETMOVE); } this->yaw = this->actor.shape.rot.y; @@ -3827,7 +3832,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, 3); + func_80832E48(this, ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y); } void func_80837B9C(Player* this, PlayState* play) { @@ -4686,7 +4691,9 @@ s32 func_80839800(Player* this, PlayState* play) { } func_80832224(this); - func_80832F54(play, this, 0x28F); + func_80832F54(play, this, + FLAG_FUNC_80832F54_9 | ANIM_FLAG_0 | 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) if (doorActor->parent != NULL) { @@ -4989,7 +4996,9 @@ s32 func_8083A6AC(Player* this, PlayState* play) { this->actor.shape.rot.y = this->yaw; this->stateFlags1 |= PLAYER_STATE1_21; - func_80832F54(play, this, 0x9F); + func_80832F54(play, this, + ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | + ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); this->unk_850 = -1; this->unk_84F = sp50; @@ -5034,7 +5043,7 @@ void func_8083AA10(Player* this, PlayState* play) { return; } - if (!(this->stateFlags3 & PLAYER_STATE3_1) && !(this->skelAnime.moveFlags & 0x80) && + if (!(this->stateFlags3 & PLAYER_STATE3_1) && !(this->skelAnime.moveFlags & ANIM_FLAG_PLAYER_7) && (func_8084411C != this->func_674) && (func_80844A44 != this->func_674)) { if ((D_80853604 == FLOOR_PROPERTY_7) || (this->meleeWeaponState != 0)) { @@ -5659,7 +5668,7 @@ s32 func_8083C2B0(Player* this, PlayState* play) { LinkAnimation_Change(play, &this->skelAnime, anim, 1.0f, frame, frame, ANIMMODE_ONCE, 0.0f); if (Player_IsChildWithHylianShield(this)) { - func_80832F54(play, this, 4); + func_80832F54(play, this, ANIM_FLAG_PLAYER_2); } Player_PlaySfx(this, NA_SE_IT_SHIELD_POSTURE); @@ -6310,7 +6319,9 @@ s32 func_8083E0FC(Player* this, PlayState* play) { Actor_MountHorse(play, this, &rideActor->actor); func_80832264(play, this, D_80854578[temp].anim); - func_80832F54(play, this, 0x9B); + func_80832F54(play, this, + ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | + ANIM_FLAG_PLAYER_7); this->actor.parent = this->rideActor; func_80832224(this); Actor_DisableLens(play); @@ -6465,7 +6476,9 @@ s32 func_8083E5A8(Player* this, PlayState* play) { if ((giEntry->itemId != ITEM_NONE) && (giEntry->gi >= 0) && (Item_CheckObtainability(giEntry->itemId) == ITEM_NONE)) { func_808322D0(play, this, this->ageProperties->unk_98); - func_80832F54(play, this, 0x28F); + func_80832F54(play, this, + FLAG_FUNC_80832F54_9 | ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_2 | + ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_PLAYER_7); chest->unk_1F4 = 1; Camera_ChangeSetting(Play_GetCamera(play, CAM_ID_MAIN), CAM_SET_SLOW_CHEST_CS); } else { @@ -6641,7 +6654,9 @@ s32 func_8083EC18(Player* this, PlayState* play, u32 interactWallFlags) { func_80832224(this); Math_Vec3f_Copy(&this->actor.prevPos, &this->actor.world.pos); func_80832264(play, this, sp30); - func_80832F54(play, this, 0x9F); + func_80832F54(play, this, + ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | + ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); return true; } @@ -6720,7 +6735,9 @@ s32 Player_TryEnteringCrawlspace(Player* this, PlayState* play, u32 interactWall func_80832224(this); this->actor.prevPos = this->actor.world.pos; func_80832264(play, this, &gPlayerAnim_link_child_tunnel_start); - func_80832F54(play, this, 0x9D); + func_80832F54(play, this, + ANIM_FLAG_0 | ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | + ANIM_FLAG_PLAYER_7); return true; } @@ -6808,7 +6825,9 @@ s32 Player_TryLeavingCrawlspace(Player* this, PlayState* play) { // Leaving a crawlspace forwards this->actor.shape.rot.y = this->actor.wallYaw + 0x8000; func_80832264(play, this, &gPlayerAnim_link_child_tunnel_end); - func_80832F54(play, this, 0x9D); + func_80832F54(play, this, + ANIM_FLAG_0 | 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 { // Leaving a crawlspace backwards @@ -6816,7 +6835,9 @@ s32 Player_TryLeavingCrawlspace(Player* this, PlayState* play) { LinkAnimation_Change(play, &this->skelAnime, &gPlayerAnim_link_child_tunnel_start, -1.0f, Animation_GetLastFrame(&gPlayerAnim_link_child_tunnel_start), 0.0f, ANIMMODE_ONCE, 0.0f); - func_80832F54(play, this, 0x9D); + func_80832F54(play, this, + ANIM_FLAG_0 | 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); } @@ -8226,7 +8247,7 @@ void func_80843188(Player* this, PlayState* play) { LinkAnimation_Change(play, &this->skelAnime, &gPlayerAnim_clink_normal_defense_ALL, 1.0f, Animation_GetLastFrame(&gPlayerAnim_clink_normal_defense_ALL), 0.0f, ANIMMODE_ONCE, 0.0f); - func_80832F54(play, this, 4); + func_80832F54(play, this, ANIM_FLAG_PLAYER_2); } else { if (this->itemAction < 0) { func_8008EC70(this); @@ -9525,7 +9546,9 @@ void func_808467D4(PlayState* play, Player* this) { this->yaw = this->actor.shape.rot.y = -0x8000; LinkAnimation_Change(play, &this->skelAnime, this->ageProperties->unk_A0, 2.0f / 3.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f); - func_80832F54(play, this, 0x28F); + func_80832F54(play, this, + FLAG_FUNC_80832F54_9 | ANIM_FLAG_0 | 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); } @@ -9534,7 +9557,8 @@ void func_808467D4(PlayState* play, Player* this) { void func_808468A8(PlayState* play, Player* this) { func_80835C58(play, this, func_8084F9A0, 0); - func_80832F54(play, this, 0x9B); + func_80832F54(play, this, + ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); } void func_808468E8(PlayState* play, Player* this) { @@ -10579,7 +10603,9 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { func_8083A360(play, this); this->stateFlags1 |= PLAYER_STATE1_23; func_80832264(play, this, &gPlayerAnim_link_uma_wait_1); - func_80832F54(play, this, 0x9B); + func_80832F54(play, this, + ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | + ANIM_FLAG_PLAYER_7); this->unk_850 = 99; } @@ -10604,7 +10630,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { func_8084FF7C(this); } - if (!(this->skelAnime.moveFlags & 0x80)) { + if (!(this->skelAnime.moveFlags & ANIM_FLAG_PLAYER_7)) { if (((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (D_808535E4 == FLOOR_TYPE_5) && (this->currentBoots != PLAYER_BOOTS_IRON)) || ((this->currentBoots == PLAYER_BOOTS_HOVER) && @@ -10787,9 +10813,10 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { Player_UpdateCamAndSeqModes(play, this); - if (this->skelAnime.moveFlags & 8) { - AnimationContext_SetMoveActor(play, &this->actor, &this->skelAnime, - (this->skelAnime.moveFlags & 4) ? 1.0f : this->ageProperties->unk_08); + if (this->skelAnime.moveFlags & ANIM_FLAG_PLAYER_SETMOVE) { + AnimationContext_SetMoveActor( + play, &this->actor, &this->skelAnime, + (this->skelAnime.moveFlags & ANIM_FLAG_PLAYER_2) ? 1.0f : this->ageProperties->unk_08); } func_808368EC(this, play); @@ -11579,7 +11606,7 @@ void func_8084BDFC(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_6; if (LinkAnimation_Update(play, &this->skelAnime)) { - func_80832E48(this, 1); + func_80832E48(this, ANIM_FLAG_0); func_8083C0E8(this, play); return; } @@ -13936,7 +13963,8 @@ void func_808510D4(PlayState* play, Player* this, void* anim) { } void func_808510F4(PlayState* play, Player* this, void* anim) { - func_8083303C(play, this, anim, 0x9C); + func_8083303C(play, this, anim, + ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); } void func_80851114(PlayState* play, Player* this, void* anim) { @@ -13944,7 +13972,8 @@ void func_80851114(PlayState* play, Player* this, void* anim) { } void func_80851134(PlayState* play, Player* this, void* anim) { - func_808330EC(play, this, anim, 0x9C); + func_808330EC(play, this, anim, + ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); } void func_80851154(PlayState* play, Player* this, void* anim) { @@ -14189,7 +14218,9 @@ void func_808519EC(PlayState* play, Player* this, CsCmdActorCue* cue) { Math_Vec3f_Copy(&this->actor.world.pos, &D_80855198); this->actor.shape.rot.y = -0x8000; func_808322D0(play, this, this->ageProperties->unk_9C); - func_80832F54(play, this, 0x28F); + func_80832F54(play, this, + FLAG_FUNC_80832F54_9 | ANIM_FLAG_0 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_2 | + ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_PLAYER_7); } static struct_808551A4 D_808551A4[] = { @@ -14299,17 +14330,20 @@ void func_80851E28(PlayState* play, Player* this, CsCmdActorCue* cue) { } void func_80851E64(PlayState* play, Player* this, CsCmdActorCue* cue) { - func_80833064(play, this, &gPlayerAnim_link_swimer_swim_get, 0x98); + func_80833064(play, this, &gPlayerAnim_link_swimer_swim_get, + ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); } void func_80851E90(PlayState* play, Player* this, CsCmdActorCue* cue) { - func_8083303C(play, this, &gPlayerAnim_clink_op3_negaeri, 0x9C); + func_8083303C(play, this, &gPlayerAnim_clink_op3_negaeri, + ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); func_80832698(this, NA_SE_VO_LI_GROAN); } void func_80851ECC(PlayState* play, Player* this, CsCmdActorCue* cue) { if (LinkAnimation_Update(play, &this->skelAnime)) { - func_808330EC(play, this, &gPlayerAnim_clink_op3_wait2, 0x9C); + func_808330EC(play, this, &gPlayerAnim_clink_op3_wait2, + ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); } } @@ -14335,7 +14369,8 @@ static struct_80832924 D_808551BC[] = { void func_80851FB0(PlayState* play, Player* this, CsCmdActorCue* cue) { if (LinkAnimation_Update(play, &this->skelAnime)) { - func_808330EC(play, this, &gPlayerAnim_clink_op3_wait3, 0x9C); + func_808330EC(play, this, &gPlayerAnim_clink_op3_wait3, + ANIM_FLAG_PLAYER_2 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); this->unk_850 = 1; } else if (this->unk_850 == 0) { func_80832924(this, D_808551BC); @@ -14358,7 +14393,8 @@ void func_80852048(PlayState* play, Player* this, CsCmdActorCue* cue) { } void func_80852080(PlayState* play, Player* this, CsCmdActorCue* cue) { - func_80833064(play, this, &gPlayerAnim_clink_demo_futtobi, 0x9D); + func_80833064(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); func_80832698(this, NA_SE_VO_LI_FALL_L); } @@ -14406,7 +14442,7 @@ void func_80852234(PlayState* play, Player* this, CsCmdActorCue* cue) { } void func_8085225C(PlayState* play, Player* this, CsCmdActorCue* cue) { - func_80832F54(play, this, 0x98); + func_80832F54(play, this, ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE | ANIM_FLAG_PLAYER_7); } void func_80852280(PlayState* play, Player* this, CsCmdActorCue* cue) { @@ -14644,7 +14680,7 @@ void func_80852B4C(PlayState* play, Player* this, CsCmdActorCue* cue, struct_808 arg3->func(play, this, cue); } - if ((D_80858AA0 & 4) && !(this->skelAnime.moveFlags & 4)) { + if ((D_80858AA0 & ANIM_FLAG_PLAYER_2) && !(this->skelAnime.moveFlags & ANIM_FLAG_PLAYER_2)) { this->skelAnime.morphTable[0].y /= this->ageProperties->unk_08; D_80858AA0 = 0; } @@ -14831,7 +14867,7 @@ void func_80853148(PlayState* play, Actor* actor) { } if (this->skelAnime.animation == &gPlayerAnim_link_normal_backspace) { - func_80832F54(play, this, 0x19); + func_80832F54(play, this, ANIM_FLAG_0 | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_NO_MOVE); } func_80832224(this);