added setup option to continue recording after replaying tape
authorHolger Schemel <info@artsoft.org>
Sat, 26 Nov 2022 10:09:29 +0000 (11:09 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 26 Nov 2022 10:09:29 +0000 (11:09 +0100)
src/files.c
src/libgame/system.h
src/screens.c
src/tape.c

index de5017197aa2e8c4bb9754ff628082f9b4811f53..cd275d560769fbbfbb5552fbbef7d14bec1765a6 100644 (file)
@@ -9458,6 +9458,10 @@ static struct TokenInfo global_setup_tokens[] =
     TYPE_SWITCH,
     &setup.autorecord,                         "automatic_tape_recording"
   },
+  {
+    TYPE_SWITCH,
+    &setup.autorecord_after_replay,            "autorecord_after_replay"
+  },
   {
     TYPE_SWITCH,
     &setup.auto_pause_on_start,                        "auto_pause_on_start"
@@ -10340,6 +10344,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si)
   si->engine_snapshot_memory = SNAPSHOT_MEMORY_DEFAULT;
   si->fade_screens = TRUE;
   si->autorecord = TRUE;
+  si->autorecord_after_replay = TRUE;
   si->auto_pause_on_start = FALSE;
   si->show_titlescreen = TRUE;
   si->quick_doors = FALSE;
index 79eeb0b4b26ffe581e5528d628b28bf0c07bb5db..3378be4fff2b389d20d213c9e5d6ee2e3e15eb67 100644 (file)
@@ -1511,6 +1511,7 @@ struct SetupInfo
   int engine_snapshot_memory;
   boolean fade_screens;
   boolean autorecord;
+  boolean autorecord_after_replay;
   boolean auto_pause_on_start;
   boolean show_titlescreen;
   boolean quick_doors;
index 567ffa8b59a549c3ffd890dff04857e22aa3f5a8..dbbdf0c9d6344e4795ab7032af987ccda8605871 100644 (file)
@@ -7206,7 +7206,8 @@ static struct TokenInfo setup_info_game[] =
   { TYPE_YES_NO,       &setup.ask_on_game_over, "Ask on Game Over:"    },
   { 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.autorecord,      "Auto-Record When Playing:" },
+  { TYPE_SWITCH,       &setup.autorecord_after_replay, "Auto-Record After Replay:" },
   { TYPE_SWITCH,       &setup.auto_pause_on_start, "Start Game in Pause Mode:" },
   { TYPE_ENTER_LIST,   execSetupChooseGameSpeed, "Game Speed:"         },
   { TYPE_STRING,       &game_speed_text,       ""                      },
index eb825c8d98c49924fa69aa95e806bd63c20baa92..4efba84a76f7c05072ca49121845334cc744b940 100644 (file)
@@ -994,6 +994,9 @@ byte *TapePlayAction(void)
       TapeStopWarpForward();
       TapeTogglePause(TAPE_TOGGLE_MANUAL);
 
+      if (setup.autorecord_after_replay)
+       TapeAppendRecording();
+
       return NULL;
     }
   }
@@ -1004,6 +1007,9 @@ byte *TapePlayAction(void)
     {
       TapeStopWarpForward();
       TapeTogglePause(TAPE_TOGGLE_MANUAL);
+
+      if (setup.autorecord_after_replay)
+       TapeAppendRecording();
     }
     else
     {