From d489b6ef92ae9f61bbceb5f594026a51e71538f2 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Tue, 20 Jun 2023 22:31:57 +0100 Subject: Add gold support - added gold layer to the map - the player can collect gold - updates the score - TODO: end of stage --- src/game.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/game.c') 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; +} -- cgit v1.2.3