#ifndef components_h #define components_h #include "animation.h" #include "asset.h" #include "rect.h" /* Components are POD. If you put a pointer in one of these, * you're a dumb poo poo head. */ typedef struct { int x, y; } CPosition; typedef struct { Asset_ID id; Rectangle rect; } CSprite; typedef struct { Animation_ID id; int frame; int timer; } CAnimated; typedef struct { int life; int vx, vy; } CBullet; typedef enum { ctype_sprite = 1 << 0, ctype_position = 1 << 1, ctype_animated = 1 << 2, ctype_bullet = 1 << 3, ctype_player_bullet = 1 << 4, ctype_enemy_bullet = 1 << 5 } CType; #endif