}
game.restart_level = FALSE;
+ game.restart_game_message = NULL;
if (level.game_engine_type == GAME_ENGINE_TYPE_MM)
InitGameActions_MM();
"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 */
/* values for special game initialization control */
boolean restart_level;
+ /* trigger message to ask for restarting the game */
+ char *restart_game_message;
+
/* values for special game control */
int centered_player_nr;
int centered_player_nr_next;
void RequestQuitGameExt(boolean, boolean, char *);
void RequestQuitGame(boolean);
+void RequestRestartGame(char *);
unsigned int InitEngineRandom_RND(int);
unsigned int RND(int);
else if (IS_MCDUFFIN(Store[x][y]))
{
Store[x][y] = EL_EMPTY;
+
+ game.restart_game_message = "Bomb killed Mc Duffin ! Play it again ?";
}
Feld[x][y] = Store[x][y];
SetTileCursorActive(FALSE);
+ game.restart_game_message = "Out of magic energy ! Play it again ?";
+
#if 0
if (Request("Out of magic energy ! Play it again ?",
REQ_ASK | REQ_STAY_CLOSED))
SetTileCursorActive(FALSE);
+ game.restart_game_message = "Magic spell hit Mc Duffin ! Play it again ?";
+
#if 0
if (Request("Magic spell hit Mc Duffin ! Play it again ?",
REQ_ASK | REQ_STAY_CLOSED))
static void InitGameInfo()
{
game.restart_level = FALSE;
+ game.restart_game_message = NULL;
}
static void InitPlayerInfo()
void HandleGameActions()
{
+ if (game.restart_game_message != NULL)
+ RequestRestartGame(game.restart_game_message);
+
if (game_status != GAME_MODE_PLAYING)
return;