X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=f8606638343c4427fddb0d3f93790a1d4a4e48e0;hb=f459d13abcc4b9966d23ff233201d77039b73777;hp=464cdc0ba6d767e6b7d0c82d7f50fc7e7b416eb2;hpb=ddc4128c361f5ce89f431295ddc30879fb5422eb;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index 464cdc0b..f8606638 100644 --- a/src/game.c +++ b/src/game.c @@ -4227,6 +4227,7 @@ void InitGame() } game.restart_level = FALSE; + game.restart_game_message = NULL; if (level.game_engine_type == GAME_ENGINE_TYPE_MM) InitGameActions_MM(); @@ -14958,6 +14959,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 */