diff options
| author | engineer124 <47598039+engineer124@users.noreply.github.com> | 2023-07-11 00:00:42 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-10 10:00:42 -0400 |
| commit | 82318a1c1bd25926269b2cfab16958c4151081d3 (patch) | |
| tree | c2b6169c64f5e1fcece22842806b477dac52db91 /src/code | |
| parent | b3eae0e5b7bcc2c5d3c8a1d562f0737d80c7e35c (diff) | |
Animation Cleanup Part 1: Dm Actors (#1290)
* DM cleanup
* cleanup
* fix pointer
* rm unused anim enum
* PR Suggestions
* spacing
* missed one
* More PR Suggestions
* oops
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/z_actor.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 35dbc8361..843b0eafd 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -4451,18 +4451,19 @@ s16 func_800BDB6C(Actor* actor, PlayState* play, s16 arg2, f32 arg3) { return arg2; } -void Actor_ChangeAnimationByInfo(SkelAnime* skelAnime, AnimationInfo* animationInfo, s32 animIndex) { - f32 frameCount; +void Actor_ChangeAnimationByInfo(SkelAnime* skelAnime, AnimationInfo* animInfo, s32 animIndex) { + f32 endFrame; - animationInfo += animIndex; - if (animationInfo->frameCount > 0.0f) { - frameCount = animationInfo->frameCount; + animInfo += animIndex; + + if (animInfo->frameCount > 0.0f) { + endFrame = animInfo->frameCount; } else { - frameCount = Animation_GetLastFrame(&animationInfo->animation->common); + endFrame = Animation_GetLastFrame(&animInfo->animation->common); } - Animation_Change(skelAnime, animationInfo->animation, animationInfo->playSpeed, animationInfo->startFrame, - frameCount, animationInfo->mode, animationInfo->morphFrames); + Animation_Change(skelAnime, animInfo->animation, animInfo->playSpeed, animInfo->startFrame, endFrame, + animInfo->mode, animInfo->morphFrames); } /** |
