projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
improved code to type player name in main menu
[rocksndiamonds.git]
/
src
/
files.c
diff --git
a/src/files.c
b/src/files.c
index 0b656358d61eefb548c149e8d27c604816fa6638..12813f59a4aa88ade989bae047640df2a40dcc2b 100644
(file)
--- a/
src/files.c
+++ b/
src/files.c
@@
-9153,6
+9153,14
@@
static struct TokenInfo debug_setup_tokens[] =
TYPE_BOOLEAN,
&setup.debug.show_frames_per_second, "debug.show_frames_per_second"
},
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[] =
};
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.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
si->options.verbose = FALSE;
#if defined(PLATFORM_ANDROID)
si->fullscreen = TRUE;
#endif
+
+ setHideSetupEntry(&setup.debug.xsn_mode);
}
static void setSetupInfoToDefaults_AutoSetup(struct SetupInfo *si)
}
static void setSetupInfoToDefaults_AutoSetup(struct SetupInfo *si)
@@
-9477,10
+9490,21
@@
void setHideSetupEntry(void *setup_value)
{
char *hide_setup_token = getHideSetupToken(setup_value);
{
char *hide_setup_token = getHideSetupToken(setup_value);
+ if (hide_setup_hash == NULL)
+ hide_setup_hash = newSetupFileHash();
+
if (setup_value != NULL)
setHashEntry(hide_setup_hash, hide_setup_token, "");
}
if (setup_value != NULL)
setHashEntry(hide_setup_hash, hide_setup_token, "");
}
+void removeHideSetupEntry(void *setup_value)
+{
+ char *hide_setup_token = getHideSetupToken(setup_value);
+
+ if (setup_value != NULL)
+ removeHashEntry(hide_setup_hash, hide_setup_token);
+}
+
boolean hideSetupEntry(void *setup_value)
{
char *hide_setup_token = getHideSetupToken(setup_value);
boolean hideSetupEntry(void *setup_value)
{
char *hide_setup_token = getHideSetupToken(setup_value);
@@
-9519,9
+9543,6
@@
static void decodeSetupFileHash(SetupFileHash *setup_file_hash)
if (!setup_file_hash)
return;
if (!setup_file_hash)
return;
- if (hide_setup_hash == NULL)
- hide_setup_hash = newSetupFileHash();
-
for (i = 0; i < ARRAY_SIZE(global_setup_tokens); i++)
setSetupInfoFromTokenInfo(setup_file_hash, global_setup_tokens, i);
for (i = 0; i < ARRAY_SIZE(global_setup_tokens); i++)
setSetupInfoFromTokenInfo(setup_file_hash, global_setup_tokens, i);
@@
-9863,7
+9884,9
@@
void SaveSetup(void)
fprintf(file, "\n");
for (i = 0; i < ARRAY_SIZE(debug_setup_tokens); i++)
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++)
fprintf(file, "\n");
for (i = 0; i < ARRAY_SIZE(options_setup_tokens); i++)