summaryrefslogtreecommitdiff
path: root/AnimationRender/AnimationRender.c
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2026-03-28 22:36:57 +0200
committerSyndamia <kamen@syndamia.com>2026-03-28 22:36:57 +0200
commit40f33359c7b47d99c3386948bbeead8409a1a902 (patch)
tree6847f11c13b3eb87d0dadfab4fce68a2062fd09a /AnimationRender/AnimationRender.c
parentaf9f6ae727a15b965789717047a52e6857a3bd8d (diff)
downloadppm_graphics-40f33359c7b47d99c3386948bbeead8409a1a902.tar
ppm_graphics-40f33359c7b47d99c3386948bbeead8409a1a902.tar.gz
ppm_graphics-40f33359c7b47d99c3386948bbeead8409a1a902.zip
feat: Add rotation interpolation and add frame context reset on new frame
Diffstat (limited to 'AnimationRender/AnimationRender.c')
-rw-r--r--AnimationRender/AnimationRender.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/AnimationRender/AnimationRender.c b/AnimationRender/AnimationRender.c
index 68bb7b7..e717a95 100644
--- a/AnimationRender/AnimationRender.c
+++ b/AnimationRender/AnimationRender.c
@@ -10,7 +10,10 @@ void RenderAnimation(u32 width, u32 height, u32 totalFrames, const FrameCallback
fc.frameBuffer = frameBuffer;
for (u32 f = 0; f < totalFrames; ++f) {
+ fc.startFrame = 0;
+ fc.endFrame = totalFrames;
fc.frame = f;
+
for (usize i = 0; i < sizeCallbacks; ++i) {
// Soft context reset
if (callbacks[i] == NULL) {
@@ -21,6 +24,7 @@ void RenderAnimation(u32 width, u32 height, u32 totalFrames, const FrameCallback
else if (fc.startFrame <= fc.frame && fc.frame <= fc.endFrame)
callbacks[i]->callback(callbacks[i]->callback_self, &fc);
}
+
ppm6_write(stdout, frameBuffer);
}