From cd4c45c4456c67590b012faeaeb73132bda4d4ed Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Thu, 17 Mar 2022 21:27:54 +0100 Subject: [PATCH] limited filling high score list with empty score entries to "top ten" list --- src/screens.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/screens.c b/src/screens.c index 3245e447..7d4a2282 100644 --- a/src/screens.c +++ b/src/screens.c @@ -5713,7 +5713,9 @@ void HandleChooseLevelNr(int mx, int my, int dx, int dy, int button) static void DrawHallOfFame_setScoreEntries(void) { - int num_visible_score_entries = NUM_MENU_ENTRIES_ON_SCREEN - 1; + int max_empty_entries = 10; // at least show "top ten" list, if empty + int max_visible_entries = NUM_MENU_ENTRIES_ON_SCREEN - 1; // w/o back link + int min_score_entries = MIN(max_empty_entries, max_visible_entries); int score_pos = (scores.last_added >= 0 ? scores.last_added : 0); int i; @@ -5729,7 +5731,7 @@ static void DrawHallOfFame_setScoreEntries(void) // do not add empty score entries if off-screen if (scores.entry[i].score == 0 && scores.entry[i].time == 0 && - i >= num_visible_score_entries) + i >= min_score_entries) break; TreeInfo *ti = newTreeInfo_setDefaults(TREE_TYPE_SCORE_ENTRY); -- 2.34.1