X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fgame.c;h=6e64d55c532278896e9ada1b2a4b39c4765a30bc;hp=41768a54c63e6b97aa0a661a9b522d475a25297f;hb=40aa8a64f516da6baf703b44d141b37c291553df;hpb=10464a20b3b871f7731f5ec6ad2faca814bf6c20 diff --git a/src/game.c b/src/game.c index 41768a54..6e64d55c 100644 --- a/src/game.c +++ b/src/game.c @@ -3305,17 +3305,18 @@ void InitGame() ExpireSoundLoops(TRUE); - FadeOut(fade_mask); + if (!level_editor_test_game) + FadeOut(fade_mask); /* needed if different viewport properties defined for playing */ ChangeViewportPropertiesIfNeeded(); ClearField(); - OpenDoor(GetDoorState() | DOOR_NO_DELAY | DOOR_FORCE_REDRAW); - DrawCompleteVideoDisplay(); + OpenDoor(GetDoorState() | DOOR_NO_DELAY | DOOR_FORCE_REDRAW); + InitGameEngine(); InitGameControlValues(); @@ -4227,6 +4228,7 @@ void InitGame() } game.restart_level = FALSE; + game.restart_game_message = NULL; if (level.game_engine_type == GAME_ENGINE_TYPE_MM) InitGameActions_MM(); @@ -4698,7 +4700,7 @@ void GameEnd() if (!global.use_envelope_request) CloseDoor(DOOR_CLOSE_1); - SaveTapeChecked(tape.level_nr); /* ask to save tape */ + SaveTapeChecked_LevelSolved(tape.level_nr); /* ask to save tape */ } /* if no tape is to be saved, close both doors simultaneously */ @@ -14958,6 +14960,22 @@ void RequestQuitGame(boolean ask_if_really_quit) "Do you really want to quit the game?"); } +void RequestRestartGame(char *message) +{ + game.restart_game_message = NULL; + + if (Request(message, REQ_ASK | REQ_STAY_CLOSED)) + { + StartGameActions(options.network, setup.autorecord, level.random_seed); + } + else + { + SetGameStatus(GAME_MODE_MAIN); + + DrawMainMenu(); + } +} + /* ------------------------------------------------------------------------- */ /* random generator functions */ @@ -15268,7 +15286,7 @@ void LoadEngineSnapshotValues() LoadEngineSnapshotValues_EM(); if (level.game_engine_type == GAME_ENGINE_TYPE_SP) LoadEngineSnapshotValues_SP(); - if (level.game_engine_type == GAME_ENGINE_TYPE_SP) + if (level.game_engine_type == GAME_ENGINE_TYPE_MM) LoadEngineSnapshotValues_MM(); }