1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-12 09:50:50 +00:00

Standardize "ActorMovement" over "ActorMove" (#2214)

* ActorMove -> ActorMovement

* more move -> movement

* ANIM_FLAG_ENABLE_MOVEMENT

* format
This commit is contained in:
fig02 2024-09-23 10:07:11 -04:00 committed by GitHub
parent ebd2b8dd50
commit bb3848262d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 124 additions and 117 deletions

View file

@ -176,20 +176,20 @@ void DemoEc_UpdateBgFlags(DemoEc* this, PlayState* play) {
}
void func_8096D594(DemoEc* this, PlayState* play) {
this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
AnimTaskQueue_AddActorMovement(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_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
}
void func_8096D64C(DemoEc* this, PlayState* play) {
this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
}
void DemoEc_UpdateEyes(DemoEc* this) {

View file

@ -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_UPDATE_XZ;
AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ;
AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
}
void DemoIk_EndMove(DemoIk* this) {
this->skelAnime.moveFlags &= ~ANIM_FLAG_UPDATE_XZ;
this->skelAnime.movementFlags &= ~ANIM_FLAG_UPDATE_XZ;
}
f32 DemoIk_GetCurFrame(DemoIk* this) {

View file

@ -337,8 +337,8 @@ 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_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
AnimTaskQueue_AddActorMove(play, &this->actor, skelAnime, 1.0f);
skelAnime->movementFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
AnimTaskQueue_AddActorMovement(play, &this->actor, skelAnime, 1.0f);
}
}

View file

@ -756,8 +756,8 @@ void EnNb_InitDemo6KInConfrontation(EnNb* this, PlayState* play) {
}
void func_80AB2688(EnNb* this, PlayState* play) {
this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ;
AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ;
AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
}
void func_80AB26C8(EnNb* this) {

View file

@ -392,17 +392,17 @@ s32 EnRu1_UpdateSkelAnime(EnRu1* this) {
}
void func_80AEB364(EnRu1* this, PlayState* play) {
this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ;
AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ;
AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
}
void func_80AEB3A4(EnRu1* this, PlayState* play) {
this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ;
this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ;
func_80AEB364(this, play);
}
void func_80AEB3CC(EnRu1* this) {
this->skelAnime.moveFlags &= ~ANIM_FLAG_UPDATE_XZ;
this->skelAnime.movementFlags &= ~ANIM_FLAG_UPDATE_XZ;
}
void func_80AEB3DC(EnRu1* this, PlayState* play) {
@ -463,8 +463,8 @@ void func_80AEB6E0(EnRu1* this, PlayState* play) {
SkelAnime* skelAnime = &this->skelAnime;
if (skelAnime->baseTransl.y < skelAnime->jointTable[0].y) {
skelAnime->moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
AnimTaskQueue_AddActorMove(play, &this->actor, skelAnime, 1.0f);
skelAnime->movementFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
AnimTaskQueue_AddActorMovement(play, &this->actor, skelAnime, 1.0f);
}
}
@ -474,13 +474,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_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
AnimTaskQueue_AddActorMove(play, &this->actor, skelAnime, 1.0f);
skelAnime->movementFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
AnimTaskQueue_AddActorMovement(play, &this->actor, skelAnime, 1.0f);
}
}
void func_80AEB7D0(EnRu1* this) {
this->skelAnime.moveFlags &= ~(ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y);
this->skelAnime.movementFlags &= ~(ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y);
}
f32 func_80AEB7E0(CsCmdActorCue* cue, PlayState* play) {

View file

@ -1593,7 +1593,7 @@ void func_8086318C(EnTest* this, PlayState* play) {
void EnTest_SetupRecoil(EnTest* this) {
this->swordState = 0;
this->skelAnime.moveFlags = ANIM_FLAG_UPDATE_Y;
this->skelAnime.movementFlags = ANIM_FLAG_UPDATE_Y;
this->unk_7C8 = 0x13;
this->skelAnime.playSpeed = -1.0f;
this->skelAnime.startFrame = this->skelAnime.curFrame;

View file

@ -253,25 +253,25 @@ void func_80B3C8CC(EnXc* this, PlayState* play) {
SkelAnime* skelAnime = &this->skelAnime;
if (skelAnime->jointTable[0].y >= skelAnime->baseTransl.y) {
skelAnime->moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
AnimTaskQueue_AddActorMove(play, &this->actor, skelAnime, 1.0f);
skelAnime->movementFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
AnimTaskQueue_AddActorMovement(play, &this->actor, skelAnime, 1.0f);
}
}
void func_80B3C924(EnXc* this, PlayState* play) {
this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
AnimTaskQueue_AddActorMovement(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_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y;
AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
}
void func_80B3C9DC(EnXc* this) {
this->skelAnime.moveFlags &= ~(ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y);
this->skelAnime.movementFlags &= ~(ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y);
}
void func_80B3C9EC(EnXc* this) {

View file

@ -345,8 +345,8 @@ void func_80B4B834(CsCmdActorCue* cue, Vec3f* dest) {
}
void func_80B4B874(EnZl1* this, PlayState* play) {
this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ;
AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ;
AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
}
void func_80B4B8B4(EnZl1* this, PlayState* play) {

View file

@ -298,8 +298,8 @@ void EnZl4_UpdateFace(EnZl4* this) {
}
void EnZl4_SetMove(EnZl4* this, PlayState* play) {
this->skelAnime.moveFlags |= ANIM_FLAG_UPDATE_XZ;
AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
this->skelAnime.movementFlags |= ANIM_FLAG_UPDATE_XZ;
AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
}
void func_80B5BB78(EnZl4* this, PlayState* play) {

View file

@ -52,11 +52,11 @@ void ObjHsblock_SetupAction(ObjHsblock* this, ObjHsblockActionFunc actionFunc) {
this->actionFunc = actionFunc;
}
void func_80B93B68(ObjHsblock* this, PlayState* play, CollisionHeader* collision, s32 moveFlags) {
void func_80B93B68(ObjHsblock* this, PlayState* play, CollisionHeader* collision, s32 transformFlags) {
s32 pad;
CollisionHeader* colHeader = NULL;
DynaPolyActor_Init(&this->dyna, moveFlags);
DynaPolyActor_Init(&this->dyna, transformFlags);
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);

View file

@ -1974,26 +1974,26 @@ void Player_ZeroRootLimbYaw(Player* this) {
}
void func_80832DBC(Player* this) {
if (this->skelAnime.moveFlags != 0) {
if (this->skelAnime.movementFlags != 0) {
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 & ANIM_FLAG_PLAYER_SETMOVE) {
if (this->skelAnime.moveFlags & ANIM_FLAG_UPDATE_Y) {
if (this->skelAnime.movementFlags & ANIM_FLAG_ENABLE_MOVEMENT) {
if (this->skelAnime.movementFlags & ANIM_FLAG_UPDATE_Y) {
this->skelAnime.jointTable[0].y = this->skelAnime.prevTransl.y;
}
} else {
this->skelAnime.jointTable[0].y = this->skelAnime.baseTransl.y;
}
Player_SkelAnimeResetPrevTranslRot(this);
this->skelAnime.moveFlags = 0;
this->skelAnime.movementFlags = 0;
}
}
void func_80832E48(Player* this, s32 flags) {
Vec3f pos;
this->skelAnime.moveFlags = flags;
this->skelAnime.movementFlags = flags;
this->skelAnime.prevTransl = this->skelAnime.baseTransl;
SkelAnime_UpdateTranslation(&this->skelAnime, &pos, this->actor.shape.rot.y);
@ -2022,14 +2022,14 @@ void func_80832E48(Player* this, s32 flags) {
void Player_AnimReplaceApplyFlags(PlayState* play, Player* this, s32 flags) {
if (flags & ANIM_REPLACE_APPLY_FLAG_9) {
Player_SkelAnimeResetPrevTranslRotAgeScale(this);
} else if ((flags & ANIM_REPLACE_APPLY_FLAG_8) || (this->skelAnime.moveFlags != 0)) {
} else if ((flags & ANIM_REPLACE_APPLY_FLAG_8) || (this->skelAnime.movementFlags != 0)) {
Player_SkelAnimeResetPrevTranslRot(this);
} else {
this->skelAnime.prevTransl = this->skelAnime.jointTable[0];
this->skelAnime.prevRot = this->actor.shape.rot.y;
}
this->skelAnime.moveFlags = flags & 0xFF;
this->skelAnime.movementFlags = flags & 0xFF;
Player_ZeroSpeedXZ(this);
AnimTaskQueue_DisableTransformTasksForGroup(play);
}
@ -2050,7 +2050,7 @@ void Player_AnimReplacePlayOnceAdjusted(PlayState* play, Player* this, LinkAnima
void Player_AnimReplaceNormalPlayOnceAdjusted(PlayState* play, Player* this, LinkAnimationHeader* anim) {
Player_AnimReplacePlayOnceAdjusted(play, this, anim,
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS);
}
@ -2070,7 +2070,7 @@ void Player_AnimReplacePlayLoopAdjusted(PlayState* play, Player* this, LinkAnima
void Player_AnimReplaceNormalPlayLoopAdjusted(PlayState* play, Player* this, LinkAnimationHeader* anim) {
Player_AnimReplacePlayLoopAdjusted(play, this, anim,
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS);
}
@ -3076,7 +3076,7 @@ s32 func_80835588(Player* this, PlayState* play) {
void Player_SetParallel(Player* this) {
this->stateFlags1 |= PLAYER_STATE1_PARALLEL;
if (!(this->skelAnime.moveFlags & ANIM_FLAG_OVERRIDE_MOVEMENT) &&
if (!(this->skelAnime.movementFlags & ANIM_FLAG_OVERRIDE_MOVEMENT) &&
(this->actor.bgCheckFlags & BGCHECKFLAG_PLAYER_WALL_INTERACT) && (sShapeYawToTouchedWall < 0x2000)) {
// snap to the wall
this->yaw = this->actor.shape.rot.y = this->actor.wallYaw + 0x8000;
@ -3282,10 +3282,10 @@ s32 Player_SetupAction(PlayState* play, Player* this, PlayerActionFunc actionFun
void func_80835DAC(PlayState* play, Player* this, PlayerActionFunc actionFunc, s32 flags) {
s32 temp;
temp = this->skelAnime.moveFlags;
this->skelAnime.moveFlags = 0;
temp = this->skelAnime.movementFlags;
this->skelAnime.movementFlags = 0;
Player_SetupAction(play, this, actionFunc, flags);
this->skelAnime.moveFlags = temp;
this->skelAnime.movementFlags = temp;
}
void func_80835DE4(PlayState* play, Player* this, PlayerActionFunc actionFunc, s32 flags) {
@ -3495,7 +3495,7 @@ s32 Player_UpdateUpperBody(Player* this, PlayState* play) {
this->stateFlags3 |= PLAYER_STATE3_FLYING_WITH_HOOKSHOT;
Player_AnimPlayOnce(play, this, &gPlayerAnim_link_hook_fly_start);
Player_AnimReplaceApplyFlags(play, this,
ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE |
ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
func_80832224(this);
this->yaw = this->actor.shape.rot.y;
@ -4281,7 +4281,7 @@ 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_UPDATE_XZ | ANIM_FLAG_PLAYER_SETMOVE);
ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_ENABLE_MOVEMENT);
}
this->yaw = this->actor.shape.rot.y;
@ -5192,7 +5192,7 @@ s32 Player_ActionChange_1(Player* this, PlayState* play) {
func_80832224(this);
Player_AnimReplaceApplyFlags(play, this,
ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y |
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_OVERRIDE_MOVEMENT);
// If this door is the second half of a double door (spawned as child)
@ -5504,7 +5504,7 @@ s32 func_8083A6AC(Player* this, PlayState* play) {
this->stateFlags1 |= PLAYER_STATE1_21;
Player_AnimReplaceApplyFlags(play, this,
ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y |
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
this->av2.actionVar2 = -1;
@ -5550,7 +5550,8 @@ void func_8083AA10(Player* this, PlayState* play) {
return;
}
if (!(this->stateFlags3 & PLAYER_STATE3_1) && !(this->skelAnime.moveFlags & ANIM_FLAG_OVERRIDE_MOVEMENT) &&
if (!(this->stateFlags3 & PLAYER_STATE3_1) &&
!(this->skelAnime.movementFlags & ANIM_FLAG_OVERRIDE_MOVEMENT) &&
(Player_Action_8084411C != this->actionFunc) && (Player_Action_80844A44 != this->actionFunc)) {
if ((sPrevFloorProperty == FLOOR_PROPERTY_7) || (this->meleeWeaponState != 0)) {
@ -6618,7 +6619,7 @@ void func_8083D53C(PlayState* play, Player* this) {
return;
}
} else if ((this->stateFlags1 & PLAYER_STATE1_27) && (this->actor.depthInWater < this->ageProperties->unk_24)) {
if ((this->skelAnime.moveFlags == 0) && (this->currentBoots != PLAYER_BOOTS_IRON)) {
if ((this->skelAnime.movementFlags == 0) && (this->currentBoots != PLAYER_BOOTS_IRON)) {
func_8083CD54(play, this, this->actor.shape.rot.y);
}
func_8083D0A8(play, this, this->actor.velocity.y);
@ -6863,7 +6864,7 @@ 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_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE |
ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
this->actor.parent = this->rideActor;
@ -7033,7 +7034,7 @@ s32 Player_ActionChange_2(Player* this, PlayState* play) {
Player_AnimReplaceApplyFlags(play, this,
ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y |
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT |
ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_OVERRIDE_MOVEMENT);
ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_OVERRIDE_MOVEMENT);
chest->unk_1F4 = 1;
Camera_RequestSetting(Play_GetCamera(play, CAM_ID_MAIN), CAM_SET_SLOW_CHEST_CS);
} else {
@ -7212,7 +7213,7 @@ s32 func_8083EC18(Player* this, PlayState* play, u32 wallFlags) {
Player_AnimReplaceApplyFlags(
play, this,
ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT |
ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
return true;
}
@ -7293,7 +7294,7 @@ s32 Player_TryEnteringCrawlspace(Player* this, PlayState* play, u32 interactWall
Player_AnimPlayOnce(play, this, &gPlayerAnim_link_child_tunnel_start);
Player_AnimReplaceApplyFlags(play, this,
ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT |
ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_ADJUST_STARTING_POS |
ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_ADJUST_STARTING_POS |
ANIM_FLAG_OVERRIDE_MOVEMENT);
return true;
@ -7384,7 +7385,7 @@ s32 Player_TryLeavingCrawlspace(Player* this, PlayState* play) {
Player_AnimPlayOnce(play, this, &gPlayerAnim_link_child_tunnel_end);
Player_AnimReplaceApplyFlags(play, this,
ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT |
ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_ADJUST_STARTING_POS |
ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_ADJUST_STARTING_POS |
ANIM_FLAG_OVERRIDE_MOVEMENT);
OnePointCutscene_Init(play, 9601, 999, NULL, CAM_ID_MAIN);
} else {
@ -7395,7 +7396,7 @@ s32 Player_TryLeavingCrawlspace(Player* this, PlayState* play) {
0.0f);
Player_AnimReplaceApplyFlags(play, this,
ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT |
ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_ADJUST_STARTING_POS |
ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_ADJUST_STARTING_POS |
ANIM_FLAG_OVERRIDE_MOVEMENT);
OnePointCutscene_Init(play, 9602, 999, NULL, CAM_ID_MAIN);
}
@ -10115,7 +10116,7 @@ void func_808467D4(PlayState* play, Player* this) {
0.0f);
Player_AnimReplaceApplyFlags(play, this,
ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y |
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_OVERRIDE_MOVEMENT);
if (LINK_IS_ADULT) {
func_80846720(play, this, 0);
@ -10126,7 +10127,7 @@ 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_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE |
ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
}
@ -11287,7 +11288,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_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_PLAYER_SETMOVE |
ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
this->av2.actionVar2 = 99;
}
@ -11313,7 +11314,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
func_8084FF7C(this);
}
if (!(this->skelAnime.moveFlags & ANIM_FLAG_OVERRIDE_MOVEMENT)) {
if (!(this->skelAnime.movementFlags & ANIM_FLAG_OVERRIDE_MOVEMENT)) {
if (((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (sFloorType == FLOOR_TYPE_5) &&
(this->currentBoots != PLAYER_BOOTS_IRON)) ||
((this->currentBoots == PLAYER_BOOTS_HOVER) &&
@ -11498,11 +11499,11 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
Player_UpdateCamAndSeqModes(play, this);
if (this->skelAnime.moveFlags & ANIM_FLAG_PLAYER_SETMOVE) {
AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime,
(this->skelAnime.moveFlags & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT)
? 1.0f
: this->ageProperties->unk_08);
if (this->skelAnime.movementFlags & ANIM_FLAG_ENABLE_MOVEMENT) {
AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime,
(this->skelAnime.movementFlags & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT)
? 1.0f
: this->ageProperties->unk_08);
}
Player_UpdateShapeYaw(this, play);
@ -12095,7 +12096,7 @@ void Player_Action_8084B530(Player* this, PlayState* play) {
} else if (func_808332B8(this)) {
Player_Action_8084D610(this, play);
} else if (!Player_CheckHostileLockOn(this) && LinkAnimation_Update(play, &this->skelAnime)) {
if (this->skelAnime.moveFlags != 0) {
if (this->skelAnime.movementFlags != 0) {
func_80832DBC(this);
if ((this->talkActor->category == ACTORCAT_NPC) && (this->heldItemAction != PLAYER_IA_FISHING_POLE)) {
Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_normal_talk_free);
@ -12543,8 +12544,8 @@ void Player_Action_8084C760(Player* this, PlayState* play) {
if (LinkAnimation_Update(play, &this->skelAnime)) {
if (!(this->stateFlags1 & PLAYER_STATE1_0)) {
// While inside a crawlspace, player's skeleton does not move
if (this->skelAnime.moveFlags != 0) {
this->skelAnime.moveFlags = 0;
if (this->skelAnime.movementFlags != 0) {
this->skelAnime.movementFlags = 0;
return;
}
@ -14130,7 +14131,7 @@ void Player_Action_808502D0(Player* this, PlayState* play) {
if (LinkAnimation_Update(play, &this->skelAnime)) {
if (!Player_ActionChange_7(this, play)) {
u8 sp43 = this->skelAnime.moveFlags;
u8 sp43 = this->skelAnime.movementFlags;
LinkAnimationHeader* sp3C;
if (Player_CheckHostileLockOn(this)) {
@ -14140,7 +14141,7 @@ void Player_Action_808502D0(Player* this, PlayState* play) {
}
func_80832318(this);
this->skelAnime.moveFlags = 0;
this->skelAnime.movementFlags = 0;
if ((sp3C == &gPlayerAnim_link_fighter_Lpower_jump_kiru_end) &&
(this->modelAnimType != PLAYER_ANIMTYPE_3)) {
@ -14149,7 +14150,7 @@ void Player_Action_808502D0(Player* this, PlayState* play) {
func_8083A098(this, sp3C, play);
this->skelAnime.moveFlags = sp43;
this->skelAnime.movementFlags = sp43;
this->stateFlags3 |= PLAYER_STATE3_3;
}
} else if (this->heldItemAction == PLAYER_IA_HAMMER) {
@ -14709,7 +14710,7 @@ void func_808510D4(PlayState* play, Player* this, void* anim) {
void func_808510F4(PlayState* play, Player* this, void* anim) {
Player_AnimReplacePlayOnce(play, this, anim,
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
}
@ -14719,7 +14720,7 @@ void func_80851114(PlayState* play, Player* this, void* anim) {
void func_80851134(PlayState* play, Player* this, void* anim) {
Player_AnimReplacePlayLoop(play, this, anim,
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
}
@ -14967,7 +14968,7 @@ void func_808519EC(PlayState* play, Player* this, CsCmdActorCue* cue) {
Player_AnimPlayOnceAdjusted(play, this, this->ageProperties->unk_9C);
Player_AnimReplaceApplyFlags(play, this,
ANIM_REPLACE_APPLY_FLAG_9 | ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_UPDATE_Y |
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_OVERRIDE_MOVEMENT);
}
@ -15079,13 +15080,13 @@ void func_80851E28(PlayState* play, Player* this, CsCmdActorCue* cue) {
void func_80851E64(PlayState* play, Player* this, CsCmdActorCue* cue) {
Player_AnimReplacePlayOnceAdjusted(play, this, &gPlayerAnim_link_swimer_swim_get,
ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_ADJUST_STARTING_POS |
ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_ADJUST_STARTING_POS |
ANIM_FLAG_OVERRIDE_MOVEMENT);
}
void func_80851E90(PlayState* play, Player* this, CsCmdActorCue* cue) {
Player_AnimReplacePlayOnce(play, this, &gPlayerAnim_clink_op3_negaeri,
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
Player_PlayVoiceSfx(this, NA_SE_VO_LI_GROAN);
}
@ -15093,7 +15094,7 @@ void func_80851E90(PlayState* play, Player* this, CsCmdActorCue* cue) {
void func_80851ECC(PlayState* play, Player* this, CsCmdActorCue* cue) {
if (LinkAnimation_Update(play, &this->skelAnime)) {
Player_AnimReplacePlayLoop(play, this, &gPlayerAnim_clink_op3_wait2,
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
}
}
@ -15121,7 +15122,7 @@ static AnimSfxEntry D_808551BC[] = {
void func_80851FB0(PlayState* play, Player* this, CsCmdActorCue* cue) {
if (LinkAnimation_Update(play, &this->skelAnime)) {
Player_AnimReplacePlayLoop(play, this, &gPlayerAnim_clink_op3_wait3,
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_PLAYER_SETMOVE |
ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT | ANIM_FLAG_ENABLE_MOVEMENT |
ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
this->av2.actionVar2 = 1;
} else if (this->av2.actionVar2 == 0) {
@ -15147,7 +15148,7 @@ 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_UPDATE_XZ | ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT |
ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_ADJUST_STARTING_POS |
ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_ADJUST_STARTING_POS |
ANIM_FLAG_OVERRIDE_MOVEMENT);
Player_PlayVoiceSfx(this, NA_SE_VO_LI_FALL_L);
}
@ -15197,7 +15198,7 @@ void func_80852234(PlayState* play, Player* this, CsCmdActorCue* cue) {
void func_8085225C(PlayState* play, Player* this, CsCmdActorCue* cue) {
Player_AnimReplaceApplyFlags(
play, this, ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
play, this, ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_ADJUST_STARTING_POS | ANIM_FLAG_OVERRIDE_MOVEMENT);
}
void func_80852280(PlayState* play, Player* this, CsCmdActorCue* cue) {
@ -15424,7 +15425,7 @@ void func_80852A54(PlayState* play, Player* this, CsCmdActorCue* cue) {
func_808529D0(play, this, cue);
}
this->skelAnime.moveFlags = 0;
this->skelAnime.movementFlags = 0;
Player_ZeroRootLimbYaw(this);
}
@ -15436,7 +15437,7 @@ void func_80852B4C(PlayState* play, Player* this, CsCmdActorCue* cue, struct_808
}
if ((D_80858AA0 & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT) &&
!(this->skelAnime.moveFlags & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT)) {
!(this->skelAnime.movementFlags & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT)) {
this->skelAnime.morphTable[0].y /= this->ageProperties->unk_08;
D_80858AA0 = 0;
}
@ -15476,7 +15477,7 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorCue* cueUnused) {
}
}
D_80858AA0 = this->skelAnime.moveFlags;
D_80858AA0 = this->skelAnime.movementFlags;
func_80832DBC(this);
PRINTF("TOOL MODE=%d\n", csAction);
@ -15495,7 +15496,7 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorCue* cueUnused) {
void Player_Action_CsAction(Player* this, PlayState* play) {
if (this->csAction != this->prevCsAction) {
D_80858AA0 = this->skelAnime.moveFlags;
D_80858AA0 = this->skelAnime.movementFlags;
func_80832DBC(this);
this->prevCsAction = this->csAction;
@ -15631,7 +15632,7 @@ void func_80853148(PlayState* play, Actor* actor) {
if (this->skelAnime.animation == &gPlayerAnim_link_normal_backspace) {
Player_AnimReplaceApplyFlags(
play, this, ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_PLAYER_SETMOVE | ANIM_FLAG_ADJUST_STARTING_POS);
play, this, ANIM_FLAG_UPDATE_XZ | ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_ADJUST_STARTING_POS);
}
func_80832224(this);