summaryrefslogtreecommitdiff
path: root/Animation.h
diff options
context:
space:
mode:
Diffstat (limited to 'Animation.h')
-rw-r--r--Animation.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/Animation.h b/Animation.h
index 96fa765..6cebdb0 100644
--- a/Animation.h
+++ b/Animation.h
@@ -16,7 +16,22 @@ typedef struct Animation {
AnimationEventNode* events;
} Animation;
-typedef ARGB (*PixelRenderer)(const Animation* anim, u32 currentFrame, ARGB pixel, i32 row, i32 col, void* priv);
+typedef struct PixelRendererParams {
+ struct Frames {
+ u32 current;
+ u32 start;
+ u32 end;
+ } frame;
+
+ ARGB pixel;
+
+ i32 row;
+ i32 col;
+
+ void* priv;
+} PixelRendererParams;
+
+typedef ARGB (*PixelRenderer)(const Animation* anim, PixelRendererParams params);
AnimationEventNode* AnimationEventNode_new(u32 startFrame, u32 endFrame, PixelRenderer renderCallback, void* privateData);
Animation Animation_new(u32 width, u32 height, u32 frameCount);