added option '--mytapes' to use private tapes for tape tests
authorHolger Schemel <info@artsoft.org>
Sun, 18 Dec 2016 12:43:16 +0000 (13:43 +0100)
committerHolger Schemel <info@artsoft.org>
Sun, 18 Dec 2016 12:43:16 +0000 (13:43 +0100)
src/libgame/misc.c
src/libgame/system.h
src/main.c
src/tape.c

index 3bc3299f2c70fcb5ad5427f2709021bdaa66d838..0ea2d07a977917ff66bd78ee235ab61e10e95031 100644 (file)
@@ -953,6 +953,7 @@ void GetOptions(int argc, char *argv[],
   options.execute_command = NULL;
   options.special_flags = NULL;
 
+  options.mytapes = FALSE;
   options.serveronly = FALSE;
   options.network = FALSE;
   options.verbose = FALSE;
@@ -1063,6 +1064,10 @@ void GetOptions(int argc, char *argv[],
       if (option_arg == next_option)
        options_left++;
     }
+    else if (strncmp(option, "-mytapes", option_len) == 0)
+    {
+      options.mytapes = TRUE;
+    }
     else if (strncmp(option, "-network", option_len) == 0)
     {
       options.network = TRUE;
index b6cea7b51ea2d38ed0d5fddae8174d9fa114521a..130db06da03f4eb9aa92e96388c2a72d4651406a 100644 (file)
@@ -779,6 +779,7 @@ struct OptionInfo
 
   char *special_flags;
 
+  boolean mytapes;
   boolean serveronly;
   boolean network;
   boolean verbose;
index c57461a567a5e30ee4c08e26f6adf21ad70dfb4e..141a00a305d9d3626316bc8044cb5286d81a6925 100644 (file)
@@ -5630,6 +5630,7 @@ static void print_usage()
        "  -g, --graphics DIRECTORY         alternative graphics DIRECTORY\n"
        "  -s, --sounds DIRECTORY           alternative sounds DIRECTORY\n"
        "  -m, --music DIRECTORY            alternative music DIRECTORY\n"
+       "      --mytapes                    use private tapes for tape tests\n"
        "  -n, --network                    network multiplayer game\n"
        "      --serveronly                 only start network server\n"
        "  -v, --verbose                    verbose mode\n"
index 540341fbc19d6bbb097909ac70ad57d168fbedc7..5a879d12ac0af05f624130ea6d5adf7ed8fe4917 100644 (file)
@@ -1122,7 +1122,10 @@ void AutoPlayTape()
     continue;
 #endif
 
-    LoadSolutionTape(level_nr);
+    if (options.mytapes)
+      LoadTape(level_nr);
+    else
+      LoadSolutionTape(level_nr);
 
     if (tape.no_valid_file)
     {