diff options
author | kdx <kikoodx@paranoici.org> | 2023-03-18 22:09:57 +0100 |
---|---|---|
committer | kdx <kikoodx@paranoici.org> | 2023-03-18 22:09:57 +0100 |
commit | 297ee77f926197504f8e0d7d6fcf0bf602cccd66 (patch) | |
tree | d45446e07164f5f1521e5aa08dd8450d71f51348 | |
parent | 7fbb779c5f1055461b0f38d83035725ff7cd3b77 (diff) | |
download | hyperultra-297ee77f926197504f8e0d7d6fcf0bf602cccd66.tar.gz |
don't typedef EntityType enum
-rw-r--r-- | src/entity.c | 2 | ||||
-rw-r--r-- | src/entity.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/entity.c b/src/entity.c index 9b378aa..ef295a7 100644 --- a/src/entity.c +++ b/src/entity.c @@ -35,7 +35,7 @@ entity_meet(Entity *this, Entity *other) } Entity * -entity_place_meeting(Entity *this, Game *g, EntityType type) +entity_place_meeting(Entity *this, Game *g, unsigned int type) { for (int i = 0; i < MAX_ENTITIES; i++) if (this != &g->entities[i] && g->entities[i].type == type && diff --git a/src/entity.h b/src/entity.h index 8878778..e7def38 100644 --- a/src/entity.h +++ b/src/entity.h @@ -6,12 +6,12 @@ struct Game; -typedef enum { +enum { ET_NONE, ET_player, ET_exit, ET_deathpart -} EntityType; +}; typedef struct Entity Entity; struct Entity { @@ -35,5 +35,5 @@ struct Entity { bool entity_collide(Entity *this, struct Game *g, int ox, int oy); bool entity_meet(Entity *this, Entity *other); -Entity *entity_place_meeting(Entity *this, struct Game *g, EntityType type); +Entity *entity_place_meeting(Entity *this, struct Game *g, unsigned int type); void entity_move(Entity *this, struct Game *g); |