From 49379fe29f1e4a1ed19ada85db4c37909a611142 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Tue, 4 Jul 2023 23:19:21 +0100 Subject: Warp all the entities out Used by the stage clear code. --- src/entities.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/entities.c') diff --git a/src/entities.c b/src/entities.c index be976ea..df8fb4e 100644 --- a/src/entities.c +++ b/src/entities.c @@ -4,9 +4,10 @@ #include "vga.h" #include "map.h" #include "data.h" - #include "entities.h" +#include "effect.h" + #define MAX_ENTITY 32 static Entity entities[MAX_ENTITY]; @@ -70,3 +71,12 @@ void entities_draw() blitrc(binary_sprites_start, &e->frames[e->dir * 4 + e->frame], &dst); } } + +void entities_warp_out_all() +{ + Entity *e = entities; + + for (uint8_t i = 0; i < last; i++, e++) + if (e->used) + effect_out_init(e); +} -- cgit v1.2.3