From f3c30a9012020e89684f10fbdcb618c16b7e80fb Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 6 Jan 2025 16:57:45 +0100 Subject: [PATCH] fixed errors with covering BD screen when not using BD engine --- src/game.c | 3 +-- src/tools.c | 9 +++++++-- src/tools.h | 2 ++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/game.c b/src/game.c index 196e7617..99ddce52 100644 --- a/src/game.c +++ b/src/game.c @@ -5052,8 +5052,7 @@ static boolean AdvanceToNextLevel(void) scores.next_level_nr = level_nr; // cover screen before loading next level (which may have different size and color) - if (game_bd.cover_screen) - CoverScreen_BD(); + CoverScreen(); LoadLevel(level_nr); diff --git a/src/tools.c b/src/tools.c index 51f3e11b..b1ae9055 100644 --- a/src/tools.c +++ b/src/tools.c @@ -999,6 +999,12 @@ static void SetScreenStates_AfterFadingOut(void) global.border_status = GAME_MODE_PLAYING; } +void CoverScreen(void) +{ + if (level.game_engine_type == GAME_ENGINE_TYPE_BD && game_bd.cover_screen) + CoverScreen_BD(); +} + void FadeIn(int fade_mask) { SetScreenStates_BeforeFadingIn(); @@ -1037,8 +1043,7 @@ void FadeOut(int fade_mask) BackToFront(); // when using BD game engine, cover playfield before fading out after a game - if (game_bd.cover_screen) - CoverScreen_BD(); + CoverScreen(); SetScreenStates_BeforeFadingOut(); diff --git a/src/tools.h b/src/tools.h index a960946c..6b318627 100644 --- a/src/tools.h +++ b/src/tools.h @@ -94,6 +94,8 @@ void BlitScreenToBitmap(Bitmap *); void BackToFront(void); void BackToFront_WithFrameDelay(unsigned int); +void CoverScreen(void); + void FadeIn(int); void FadeOut(int); void FadeSetEnterMenu(void); -- 2.34.1