aboutsummaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-06-25 22:44:23 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-06-25 22:44:23 +0100
commit6bd6757583510ba3edf75451309e4b8ec8c9b0f1 (patch)
treee63f401238e4118ff6d1670ea86508f0181c19ea /src/game.c
parent2d7fbc07acf0c5766d662d2629e72600b65f744b (diff)
downloadgold-mine-run-6bd6757583510ba3edf75451309e4b8ec8c9b0f1.tar.gz
gold-mine-run-6bd6757583510ba3edf75451309e4b8ec8c9b0f1.zip
Add entity system, add new enemy (snake)
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c6
1 files changed, 6 insertions, 0 deletions
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();