animation: fixed timer sometimes skipping the end frame
authorLukas Krickl <lukas@krickl.dev>
Sun, 14 Sep 2025 05:21:56 +0000 (07:21 +0200)
committerLukas Krickl <lukas@krickl.dev>
Sun, 14 Sep 2025 05:21:56 +0000 (07:21 +0200)
This fix simply replaced the equality check with a greater than check.

src/animation.s

index 54f6ebe4c6bd2a9299ebf8c30b6407a15ca3b5bc..5cabafb72d02aea9924ebf6224ff9bcee2281e7a 100644 (file)
@@ -259,7 +259,7 @@ unit_draw:
        ld a, [bc] ; a = expected timer
        cp a, d ; next frame?
        pop de
-       jr nz, @no_new_frame REL
+       jr nc, @no_new_frame REL
        
                ; if new frame: clear timer
                xor a, a