diff options
-rw-r--r-- | obj.h | 11 | ||||
-rw-r--r-- | player.c | 1 |
2 files changed, 12 insertions, 0 deletions
@@ -13,6 +13,16 @@ typedef enum { face_right } Face; +#define specials_xmacro \ + x(special_gun, 21, 0) + +typedef enum { +#define x(name, x, y) name, + specials_xmacro +#undef x + special_count +} Special; + typedef struct { int x, y, vx, vy; int frame; @@ -22,6 +32,7 @@ typedef struct { int inv, hp, charge; Face face; Rect rect; + Special spec; } Player; void init_player(Player* p); @@ -27,6 +27,7 @@ void init_player(Player* p) { p->inv = 0; p->hp = player_health; p->charge = 0; + p->spec = special_gun; } void update_player_anim(Player* p) { |