X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fscreens.c;h=4f7d783a681046a972839fda35ef9926e5fbfa8e;hb=7eb9afbda870a52bfef66b5d1750696a6add61c4;hp=1f01c599d9a037ff0eb42a4d282680b2ad5e663d;hpb=4c4b479df75864d1af0b7d630e5eb97c16a03faa;p=rocksndiamonds.git diff --git a/src/screens.c b/src/screens.c index 1f01c599..4f7d783a 100644 --- a/src/screens.c +++ b/src/screens.c @@ -1490,7 +1490,7 @@ void DrawMainMenu() OpenDoor(GetDoorState() | DOOR_NO_DELAY | DOOR_FORCE_REDRAW); - DrawMaskedBorder(REDRAW_ALL); + DrawMaskedBorder(fade_mask); FadeIn(fade_mask); FadeSetEnterMenu(); @@ -1827,6 +1827,10 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) } else if (pos == MAIN_CONTROL_LEVEL_NUMBER && !button) { + StopAnimation(); + + CloseDoor(DOOR_CLOSE_2); + game_status = GAME_MODE_LEVELNR; ChangeViewportPropertiesIfNeeded(); @@ -1861,6 +1865,10 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) { if (leveldir_first) { + StopAnimation(); + + CloseDoor(DOOR_CLOSE_2); + game_status = GAME_MODE_LEVELS; SaveLevelSetup_LastSeries(); @@ -1876,6 +1884,10 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) } else if (pos == MAIN_CONTROL_SCORES) { + StopAnimation(); + + CloseDoor(DOOR_CLOSE_2); + game_status = GAME_MODE_SCORES; DrawHallOfFame(-1); @@ -1886,6 +1898,8 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) !strEqual(setup.player_name, "Artsoft")) Request("This level is read only!", REQ_CONFIRM); + StopAnimation(); + CloseDoor(DOOR_CLOSE_2); game_status = GAME_MODE_EDITOR; @@ -1896,6 +1910,10 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) } else if (pos == MAIN_CONTROL_INFO) { + StopAnimation(); + + CloseDoor(DOOR_CLOSE_2); + game_status = GAME_MODE_INFO; info_mode = INFO_MODE_MAIN; @@ -1905,10 +1923,16 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) } else if (pos == MAIN_CONTROL_GAME) { + StopAnimation(); + StartGameActions(options.network, setup.autorecord, level.random_seed); } else if (pos == MAIN_CONTROL_SETUP) { + StopAnimation(); + + CloseDoor(DOOR_CLOSE_2); + game_status = GAME_MODE_SETUP; setup_mode = SETUP_MODE_MAIN; @@ -3641,6 +3665,8 @@ static void DrawChooseTree(TreeInfo **ti_ptr) HandleChooseTree(0, 0, 0, 0, MB_MENU_INITIALIZE, ti_ptr); MapScreenTreeGadgets(*ti_ptr); + DrawMaskedBorder(fade_mask); + FadeIn(fade_mask); InitAnimation(); @@ -4148,6 +4174,8 @@ void DrawHallOfFame(int highlight_position) HandleHallOfFame(highlight_position, 0, 0, 0, MB_MENU_INITIALIZE); + DrawMaskedBorder(fade_mask); + FadeIn(fade_mask); } @@ -5832,6 +5860,8 @@ static void DrawSetupScreen_Generic() if (redraw_all) redraw_mask = fade_mask = REDRAW_ALL; + DrawMaskedBorder(fade_mask); + FadeIn(fade_mask); InitAnimation();