added command line options for level identifier/nr for tape tests/uploads
[rocksndiamonds.git] / src / libgame / misc.c
index e27c3e7e60280e71a295dbd27206f69e6345530d..8bc457216de7448418ad5cebd885728e562b5b60 100644 (file)
@@ -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;