1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-13 04:39:36 +00:00

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<<n flags
This commit is contained in:
Dragorn421 2023-08-15 22:23:53 +02:00 committed by GitHub
parent 9e9d62cf71
commit 4dea0bfb26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 109 additions and 69 deletions

View file

@ -88,8 +88,12 @@ 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
#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 AnimationContext_SetMoveActor
#define ANIM_FLAG_NO_MOVE (1 << 4)
#define ANIM_FLAG_PLAYER_7 (1 << 7) // (player-only)
typedef struct SkelAnime {
/* 0x00 */ u8 limbCount; // Number of limbs in the skeleton
@ -287,7 +291,7 @@ typedef struct {
typedef struct {
/* 0x000 */ struct Actor* actor;
/* 0x004 */ struct SkelAnime* skelAnime;
/* 0x008 */ f32 unk_08;
/* 0x008 */ f32 diffScaleY;
} AnimEntryMoveActor; // size = 0xC
typedef union {
@ -317,7 +321,7 @@ void AnimationContext_SetCopyAll(struct PlayState* play, s32 vecCount, Vec3s* ds
void AnimationContext_SetCopyTrue(struct PlayState* play, s32 vecCount, Vec3s* dst, Vec3s* src, u8* copyFlag);
void AnimationContext_SetCopyFalse(struct PlayState* play, s32 vecCount, Vec3s* dst, Vec3s* src, u8* copyFlag);
void AnimationContext_SetInterp(struct PlayState* play, s32 vecCount, Vec3s* base, Vec3s* mod, f32 weight);
void AnimationContext_SetMoveActor(struct PlayState* play, struct Actor* actor, SkelAnime* skelAnime, f32 arg3);
void AnimationContext_SetMoveActor(struct PlayState* play, struct Actor* actor, SkelAnime* skelAnime, f32 moveDiffScaleY);
void AnimationContext_SetNextQueue(struct PlayState* play);
void AnimationContext_DisableQueue(struct PlayState* play);

View file

@ -1064,12 +1064,12 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx**
sCurBodyPartPos = &this->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;
}
}

View file

@ -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;
}

View file

@ -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);
}

View file

@ -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) {

View file

@ -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);
}
}

View file

@ -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);
}

View file

@ -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) {

View file

@ -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;

View file

@ -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) {

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);