aboutsummaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-06-20 22:31:57 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-06-20 22:31:57 +0100
commitd489b6ef92ae9f61bbceb5f594026a51e71538f2 (patch)
treef0bb53c68f5f8bd6fc4e3df97a5016a8e58224cf /src/game.c
parent8ad4c1aa98144a1799f340a44c80a0e461ced683 (diff)
downloadgold-mine-run-d489b6ef92ae9f61bbceb5f594026a51e71538f2.tar.gz
gold-mine-run-d489b6ef92ae9f61bbceb5f594026a51e71538f2.zip
Add gold support
- added gold layer to the map - the player can collect gold - updates the score - TODO: end of stage
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game.c b/src/game.c
index b39b0ca..b80090a 100644
--- a/src/game.c
+++ b/src/game.c
@@ -24,7 +24,7 @@ static uint8_t stage;
static uint8_t gold;
static uint8_t time;
-void hud_render()
+static void hud_render()
{
char b[32];
@@ -106,3 +106,9 @@ void run_game()
blit_update();
}
}
+
+void add_score(uint8_t v)
+{
+ score += v;
+ hud |= HUD_SCORE;
+}