diff options
| author | fig02 <fig02srl@gmail.com> | 2024-09-23 10:07:11 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-23 10:07:11 -0400 |
| commit | bb3848262ddb6a605e8ae1dfacab934b4605790e (patch) | |
| tree | 7601518e8aa73b06d777327107e9bae755092100 /src/code | |
| parent | ebd2b8dd506978a14f15ef7fde99d16658762f24 (diff) | |
Standardize "ActorMovement" over "ActorMove" (#2214)
* ActorMove -> ActorMovement
* more move -> movement
* ANIM_FLAG_ENABLE_MOVEMENT
* format
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/z_player_lib.c | 8 | ||||
| -rw-r--r-- | src/code/z_skelanime.c | 27 |
2 files changed, 18 insertions, 17 deletions
diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index d2642b9ea..2e1a44ae1 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -1263,14 +1263,14 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx** sCurBodyPartPos = &this->bodyPartsPos[0] - 1; if (!LINK_IS_ADULT) { - if (!(this->skelAnime.moveFlags & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT) || - (this->skelAnime.moveFlags & ANIM_FLAG_UPDATE_XZ)) { + if (!(this->skelAnime.movementFlags & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT) || + (this->skelAnime.movementFlags & ANIM_FLAG_UPDATE_XZ)) { pos->x *= 0.64f; pos->z *= 0.64f; } - if (!(this->skelAnime.moveFlags & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT) || - (this->skelAnime.moveFlags & ANIM_FLAG_UPDATE_Y)) { + if (!(this->skelAnime.movementFlags & ANIM_FLAG_DISABLE_CHILD_ROOT_ADJUSTMENT) || + (this->skelAnime.movementFlags & ANIM_FLAG_UPDATE_Y)) { pos->y *= 0.64f; } } diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index f8929d6cd..a953bdb21 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -818,7 +818,7 @@ void AnimTaskQueue_SetNextGroup(PlayState* play) { * A transformative task is one that will alter the appearance of an animation. * These include Copy, Interp, CopyUsingMap, and CopyUsingMapInverted. * - * LoadPlayerFrame and ActorMove, which don't alter the appearance of an existing animation, + * LoadPlayerFrame and ActorMovement, which don't alter the appearance of an existing animation, * will always run even if a group has its transformative tasks disabled. */ void AnimTaskQueue_DisableTransformTasksForGroup(PlayState* play) { @@ -960,13 +960,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 moveDiffScaleY) { +void AnimTaskQueue_AddActorMovement(PlayState* play, Actor* actor, SkelAnime* skelAnime, f32 moveDiffScaleY) { 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.diffScaleY = moveDiffScaleY; + task->data.actorMovement.actor = actor; + task->data.actorMovement.skelAnime = skelAnime; + task->data.actorMovement.diffScaleY = moveDiffScaleY; } } @@ -1049,9 +1049,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; @@ -1070,8 +1071,8 @@ typedef void (*AnimTaskFunc)(struct PlayState* play, AnimTaskData* data); */ void AnimTaskQueue_Update(PlayState* play, AnimTaskQueue* animTaskQueue) { static AnimTaskFunc animTaskFuncs[] = { - 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; @@ -1838,7 +1839,7 @@ void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* diff, s16 angle) { f32 cos; // If `ANIM_FLAG_UPDATE_XZ` behaved as expected, it would also be checked here - if (skelAnime->moveFlags & ANIM_FLAG_ADJUST_STARTING_POS) { + if (skelAnime->movementFlags & ANIM_FLAG_ADJUST_STARTING_POS) { diff->x = diff->z = 0.0f; } else { x = skelAnime->jointTable[0].x; @@ -1864,8 +1865,8 @@ void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* diff, s16 angle) { skelAnime->prevTransl.z = skelAnime->jointTable[0].z; skelAnime->jointTable[0].z = skelAnime->baseTransl.z; - if (skelAnime->moveFlags & ANIM_FLAG_UPDATE_Y) { - if (skelAnime->moveFlags & ANIM_FLAG_ADJUST_STARTING_POS) { + if (skelAnime->movementFlags & ANIM_FLAG_UPDATE_Y) { + if (skelAnime->movementFlags & ANIM_FLAG_ADJUST_STARTING_POS) { diff->y = 0.0f; } else { diff->y = skelAnime->jointTable[0].y - skelAnime->prevTransl.y; @@ -1878,7 +1879,7 @@ void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* diff, s16 angle) { skelAnime->prevTransl.y = skelAnime->jointTable[0].y; } - skelAnime->moveFlags &= ~ANIM_FLAG_ADJUST_STARTING_POS; + skelAnime->movementFlags &= ~ANIM_FLAG_ADJUST_STARTING_POS; } /** |
