From 65fa1051585f5345c3270db73ab53b7a0dbbaa50 Mon Sep 17 00:00:00 2001 From: quou Date: Tue, 2 May 2023 21:37:07 +1000 Subject: Add ECS. --- components.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 components.h (limited to 'components.h') 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 -- cgit v1.2.3-54-g00ecf