From 6bd6757583510ba3edf75451309e4b8ec8c9b0f1 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sun, 25 Jun 2023 22:44:23 +0100 Subject: Add entity system, add new enemy (snake) --- src/game.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/game.c') diff --git a/src/game.c b/src/game.c index c489417..001ce21 100644 --- a/src/game.c +++ b/src/game.c @@ -7,6 +7,7 @@ #include "map.h" #include "data.h" #include "timer.h" +#include "entities.h" #include "player.h" @@ -114,6 +115,7 @@ void run_game() map_init(binary_stage_start); map_render(); + entities_draw(); player_draw(); timer_start(GAME_TIME_MAX, &clock_updated); @@ -129,10 +131,14 @@ void run_game() if (hud) hud_render(); + /* erase first the last we draw */ player_erase(); + entities_erase(); player_update(); + entities_update(); + entities_draw(); player_draw(); wait_vsync(); -- cgit v1.2.3