From 4c4ffc1b84ada5dc47f9d36e9154564b68ff7fed Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Tue, 11 Jul 2023 23:11:21 +0100 Subject: Add gol/silver keys and door logic --- src/effect.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/effect.c') diff --git a/src/effect.c b/src/effect.c index a2e58c2..e9ee55e 100644 --- a/src/effect.c +++ b/src/effect.c @@ -1,4 +1,6 @@ #include +#include +#include #include "vga.h" #include "entities.h" @@ -21,6 +23,24 @@ static const Rect frames[2 * 4] = { 0, 0, 144, 144 } }; +void effect_out_new(uint16_t x, uint16_t y) +{ + Entity *e = entities_new(); +#ifdef DEBUG + if (!e) + { + set_mode(3); + fprintf(stderr, "ERROR: run out of entities\n"); + exit(1); + } +#endif + + e->x = x; + e->y = y; + + effect_out_init(e); +} + void effect_out_init(Entity *e) { e->frames = (const Rect *)frames; -- cgit v1.2.3