summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorDragorn421 <Dragorn421@users.noreply.github.com>2023-08-15 22:23:53 +0200
committerGitHub <noreply@github.com>2023-08-15 22:23:53 +0200
commit4dea0bfb26951a8a07ee4cbb9642d8bcd52ba71a (patch)
tree58b4bc2b3a80f7aa4b3a6bf66270cb637276f38d /src/code
parent9e9d62cf710d6be36094d9d44e73996ea368b84b (diff)
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
Diffstat (limited to 'src/code')
-rw-r--r--src/code/z_player_lib.c4
-rw-r--r--src/code/z_skelanime.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c
index a3eebe7fe..981bcf761 100644
--- a/src/code/z_player_lib.c
+++ b/src/code/z_player_lib.c
@@ -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;
}
}
diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c
index bc8a9f392..0efb58769 100644
--- a/src/code/z_skelanime.c
+++ b/src/code/z_skelanime.c
@@ -914,13 +914,13 @@ void AnimationContext_SetCopyFalse(PlayState* play, s32 vecCount, Vec3s* dst, Ve
/**
* Requests moving an actor according to the translation of its root limb
*/
-void AnimationContext_SetMoveActor(PlayState* play, Actor* actor, SkelAnime* skelAnime, f32 arg3) {
+void AnimationContext_SetMoveActor(PlayState* play, Actor* actor, SkelAnime* skelAnime, f32 moveDiffScaleY) {
AnimationEntry* entry = AnimationContext_AddEntry(&play->animationCtx, ANIMENTRY_MOVEACTOR);
if (entry != NULL) {
entry->data.move.actor = actor;
entry->data.move.skelAnime = skelAnime;
- entry->data.move.unk_08 = arg3;
+ entry->data.move.diffScaleY = moveDiffScaleY;
}
}
@@ -1011,7 +1011,7 @@ void AnimationContext_MoveActor(PlayState* play, AnimationEntryData* data) {
SkelAnime_UpdateTranslation(entry->skelAnime, &diff, actor->shape.rot.y);
actor->world.pos.x += diff.x * actor->scale.x;
- actor->world.pos.y += diff.y * actor->scale.y * entry->unk_08;
+ actor->world.pos.y += diff.y * actor->scale.y * entry->diffScaleY;
actor->world.pos.z += diff.z * actor->scale.z;
}