added setup values for tile selection cursor for MM game engine
authorHolger Schemel <info@artsoft.org>
Sun, 13 Dec 2020 20:10:05 +0000 (21:10 +0100)
committerHolger Schemel <info@artsoft.org>
Sun, 13 Dec 2020 20:21:54 +0000 (21:21 +0100)
src/files.c
src/libgame/system.h

index 0de6f338d4bf705bbfb953a796e2376291495229..12813f59a4aa88ade989bae047640df2a40dcc2b 100644 (file)
@@ -9153,6 +9153,14 @@ static struct TokenInfo debug_setup_tokens[] =
     TYPE_BOOLEAN,
     &setup.debug.show_frames_per_second,       "debug.show_frames_per_second"
   },
+  {
+    TYPE_SWITCH3,
+    &setup.debug.xsn_mode,                     "debug.xsn_mode"
+  },
+  {
+    TYPE_INTEGER,
+    &setup.debug.xsn_percent,                  "debug.xsn_percent"
+  },
 };
 
 static struct TokenInfo options_setup_tokens[] =
@@ -9426,11 +9434,16 @@ static void setSetupInfoToDefaults(struct SetupInfo *si)
 
   si->debug.show_frames_per_second = FALSE;
 
+  si->debug.xsn_mode = AUTO;
+  si->debug.xsn_percent = 0;
+
   si->options.verbose = FALSE;
 
 #if defined(PLATFORM_ANDROID)
   si->fullscreen = TRUE;
 #endif
+
+  setHideSetupEntry(&setup.debug.xsn_mode);
 }
 
 static void setSetupInfoToDefaults_AutoSetup(struct SetupInfo *si)
@@ -9871,7 +9884,9 @@ void SaveSetup(void)
 
   fprintf(file, "\n");
   for (i = 0; i < ARRAY_SIZE(debug_setup_tokens); i++)
-    fprintf(file, "%s\n", getSetupLine(debug_setup_tokens, "", i));
+    if (!strPrefix(debug_setup_tokens[i].text, "debug.xsn_") ||
+       setup.debug.xsn_mode != AUTO)
+      fprintf(file, "%s\n", getSetupLine(debug_setup_tokens, "", i));
 
   fprintf(file, "\n");
   for (i = 0; i < ARRAY_SIZE(options_setup_tokens); i++)
index 30772b4b1d62f57498e255b5de78a4bbebaac98b..c1eb58d87f4dcb3876d0485be937ca4a1c89f100 100644 (file)
@@ -1368,6 +1368,8 @@ struct SetupDebugInfo
   boolean frame_delay_use_mod_key;
   boolean frame_delay_game_only;
   boolean show_frames_per_second;
+  int xsn_mode;
+  int xsn_percent;
 };
 
 struct SetupInfo