From: Holger Schemel Date: Tue, 9 Jun 2015 22:03:04 +0000 (+0200) Subject: small cleanup of screen fading code X-Git-Tag: 4.0.0.0-rc1~176 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b42cb98ebc3215ce864e9dd19371b48afff4c2fd;p=rocksndiamonds.git small cleanup of screen fading code --- diff --git a/src/editor.c b/src/editor.c index 9f8182d6..257325a3 100644 --- a/src/editor.c +++ b/src/editor.c @@ -7620,33 +7620,15 @@ void DrawLevelEd() CloseDoor(DOOR_CLOSE_ALL); -#if 1 /* needed if different viewport properties defined for editor */ ChangeViewportPropertiesIfNeeded(); -#endif if (CheckIfRedrawGlobalBorderIsNeeded()) fade_mask = REDRAW_ALL; -#if 0 - printf("::: %d\n", (fade_mask == REDRAW_ALL ? 1 : 0)); -#endif - FadeOut(fade_mask); -#if 0 - /* needed after playing if editor playfield area has different size */ - ClearRectangle(drawto, REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE); -#endif - -#if 0 - /* needed if different viewport properties defined for editor */ - ChangeViewportPropertiesIfNeeded(); -#endif - -#if 1 ClearField(); -#endif InitZoomLevelSettings(); diff --git a/src/game.c b/src/game.c index 73505d24..ae934676 100644 --- a/src/game.c +++ b/src/game.c @@ -3098,10 +3098,8 @@ void InitGame() if (!game.restart_level) CloseDoor(DOOR_CLOSE_1); -#if 1 /* needed if different viewport properties defined for playing */ ChangeViewportPropertiesIfNeeded(); -#endif if (level_editor_test_game) FadeSkipNextFadeIn(); @@ -3111,20 +3109,9 @@ void InitGame() if (CheckIfRedrawGlobalBorderIsNeeded()) fade_mask = REDRAW_ALL; -#if 0 - printf("::: %d\n", (fade_mask == REDRAW_ALL ? 1 : 0)); -#endif - FadeOut(fade_mask); -#if 0 - /* needed if different viewport properties defined for playing */ - ChangeViewportPropertiesIfNeeded(); -#endif - -#if 1 ClearField(); -#endif DrawCompleteVideoDisplay(); diff --git a/src/screens.c b/src/screens.c index 83e508ea..aa8813c7 100644 --- a/src/screens.c +++ b/src/screens.c @@ -1416,10 +1416,8 @@ void DrawMainMenu() /* needed if last screen (level choice) changed graphics, sounds or music */ ReloadCustomArtwork(0); -#if 1 /* needed if different viewport properties defined for menues */ ChangeViewportPropertiesIfNeeded(); -#endif if (redraw_mask & REDRAW_ALL) fade_mask = REDRAW_ALL; @@ -1429,11 +1427,6 @@ void DrawMainMenu() FadeOut(fade_mask); -#if 0 - /* needed if different viewport properties defined for menues */ - ChangeViewportPropertiesIfNeeded(); -#endif - /* needed if last screen was the editor screen */ UndrawSpecialEditorDoor(); @@ -1461,7 +1454,7 @@ void DrawMainMenu() SetMainBackgroundImage(IMG_BACKGROUND_MAIN); -#if 1 +#if 0 if (fade_mask == REDRAW_ALL) RedrawGlobalBorder(); #endif @@ -1498,11 +1491,6 @@ void DrawMainMenu() DrawMaskedBorder(REDRAW_ALL); -#if 0 - if (redraw_mask & REDRAW_ALL) - fade_mask = REDRAW_ALL; -#endif - FadeIn(fade_mask); FadeSetEnterMenu();