From: Holger Schemel Date: Fri, 12 Oct 2018 22:51:51 +0000 (+0200) Subject: added setup option to ask to play again after game is over but not solved X-Git-Tag: 4.1.2.0~130 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=17c7213a32d3a0e4c84727937f2ed79028461798;p=rocksndiamonds.git added setup option to ask to play again after game is over but not solved --- diff --git a/src/files.c b/src/files.c index 605efc27..75e691c3 100644 --- a/src/files.c +++ b/src/files.c @@ -8365,6 +8365,7 @@ enum SETUP_TOKEN_VSYNC_MODE, SETUP_TOKEN_ASK_ON_ESCAPE, SETUP_TOKEN_ASK_ON_ESCAPE_EDITOR, + SETUP_TOKEN_ASK_ON_GAME_OVER, SETUP_TOKEN_QUICK_SWITCH, SETUP_TOKEN_INPUT_ON_FOCUS, SETUP_TOKEN_PREFER_AGA_GRAPHICS, @@ -8609,6 +8610,7 @@ static struct TokenInfo global_setup_tokens[] = { TYPE_STRING, &si.vsync_mode, "vsync_mode" }, { TYPE_SWITCH, &si.ask_on_escape, "ask_on_escape" }, { TYPE_SWITCH, &si.ask_on_escape_editor, "ask_on_escape_editor" }, + { TYPE_SWITCH, &si.ask_on_game_over, "ask_on_game_over" }, { TYPE_SWITCH, &si.quick_switch, "quick_player_switch" }, { TYPE_SWITCH, &si.input_on_focus, "input_on_focus" }, { TYPE_SWITCH, &si.prefer_aga_graphics, "prefer_aga_graphics" }, @@ -8832,6 +8834,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->vsync_mode = getStringCopy(STR_VSYNC_MODE_DEFAULT); si->ask_on_escape = TRUE; si->ask_on_escape_editor = TRUE; + si->ask_on_game_over = TRUE; si->quick_switch = FALSE; si->input_on_focus = FALSE; si->prefer_aga_graphics = TRUE; diff --git a/src/libgame/system.h b/src/libgame/system.h index 66ff7805..711b2273 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1288,6 +1288,7 @@ struct SetupInfo char *vsync_mode; boolean ask_on_escape; boolean ask_on_escape_editor; + boolean ask_on_game_over; boolean quick_switch; boolean input_on_focus; boolean prefer_aga_graphics; diff --git a/src/screens.c b/src/screens.c index 1a40ae7c..3c12d6b5 100644 --- a/src/screens.c +++ b/src/screens.c @@ -6164,6 +6164,7 @@ static struct TokenInfo setup_info_game[] = { TYPE_SWITCH, &setup.increment_levels,"Increment Solved Levels:" }, { TYPE_SWITCH, &setup.auto_play_next_level,"Auto-play Next Level:" }, { TYPE_SWITCH, &setup.skip_scores_after_game,"Skip Scores After Game:" }, + { TYPE_YES_NO, &setup.ask_on_game_over, "Ask on Game Over:" }, { TYPE_SWITCH, &setup.autorecord, "Auto-Record Tapes:" }, { TYPE_ENTER_LIST, execSetupChooseGameSpeed, "Game Speed:" }, { TYPE_STRING, &game_speed_text, "" }, @@ -8211,7 +8212,8 @@ void HandleSetupScreen(int mx, int my, int dx, int dy, int button) void HandleGameActions(void) { - CheckGameOver(); + if (setup.ask_on_game_over) + CheckGameOver(); if (game.restart_game_message != NULL) {