From 960545869c00aa3c8fc0068282f52ce55f4603c1 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 18 Dec 2016 13:43:16 +0100 Subject: [PATCH] added option '--mytapes' to use private tapes for tape tests --- src/libgame/misc.c | 5 +++++ src/libgame/system.h | 1 + src/main.c | 1 + src/tape.c | 5 ++++- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 3bc3299f..0ea2d07a 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -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; diff --git a/src/libgame/system.h b/src/libgame/system.h index b6cea7b5..130db06d 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -779,6 +779,7 @@ struct OptionInfo char *special_flags; + boolean mytapes; boolean serveronly; boolean network; boolean verbose; diff --git a/src/main.c b/src/main.c index c57461a5..141a00a3 100644 --- a/src/main.c +++ b/src/main.c @@ -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" diff --git a/src/tape.c b/src/tape.c index 540341fb..5a879d12 100644 --- a/src/tape.c +++ b/src/tape.c @@ -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) { -- 2.34.1