aboutsummaryrefslogtreecommitdiff
path: root/components.h
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2023-05-02 21:37:07 +1000
committerquou <quou@disroot.org>2023-05-02 21:37:07 +1000
commit65fa1051585f5345c3270db73ab53b7a0dbbaa50 (patch)
tree30fed63168b86f8de48698174b265ffbdfae4343 /components.h
parentd3745895ca0107c705b2d89b8b80e254536dad86 (diff)
Add ECS.
Diffstat (limited to 'components.h')
-rw-r--r--components.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/components.h b/components.h
new file mode 100644
index 0000000..cdd7c46
--- /dev/null
+++ b/components.h
@@ -0,0 +1,21 @@
+#ifndef components_h
+#define components_h
+
+#include "asset.h"
+#include "rect.h"
+
+typedef struct {
+ int x, y;
+} CPosition;
+
+typedef struct {
+ Asset_ID id;
+ Rectangle rect;
+} CSprite;
+
+typedef enum {
+ ctype_sprite = 1 << 0,
+ ctype_position = 1 << 1
+} CType;
+
+#endif