diff options
author | quou <quou@disroot.org> | 2023-05-04 10:15:19 +1000 |
---|---|---|
committer | quou <quou@disroot.org> | 2023-05-04 10:15:19 +1000 |
commit | c4ac81cffcf925963acb0c02584ab22626427a73 (patch) | |
tree | 7d6421405e53a92baada909355c5398f21e91864 /components.h | |
parent | c4ee81da673208fe7b3e3638692fd466acf61c3f (diff) |
Add an animation system.
Diffstat (limited to 'components.h')
-rw-r--r-- | components.h | 11 |
1 files changed, 10 insertions, 1 deletions
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 |