summaryrefslogtreecommitdiff
path: root/src/settings_internal.h
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-06-03 20:55:03 +0200
committerPatric Stout <github@truebrain.nl>2021-06-06 21:45:01 +0200
commit648ee88a02fef70172a108ed7bc511e27984d2c4 (patch)
tree20c4fd197f9815a812a6966c8467464bcd19da32 /src/settings_internal.h
parent264991dfa506c0bdebb2e2c936f79a2412dad442 (diff)
downloadopenttd-648ee88a02fef70172a108ed7bc511e27984d2c4.tar.xz
Codechange: merge guiflags and flags in settings .ini files
It was rather confusing which one was for what, especially as some SaveLoad flags were settings-only. Clean up this mess a bit by having only Setting flags.
Diffstat (limited to 'src/settings_internal.h')
-rw-r--r--src/settings_internal.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/settings_internal.h b/src/settings_internal.h
index 351c66ea3..a625f576c 100644
--- a/src/settings_internal.h
+++ b/src/settings_internal.h
@@ -14,16 +14,19 @@
enum SettingFlag : uint16 {
SF_NONE = 0,
- SF_GUI_0_IS_SPECIAL = 1 << 0, ///< A value of zero is possible and has a custom string (the one after "strval").
- SF_GUI_NEGATIVE_IS_SPECIAL = 1 << 1, ///< A negative value has another string (the one after "strval").
- SF_GUI_DROPDOWN = 1 << 2, ///< The value represents a limited number of string-options (internally integer) presented as dropdown.
- SF_GUI_CURRENCY = 1 << 3, ///< The number represents money, so when reading value multiply by exchange rate.
- SF_NETWORK_ONLY = 1 << 4, ///< This setting only applies to network games.
- SF_NO_NETWORK = 1 << 5, ///< This setting does not apply to network games; it may not be changed during the game.
- SF_NEWGAME_ONLY = 1 << 6, ///< This setting cannot be changed in a game.
- SF_SCENEDIT_TOO = 1 << 7, ///< This setting can be changed in the scenario editor (only makes sense when SF_NEWGAME_ONLY is set).
- SF_SCENEDIT_ONLY = 1 << 8, ///< This setting can only be changed in the scenario editor.
- SF_PER_COMPANY = 1 << 9, ///< This setting can be different for each company (saved in company struct).
+ SF_GUI_0_IS_SPECIAL = 1 << 0, ///< A value of zero is possible and has a custom string (the one after "strval").
+ SF_GUI_NEGATIVE_IS_SPECIAL = 1 << 1, ///< A negative value has another string (the one after "strval").
+ SF_GUI_DROPDOWN = 1 << 2, ///< The value represents a limited number of string-options (internally integer) presented as dropdown.
+ SF_GUI_CURRENCY = 1 << 3, ///< The number represents money, so when reading value multiply by exchange rate.
+ SF_NETWORK_ONLY = 1 << 4, ///< This setting only applies to network games.
+ SF_NO_NETWORK = 1 << 5, ///< This setting does not apply to network games; it may not be changed during the game.
+ SF_NEWGAME_ONLY = 1 << 6, ///< This setting cannot be changed in a game.
+ SF_SCENEDIT_TOO = 1 << 7, ///< This setting can be changed in the scenario editor (only makes sense when SF_NEWGAME_ONLY is set).
+ SF_SCENEDIT_ONLY = 1 << 8, ///< This setting can only be changed in the scenario editor.
+ SF_PER_COMPANY = 1 << 9, ///< This setting can be different for each company (saved in company struct).
+ SF_NOT_IN_SAVE = 1 << 10, ///< Do not save with savegame, basically client-based.
+ SF_NOT_IN_CONFIG = 1 << 11, ///< Do not save to config file.
+ SF_NO_NETWORK_SYNC = 1 << 12, ///< Do not synchronize over network (but it is saved if SF_NOT_IN_SAVE is not set).
};
DECLARE_ENUM_AS_BIT_SET(SettingFlag)
@@ -288,7 +291,7 @@ struct ListSettingDesc : SettingDesc {
/** Placeholder for settings that have been removed, but might still linger in the savegame. */
struct NullSettingDesc : SettingDesc {
NullSettingDesc(SaveLoad save) :
- SettingDesc(save, "", SF_NONE, false) {}
+ SettingDesc(save, "", SF_NOT_IN_CONFIG, false) {}
virtual ~NullSettingDesc() {}
void FormatValue(char *buf, const char *last, const void *object) const override { NOT_REACHED(); }