From: Holger Schemel Date: Thu, 21 Jun 2018 05:19:03 +0000 (+0200) Subject: added explicit level number parameter to high-score handling functions X-Git-Tag: 4.1.1.0~107 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=e2260726;p=rocksndiamonds.git added explicit level number parameter to high-score handling functions --- diff --git a/src/game.c b/src/game.c index c6d3a862..ca13127d 100644 --- a/src/game.c +++ b/src/game.c @@ -1096,7 +1096,7 @@ void ContinueMoving(int, int); void Bang(int, int); void InitMovDir(int, int); void InitAmoebaNr(int, int); -int NewHiScore(void); +int NewHiScore(int); void TestIfGoodThingHitsBadThing(int, int, int); void TestIfBadThingHitsGoodThing(int, int, int); @@ -4695,11 +4695,11 @@ void GameEnd() level_nr < leveldir_current->last_level) raise_level = TRUE; /* advance to next level */ - if ((hi_pos = NewHiScore()) >= 0) + if ((hi_pos = NewHiScore(level_nr)) >= 0) { SetGameStatus(GAME_MODE_SCORES); - DrawHallOfFame(hi_pos); + DrawHallOfFame(level_nr, hi_pos); if (raise_level) { @@ -4721,7 +4721,7 @@ void GameEnd() } } -int NewHiScore() +int NewHiScore(int level_nr) { int k, l; int position = -1; diff --git a/src/screens.c b/src/screens.c index 9906b644..0198a8ee 100644 --- a/src/screens.c +++ b/src/screens.c @@ -2073,7 +2073,7 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) SetGameStatus(GAME_MODE_SCORES); - DrawHallOfFame(-1); + DrawHallOfFame(level_nr, -1); } else if (pos == MAIN_CONTROL_EDITOR) { @@ -4498,7 +4498,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 highlight_position) +void DrawHallOfFame(int level_nr, int highlight_position) { int fade_mask = REDRAW_FIELD; diff --git a/src/screens.h b/src/screens.h index f314fb3b..70b1701c 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); +void DrawHallOfFame(int, int); void RedrawSetupScreenAfterFullscreenToggle(); void RedrawSetupScreenAfterScreenRotation(int);