Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane-D committed Dec 13, 2024
1 parent d4458a3 commit 10593e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sprite_eng.c
Original file line number Diff line number Diff line change
Expand Up @@ -1208,9 +1208,9 @@ bool SPR_isAnimationDone(Sprite* sprite)
// for debug
checkSpriteValid(sprite, "SPR_isAnimationDone");

// check for animation done state (mainly used for frame change callback) or
// when we are in the frame change callback we need to test for the 'animation done state'
return (sprite->status & STATE_ANIMATION_DONE) ||
// if we are on last tick from last frame (if auto animation is disabled then only test for last frame)
// otherwise we just check if we are on last frame tick (if auto animation is disabled then only test for last frame)
((sprite->frameInd == (sprite->animation->numFrame - 1)) && ((sprite->timer == 1) || (sprite->timer == -1)));
}

Expand Down

0 comments on commit 10593e5

Please sign in to comment.