]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - main.c
use INSTR_STATE by default, add -femulate-state to switch to emulation, and -state...
[xonotic/gmqcc.git] / main.c
diff --git a/main.c b/main.c
index 156a3f0c1af5c81c4c72d7ac70dc64087ea5c29c..ff15b20ec329802c1c2167fe76866fccbf92ef22 100644 (file)
--- a/main.c
+++ b/main.c
@@ -85,6 +85,7 @@ static int usage(void) {
             "  -Ono-<name>            disable specific optimization\n"
             "  -Ohelp                 list optimizations\n");
     con_out("  -force-crc=num         force a specific checksum into the header\n");
+    con_out("  -state-fps=num         emulate OP_STATE with the specified FPS\n");
     con_out("  -coverage              add coverage support\n");
     return -1;
 }
@@ -217,6 +218,11 @@ static bool options_parse(int argc, char **argv) {
                 OPTS_OPTION_U16 (OPTION_FORCED_CRC) = strtol(argarg, NULL, 0);
                 continue;
             }
+            if (options_long_gcc("state-fps", &argc, &argv, &argarg)) {
+                OPTS_OPTION_U32(OPTION_STATE_FPS) = strtol(argarg, NULL, 0);
+                opts_set(opts.flags, EMULATE_STATE, true);
+                continue;
+            }
             if (options_long_gcc("redirout", &argc, &argv, &redirout)) {
                 con_change(redirout, redirerr);
                 continue;