diff options
author | Freya Murphy <freya@freyacat.org> | 2025-04-27 16:11:54 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-04-27 16:11:54 -0400 |
commit | 91fb39db553dea9d07bb124f38c83460abc48d21 (patch) | |
tree | 05b672e0a584d55ae78999b874f89e579d0d9657 /user | |
parent | fix FIXMEs in syscall.c (diff) | |
download | comus-91fb39db553dea9d07bb124f38c83460abc48d21.tar.gz comus-91fb39db553dea9d07bb124f38c83460abc48d21.tar.bz2 comus-91fb39db553dea9d07bb124f38c83460abc48d21.zip |
fmt
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) |