fixed graphical bugs caused by commit f77bbb8f and 1b4dc759
authorHolger Schemel <info@artsoft.org>
Wed, 27 Feb 2019 21:35:32 +0000 (22:35 +0100)
committerHolger Schemel <info@artsoft.org>
Wed, 27 Feb 2019 21:35:32 +0000 (22:35 +0100)
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.

src/game.c
src/tools.c

index ad2f231f641f92cc86eb124e2e8a91c4eed6eede..f0d6aff1d4517c50d0b7aeff690535828c3514c9 100644 (file)
@@ -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();
index 47c4b4f8536a52c4a6d10a51bdcc95a6e62cb4a4..e33344dd6b23cd1a64bd06a2f84d4d8924836fc0 100644 (file)
@@ -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();