From: Holger Schemel Date: Thu, 16 Sep 2021 14:49:42 +0000 (+0200) Subject: added command line options for level identifier/nr for tape tests/uploads X-Git-Tag: 4.3.0.0~56 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b65cb6a4342705f9080d262862c0961f4a808982;p=rocksndiamonds.git added command line options for level identifier/nr for tape tests/uploads --- diff --git a/src/libgame/misc.c b/src/libgame/misc.c index e27c3e7e..8bc45721 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -1300,6 +1300,8 @@ void GetOptions(int argc, char *argv[], options.special_flags = NULL; options.debug_mode = NULL; options.player_name = NULL; + options.identifier = NULL; + options.level_nr = NULL; options.mytapes = FALSE; options.serveronly = FALSE; @@ -1446,6 +1448,24 @@ void GetOptions(int argc, char *argv[], if (option_arg == next_option) options_left++; } + else if (strncmp(option, "-identifier", option_len) == 0) + { + if (option_arg == NULL) + FailWithHelp("option '%s' requires an argument", option_str); + + options.identifier = getStringCopy(option_arg); + if (option_arg == next_option) + options_left++; + } + else if (strncmp(option, "-level-nr", option_len) == 0) + { + if (option_arg == NULL) + FailWithHelp("option '%s' requires an argument", option_str); + + options.level_nr = getStringCopy(option_arg); + if (option_arg == next_option) + options_left++; + } else if (strncmp(option, "-verbose", option_len) == 0) { options.verbose = TRUE; diff --git a/src/libgame/system.h b/src/libgame/system.h index 2943e645..32180326 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1065,6 +1065,8 @@ struct OptionInfo char *debug_mode; char *player_name; + char *identifier; + char *level_nr; boolean mytapes; boolean serveronly;