summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorDragorn421 <Dragorn421@users.noreply.github.com>2022-01-12 03:10:43 +0100
committerGitHub <noreply@github.com>2022-01-11 21:10:43 -0500
commit11917bf640d85250e2336389cec3e79bb5584816 (patch)
treeaba654ea96790dad3378514f58330a429a5889dd /src/code
parentd3a8ade6bae030b587cfbe7aa2d76117d1e54a02 (diff)
Cleanup around some generic animation info structs (#1059)
* Name generic anim info structs and cleanup usage * Make `EnDaiku` use generic struct * Add `/* decimalid */` comments to all added enums * small fixes * Two more generic animinfo structs * Cleanup usage of newly generic structs * Cleanup x2 usage of newly generic structs * `transitionRate` -> `morphFrames` * Properly name generic anim structs (attempt to at least) * `anim` -> `animation` * fixes * run formatter * Use consistent prototypes for each actor's ChangeAnim helper * run formatter * minor cleanup * Run formatter * `Animation_ChangeInfo` -> `Animation_ChangeByInfo`
Diffstat (limited to 'src/code')
-rw-r--r--src/code/z_actor.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c
index a46fdb52f..0fbba750b 100644
--- a/src/code/z_actor.c
+++ b/src/code/z_actor.c
@@ -3857,19 +3857,19 @@ s16 func_80034DD4(Actor* actor, GlobalContext* globalCtx, s16 arg2, f32 arg3) {
return arg2;
}
-void func_80034EC0(SkelAnime* skelAnime, struct_80034EC0_Entry* animations, s32 index) {
+void Animation_ChangeByInfo(SkelAnime* skelAnime, AnimationInfo* animationInfo, s32 index) {
f32 frameCount;
- animations += index;
+ animationInfo += index;
- if (animations->frameCount > 0.0f) {
- frameCount = animations->frameCount;
+ if (animationInfo->frameCount > 0.0f) {
+ frameCount = animationInfo->frameCount;
} else {
- frameCount = Animation_GetLastFrame(animations->animation);
+ frameCount = Animation_GetLastFrame(animationInfo->animation);
}
- Animation_Change(skelAnime, animations->animation, animations->playbackSpeed, animations->startFrame, frameCount,
- animations->mode, animations->transitionRate);
+ Animation_Change(skelAnime, animationInfo->animation, animationInfo->playSpeed, animationInfo->startFrame,
+ frameCount, animationInfo->mode, animationInfo->morphFrames);
}
void func_80034F54(GlobalContext* globalCtx, s16* arg1, s16* arg2, s32 arg3) {