From: Holger Schemel Date: Thu, 24 Feb 2022 00:57:42 +0000 (+0100) Subject: moved code to draw content of score info screen to separate function X-Git-Tag: 4.3.2.0~102 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=5b98b5eb58d2cc225467acc205102e00f8fd8f62;p=rocksndiamonds.git moved code to draw content of score info screen to separate function --- diff --git a/src/screens.c b/src/screens.c index 8e95e47b..459fd001 100644 --- a/src/screens.c +++ b/src/screens.c @@ -5855,7 +5855,7 @@ void HandleHallOfFame(int mx, int my, int dx, int dy, int button) HandleChooseTree(mx, my, dx, dy, button, &score_entry_current); } -static void DrawScoreInfo(int entry_nr) +static void DrawScoreInfo_Content(int entry_nr) { struct ScoreEntry *entry = &scores.entry[entry_nr]; char *pos_text = getHallOfFameRankText(entry_nr); @@ -5875,12 +5875,6 @@ static void DrawScoreInfo(int entry_nr) int xstart1 = mSX - SX + 2 * xstep; int xstart2 = mSX - SX + 14 * xstep; - SetMainBackgroundImageIfDefined(IMG_BACKGROUND_SCOREINFO); - - UnmapAllGadgets(); - - FadeOut(REDRAW_FIELD); - ClearField(); drawChooseTreeHead(score_entries); @@ -5926,6 +5920,17 @@ static void DrawScoreInfo(int entry_nr) } DrawTextSCentered(ybottom, font_foot, "Press any key or button to go back"); +} + +static void DrawScoreInfo(int entry_nr) +{ + SetMainBackgroundImageIfDefined(IMG_BACKGROUND_SCOREINFO); + + UnmapAllGadgets(); + + FadeOut(REDRAW_FIELD); + + DrawScoreInfo_Content(entry_nr); FadeIn(REDRAW_FIELD); }