3 ; This file is part of OpenTTD.
4 ; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
5 ; OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
6 ; See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
10 static const uint GAME_DIFFICULTY_NUM = 18;
11 static uint16 _old_diff_custom[GAME_DIFFICULTY_NUM];
12 uint8 _old_diff_level;
///< Old difficulty level from old savegames
13 uint8 _old_units;
///< Old units from old savegames
15 /* Most of these strings are used both for gameopt
-backward compatability
16 * and the settings tables. The rest is here for consistency.
*/
17 static const char *_locale_currencies = "GBP|USD|EUR|YEN|ATS|BEF|CHF|CZK|DEM|DKK|ESP|FIM|FRF|GRD|HUF|ISK|ITL|NLG|NOK|PLN|RON|RUR|SIT|SEK|YTL|SKK|BRL|EEK|custom";
18 static const char *_locale_units = "imperial|metric|si";
19 static const char *_town_names = "english|french|german|american|latin|silly|swedish|dutch|finnish|polish|slovak|norwegian|hungarian|austrian|romanian|czech|swiss|danish|turkish|italian|catalan";
20 static const char *_climates = "temperate|arctic|tropic|toyland";
21 static const char *_autosave_interval = "off|monthly|quarterly|half year|yearly";
22 static const char *_roadsides = "left|right";
23 static const char *_savegame_date = "long|short|iso";
25 static const char *_server_langs = "ANY|ENGLISH|GERMAN|FRENCH|BRAZILIAN|BULGARIAN|CHINESE|CZECH|DANISH|DUTCH|ESPERANTO|FINNISH|HUNGARIAN|ICELANDIC|ITALIAN|JAPANESE|KOREAN|LITHUANIAN|NORWEGIAN|POLISH|PORTUGUESE|ROMANIAN|RUSSIAN|SLOVAK|SLOVENIAN|SPANISH|SWEDISH|TURKISH|UKRAINIAN|AFRIKAANS|CROATIAN|CATALAN|ESTONIAN|GALICIAN|GREEK|LATVIAN";
26 #endif /* ENABLE_NETWORK */
27 static const char *_osk_activation = "disabled|double|single|immediately";
28 static const char *_settings_profiles = "easy|medium|hard";
29 static const char *_news_display = "off|summarized|full";
31 static const SettingDesc _gameopt_settings[] = {
32 /* In version
4 a new difficulty setting has been added to the difficulty settings
,
33 * town attitude towards demolishing. Needs special handling because some dimwit thought
34 * it funny to have the GameDifficulty struct be an array while it is a struct of
36 * XXX
- To save file
-space and since values are never bigger than about
10? only
37 * save the first
16 bits in the savegame. Question is why the values are still int32
38 * and why not byte for example?
39 * 'SLE_FILE_I16 | SLE_VAR_U16' in
"diff_custom" is needed to get around SlArray
() hack
40 * for savegames version
0 - though it is an array
, it has to go through the byteswap process
*/
44 SDTG_GENERAL = SDTG_GENERAL($name, $sdt_cmd, $sle_cmd, $type, $flags, $guiflags, $var, $length, $def, $min, $max, $interval, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat),
45 SDTG_VAR = SDTG_VAR($name, $type, $flags, $guiflags, $var, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat),
46 SDT_NULL = SDT_NULL($length, $from, $to),
47 SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $guiflags, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat),
48 SDTG_OMANY = SDTG_OMANY($name, $type, $flags, $guiflags, $var, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $cat),
49 SDT_OMANY = SDT_OMANY($base, $var, $type, $flags, $guiflags, $def, $max, $full, $str, $strhelp, $strval, $proc, $from, $to, $load, $cat),
50 SDT_VAR = SDT_VAR($base, $var, $type, $flags, $guiflags, $def, $min, $max, $interval, $str, $strhelp, $strval, $proc, $from, $to, $cat),
58 strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
69 name = ""diff_custom""
72 type = SLE_FILE_I16 | SLE_VAR_U16
73 flags = SLF_NOT_IN_CONFIG
74 var = _old_diff_custom
83 name = ""diff_custom""
87 flags = SLF_NOT_IN_CONFIG
88 var = _old_diff_custom
101 flags = SLF_NOT_IN_CONFIG
109 var = locale.currency
111 flags = SLF_NO_NETWORK_SYNC
113 max = CURRENCY_END - 1
114 full = _locale_currencies
121 flags = SLF_NOT_IN_CONFIG
127 # There are only 21 predefined town_name values (0-20), but you can have more with newgrf action F so allow
128 # these bigger values (21-255). Invalid values will fallback to english on use and (undefined string) in GUI.
131 var = game_creation.town_name
140 var = game_creation.landscape
145 load = ConvertLandscape
150 var = game_creation.snow_line_height
152 def = DEF_SNOWLINE_HEIGHT * TILE_HEIGHT
153 min = MIN_SNOWLINE_HEIGHT * TILE_HEIGHT
154 max = MAX_SNOWLINE_HEIGHT * TILE_HEIGHT
159 var = game_creation.desert_amount
160 from = SL_PATCH_PACK_1_2
162 def = DEF_DESERT_AMOUNT
163 min = MIN_DESERT_AMOUNT
164 max = MAX_DESERT_AMOUNT
169 var = game_creation.desert_amount
172 def = DEF_DESERT_AMOUNT
173 min = MIN_DESERT_AMOUNT
174 max = MAX_DESERT_AMOUNT
189 flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
192 full = _autosave_interval
197 var = vehicle.road_side