diff options
| author | Syndamia <kamen@syndamia.com> | 2026-03-28 22:26:34 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2026-03-28 22:26:52 +0200 |
| commit | af9f6ae727a15b965789717047a52e6857a3bd8d (patch) | |
| tree | 8b7b3daeff4a759a6c5403bd7a17a63d67e55a7d /AnimationRender/AnimationRender.c | |
| parent | 1cc8f72fb1c44e203a324e274038c2883c351fbb (diff) | |
| download | ppm_graphics-af9f6ae727a15b965789717047a52e6857a3bd8d.tar ppm_graphics-af9f6ae727a15b965789717047a52e6857a3bd8d.tar.gz ppm_graphics-af9f6ae727a15b965789717047a52e6857a3bd8d.zip | |
feat: Better timing handling
Diffstat (limited to 'AnimationRender/AnimationRender.c')
| -rw-r--r-- | AnimationRender/AnimationRender.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/AnimationRender/AnimationRender.c b/AnimationRender/AnimationRender.c index 8974ba3..68bb7b7 100644 --- a/AnimationRender/AnimationRender.c +++ b/AnimationRender/AnimationRender.c @@ -16,10 +16,12 @@ void RenderAnimation(u32 width, u32 height, u32 totalFrames, const FrameCallback if (callbacks[i] == NULL) { fc.startFrame = 0; fc.endFrame = totalFrames; + fc.frame = f; } - else + else if (fc.startFrame <= fc.frame && fc.frame <= fc.endFrame) callbacks[i]->callback(callbacks[i]->callback_self, &fc); } + ppm6_write(stdout, frameBuffer); } RGBImage_delete(&frameBuffer); |
