aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-07-05 07:36:20 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-07-05 07:36:20 +0100
commit38a4f4e09cfba4c59e99a72fccc59ac36bb8d5ae (patch)
treef3804cf9aa220948a7ba6ee61150124f5983fedb
parent8f4aa3eea74d9d7b78c3a38622c7964a45767109 (diff)
downloadgold-mine-run-38a4f4e09cfba4c59e99a72fccc59ac36bb8d5ae.tar.gz
gold-mine-run-38a4f4e09cfba4c59e99a72fccc59ac36bb8d5ae.zip
Fix time bonus calculation
It was overflowing and showint 255 as time.
-rw-r--r--src/game.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game.c b/src/game.c
index 101a053..ba6ee85 100644
--- a/src/game.c
+++ b/src/game.c
@@ -130,9 +130,10 @@ static void run_stageclear()
/* wait some time */
wait_frames(96);
- while (time--)
+ while (time)
{
add_score(25);
+ time--;
hud |= HUD_TIME;
sound_queue_efx(EFX_GOLD);
hud_render();