From: Holger Schemel Date: Wed, 27 Feb 2019 21:35:32 +0000 (+0100) Subject: fixed graphical bugs caused by commit f77bbb8f and 1b4dc759 X-Git-Tag: 4.1.3.0~51 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=3ea7bc006da99f1b13d817285820023b30ce2e38;p=rocksndiamonds.git fixed graphical bugs caused by commit f77bbb8f and 1b4dc759 Each of these two commits exactly do the reverse of the other commit, both still resulting in graphical bugs (that the corresponding other commit fixes). This change should fix both problems, resulting in (a) playfield not flashing black when game started from level editor and (b) different global borders when playing from level editor being correctly drawn. --- diff --git a/src/game.c b/src/game.c index ad2f231f..f0d6aff1 100644 --- a/src/game.c +++ b/src/game.c @@ -3354,7 +3354,7 @@ void InitGame(void) SetGameStatus(GAME_MODE_PLAYING); if (level_editor_test_game) - FadeSkipNextFadeIn(); + FadeSkipNextFadeOut(); else FadeSetEnterScreen(); @@ -3365,8 +3365,10 @@ void InitGame(void) ExpireSoundLoops(TRUE); - if (!level_editor_test_game) - FadeOut(fade_mask); + FadeOut(fade_mask); + + if (level_editor_test_game) + FadeSkipNextFadeIn(); // needed if different viewport properties defined for playing ChangeViewportPropertiesIfNeeded(); diff --git a/src/tools.c b/src/tools.c index 47c4b4f8..e33344dd 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1064,7 +1064,8 @@ void FadeIn(int fade_mask) void FadeOut(int fade_mask) { // update screen if areas covered by "fade_mask" and "redraw_mask" differ - if (!equalRedrawMasks(fade_mask, redraw_mask)) + if (!equalRedrawMasks(fade_mask, redraw_mask) && + fade_type_skip != FADE_MODE_SKIP_FADE_OUT) BackToFront(); SetScreenStates_BeforeFadingOut();