aboutsummaryrefslogtreecommitdiff
path: root/components.h
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2023-05-04 10:15:19 +1000
committerquou <quou@disroot.org>2023-05-04 10:15:19 +1000
commitc4ac81cffcf925963acb0c02584ab22626427a73 (patch)
tree7d6421405e53a92baada909355c5398f21e91864 /components.h
parentc4ee81da673208fe7b3e3638692fd466acf61c3f (diff)
Add an animation system.
Diffstat (limited to 'components.h')
-rw-r--r--components.h11
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