From c4ac81cffcf925963acb0c02584ab22626427a73 Mon Sep 17 00:00:00 2001 From: quou Date: Thu, 4 May 2023 10:15:19 +1000 Subject: Add an animation system. --- components.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'components.h') diff --git a/components.h b/components.h index cdd7c46..84cfc54 100644 --- a/components.h +++ b/components.h @@ -1,6 +1,7 @@ #ifndef components_h #define components_h +#include "animation.h" #include "asset.h" #include "rect.h" @@ -13,9 +14,17 @@ typedef struct { Rectangle rect; } CSprite; +typedef struct { + Animation_ID id; + + int frame; + int timer; +} CAnimated; + typedef enum { ctype_sprite = 1 << 0, - ctype_position = 1 << 1 + ctype_position = 1 << 1, + ctype_animated = 1 << 2 } CType; #endif -- cgit v1.2.3-54-g00ecf