summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2012-02-04 13:29:09 +0000
committermichi_cc <michi_cc@openttd.org>2012-02-04 13:29:09 +0000
commit2909e39e99aac74b124aee113dd4fa3f430d9d6c (patch)
tree4b90e516ef3341d72c586669e2e3862ecdaed438
parent6db39410a1ea0bc8ece1f33fb7771e47d39cc2b7 (diff)
downloadopenttd-2909e39e99aac74b124aee113dd4fa3f430d9d6c.tar.xz
(svn r23888) -Change: Move the min/max zoom settings to the "misc" section so they are valid before sprites are loaded.
-rw-r--r--src/table/misc_settings.ini27
-rw-r--r--src/table/settings.ini25
2 files changed, 27 insertions, 25 deletions
diff --git a/src/table/misc_settings.ini b/src/table/misc_settings.ini
index d9206d838..8415a4d26 100644
--- a/src/table/misc_settings.ini
+++ b/src/table/misc_settings.ini
@@ -8,6 +8,7 @@
[pre-amble]
extern char _config_language_file[MAX_PATH];
+static bool ZoomMinMaxChanged(int32 p1);
static const SettingDescGlobVarList _misc_settings[] = {
[post-amble]
@@ -271,5 +272,31 @@ def = 100
min = 0
max = UINT32_MAX
+[SDTG_VAR]
+name = ""zoom_min""
+type = SLE_UINT8
+var = _settings_client.gui.zoom_min
+flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
+guiflags = SGF_MULTISTRING
+def = ZOOM_LVL_MIN
+min = ZOOM_LVL_MIN
+max = ZOOM_LVL_GUI
+str = STR_CONFIG_SETTING_ZOOM_MIN
+strval = STR_CONFIG_SETTING_ZOOM_LVL_MIN
+proc = ZoomMinMaxChanged
+
+[SDTG_VAR]
+name = ""zoom_max""
+type = SLE_UINT8
+var = _settings_client.gui.zoom_max
+flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
+guiflags = SGF_MULTISTRING
+def = ZOOM_LVL_MAX
+min = ZOOM_LVL_OUT_8X
+max = ZOOM_LVL_MAX
+str = STR_CONFIG_SETTING_ZOOM_MAX
+strval = STR_CONFIG_SETTING_ZOOM_LVL_OUT_2X
+proc = ZoomMinMaxChanged
+
[SDTG_END]
diff --git a/src/table/settings.ini b/src/table/settings.ini
index aec498f82..511ce2077 100644
--- a/src/table/settings.ini
+++ b/src/table/settings.ini
@@ -40,7 +40,6 @@ static bool InvalidateIndustryViewWindow(int32 p1);
static bool InvalidateAISettingsWindow(int32 p1);
static bool RedrawTownAuthority(int32 p1);
static bool InvalidateCompanyInfrastructureWindow(int32 p1);
-static bool ZoomMinMaxChanged(int32 p1);
#ifdef ENABLE_NETWORK
static bool UpdateClientName(int32 p1);
@@ -2080,30 +2079,6 @@ max = 255
interval = 1
str = STR_CONFIG_SETTING_SOFT_LIMIT
-[SDTC_VAR]
-var = gui.zoom_min
-type = SLE_UINT8
-flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
-guiflags = SGF_MULTISTRING
-def = ZOOM_LVL_MIN
-min = ZOOM_LVL_MIN
-max = ZOOM_LVL_GUI
-str = STR_CONFIG_SETTING_ZOOM_MIN
-strval = STR_CONFIG_SETTING_ZOOM_LVL_MIN
-proc = ZoomMinMaxChanged
-
-[SDTC_VAR]
-var = gui.zoom_max
-type = SLE_UINT8
-flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
-guiflags = SGF_MULTISTRING
-def = ZOOM_LVL_MAX
-min = ZOOM_LVL_OUT_8X
-max = ZOOM_LVL_MAX
-str = STR_CONFIG_SETTING_ZOOM_MAX
-strval = STR_CONFIG_SETTING_ZOOM_LVL_OUT_2X
-proc = ZoomMinMaxChanged
-
[SDTC_BOOL]
var = gui.population_in_label
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC