From: Holger Schemel Date: Thu, 17 Mar 2022 20:27:54 +0000 (+0100) Subject: limited filling high score list with empty score entries to "top ten" list X-Git-Tag: 4.3.2.0~69 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=cd4c45c4456c67590b012faeaeb73132bda4d4ed limited filling high score list with empty score entries to "top ten" list --- 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);