diff options
-rw-r--r-- | world.c | 2 | ||||
-rw-r--r-- | world.h | 1 |
2 files changed, 3 insertions, 0 deletions
@@ -5,6 +5,7 @@ void init_world(World* w) { w->particle_count = 0; w->enemy_count = 0; w->deathzone_count = 0; + w->frame = 0; init_player(&w->player); } @@ -63,6 +64,7 @@ void update_world(World* w, const App* a) { for (i = w->enemy_count - 1; i >= 0; i--) if (update_enemy(&w->enemies[i], w)) w->enemies[i] = w->enemies[--w->enemy_count]; + w->frame++; } void ren_world(const World* w, struct Renderer* r) { @@ -18,6 +18,7 @@ typedef struct World { int deathzone_count; Player player; Map map; + int frame; } World; void init_world(World* w); |