projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
27fd44d
)
added filling visible high score list with empty score entries, if needed
author
Holger Schemel
<info@artsoft.org>
Wed, 16 Mar 2022 16:22:43 +0000
(17:22 +0100)
committer
Holger Schemel
<info@artsoft.org>
Wed, 16 Mar 2022 16:22:43 +0000
(17:22 +0100)
src/screens.c
patch
|
blob
|
history
diff --git
a/src/screens.c
b/src/screens.c
index 8b70372f58931af42d77a303e8f2a071502b6fed..d208c3a464723bd99a245cfb273c156aa8f18a91 100644
(file)
--- a/
src/screens.c
+++ b/
src/screens.c
@@
-5713,6
+5713,7
@@
void HandleChooseLevelNr(int mx, int my, int dx, int dy, int button)
static void DrawHallOfFame_setScoreEntries(void)
{
static void DrawHallOfFame_setScoreEntries(void)
{
+ int num_visible_score_entries = NUM_MENU_ENTRIES_ON_SCREEN - 1;
int score_pos = (scores.last_added >= 0 ? scores.last_added : 0);
int i;
int score_pos = (scores.last_added >= 0 ? scores.last_added : 0);
int i;
@@
-5725,9
+5726,10
@@
static void DrawHallOfFame_setScoreEntries(void)
for (i = 0; i < MAX_SCORE_ENTRIES; i++)
{
for (i = 0; i < MAX_SCORE_ENTRIES; i++)
{
- // do not add empty score entries
+ // do not add empty score entries
if off-screen
if (scores.entry[i].score == 0 &&
if (scores.entry[i].score == 0 &&
- scores.entry[i].time == 0)
+ scores.entry[i].time == 0 &&
+ i >= num_visible_score_entries)
break;
TreeInfo *ti = newTreeInfo_setDefaults(TREE_TYPE_SCORE_ENTRY);
break;
TreeInfo *ti = newTreeInfo_setDefaults(TREE_TYPE_SCORE_ENTRY);