diff options
Diffstat (limited to 'user')
-rw-r--r-- | user/apple.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/user/apple.c b/user/apple.c index d0a5cc4..000718c 100644 --- a/user/apple.c +++ b/user/apple.c @@ -8,7 +8,7 @@ INCBIN(APPLE, "data/apple.bin"); #define APPLE_WIDTH 256 #define APPLE_HEIGHT 144 #define APPLE_FPS 12 -#define APPLE_FRAMES 5259 +#define APPLE_FRAMES 2630 #define MIN(a, b) (((a) < (b)) ? (a) : (b)) @@ -33,7 +33,10 @@ static void draw_frame(void) } } - frame = ((ticks() - ticks_off) / (1000 / APPLE_FPS)) % APPLE_FRAMES; + frame = ((ticks() - ticks_off) / (1000 / APPLE_FPS)); + + if (frame >= APPLE_FRAMES) + exit(0); } int main(void) |