X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=593a8bac409ac4b4a1f45cf0fc957ffe0d49ec56;hb=884012f34f9f3c22bf75d1468e4ed57d7795a24b;hp=c257bb4062115b2e76886d7110076f4903198cf7;hpb=0868de4751d9e3d4b2f3185c52edb5569217d39a;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index c257bb40..593a8bac 100644 --- a/src/game.c +++ b/src/game.c @@ -3155,8 +3155,20 @@ void InitGame() if (!game.restart_level) CloseDoor(DOOR_CLOSE_1); + if (level_editor_test_game) + fading = fading_none; + else + fading = menu.destination; + +#if 1 + if (fading.anim_mode == ANIM_CROSSFADE) + FadeCrossSaveBackbuffer(); + else + FadeOut(REDRAW_FIELD); +#else if (do_fading) FadeOut(REDRAW_FIELD); +#endif /* !!! FIX THIS (START) !!! */ if (level.game_engine_type == GAME_ENGINE_TYPE_EM) @@ -3183,10 +3195,17 @@ void InitGame() } /* !!! FIX THIS (END) !!! */ +#if 1 + if (fading.anim_mode == ANIM_CROSSFADE) + FadeCross(redraw_mask); + else + FadeIn(redraw_mask); +#else if (do_fading) FadeIn(REDRAW_FIELD); BackToFront(); +#endif if (!game.restart_level) { @@ -3637,14 +3656,25 @@ void GameEnd() { game_status = GAME_MODE_MAIN; +#if 1 + DrawAndFadeInMainMenu(REDRAW_FIELD); +#else DrawMainMenu(); +#endif return; } if (!local_player->LevelSolved_SaveScore) { +#if 1 + if (fading.anim_mode == ANIM_CROSSFADE) + FadeCrossSaveBackbuffer(); + else + FadeOut(REDRAW_FIELD); +#else FadeOut(REDRAW_FIELD); +#endif game_status = GAME_MODE_MAIN; @@ -3676,7 +3706,14 @@ void GameEnd() } else { +#if 1 + if (fading.anim_mode == ANIM_CROSSFADE) + FadeCrossSaveBackbuffer(); + else + FadeOut(REDRAW_FIELD); +#else FadeOut(REDRAW_FIELD); +#endif game_status = GAME_MODE_MAIN; @@ -14093,13 +14130,32 @@ void RequestQuitGameExt(boolean skip_request, boolean quick_quit, char *message) { if (quick_quit) { +#if 1 + fading = fading_none; +#else + OpenDoor(DOOR_CLOSE_1); +#endif + game_status = GAME_MODE_MAIN; +#if 1 + DrawAndFadeInMainMenu(REDRAW_FIELD); +#else DrawMainMenu(); +#endif } else { +#if 0 +#if 1 + if (fading.anim_mode == ANIM_CROSSFADE) + FadeCrossSaveBackbuffer(); + else + FadeOut(REDRAW_FIELD); +#else FadeOut(REDRAW_FIELD); +#endif +#endif game_status = GAME_MODE_MAIN;