mirror of https://github.com/zeldaret/mm.git
Standardize "ActorMovement" over "ActorMove" (#1773)
* actor movement * cleanup * missed one
This commit is contained in:
parent
a8eb7e327f
commit
4724a2b7fe
|
@ -22,7 +22,15 @@ struct PlayerAnimationFrame;
|
|||
#define ANIM_FLAG_1 (1 << 0)
|
||||
#define ANIM_FLAG_UPDATE_Y (1 << 1)
|
||||
#define ANIM_FLAG_4 (1 << 2)
|
||||
#define ANIM_FLAG_8 (1 << 3)
|
||||
|
||||
// When this flag is set, ActorMovement tasks will be queued.
|
||||
//
|
||||
// Note that individual actors are responsible for implementing the functionality of this flag.
|
||||
// In practice, Player is the only actor who implements this flag.
|
||||
// It is possible to bypass the need for this flag by manually calling `AnimTaskQueue_AddActorMovement`
|
||||
// when it is needed.
|
||||
#define ANIM_FLAG_ENABLE_MOVEMENT (1 << 3)
|
||||
|
||||
#define ANIM_FLAG_NOMOVE (1 << 4)
|
||||
#define ANIM_FLAG_80 (1 << 7)
|
||||
#define ANIM_FLAG_100 (1 << 8)
|
||||
|
@ -140,7 +148,7 @@ typedef struct {
|
|||
/* 0x0 */ struct Actor* actor;
|
||||
/* 0x4 */ struct SkelAnime* skelAnime;
|
||||
/* 0x8 */ f32 diffScale;
|
||||
} AnimTaskActorMove; // size = 0xC
|
||||
} AnimTaskActorMovement; // size = 0xC
|
||||
|
||||
typedef union {
|
||||
AnimTaskLoadPlayerFrame loadPlayerFrame;
|
||||
|
@ -148,7 +156,7 @@ typedef union {
|
|||
AnimTaskInterp interp;
|
||||
AnimTaskCopyUsingMap copyUsingMap;
|
||||
AnimTaskCopyUsingMapInverted copyUsingMapInverted;
|
||||
AnimTaskActorMove actorMove;
|
||||
AnimTaskActorMovement actorMovement;
|
||||
} AnimTaskData; // size = 0x3C
|
||||
|
||||
typedef struct {
|
||||
|
@ -192,7 +200,7 @@ typedef struct SkelAnime {
|
|||
s32 (*player)(struct PlayState*, struct SkelAnime*); // Loop, Play once, and Morph
|
||||
} update;
|
||||
/* 0x34 */ s8 initFlags; // Flags used when initializing Player's skeleton
|
||||
/* 0x35 */ u8 moveFlags; // Flags used for animations that move the actor in worldspace.
|
||||
/* 0x35 */ u8 movementFlags; // Flags used for animations that move the actor in worldspace.
|
||||
/* 0x36 */ s16 prevYaw; // Previous rotation in worldspace.
|
||||
/* 0x38 */ Vec3s prevTransl; // Previous modelspace translation.
|
||||
/* 0x3E */ Vec3s baseTransl; // Base modelspace translation.
|
||||
|
@ -262,7 +270,7 @@ void AnimTaskQueue_AddCopy(struct PlayState* play, s32 vecCount, Vec3s* dest, Ve
|
|||
void AnimTaskQueue_AddInterp(struct PlayState* play, s32 vecCount, Vec3s* base, Vec3s* mod, f32 weight);
|
||||
void AnimTaskQueue_AddCopyUsingMap(struct PlayState* play, s32 vecCount, Vec3s* dest, Vec3s* src, u8* limbCopyMap);
|
||||
void AnimTaskQueue_AddCopyUsingMapInverted(struct PlayState* play, s32 vecCount, Vec3s* dest, Vec3s* src, u8* limbCopyMap);
|
||||
void AnimTaskQueue_AddActorMove(struct PlayState* play, struct Actor* actor, SkelAnime* skelAnime, f32 moveDiffScale);
|
||||
void AnimTaskQueue_AddActorMovement(struct PlayState* play, struct Actor* actor, SkelAnime* skelAnime, f32 moveDiffScale);
|
||||
void AnimTaskQueue_Update(struct PlayState* play, AnimTaskQueue* animTaskQueue);
|
||||
|
||||
void SkelAnime_InitPlayer(struct PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg, PlayerAnimationHeader* animation, s32 flags, void* jointTableBuffer, void* morphTableBuffer, s32 limbBufCount);
|
||||
|
|
|
@ -189,8 +189,8 @@ void func_800F0BB4(EnHy* enHy, PlayState* play, EnDoor* door, s16 arg3, s16 arg4
|
|||
EnHy_ChangeObjectAndAnim(enHy, play, (animIndex == 0) ? arg3 : arg4);
|
||||
enHy->skelAnime.baseTransl = enHy->skelAnime.jointTable[LIMB_ROOT_POS];
|
||||
enHy->skelAnime.prevTransl = enHy->skelAnime.jointTable[LIMB_ROOT_POS];
|
||||
enHy->skelAnime.moveFlags |= (ANIM_FLAG_UPDATE_Y | ANIM_FLAG_1);
|
||||
AnimTaskQueue_AddActorMove(play, &enHy->actor, &enHy->skelAnime, 1.0f);
|
||||
enHy->skelAnime.movementFlags |= (ANIM_FLAG_UPDATE_Y | ANIM_FLAG_1);
|
||||
AnimTaskQueue_AddActorMovement(play, &enHy->actor, &enHy->skelAnime, 1.0f);
|
||||
door->knobDoor.requestOpen = true;
|
||||
door->knobDoor.animIndex = animIndex;
|
||||
}
|
||||
|
|
|
@ -2235,11 +2235,12 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx**
|
|||
sPlayerCurBodyPartPos = &player->bodyPartsPos[0] - 1;
|
||||
|
||||
if (player->transformation != PLAYER_FORM_FIERCE_DEITY) {
|
||||
if (!(player->skelAnime.moveFlags & ANIM_FLAG_4) || (player->skelAnime.moveFlags & ANIM_FLAG_1)) {
|
||||
if (!(player->skelAnime.movementFlags & ANIM_FLAG_4) || (player->skelAnime.movementFlags & ANIM_FLAG_1)) {
|
||||
pos->x *= player->ageProperties->unk_08;
|
||||
pos->z *= player->ageProperties->unk_08;
|
||||
}
|
||||
if (!(player->skelAnime.moveFlags & ANIM_FLAG_4) || (player->skelAnime.moveFlags & ANIM_FLAG_UPDATE_Y)) {
|
||||
if (!(player->skelAnime.movementFlags & ANIM_FLAG_4) ||
|
||||
(player->skelAnime.movementFlags & ANIM_FLAG_UPDATE_Y)) {
|
||||
pos->y *= player->ageProperties->unk_08;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ void AnimTask_Copy(struct PlayState* play, AnimTaskData* data);
|
|||
void AnimTask_Interp(struct PlayState* play, AnimTaskData* data);
|
||||
void AnimTask_CopyUsingMap(struct PlayState* play, AnimTaskData* data);
|
||||
void AnimTask_CopyUsingMapInverted(struct PlayState* play, AnimTaskData* data);
|
||||
void AnimTask_ActorMove(struct PlayState* play, AnimTaskData* data);
|
||||
void AnimTask_ActorMovement(struct PlayState* play, AnimTaskData* data);
|
||||
|
||||
s32 sCurAnimTaskGroup;
|
||||
s32 sDisabledTransformTaskGroups;
|
||||
|
@ -1121,13 +1121,13 @@ void AnimTaskQueue_AddCopyUsingMapInverted(PlayState* play, s32 vecCount, Vec3s*
|
|||
/**
|
||||
* Creates a task which will move an actor according to the translation of its root limb for the current frame.
|
||||
*/
|
||||
void AnimTaskQueue_AddActorMove(PlayState* play, Actor* actor, SkelAnime* skelAnime, f32 moveDiffScale) {
|
||||
void AnimTaskQueue_AddActorMovement(PlayState* play, Actor* actor, SkelAnime* skelAnime, f32 moveDiffScale) {
|
||||
AnimTask* task = AnimTaskQueue_NewTask(&play->animTaskQueue, ANIMTASK_ACTOR_MOVE);
|
||||
|
||||
if (task != NULL) {
|
||||
task->data.actorMove.actor = actor;
|
||||
task->data.actorMove.skelAnime = skelAnime;
|
||||
task->data.actorMove.diffScale = moveDiffScale;
|
||||
task->data.actorMovement.actor = actor;
|
||||
task->data.actorMovement.skelAnime = skelAnime;
|
||||
task->data.actorMovement.diffScale = moveDiffScale;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1210,9 +1210,10 @@ void AnimTask_CopyUsingMapInverted(PlayState* play, AnimTaskData* data) {
|
|||
|
||||
/**
|
||||
* Move an actor according to the translation of its root limb for the current animation frame.
|
||||
* The actor's current shape yaw will factor into the resulting movement.
|
||||
*/
|
||||
void AnimTask_ActorMove(PlayState* play, AnimTaskData* data) {
|
||||
AnimTaskActorMove* task = &data->actorMove;
|
||||
void AnimTask_ActorMovement(PlayState* play, AnimTaskData* data) {
|
||||
AnimTaskActorMovement* task = &data->actorMovement;
|
||||
Actor* actor = task->actor;
|
||||
Vec3f diff;
|
||||
|
||||
|
@ -1231,8 +1232,8 @@ typedef void (*AnimTaskFunc)(struct PlayState* play, AnimTaskData* data);
|
|||
*/
|
||||
void AnimTaskQueue_Update(PlayState* play, AnimTaskQueue* animTaskQueue) {
|
||||
static AnimTaskFunc sAnimTaskFuncs[ANIMTASK_MAX] = {
|
||||
AnimTask_LoadPlayerFrame, AnimTask_Copy, AnimTask_Interp, AnimTask_CopyUsingMap,
|
||||
AnimTask_CopyUsingMapInverted, AnimTask_ActorMove,
|
||||
AnimTask_LoadPlayerFrame, AnimTask_Copy, AnimTask_Interp, AnimTask_CopyUsingMap,
|
||||
AnimTask_CopyUsingMapInverted, AnimTask_ActorMovement,
|
||||
};
|
||||
AnimTask* task = animTaskQueue->tasks;
|
||||
|
||||
|
@ -1978,7 +1979,7 @@ void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* diff, s16 angle) {
|
|||
f32 sin;
|
||||
f32 cos;
|
||||
|
||||
if (skelAnime->moveFlags & ANIM_FLAG_NOMOVE) {
|
||||
if (skelAnime->movementFlags & ANIM_FLAG_NOMOVE) {
|
||||
diff->z = 0.0f;
|
||||
diff->x = 0.0f;
|
||||
} else {
|
||||
|
@ -1996,8 +1997,8 @@ void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* diff, s16 angle) {
|
|||
skelAnime->prevTransl.z = skelAnime->jointTable[LIMB_ROOT_POS].z;
|
||||
skelAnime->jointTable[LIMB_ROOT_POS].z = skelAnime->baseTransl.z;
|
||||
|
||||
if (skelAnime->moveFlags & ANIM_FLAG_UPDATE_Y) {
|
||||
if (skelAnime->moveFlags & ANIM_FLAG_NOMOVE) {
|
||||
if (skelAnime->movementFlags & ANIM_FLAG_UPDATE_Y) {
|
||||
if (skelAnime->movementFlags & ANIM_FLAG_NOMOVE) {
|
||||
diff->y = 0.0f;
|
||||
} else {
|
||||
diff->y = skelAnime->jointTable[LIMB_ROOT_POS].y - skelAnime->prevTransl.y;
|
||||
|
@ -2008,7 +2009,7 @@ void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* diff, s16 angle) {
|
|||
diff->y = 0.0f;
|
||||
skelAnime->prevTransl.y = skelAnime->jointTable[LIMB_ROOT_POS].y;
|
||||
}
|
||||
skelAnime->moveFlags &= ~ANIM_FLAG_NOMOVE;
|
||||
skelAnime->movementFlags &= ~ANIM_FLAG_NOMOVE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1233,7 +1233,7 @@ s32 func_8094FCC4(EnGm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
|||
EnGm_ChangeAnim(this, play, ENGM_ANIM_0);
|
||||
} else {
|
||||
EnGm_ChangeAnim(this, play, ENGM_ANIM_9);
|
||||
this->skelAnime.moveFlags = ANIM_FLAG_NOMOVE;
|
||||
this->skelAnime.movementFlags = ANIM_FLAG_NOMOVE;
|
||||
}
|
||||
this->unk_3A4 |= 0x100;
|
||||
this->unk_3A4 |= 0x200;
|
||||
|
@ -1309,7 +1309,7 @@ s32 func_8094FF04(EnGm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
|||
} else {
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &sp30);
|
||||
EnGm_ChangeAnim(this, play, ENGM_ANIM_9);
|
||||
this->skelAnime.moveFlags = ANIM_FLAG_NOMOVE;
|
||||
this->skelAnime.movementFlags = ANIM_FLAG_NOMOVE;
|
||||
}
|
||||
this->unk_400 = 0;
|
||||
this->unk_3A4 |= 0x100;
|
||||
|
@ -1468,7 +1468,7 @@ s32 func_809503F8(EnGm* this, PlayState* play) {
|
|||
SubS_SetOfferMode(&this->unk_3A4, SUBS_OFFER_MODE_ONSCREEN, SUBS_OFFER_MODE_MASK);
|
||||
EnGm_ChangeAnim(this, play, ENGM_ANIM_0);
|
||||
} else {
|
||||
AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
|
||||
AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -1505,7 +1505,7 @@ s32 func_80950490(EnGm* this, PlayState* play) {
|
|||
EnGm_ChangeAnim(this, play, ENGM_ANIM_0);
|
||||
func_8094E278(play);
|
||||
} else {
|
||||
AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
|
||||
AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -1077,12 +1077,13 @@ s32 EnTest3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
|||
|
||||
if (limbIndex == KAFEI_LIMB_ROOT) {
|
||||
sKafeiCurBodyPartPos = &this->player.bodyPartsPos[0] - 1;
|
||||
if (!(this->player.skelAnime.moveFlags & ANIM_FLAG_4) || (this->player.skelAnime.moveFlags & ANIM_FLAG_1)) {
|
||||
if (!(this->player.skelAnime.movementFlags & ANIM_FLAG_4) ||
|
||||
(this->player.skelAnime.movementFlags & ANIM_FLAG_1)) {
|
||||
pos->x *= this->player.ageProperties->unk_08;
|
||||
pos->z *= this->player.ageProperties->unk_08;
|
||||
}
|
||||
if (!(this->player.skelAnime.moveFlags & ANIM_FLAG_4) ||
|
||||
(this->player.skelAnime.moveFlags & ANIM_FLAG_UPDATE_Y)) {
|
||||
if (!(this->player.skelAnime.movementFlags & ANIM_FLAG_4) ||
|
||||
(this->player.skelAnime.movementFlags & ANIM_FLAG_UPDATE_Y)) {
|
||||
pos->y *= this->player.ageProperties->unk_08;
|
||||
}
|
||||
pos->y -= this->player.unk_AB8;
|
||||
|
|
|
@ -1081,7 +1081,7 @@ s32 func_80A87DC0(Actor* thisx, PlayState* play) {
|
|||
Actor_PlaySfx(&this->actor, NA_SE_EN_KOUME_LAUGH);
|
||||
EnTru_ChangeAnim(this, KOUME_ANIM_TAKE_OFF);
|
||||
this->skelAnime.baseTransl.y = 0;
|
||||
this->skelAnime.moveFlags = 2;
|
||||
this->skelAnime.movementFlags = ANIM_FLAG_UPDATE_Y;
|
||||
this->unk_34E &= ~0x8;
|
||||
this->unk_34E |= 0x10;
|
||||
this->unk_364++;
|
||||
|
@ -1089,7 +1089,7 @@ s32 func_80A87DC0(Actor* thisx, PlayState* play) {
|
|||
|
||||
case 3:
|
||||
if (!Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime, 1.0f);
|
||||
AnimTaskQueue_AddActorMovement(play, &this->actor, &this->skelAnime, 1.0f);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -513,7 +513,7 @@ Input* sPlayerControlInput;
|
|||
s32 sPlayerUseHeldItem; // When true, the current held item is used. Is reset to false every frame.
|
||||
s32 sPlayerHeldItemButtonIsHeldDown; // Indicates if the button for the current held item is held down.
|
||||
AdjLightSettings D_80862B50; // backup of lay->envCtx.adjLightSettings
|
||||
s32 D_80862B6C; // this->skelAnime.moveFlags // sPlayerSkelMoveFlags?
|
||||
s32 D_80862B6C; // this->skelAnime.movementFlags // sPlayerSkelMoveFlags?
|
||||
|
||||
bool func_8082DA90(PlayState* play) {
|
||||
return (play->transitionTrigger != TRANS_TRIGGER_OFF) || (play->transitionMode != TRANS_MODE_OFF);
|
||||
|
@ -1920,42 +1920,42 @@ void Player_Anim_ZeroModelYaw(Player* this) {
|
|||
}
|
||||
|
||||
void Player_Anim_ResetMove(Player* this) {
|
||||
if (this->skelAnime.moveFlags) {
|
||||
if (this->skelAnime.movementFlags) {
|
||||
Player_Anim_ResetModelRotY(this);
|
||||
this->skelAnime.jointTable[LIMB_ROOT_POS].x = this->skelAnime.baseTransl.x;
|
||||
this->skelAnime.jointTable[LIMB_ROOT_POS].z = this->skelAnime.baseTransl.z;
|
||||
|
||||
if (this->skelAnime.moveFlags & ANIM_FLAG_8) {
|
||||
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[LIMB_ROOT_POS].y = this->skelAnime.prevTransl.y;
|
||||
}
|
||||
} else {
|
||||
this->skelAnime.jointTable[LIMB_ROOT_POS].y = this->skelAnime.baseTransl.y;
|
||||
}
|
||||
Player_Anim_ResetPrevTranslRot(this);
|
||||
this->skelAnime.moveFlags = 0;
|
||||
this->skelAnime.movementFlags = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Only used for ledge climbing
|
||||
*/
|
||||
void Player_AnimReplace_SetupLedgeClimb(Player* this, s32 moveFlags) {
|
||||
void Player_AnimReplace_SetupLedgeClimb(Player* this, s32 movementFlags) {
|
||||
Vec3f pos;
|
||||
|
||||
this->skelAnime.moveFlags = moveFlags;
|
||||
this->skelAnime.movementFlags = movementFlags;
|
||||
this->skelAnime.prevTransl = this->skelAnime.baseTransl;
|
||||
SkelAnime_UpdateTranslation(&this->skelAnime, &pos, this->actor.shape.rot.y);
|
||||
|
||||
if (moveFlags & ANIM_FLAG_1) {
|
||||
if (movementFlags & ANIM_FLAG_1) {
|
||||
pos.x *= this->ageProperties->unk_08;
|
||||
pos.z *= this->ageProperties->unk_08;
|
||||
this->actor.world.pos.x += pos.x * this->actor.scale.x;
|
||||
this->actor.world.pos.z += pos.z * this->actor.scale.z;
|
||||
}
|
||||
|
||||
if (moveFlags & ANIM_FLAG_UPDATE_Y) {
|
||||
if (!(moveFlags & ANIM_FLAG_4)) {
|
||||
if (movementFlags & ANIM_FLAG_UPDATE_Y) {
|
||||
if (!(movementFlags & ANIM_FLAG_4)) {
|
||||
pos.y *= this->ageProperties->unk_08;
|
||||
}
|
||||
this->actor.world.pos.y += pos.y * this->actor.scale.y;
|
||||
|
@ -1964,55 +1964,57 @@ void Player_AnimReplace_SetupLedgeClimb(Player* this, s32 moveFlags) {
|
|||
Player_Anim_ResetModelRotY(this);
|
||||
}
|
||||
|
||||
void Player_AnimReplace_Setup(PlayState* play, Player* this, s32 moveFlags) {
|
||||
if (moveFlags & ANIM_FLAG_200) {
|
||||
void Player_AnimReplace_Setup(PlayState* play, Player* this, s32 movementFlags) {
|
||||
if (movementFlags & ANIM_FLAG_200) {
|
||||
Player_Anim_ResetPrevTranslRotFormScale(this);
|
||||
} else if ((moveFlags & ANIM_FLAG_100) || this->skelAnime.moveFlags) {
|
||||
} else if ((movementFlags & ANIM_FLAG_100) || this->skelAnime.movementFlags) {
|
||||
Player_Anim_ResetPrevTranslRot(this);
|
||||
} else {
|
||||
this->skelAnime.prevTransl = this->skelAnime.jointTable[LIMB_ROOT_POS];
|
||||
this->skelAnime.prevYaw = this->actor.shape.rot.y;
|
||||
}
|
||||
|
||||
this->skelAnime.moveFlags = moveFlags;
|
||||
this->skelAnime.movementFlags = movementFlags;
|
||||
Player_StopHorizontalMovement(this);
|
||||
AnimTaskQueue_DisableTransformTasksForGroup(play);
|
||||
}
|
||||
|
||||
void Player_AnimReplace_PlayOnceSetSpeed(PlayState* play, Player* this, PlayerAnimationHeader* anim, s32 moveFlags,
|
||||
void Player_AnimReplace_PlayOnceSetSpeed(PlayState* play, Player* this, PlayerAnimationHeader* anim, s32 movementFlags,
|
||||
f32 playSpeed) {
|
||||
PlayerAnimation_PlayOnceSetSpeed(play, &this->skelAnime, anim, playSpeed);
|
||||
Player_AnimReplace_Setup(play, this, moveFlags);
|
||||
Player_AnimReplace_Setup(play, this, movementFlags);
|
||||
}
|
||||
|
||||
void Player_AnimReplace_PlayOnce(PlayState* play, Player* this, PlayerAnimationHeader* anim, s32 moveFlags) {
|
||||
Player_AnimReplace_PlayOnceSetSpeed(play, this, anim, moveFlags, PLAYER_ANIM_NORMAL_SPEED);
|
||||
void Player_AnimReplace_PlayOnce(PlayState* play, Player* this, PlayerAnimationHeader* anim, s32 movementFlags) {
|
||||
Player_AnimReplace_PlayOnceSetSpeed(play, this, anim, movementFlags, PLAYER_ANIM_NORMAL_SPEED);
|
||||
}
|
||||
|
||||
void Player_AnimReplace_PlayOnceAdjusted(PlayState* play, Player* this, PlayerAnimationHeader* anim, s32 moveFlags) {
|
||||
Player_AnimReplace_PlayOnceSetSpeed(play, this, anim, moveFlags, PLAYER_ANIM_ADJUSTED_SPEED);
|
||||
void Player_AnimReplace_PlayOnceAdjusted(PlayState* play, Player* this, PlayerAnimationHeader* anim,
|
||||
s32 movementFlags) {
|
||||
Player_AnimReplace_PlayOnceSetSpeed(play, this, anim, movementFlags, PLAYER_ANIM_ADJUSTED_SPEED);
|
||||
}
|
||||
|
||||
void Player_AnimReplace_PlayOnceNormalAdjusted(PlayState* play, Player* this, PlayerAnimationHeader* anim) {
|
||||
Player_AnimReplace_PlayOnceAdjusted(play, this, anim, ANIM_FLAG_4 | ANIM_FLAG_8 | ANIM_FLAG_200);
|
||||
Player_AnimReplace_PlayOnceAdjusted(play, this, anim, ANIM_FLAG_4 | ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_200);
|
||||
}
|
||||
|
||||
void Player_AnimReplace_PlayLoopSetSpeed(PlayState* play, Player* this, PlayerAnimationHeader* anim, s32 moveFlags,
|
||||
void Player_AnimReplace_PlayLoopSetSpeed(PlayState* play, Player* this, PlayerAnimationHeader* anim, s32 movementFlags,
|
||||
f32 playSpeed) {
|
||||
PlayerAnimation_PlayLoopSetSpeed(play, &this->skelAnime, anim, playSpeed);
|
||||
Player_AnimReplace_Setup(play, this, moveFlags);
|
||||
Player_AnimReplace_Setup(play, this, movementFlags);
|
||||
}
|
||||
|
||||
void Player_AnimReplace_PlayLoop(PlayState* play, Player* this, PlayerAnimationHeader* anim, s32 moveFlags) {
|
||||
Player_AnimReplace_PlayLoopSetSpeed(play, this, anim, moveFlags, PLAYER_ANIM_NORMAL_SPEED);
|
||||
void Player_AnimReplace_PlayLoop(PlayState* play, Player* this, PlayerAnimationHeader* anim, s32 movementFlags) {
|
||||
Player_AnimReplace_PlayLoopSetSpeed(play, this, anim, movementFlags, PLAYER_ANIM_NORMAL_SPEED);
|
||||
}
|
||||
|
||||
void Player_AnimReplace_PlayLoopAdjusted(PlayState* play, Player* this, PlayerAnimationHeader* anim, s32 moveFlags) {
|
||||
Player_AnimReplace_PlayLoopSetSpeed(play, this, anim, moveFlags, PLAYER_ANIM_ADJUSTED_SPEED);
|
||||
void Player_AnimReplace_PlayLoopAdjusted(PlayState* play, Player* this, PlayerAnimationHeader* anim,
|
||||
s32 movementFlags) {
|
||||
Player_AnimReplace_PlayLoopSetSpeed(play, this, anim, movementFlags, PLAYER_ANIM_ADJUSTED_SPEED);
|
||||
}
|
||||
|
||||
void Player_AnimReplace_PlayLoopNormalAdjusted(PlayState* play, Player* this, PlayerAnimationHeader* anim) {
|
||||
Player_AnimReplace_PlayLoopAdjusted(play, this, anim, ANIM_FLAG_4 | ANIM_FLAG_8 | ANIM_FLAG_NOMOVE);
|
||||
Player_AnimReplace_PlayLoopAdjusted(play, this, anim, ANIM_FLAG_4 | ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_NOMOVE);
|
||||
}
|
||||
|
||||
void Player_ProcessControlStick(PlayState* play, Player* this) {
|
||||
|
@ -4322,8 +4324,8 @@ bool func_80831194(PlayState* play, Player* this) {
|
|||
void Player_SetParallel(Player* this) {
|
||||
this->stateFlags1 |= PLAYER_STATE1_PARALLEL;
|
||||
|
||||
if (!(this->skelAnime.moveFlags & ANIM_FLAG_80) && (this->actor.bgCheckFlags & BGCHECKFLAG_PLAYER_WALL_INTERACT) &&
|
||||
(sShapeYawToTouchedWall < 0x2000)) {
|
||||
if (!(this->skelAnime.movementFlags & ANIM_FLAG_80) &&
|
||||
(this->actor.bgCheckFlags & BGCHECKFLAG_PLAYER_WALL_INTERACT) && (sShapeYawToTouchedWall < 0x2000)) {
|
||||
// snap to the wall
|
||||
this->yaw = this->actor.shape.rot.y = this->actor.wallYaw + 0x8000;
|
||||
}
|
||||
|
@ -4440,11 +4442,11 @@ s32 Player_SetAction(PlayState* play, Player* this, PlayerActionFunc actionFunc,
|
|||
}
|
||||
|
||||
void Player_SetAction_PreserveMoveFlags(PlayState* play, Player* this, PlayerActionFunc actionFunc, s32 arg3) {
|
||||
s32 moveFlags = this->skelAnime.moveFlags;
|
||||
s32 savedMovementFlags = this->skelAnime.movementFlags;
|
||||
|
||||
this->skelAnime.moveFlags = 0;
|
||||
this->skelAnime.movementFlags = 0;
|
||||
Player_SetAction(play, this, actionFunc, arg3);
|
||||
this->skelAnime.moveFlags = moveFlags;
|
||||
this->skelAnime.movementFlags = savedMovementFlags;
|
||||
}
|
||||
|
||||
void Player_SetAction_PreserveItemAction(PlayState* play, Player* this, PlayerActionFunc actionFunc, s32 arg3) {
|
||||
|
@ -4678,8 +4680,9 @@ bool Player_UpdateUpperBody(Player* this, PlayState* play) {
|
|||
Player_SetAction(play, this, Player_Action_HookshotFly, 1);
|
||||
this->stateFlags3 |= PLAYER_STATE3_FLYING_WITH_HOOKSHOT;
|
||||
Player_Anim_PlayOnce(play, this, &gPlayerAnim_link_hook_fly_start);
|
||||
Player_AnimReplace_Setup(play, this,
|
||||
(ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_8 | ANIM_FLAG_NOMOVE | ANIM_FLAG_80));
|
||||
Player_AnimReplace_Setup(
|
||||
play, this,
|
||||
(ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_NOMOVE | ANIM_FLAG_80));
|
||||
func_8082DAD4(this);
|
||||
this->yaw = this->actor.shape.rot.y;
|
||||
this->actor.bgCheckFlags &= ~BGCHECKFLAG_GROUND;
|
||||
|
@ -4704,13 +4707,14 @@ bool Player_UpdateUpperBody(Player* this, PlayState* play) {
|
|||
AnimTaskQueue_AddCopyUsingMapInverted(play, this->skelAnime.limbCount, this->skelAnimeUpper.jointTable,
|
||||
this->skelAnime.jointTable, sPlayerUpperBodyLimbCopyMap);
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && !(this->skelAnime.moveFlags & ANIM_FLAG_8)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) &&
|
||||
!(this->skelAnime.movementFlags & ANIM_FLAG_ENABLE_MOVEMENT)) {
|
||||
Math_StepToF(&this->skelAnimeUpperBlendWeight, 0.0f, 0.25f);
|
||||
AnimTaskQueue_AddInterp(play, this->skelAnime.limbCount, this->skelAnime.jointTable,
|
||||
this->skelAnimeUpper.jointTable, 1.0f - this->skelAnimeUpperBlendWeight);
|
||||
}
|
||||
} else if ((Player_CheckForIdleAnim(this) == IDLE_ANIM_NONE) || (this->speedXZ != 0.0f) ||
|
||||
(this->skelAnime.moveFlags & ANIM_FLAG_8)) {
|
||||
(this->skelAnime.movementFlags & ANIM_FLAG_ENABLE_MOVEMENT)) {
|
||||
AnimTaskQueue_AddCopyUsingMap(play, this->skelAnime.limbCount, this->skelAnime.jointTable,
|
||||
this->skelAnimeUpper.jointTable, sPlayerUpperBodyLimbCopyMap);
|
||||
} else {
|
||||
|
@ -5681,7 +5685,7 @@ void func_80833864(PlayState* play, Player* this, PlayerMeleeWeaponAnimation mel
|
|||
this->unk_ADC = this->skelAnime.animLength + 4.0f;
|
||||
|
||||
if ((meleeWeaponAnim < PLAYER_MWA_FLIPSLASH_START) || (meleeWeaponAnim > PLAYER_MWA_ZORA_JUMPKICK_START)) {
|
||||
Player_AnimReplace_Setup(play, this, (ANIM_FLAG_1 | ANIM_FLAG_8 | ANIM_FLAG_NOMOVE));
|
||||
Player_AnimReplace_Setup(play, this, (ANIM_FLAG_1 | ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_NOMOVE));
|
||||
}
|
||||
this->yaw = this->actor.shape.rot.y;
|
||||
}
|
||||
|
@ -6756,8 +6760,9 @@ void Player_Door_Knob(PlayState* play, Player* this, Actor* door) {
|
|||
}
|
||||
|
||||
func_8082DAD4(this);
|
||||
Player_AnimReplace_Setup(
|
||||
play, this, ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_4 | ANIM_FLAG_8 | ANIM_FLAG_80 | ANIM_FLAG_200);
|
||||
Player_AnimReplace_Setup(play, this,
|
||||
ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_4 | ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_80 |
|
||||
ANIM_FLAG_200);
|
||||
knobDoor->requestOpen = true;
|
||||
if (this->doorType != PLAYER_DOORTYPE_FAKE) {
|
||||
CollisionPoly* poly;
|
||||
|
@ -7432,8 +7437,8 @@ s32 func_80837DEC(Player* this, PlayState* play) {
|
|||
this->actor.shape.rot.y = this->yaw += 0x8000;
|
||||
this->stateFlags1 |= PLAYER_STATE1_200000;
|
||||
Player_AnimReplace_Setup(play, this,
|
||||
ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_4 | ANIM_FLAG_8 |
|
||||
ANIM_FLAG_NOMOVE | ANIM_FLAG_80);
|
||||
ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_4 |
|
||||
ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_NOMOVE | ANIM_FLAG_80);
|
||||
this->av2.actionVar2 = -1;
|
||||
this->av1.actionVar1 = var_v1_2;
|
||||
} else {
|
||||
|
@ -7499,7 +7504,7 @@ void func_8083827C(Player* this, PlayState* play) {
|
|||
return;
|
||||
}
|
||||
|
||||
if ((this->stateFlags3 & PLAYER_STATE3_2) || (this->skelAnime.moveFlags & ANIM_FLAG_80)) {
|
||||
if ((this->stateFlags3 & PLAYER_STATE3_2) || (this->skelAnime.movementFlags & ANIM_FLAG_80)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -7510,7 +7515,7 @@ void func_8083827C(Player* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if ((sPrevFloorProperty == FLOOR_PROPERTY_7) || (this->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0) ||
|
||||
((this->skelAnime.moveFlags & ANIM_FLAG_8) && func_808381F8(play, this))) {
|
||||
((this->skelAnime.movementFlags & ANIM_FLAG_ENABLE_MOVEMENT) && func_808381F8(play, this))) {
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &this->actor.prevPos);
|
||||
if (this->speedXZ > 0.0f) {
|
||||
Player_StopHorizontalMovement(this);
|
||||
|
@ -7789,7 +7794,7 @@ s32 Player_ActionHandler_13(Player* this, PlayState* play) {
|
|||
if (this->unk_AA5 != PLAYER_UNKAA5_0) {
|
||||
if (!(this->actor.bgCheckFlags & (BGCHECKFLAG_GROUND | BGCHECKFLAG_GROUND_TOUCH)) &&
|
||||
!(this->stateFlags1 & PLAYER_STATE1_8000000) && !(this->stateFlags1 & PLAYER_STATE1_800000) &&
|
||||
!(this->stateFlags3 & PLAYER_STATE3_8) && !(this->skelAnime.moveFlags & ANIM_FLAG_8)) {
|
||||
!(this->stateFlags3 & PLAYER_STATE3_8) && !(this->skelAnime.movementFlags & ANIM_FLAG_ENABLE_MOVEMENT)) {
|
||||
Player_StopCutscene(this);
|
||||
func_80833AA0(this, play);
|
||||
return true;
|
||||
|
@ -7857,7 +7862,8 @@ s32 Player_ActionHandler_13(Player* this, PlayState* play) {
|
|||
this->actor.shape.rot.y = this->yaw;
|
||||
if (talkActor->xzDistToPlayer < 40.0f) {
|
||||
Player_Anim_PlayOnceAdjusted(play, this, &gPlayerAnim_link_normal_backspace);
|
||||
Player_AnimReplace_Setup(play, this, ANIM_FLAG_1 | ANIM_FLAG_8 | ANIM_FLAG_NOMOVE);
|
||||
Player_AnimReplace_Setup(play, this,
|
||||
ANIM_FLAG_1 | ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_NOMOVE);
|
||||
} else {
|
||||
Player_Anim_PlayOnceMorph(play, this, D_8085BE84[31][this->modelAnimType]);
|
||||
}
|
||||
|
@ -9002,7 +9008,7 @@ void func_8083BB4C(PlayState* play, Player* this) {
|
|||
(this->actor.depthInWater < this->ageProperties->unk_24) &&
|
||||
(((Player_Action_56 != this->actionFunc) && !(this->stateFlags3 & PLAYER_STATE3_8000)) ||
|
||||
(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND))) {
|
||||
if (this->skelAnime.moveFlags == 0) {
|
||||
if (this->skelAnime.movementFlags == 0) {
|
||||
Player_SetupTurnInPlace(play, this, this->actor.shape.rot.y);
|
||||
}
|
||||
func_8083B32C(play, this, this->actor.velocity.y);
|
||||
|
@ -9349,8 +9355,9 @@ s32 Player_ActionHandler_3(Player* this, PlayState* play) {
|
|||
|
||||
Player_MountHorse(play, this, &rideActor->actor);
|
||||
Player_Anim_PlayOnce(play, this, entry->anim);
|
||||
Player_AnimReplace_Setup(
|
||||
play, this, ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_8 | ANIM_FLAG_NOMOVE | ANIM_FLAG_80);
|
||||
Player_AnimReplace_Setup(play, this,
|
||||
ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_ENABLE_MOVEMENT |
|
||||
ANIM_FLAG_NOMOVE | ANIM_FLAG_80);
|
||||
this->actor.parent = this->rideActor;
|
||||
func_8082DAD4(this);
|
||||
Actor_DeactivateLens(play);
|
||||
|
@ -9507,8 +9514,9 @@ s32 Player_ActionHandler_2(Player* this, PlayState* play) {
|
|||
this->csId = chest->csId2;
|
||||
Player_Anim_PlayOnceAdjusted(play, this, this->ageProperties->openChestAnim);
|
||||
Player_AnimReplace_Setup(play, this,
|
||||
ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_4 | ANIM_FLAG_8 |
|
||||
ANIM_FLAG_NOMOVE | ANIM_FLAG_80);
|
||||
ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_4 |
|
||||
ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_NOMOVE |
|
||||
ANIM_FLAG_80);
|
||||
this->actor.bgCheckFlags &= ~BGCHECKFLAG_WATER;
|
||||
chest->unk_1EC = 1;
|
||||
} else {
|
||||
|
@ -9696,7 +9704,7 @@ s32 func_8083D860(Player* this, PlayState* play) {
|
|||
Math_Vec3f_Copy(&this->actor.prevPos, &this->actor.world.pos);
|
||||
Player_Anim_PlayOnce(play, this, anim);
|
||||
Player_AnimReplace_Setup(play, this,
|
||||
ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_4 | ANIM_FLAG_8 |
|
||||
ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_4 | ANIM_FLAG_ENABLE_MOVEMENT |
|
||||
ANIM_FLAG_NOMOVE | ANIM_FLAG_80);
|
||||
return true;
|
||||
}
|
||||
|
@ -10475,12 +10483,12 @@ void func_808400CC(PlayState* play, Player* this) {
|
|||
if (Player_Action_18 != this->actionFunc) {
|
||||
func_8082DD2C(play, this);
|
||||
if ((this->transformation != PLAYER_FORM_HUMAN) && (this->transformation != PLAYER_FORM_FIERCE_DEITY)) {
|
||||
u8 moveFlags = this->skelAnime.moveFlags;
|
||||
u8 savedMovementFlags = this->skelAnime.movementFlags;
|
||||
s32 pad;
|
||||
|
||||
this->skelAnime.moveFlags = 0;
|
||||
this->skelAnime.movementFlags = 0;
|
||||
Player_SetAction(play, this, Player_Action_85, 0);
|
||||
this->skelAnime.moveFlags = moveFlags;
|
||||
this->skelAnime.movementFlags = savedMovementFlags;
|
||||
} else {
|
||||
s32 var_v1;
|
||||
s32 pad;
|
||||
|
@ -10920,8 +10928,9 @@ void Player_StartMode_TimeTravel(PlayState* play, Player* this) {
|
|||
// `Player_Action_TimeTravelEnd` will play the animation after `animDelayTimer` completes.
|
||||
PlayerAnimation_Change(play, &this->skelAnime, this->ageProperties->timeTravelEndAnim, PLAYER_ANIM_ADJUSTED_SPEED,
|
||||
0.0f, 0.0f, ANIMMODE_ONCE, 0.0f);
|
||||
Player_AnimReplace_Setup(
|
||||
play, this, ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_4 | ANIM_FLAG_8 | ANIM_FLAG_80 | ANIM_FLAG_200);
|
||||
Player_AnimReplace_Setup(play, this,
|
||||
ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_4 | ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_80 |
|
||||
ANIM_FLAG_200);
|
||||
|
||||
if (this->transformation == PLAYER_FORM_FIERCE_DEITY) {
|
||||
Player_PutSwordInHand(play, this, false);
|
||||
|
@ -10932,8 +10941,8 @@ void Player_StartMode_TimeTravel(PlayState* play, Player* this) {
|
|||
|
||||
void Player_StartMode_Door(PlayState* play, Player* this) {
|
||||
Player_SetAction(play, this, Player_Action_TryOpeningDoor, 0);
|
||||
Player_AnimReplace_Setup(play, this,
|
||||
ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_8 | ANIM_FLAG_NOMOVE | ANIM_FLAG_80);
|
||||
Player_AnimReplace_Setup(
|
||||
play, this, ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_NOMOVE | ANIM_FLAG_80);
|
||||
}
|
||||
|
||||
void Player_StartMode_Grotto(PlayState* play, Player* this) {
|
||||
|
@ -12504,7 +12513,8 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
|
|||
this->av2.actionVar2 = -1;
|
||||
Player_Anim_PlayOnce(play, this, &gPlayerAnim_link_uma_wait_1);
|
||||
Player_AnimReplace_Setup(play, this,
|
||||
ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_8 | ANIM_FLAG_NOMOVE | ANIM_FLAG_80);
|
||||
ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_NOMOVE |
|
||||
ANIM_FLAG_80);
|
||||
}
|
||||
|
||||
if (this->unk_ADC == 0) {
|
||||
|
@ -12535,7 +12545,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
|
|||
func_808484F0(this);
|
||||
}
|
||||
|
||||
if (!play->soaringCsOrSoTCsPlaying && !(this->skelAnime.moveFlags & ANIM_FLAG_80)) {
|
||||
if (!play->soaringCsOrSoTCsPlaying && !(this->skelAnime.movementFlags & ANIM_FLAG_80)) {
|
||||
if (!(this->stateFlags1 & PLAYER_STATE1_2) && (this->actor.parent == NULL)) {
|
||||
func_80844784(play, this);
|
||||
}
|
||||
|
@ -12682,9 +12692,10 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
|
|||
|
||||
Player_UpdateCamAndSeqModes(play, this);
|
||||
|
||||
if (this->skelAnime.moveFlags & ANIM_FLAG_8) {
|
||||
AnimTaskQueue_AddActorMove(play, &this->actor, &this->skelAnime,
|
||||
(this->skelAnime.moveFlags & ANIM_FLAG_4) ? 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_4) ? 1.0f
|
||||
: this->ageProperties->unk_08);
|
||||
}
|
||||
|
||||
Player_UpdateShapeYaw(this, play);
|
||||
|
@ -16070,7 +16081,7 @@ void Player_Action_Talk(Player* this, PlayState* play) {
|
|||
this->actor.gravity = 0.0f;
|
||||
}
|
||||
} else if (!Player_CheckHostileLockOn(this) && PlayerAnimation_Update(play, &this->skelAnime)) {
|
||||
if (this->skelAnime.moveFlags != 0) {
|
||||
if (this->skelAnime.movementFlags != 0) {
|
||||
Player_Anim_ResetMove(this);
|
||||
if ((this->talkActor->category == ACTORCAT_NPC) && (this->heldItemAction != PLAYER_IA_FISHING_ROD)) {
|
||||
Player_Anim_PlayOnceAdjusted(play, this, &gPlayerAnim_link_normal_talk_free);
|
||||
|
@ -17591,7 +17602,7 @@ void Player_Action_65(Player* this, PlayState* play) {
|
|||
}
|
||||
|
||||
Player_AnimReplace_Setup(play, this,
|
||||
ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_4 | ANIM_FLAG_8 |
|
||||
ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_4 | ANIM_FLAG_ENABLE_MOVEMENT |
|
||||
ANIM_FLAG_NOMOVE | ANIM_FLAG_80);
|
||||
Player_StopCutscene(this);
|
||||
this->csId = play->playerCsIds[PLAYER_CS_ID_ITEM_GET];
|
||||
|
@ -18341,10 +18352,10 @@ void Player_Action_84(Player* this, PlayState* play) {
|
|||
func_8082DC38(this);
|
||||
|
||||
if (anim == NULL) {
|
||||
this->skelAnime.moveFlags &= ~8;
|
||||
this->skelAnime.movementFlags &= ~ANIM_FLAG_ENABLE_MOVEMENT;
|
||||
func_8085B384(this, play);
|
||||
} else {
|
||||
u8 moveFlags = this->skelAnime.moveFlags;
|
||||
u8 savedMovementFlags = this->skelAnime.movementFlags;
|
||||
|
||||
if (this->transformation == PLAYER_FORM_ZORA) {
|
||||
if (Player_ActionHandler_8(this, play)) {
|
||||
|
@ -18356,11 +18367,11 @@ void Player_Action_84(Player* this, PlayState* play) {
|
|||
anim = &gPlayerAnim_link_fighter_power_jump_kiru_end;
|
||||
}
|
||||
|
||||
this->skelAnime.moveFlags = 0;
|
||||
this->skelAnime.movementFlags = 0;
|
||||
Player_SetAction(play, this, Player_Action_Idle, 1);
|
||||
Player_Anim_PlayOnceWaterAdjustment(play, this, anim);
|
||||
this->yaw = this->actor.shape.rot.y;
|
||||
this->skelAnime.moveFlags = moveFlags;
|
||||
this->skelAnime.movementFlags = savedMovementFlags;
|
||||
}
|
||||
this->stateFlags3 |= PLAYER_STATE3_8;
|
||||
}
|
||||
|
@ -19842,12 +19853,13 @@ void Player_CsAnim_ReplacePlayOnceNormalAdjusted(PlayState* play, Player* this,
|
|||
}
|
||||
|
||||
void Player_CsAnim_ReplacePlayOnce(PlayState* play, Player* this, void* anim) {
|
||||
Player_AnimReplace_PlayOnce(play, this, anim, ANIM_FLAG_4 | ANIM_FLAG_8 | ANIM_FLAG_NOMOVE | ANIM_FLAG_80);
|
||||
Player_AnimReplace_PlayOnce(play, this, anim,
|
||||
ANIM_FLAG_4 | ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_NOMOVE | ANIM_FLAG_80);
|
||||
}
|
||||
|
||||
void Player_CsAnim_ReplacePlayOnceAdjustedReverse(PlayState* play, Player* this, void* anim) {
|
||||
Player_Anim_PlayOnceAdjustedReverse(play, this, anim);
|
||||
Player_AnimReplace_Setup(play, this, ANIM_FLAG_4 | ANIM_FLAG_8 | ANIM_FLAG_NOMOVE | ANIM_FLAG_80);
|
||||
Player_AnimReplace_Setup(play, this, ANIM_FLAG_4 | ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_NOMOVE | ANIM_FLAG_80);
|
||||
}
|
||||
|
||||
void Player_CsAnim_ReplacePlayLoopNormalAdjusted(PlayState* play, Player* this, void* anim) {
|
||||
|
@ -19855,7 +19867,8 @@ void Player_CsAnim_ReplacePlayLoopNormalAdjusted(PlayState* play, Player* this,
|
|||
}
|
||||
|
||||
void Player_CsAnim_ReplacePlayLoop(PlayState* play, Player* this, void* anim) {
|
||||
Player_AnimReplace_PlayLoop(play, this, anim, ANIM_FLAG_4 | ANIM_FLAG_8 | ANIM_FLAG_NOMOVE | ANIM_FLAG_80);
|
||||
Player_AnimReplace_PlayLoop(play, this, anim,
|
||||
ANIM_FLAG_4 | ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_NOMOVE | ANIM_FLAG_80);
|
||||
}
|
||||
|
||||
void Player_CsAnim_PlayOnce(PlayState* play, Player* this, void* anim) {
|
||||
|
@ -20897,7 +20910,7 @@ void Player_Cutscene_8085ABA8(Player* this, CsCmdActorCue* cue) {
|
|||
}
|
||||
}
|
||||
|
||||
this->skelAnime.moveFlags = 0;
|
||||
this->skelAnime.movementFlags = 0;
|
||||
Player_Anim_ZeroModelYaw(this);
|
||||
}
|
||||
|
||||
|
@ -20908,7 +20921,7 @@ void func_8085AC9C(PlayState* play, Player* this, CsCmdActorCue* cue, PlayerCsAc
|
|||
csEntry->csActionFunc(play, this, cue);
|
||||
}
|
||||
|
||||
if ((D_80862B6C & 4) && !(this->skelAnime.moveFlags & ANIM_FLAG_4)) {
|
||||
if ((D_80862B6C & ANIM_FLAG_4) && !(this->skelAnime.movementFlags & ANIM_FLAG_4)) {
|
||||
this->skelAnime.morphTable[LIMB_ROOT_POS].y /= this->ageProperties->unk_08;
|
||||
D_80862B6C = 0;
|
||||
}
|
||||
|
@ -20974,7 +20987,7 @@ void Player_CsAction_48(PlayState* play, Player* this, CsCmdActorCue* cue) {
|
|||
this->stateFlags3 &= ~PLAYER_STATE3_20000000;
|
||||
}
|
||||
|
||||
D_80862B6C = this->skelAnime.moveFlags;
|
||||
D_80862B6C = this->skelAnime.movementFlags;
|
||||
|
||||
Player_Anim_ResetMove(this);
|
||||
func_8085AD5C(play, this, ABS_ALT(csAction));
|
||||
|
@ -20996,7 +21009,7 @@ void Player_CsAction_48(PlayState* play, Player* this, CsCmdActorCue* cue) {
|
|||
|
||||
void Player_Action_CsAction(Player* this, PlayState* play) {
|
||||
if (this->csAction != this->prevCsAction) {
|
||||
D_80862B6C = this->skelAnime.moveFlags;
|
||||
D_80862B6C = this->skelAnime.movementFlags;
|
||||
Player_Anim_ResetMove(this);
|
||||
|
||||
this->prevCsAction = this->csAction;
|
||||
|
@ -21155,7 +21168,7 @@ void Player_StartTalking(PlayState* play, Actor* actor) {
|
|||
}
|
||||
|
||||
if (this->skelAnime.animation == &gPlayerAnim_link_normal_backspace) {
|
||||
Player_AnimReplace_Setup(play, this, ANIM_FLAG_1 | ANIM_FLAG_8 | ANIM_FLAG_NOMOVE);
|
||||
Player_AnimReplace_Setup(play, this, ANIM_FLAG_1 | ANIM_FLAG_ENABLE_MOVEMENT | ANIM_FLAG_NOMOVE);
|
||||
}
|
||||
func_8082DAD4(this);
|
||||
}
|
||||
|
|
|
@ -2550,13 +2550,13 @@
|
|||
0x80135A90:("AnimTaskQueue_AddInterp",),
|
||||
0x80135B00:("AnimTaskQueue_AddCopyUsingMap",),
|
||||
0x80135B70:("AnimTaskQueue_AddCopyUsingMapInverted",),
|
||||
0x80135BE0:("AnimTaskQueue_AddActorMove",),
|
||||
0x80135BE0:("AnimTaskQueue_AddActorMovement",),
|
||||
0x80135C3C:("AnimTask_LoadPlayerFrame",),
|
||||
0x80135C6C:("AnimTask_Copy",),
|
||||
0x80135CDC:("AnimTask_Interp",),
|
||||
0x80135D38:("AnimTask_CopyUsingMap",),
|
||||
0x80135DB8:("AnimTask_CopyUsingMapInverted",),
|
||||
0x80135E3C:("AnimTask_ActorMove",),
|
||||
0x80135E3C:("AnimTask_ActorMovement",),
|
||||
0x80135EE8:("AnimTaskQueue_Update",),
|
||||
0x80135F88:("SkelAnime_InitPlayer",),
|
||||
0x801360A8:("PlayerAnimation_SetUpdateFunction",),
|
||||
|
|
|
@ -299,7 +299,7 @@ wordReplace = {
|
|||
"SkelAnime_AnimationType2Loaded": "AnimTask_Interp",
|
||||
"SkelAnime_AnimationType3Loaded": "AnimTask_CopyUsingMap",
|
||||
"SkelAnime_AnimationType4Loaded": "AnimTask_CopyUsingMapInverted",
|
||||
"SkelAnime_AnimationType5Loaded": "AnimTask_ActorMove",
|
||||
"SkelAnime_AnimationType5Loaded": "AnimTask_ActorMovement",
|
||||
"func_80135EE8": "AnimTaskQueue_Update",
|
||||
"SkelAnime_InitLink": "SkelAnime_InitPlayer",
|
||||
"LinkAnimation_SetUpdateFunction": "PlayerAnimation_SetUpdateFunction",
|
||||
|
|
|
@ -2064,13 +2064,13 @@ asm/non_matchings/code/z_skelanime/AnimTaskQueue_AddCopy.s,AnimTaskQueue_AddCopy
|
|||
asm/non_matchings/code/z_skelanime/AnimTaskQueue_AddInterp.s,AnimTaskQueue_AddInterp,0x80135A90,0x1C
|
||||
asm/non_matchings/code/z_skelanime/AnimTaskQueue_AddCopyUsingMap.s,AnimTaskQueue_AddCopyUsingMap,0x80135B00,0x1C
|
||||
asm/non_matchings/code/z_skelanime/AnimTaskQueue_AddCopyUsingMapInverted.s,AnimTaskQueue_AddCopyUsingMapInverted,0x80135B70,0x1C
|
||||
asm/non_matchings/code/z_skelanime/AnimTaskQueue_AddActorMove.s,AnimTaskQueue_AddActorMove,0x80135BE0,0x17
|
||||
asm/non_matchings/code/z_skelanime/AnimTaskQueue_AddActorMovement.s,AnimTaskQueue_AddActorMovement,0x80135BE0,0x17
|
||||
asm/non_matchings/code/z_skelanime/AnimTask_LoadPlayerFrame.s,AnimTask_LoadPlayerFrame,0x80135C3C,0xC
|
||||
asm/non_matchings/code/z_skelanime/AnimTask_Copy.s,AnimTask_Copy,0x80135C6C,0x1C
|
||||
asm/non_matchings/code/z_skelanime/AnimTask_Interp.s,AnimTask_Interp,0x80135CDC,0x17
|
||||
asm/non_matchings/code/z_skelanime/AnimTask_CopyUsingMap.s,AnimTask_CopyUsingMap,0x80135D38,0x20
|
||||
asm/non_matchings/code/z_skelanime/AnimTask_CopyUsingMapInverted.s,AnimTask_CopyUsingMapInverted,0x80135DB8,0x21
|
||||
asm/non_matchings/code/z_skelanime/AnimTask_ActorMove.s,AnimTask_ActorMove,0x80135E3C,0x2B
|
||||
asm/non_matchings/code/z_skelanime/AnimTask_ActorMovement.s,AnimTask_ActorMovement,0x80135E3C,0x2B
|
||||
asm/non_matchings/code/z_skelanime/AnimTaskQueue_Update.s,AnimTaskQueue_Update,0x80135EE8,0x28
|
||||
asm/non_matchings/code/z_skelanime/SkelAnime_InitPlayerAnimetion.s,SkelAnime_InitPlayerAnimetion,0x80135F88,0x48
|
||||
asm/non_matchings/code/z_skelanime/PlayerAnimation_SetUpdateFunction.s,PlayerAnimation_SetUpdateFunction,0x801360A8,0xE
|
||||
|
|
|
Loading…
Reference in New Issue