diff options
author | quou <quou@disroot.org> | 2023-05-02 21:37:07 +1000 |
---|---|---|
committer | quou <quou@disroot.org> | 2023-05-02 21:37:07 +1000 |
commit | 65fa1051585f5345c3270db73ab53b7a0dbbaa50 (patch) | |
tree | 30fed63168b86f8de48698174b265ffbdfae4343 /components.h | |
parent | d3745895ca0107c705b2d89b8b80e254536dad86 (diff) |
Add ECS.
Diffstat (limited to 'components.h')
-rw-r--r-- | components.h | 21 |
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 |