From: Holger Schemel Date: Sat, 1 May 2021 14:57:26 +0000 (+0200) Subject: removed function parameter only used for storing copy of global variable X-Git-Tag: 4.3.0.0~172 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=9842447719201593c7fdbd50cbb8ee48d370cc59;p=rocksndiamonds.git removed function parameter only used for storing copy of global variable --- diff --git a/src/game.c b/src/game.c index 7ce53c5b..f783c164 100644 --- a/src/game.c +++ b/src/game.c @@ -5025,7 +5025,7 @@ void GameEnd(void) { SetGameStatus(GAME_MODE_SCORES); - DrawHallOfFame(last_level_nr, scores.last_added); + DrawHallOfFame(last_level_nr); } else if (setup.auto_play_next_level && setup.increment_levels && last_level_nr < leveldir_current->last_level && diff --git a/src/screens.c b/src/screens.c index fb3aabc2..d257060f 100644 --- a/src/screens.c +++ b/src/screens.c @@ -2172,7 +2172,7 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) SetGameStatus(GAME_MODE_SCORES); - DrawHallOfFame(level_nr, -1); + DrawHallOfFame(level_nr); } else if (pos == MAIN_CONTROL_EDITOR) { @@ -5029,7 +5029,7 @@ void HandleChooseLevelNr(int mx, int my, int dx, int dy, int button) HandleChooseTree(mx, my, dx, dy, button, &level_number_current); } -void DrawHallOfFame(int level_nr, int highlight_position) +void DrawHallOfFame(int level_nr) { int fade_mask = REDRAW_FIELD; @@ -5046,17 +5046,13 @@ void DrawHallOfFame(int level_nr, int highlight_position) SetDrawDeactivationMask(REDRAW_NONE); SetDrawBackgroundMask(REDRAW_FIELD); - if (highlight_position < 0) + if (scores.last_added < 0) LoadScore(level_nr); else SetAnimStatus(GAME_MODE_PSEUDO_SCORESNEW); LoadServerScore(level_nr); - // correct highlight position after adding server scores - if (highlight_position >= 0) - highlight_position = scores.last_added; - FadeSetEnterScreen(); FadeOut(fade_mask); @@ -5068,7 +5064,7 @@ void DrawHallOfFame(int level_nr, int highlight_position) OpenDoor(GetDoorState() | DOOR_NO_DELAY | DOOR_FORCE_REDRAW); - HandleHallOfFame(level_nr, highlight_position, 0, 0, MB_MENU_INITIALIZE); + HandleHallOfFame(level_nr, scores.last_added, 0, 0, MB_MENU_INITIALIZE); DrawMaskedBorder(fade_mask); diff --git a/src/screens.h b/src/screens.h index d79745df..7bcf88b2 100644 --- a/src/screens.h +++ b/src/screens.h @@ -22,7 +22,7 @@ void DrawMainMenuExt(int); void DrawAndFadeInMainMenu(int); void DrawMainMenu(void); -void DrawHallOfFame(int, int); +void DrawHallOfFame(int); void DrawScreenAfterAddingSet(char *, int); void RedrawSetupScreenAfterFullscreenToggle(void);