summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/settings_internal.h8
-rw-r--r--src/table/currency_settings.ini2
-rw-r--r--src/table/gameopt_settings.ini2
-rw-r--r--src/table/misc_settings.ini2
-rw-r--r--src/table/settings.h.preamble10
-rw-r--r--src/table/settings.ini2
-rw-r--r--src/table/win32_settings.ini2
-rw-r--r--src/table/window_settings.ini2
8 files changed, 14 insertions, 16 deletions
diff --git a/src/settings_internal.h b/src/settings_internal.h
index 028e977e4..0f1d3c192 100644
--- a/src/settings_internal.h
+++ b/src/settings_internal.h
@@ -20,7 +20,7 @@
* @see VarTypes
* @see SettingDescBase
*/
-enum SettingDescTypeLong {
+enum SettingDescType : byte {
/* 4 bytes allocated a maximum of 16 types for GenericType */
SDT_BEGIN = 0,
SDT_NUMX = 0, ///< any number-type
@@ -32,10 +32,9 @@ enum SettingDescTypeLong {
SDT_END,
/* 10 more possible primitives */
};
-typedef SimpleTinyEnumT<SettingDescTypeLong, byte> SettingDescType;
-enum SettingGuiFlagLong {
+enum SettingGuiFlag : uint16 {
/* 1 byte allocated for a maximum of 8 flags
* Flags directing saving/loading of a variable */
SGF_NONE = 0,
@@ -49,8 +48,7 @@ enum SettingGuiFlagLong {
SGF_SCENEDIT_TOO = 1 << 7, ///< this setting can be changed in the scenario editor (only makes sense when SGF_NEWGAME_ONLY is set)
SGF_PER_COMPANY = 1 << 8, ///< this setting can be different for each company (saved in company struct)
};
-DECLARE_ENUM_AS_BIT_SET(SettingGuiFlagLong)
-typedef SimpleTinyEnumT<SettingGuiFlagLong, uint16> SettingGuiFlag;
+DECLARE_ENUM_AS_BIT_SET(SettingGuiFlag)
/**
* A SettingCategory defines a grouping of the settings.
diff --git a/src/table/currency_settings.ini b/src/table/currency_settings.ini
index 02777d2ae..d68f4bfc2 100644
--- a/src/table/currency_settings.ini
+++ b/src/table/currency_settings.ini
@@ -18,7 +18,7 @@ SDT_END = SDT_END()
[defaults]
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
-guiflags = 0
+guiflags = SGF_NONE
interval = 0
str = STR_NULL
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
diff --git a/src/table/gameopt_settings.ini b/src/table/gameopt_settings.ini
index 247bfbed2..9bacb80c7 100644
--- a/src/table/gameopt_settings.ini
+++ b/src/table/gameopt_settings.ini
@@ -50,7 +50,7 @@ SDT_END = SDT_END()
[defaults]
flags = 0
-guiflags = 0
+guiflags = SGF_NONE
interval = 0
str = STR_NULL
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
diff --git a/src/table/misc_settings.ini b/src/table/misc_settings.ini
index 6d974a005..a1159aee0 100644
--- a/src/table/misc_settings.ini
+++ b/src/table/misc_settings.ini
@@ -25,7 +25,7 @@ SDTG_END = SDTG_END()
[defaults]
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
-guiflags = 0
+guiflags = SGF_NONE
interval = 0
str = STR_NULL
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
diff --git a/src/table/settings.h.preamble b/src/table/settings.h.preamble
index b6992764d..08380cbf1 100644
--- a/src/table/settings.h.preamble
+++ b/src/table/settings.h.preamble
@@ -57,7 +57,7 @@ static size_t ConvertLandscape(const char *value);
*/
#define NSD_GENERAL(name, def, cmd, guiflags, min, max, interval, many, str, strhelp, strval, proc, load, cat)\
- {name, (const void*)(size_t)(def), {(byte)cmd}, {(uint16)guiflags}, min, max, interval, many, str, strhelp, strval, proc, load, cat}
+ {name, (const void*)(size_t)(def), cmd, guiflags, min, max, interval, many, str, strhelp, strval, proc, load, cat}
/* Macros for various objects to go in the configuration file.
* This section is for global variables */
@@ -83,9 +83,9 @@ static size_t ConvertLandscape(const char *value);
SDTG_GENERAL(name, SDT_MANYOFMANY, SL_VAR, type, flags, guiflags, var, 0, def, 0, 0, 0, full, str, strhelp, strval, proc, from, to, cat)
#define SDTG_NULL(length, from, to)\
- {{"", nullptr, {0}, {0}, 0, 0, 0, nullptr, STR_NULL, STR_NULL, STR_NULL, nullptr, nullptr, SC_NONE}, SLEG_NULL(length, from, to)}
+ {{"", nullptr, SDT_NUMX, SGF_NONE, 0, 0, 0, nullptr, STR_NULL, STR_NULL, STR_NULL, nullptr, nullptr, SC_NONE}, SLEG_NULL(length, from, to)}
-#define SDTG_END() {{nullptr, nullptr, {0}, {0}, 0, 0, 0, nullptr, STR_NULL, STR_NULL, STR_NULL, nullptr, nullptr, SC_NONE}, SLEG_END()}
+#define SDTG_END() {{nullptr, nullptr, SDT_NUMX, SGF_NONE, 0, 0, 0, nullptr, STR_NULL, STR_NULL, STR_NULL, nullptr, nullptr, SC_NONE}, SLEG_END()}
/* Macros for various objects to go in the configuration file.
* This section is for structures where their various members are saved */
@@ -114,7 +114,7 @@ static size_t ConvertLandscape(const char *value);
SDT_GENERAL(#var, SDT_MANYOFMANY, SL_VAR, type, flags, guiflags, base, var, 1, def, 0, 0, 0, full, str, strhelp, strval, proc, nullptr, from, to, cat)
#define SDT_NULL(length, from, to)\
- {{"", nullptr, {0}, {0}, 0, 0, 0, nullptr, STR_NULL, STR_NULL, STR_NULL, nullptr, nullptr, SC_NONE}, SLE_CONDNULL(length, from, to)}
+ {{"", nullptr, SDT_NUMX, SGF_NONE, 0, 0, 0, nullptr, STR_NULL, STR_NULL, STR_NULL, nullptr, nullptr, SC_NONE}, SLE_CONDNULL(length, from, to)}
#define SDTC_VAR(var, type, flags, guiflags, def, min, max, interval, str, strhelp, strval, proc, from, to, cat)\
@@ -132,5 +132,5 @@ static size_t ConvertLandscape(const char *value);
#define SDTC_OMANY(var, type, flags, guiflags, def, max, full, str, strhelp, strval, proc, from, to, cat)\
SDTG_GENERAL(#var, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, _settings_client.var, 1, def, 0, max, 0, full, str, strhelp, strval, proc, from, to, cat)
-#define SDT_END() {{nullptr, nullptr, {0}, {0}, 0, 0, 0, nullptr, STR_NULL, STR_NULL, STR_NULL, nullptr, nullptr, SC_NONE}, SLE_END()}
+#define SDT_END() {{nullptr, nullptr, SDT_NUMX, SGF_NONE, 0, 0, 0, nullptr, STR_NULL, STR_NULL, STR_NULL, nullptr, nullptr, SC_NONE}, SLE_END()}
diff --git a/src/table/settings.ini b/src/table/settings.ini
index 1aacb7634..5e57e5216 100644
--- a/src/table/settings.ini
+++ b/src/table/settings.ini
@@ -81,7 +81,7 @@ SDT_END = SDT_END()
[defaults]
flags = 0
-guiflags = 0
+guiflags = SGF_NONE
interval = 0
str = STR_NULL
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
diff --git a/src/table/win32_settings.ini b/src/table/win32_settings.ini
index 7d9821475..4b3d6f559 100644
--- a/src/table/win32_settings.ini
+++ b/src/table/win32_settings.ini
@@ -23,7 +23,7 @@ SDTG_END = SDTG_END()
[defaults]
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
-guiflags = 0
+guiflags = SGF_NONE
interval = 0
str = STR_NULL
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
diff --git a/src/table/window_settings.ini b/src/table/window_settings.ini
index 67d1edb35..998afc8db 100644
--- a/src/table/window_settings.ini
+++ b/src/table/window_settings.ini
@@ -19,7 +19,7 @@ SDT_END = SDT_END()
[defaults]
base = WindowDesc
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
-guiflags = 0
+guiflags = SGF_NONE
interval = 0
str = STR_NULL
strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT