From: Holger Schemel Date: Sun, 20 Mar 2016 15:01:31 +0000 (+0100) Subject: fixed order of some drawing operations to be related to correct screen X-Git-Tag: 4.0.0.0-rc1~42 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=fd054e61ac10b62524efcac1e8438e432cded86a;p=rocksndiamonds.git fixed order of some drawing operations to be related to correct screen --- diff --git a/src/editor.c b/src/editor.c index 4705b53c..212e1f10 100644 --- a/src/editor.c +++ b/src/editor.c @@ -7625,8 +7625,6 @@ void DrawLevelEd() { int fade_mask = REDRAW_FIELD; - CloseDoor(DOOR_CLOSE_ALL); - /* needed if different viewport properties defined for editor */ ChangeViewportPropertiesIfNeeded(); diff --git a/src/game.c b/src/game.c index 2aa3b345..87af3c97 100644 --- a/src/game.c +++ b/src/game.c @@ -3097,11 +3097,11 @@ void InitGame() // required here to update video display before fading (FIX THIS) DrawMaskedBorder(REDRAW_DOOR_2); - SetGameStatus(GAME_MODE_PLAYING); - if (!game.restart_level) CloseDoor(DOOR_CLOSE_1); + SetGameStatus(GAME_MODE_PLAYING); + /* needed if different viewport properties defined for playing */ ChangeViewportPropertiesIfNeeded(); @@ -3115,10 +3115,10 @@ void InitGame() FadeOut(fade_mask); - OpenDoor(GetDoorState() | DOOR_NO_DELAY | DOOR_FORCE_REDRAW); - ClearField(); + OpenDoor(GetDoorState() | DOOR_NO_DELAY | DOOR_FORCE_REDRAW); + DrawCompleteVideoDisplay(); InitGameEngine(); diff --git a/src/screens.c b/src/screens.c index 7181f750..5752a49d 100644 --- a/src/screens.c +++ b/src/screens.c @@ -1394,6 +1394,8 @@ void DrawMainMenu() /* needed if last screen was the playing screen, invoked from level editor */ if (level_editor_test_game) { + CloseDoor(DOOR_CLOSE_ALL); + SetGameStatus(GAME_MODE_EDITOR); DrawLevelEd(); @@ -2155,8 +2157,6 @@ static void DrawInfoScreen_Main() FreeScreenGadgets(); CreateScreenGadgets(); - CloseDoor(DOOR_CLOSE_2); - /* (needed after displaying title screens which disable auto repeat) */ KeyboardAutoRepeatOn(); @@ -2166,10 +2166,10 @@ static void DrawInfoScreen_Main() ChangeViewportPropertiesIfNeeded(); - OpenDoor(GetDoorState() | DOOR_NO_DELAY | DOOR_FORCE_REDRAW); - ClearField(); + OpenDoor(GetDoorState() | DOOR_NO_DELAY | DOOR_FORCE_REDRAW); + DrawTextSCentered(mSY - SY + 16, FONT_TITLE_1, "Info Screen"); info_info = info_info_main; @@ -2191,11 +2191,6 @@ static void DrawInfoScreen_Main() PlayMenuSound(); PlayMenuMusic(); -#if 1 - // needed after returning from title screens with different window size - OpenDoor(GetDoorState() | DOOR_NO_DELAY | DOOR_FORCE_REDRAW); -#endif - DrawMaskedBorder(fade_mask); FadeIn(fade_mask); @@ -3667,14 +3662,12 @@ static void DrawChooseTree(TreeInfo **ti_ptr) FreeScreenGadgets(); CreateScreenGadgets(); - CloseDoor(DOOR_CLOSE_2); - FadeOut(fade_mask); - OpenDoor(GetDoorState() | DOOR_NO_DELAY | DOOR_FORCE_REDRAW); - ClearField(); + OpenDoor(GetDoorState() | DOOR_NO_DELAY | DOOR_FORCE_REDRAW); + HandleChooseTree(0, 0, 0, 0, MB_MENU_INITIALIZE, ti_ptr); MapScreenTreeGadgets(*ti_ptr); @@ -4153,9 +4146,6 @@ void DrawHallOfFame(int highlight_position) { int fade_mask = REDRAW_FIELD; - /* required before door position may be changed in next step */ - CloseDoor(DOOR_CLOSE_ALL); - /* needed if different viewport properties defined for scores */ ChangeViewportPropertiesIfNeeded(); @@ -5780,17 +5770,15 @@ static void DrawSetupScreen_Generic() FreeScreenGadgets(); CreateScreenGadgets(); - CloseDoor(DOOR_CLOSE_2); - if (redraw_mask & REDRAW_ALL) redraw_all = TRUE; FadeOut(fade_mask); - OpenDoor(GetDoorState() | DOOR_NO_DELAY | DOOR_FORCE_REDRAW); - ClearField(); + OpenDoor(GetDoorState() | DOOR_NO_DELAY | DOOR_FORCE_REDRAW); + if (setup_mode == SETUP_MODE_MAIN) { setup_info = setup_info_main;