summaryrefslogtreecommitdiff
path: root/src/zombies.c
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrik@amftech.nl>2022-12-15 12:59:19 +0100
committerAldrik Ramaekers <aldrik@amftech.nl>2022-12-15 12:59:19 +0100
commit7b956089e6ba5162fb0b667f1c0a60f6ece90c38 (patch)
tree82de31240ad1f1ae77874f07b288fcc39b8948f4 /src/zombies.c
parent23d2cc231e5b4c015a8471d3035dc07802de23d5 (diff)
added drops
Diffstat (limited to 'src/zombies.c')
-rw-r--r--src/zombies.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/zombies.c b/src/zombies.c
index a924443..043bce1 100644
--- a/src/zombies.c
+++ b/src/zombies.c
@@ -205,20 +205,21 @@ void update_zombies_server(platform_window* window) {
}
}
-void draw_zombies_at_tile(platform_window* window, int x, int y) {
+void draw_zombies(platform_window* window) {
map_info info = get_map_info(window);
for (int i = 0; i < max_zombies; i++) {
zombie o = zombies[i];
if (!o.alive) continue;
- if ((int)o.position.x != x || (int)ceil(o.position.y) != y) continue;
+ //if ((int)o.position.x != x || (int)ceil(o.position.y) != y) continue;
+ OBJECT_RENDER_DEPTH((int)o.position.y);
box box = get_render_box_of_square(window, (vec3f){o.position.x, o.position.y, o.position.z}, o.size);
- render_quad_with_outline(box.tl_b, box.tr_b, box.bl_b, box.br_b);
- render_quad_with_outline(box.tl_u, box.tr_u, box.bl_u, box.br_u);
- render_quad_with_outline(box.tl_u, box.tl_b, box.bl_u, box.bl_b);
- render_quad_with_outline(box.bl_u, box.br_u, box.bl_b, box.br_b);
+ render_quad_with_outline(box.tl_b, box.tr_b, box.bl_b, box.br_b, rgb(200,200,0));
+ render_quad_with_outline(box.tl_u, box.tr_u, box.bl_u, box.br_u, rgb(200,200,0));
+ render_quad_with_outline(box.tl_u, box.tl_b, box.bl_u, box.bl_b, rgb(200,200,0));
+ render_quad_with_outline(box.bl_u, box.br_u, box.bl_b, box.br_b, rgb(200,200,0));
if (global_state.server) draw_path_of_zombie(window, o);
}