added setup option to start game in pause mode
authorHolger Schemel <info@artsoft.org>
Sun, 13 Feb 2022 10:32:39 +0000 (11:32 +0100)
committerHolger Schemel <info@artsoft.org>
Sun, 13 Feb 2022 10:32:39 +0000 (11:32 +0100)
src/files.c
src/game.c
src/libgame/system.h
src/screens.c

index 7bbcac77d755ddbc4e2e9d8446bbb020d5d03ee3..8656cecc76e46dc61ba0ccabf50364bc65c6a13d 100644 (file)
@@ -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;
index b2bb58f8f71618fd5901916f31a2df10fad3f316..1c493508a290286f096830ed58ae3de7ec219057 100644 (file)
@@ -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();
index ad89c320722276631d38f4d766c5ef5e09c04812..b9e5409a08da6f5fcdfe602d39f16d7daa97ddc6 100644 (file)
@@ -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;
index 23b8b0d1753d7389f109722bddc1d6558bc69bac..2c692c16207b175499c3110752fd3c3d74071245 100644 (file)
@@ -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:" },