From: Holger Schemel Date: Sun, 13 Feb 2022 10:32:39 +0000 (+0100) Subject: added setup option to start game in pause mode X-Git-Tag: 4.3.2.0~127 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=9aa50c4b6c5510f61585229efadcd619954dbbfe;p=rocksndiamonds.git added setup option to start game in pause mode --- diff --git a/src/files.c b/src/files.c index 7bbcac77..8656cecc 100644 --- a/src/files.c +++ b/src/files.c @@ -9976,6 +9976,10 @@ static struct TokenInfo global_setup_tokens[] = TYPE_SWITCH, &setup.autorecord, "automatic_tape_recording" }, + { + TYPE_SWITCH, + &setup.auto_pause_on_start, "auto_pause_on_start" + }, { TYPE_SWITCH, &setup.show_titlescreen, "show_titlescreen" @@ -10794,6 +10798,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->engine_snapshot_memory = SNAPSHOT_MEMORY_DEFAULT; si->fade_screens = TRUE; si->autorecord = TRUE; + si->auto_pause_on_start = FALSE; si->show_titlescreen = TRUE; si->quick_doors = FALSE; si->team_mode = FALSE; diff --git a/src/game.c b/src/game.c index b2bb58f8..1c493508 100644 --- a/src/game.c +++ b/src/game.c @@ -11771,6 +11771,9 @@ void StartGameActions(boolean init_network_game, boolean record_tape, if (record_tape) TapeStartRecording(new_random_seed); + if (setup.auto_pause_on_start && !tape.pausing) + TapeTogglePause(TAPE_TOGGLE_MANUAL); + if (init_network_game) { SendToServer_LevelFile(); diff --git a/src/libgame/system.h b/src/libgame/system.h index ad89c320..b9e5409a 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1472,6 +1472,7 @@ struct SetupInfo int engine_snapshot_memory; boolean fade_screens; boolean autorecord; + boolean auto_pause_on_start; boolean show_titlescreen; boolean quick_doors; boolean team_mode; diff --git a/src/screens.c b/src/screens.c index 23b8b0d1..2c692c16 100644 --- a/src/screens.c +++ b/src/screens.c @@ -7311,6 +7311,7 @@ static struct TokenInfo setup_info_game[] = { TYPE_YES_NO, &setup.ask_on_quit_game, "Ask on Quit Game:" }, { TYPE_YES_NO, &setup.ask_on_quit_program, "Ask on Quit Program:" }, { TYPE_SWITCH, &setup.autorecord, "Auto-Record Tapes:" }, + { TYPE_SWITCH, &setup.auto_pause_on_start, "Start Game in Pause Mode:" }, { TYPE_ENTER_LIST, execSetupChooseGameSpeed, "Game Speed:" }, { TYPE_STRING, &game_speed_text, "" }, { TYPE_SWITCH, &setup.game_speed_extended, "Game Speed Extended List:" },