summaryrefslogtreecommitdiff
path: root/include/zombies.h
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrik@amftech.nl>2022-12-20 21:12:07 +0100
committerAldrik Ramaekers <aldrik@amftech.nl>2022-12-20 21:12:07 +0100
commit38d8d7f442a4b5cb66815ada7bb508c734186c6e (patch)
tree17454b271f82719f25d6fdeff7a0be4ad016d573 /include/zombies.h
parent1683c214b37c2bb8f3e43fd9054f3a53f7695f4a (diff)
assets, sprites
Diffstat (limited to 'include/zombies.h')
-rw-r--r--include/zombies.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/zombies.h b/include/zombies.h
index c99063e..72836ea 100644
--- a/include/zombies.h
+++ b/include/zombies.h
@@ -6,6 +6,7 @@
#include "players.h"
#include "objects.h"
#include "pathfinding.h"
+#include "sprite.h"
typedef struct t_zombie {
bool alive;
@@ -20,21 +21,20 @@ typedef struct t_zombie {
} zombie;
typedef struct t_spawner {
+ bool active;
vec2 position;
float sec_since_last_spawn;
+ sprite sprite;
} spawner;
-#define MAX_SPAWNERS (3)
+#define MAX_SPAWNERS (5)
// data data that is stored on disk
-spawner spawner_tiles[MAX_SPAWNERS] = {
- {15, 5, 999},
- {3, 8, 999},
- {11, 18, 999},
-};
+spawner spawner_tiles[MAX_SPAWNERS] = {0};
#define MAX_ZOMBIES (50)
zombie zombies[MAX_ZOMBIES] = {0};
+void create_spawner(vec2 position);
void draw_spawners(platform_window* window);
void draw_zombies(platform_window* window);
void spawn_zombie(int x, int y);