From 6c428adb50fdc6b98a93cb1fe66a0a70e7596997 Mon Sep 17 00:00:00 2001 From: Jason Bou-Samra <154414066+bou-samra@users.noreply.github.com> Date: Thu, 31 Oct 2024 18:58:32 +1100 Subject: [PATCH] Update hiscore.c --- src/hiscore.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/hiscore.c b/src/hiscore.c index 9fa7220..6fd6c35 100644 --- a/src/hiscore.c +++ b/src/hiscore.c @@ -16,9 +16,9 @@ SDL_Rect cursor_last = {128, 146, 7, 5}; // last cursor position SDL_Rect fnt = {128, 146, 7, 5}; // Name entry cursor char pen1 = 0xff; -int score; // current score -char level_r = 0x1E; // game level (remaining) -char level_c = 0x00; // game level (current) +int score = 0x00; // current score +char level_r = 0x00; // game level (remaining) +char level_c = 0x01; // game level (current) int total = 0x00; // smashed tiles int total_c = 0x00; // total count @@ -36,6 +36,7 @@ int Ren_restart(void) { Ren_line(gameo, gameol[z][0], gameol[z][1], z * 9, 9, 1); } SDL_RenderPresent(sr); + check_key(); return 0; } @@ -171,16 +172,14 @@ int end_game(void) { if (game_end == 1) { // restart Ren_restart(); // Ren_restart(); - check_key(); } else if (game_end == 2) { // game over if (score < hscores1[7]) { Ren_restart(); // if score less then lowest on list, no name entry - check_key(); } else { Ren_gameover(); insert_score(score); // else display name entry dialog } } - reset(); +// reset(); return 0; }