Add standard library header includes to precompiled header. Fix several uses of strin...
[openttd-joker.git] / src / table / gameopt_settings.ini
blobfec6ff2a68b49016b8122bc37653eb74f5588953
1 ; $Id$
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/>.
9 [pre-amble]
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";
24 #ifdef ENABLE_NETWORK
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
35 * same-sized members
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 */
41 [post-amble]
43 [templates]
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),
51 SDT_END = SDT_END()
53 [defaults]
54 flags = 0
55 guiflags = 0
56 interval = 0
57 str = STR_NULL
58 strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT
59 strval = STR_NULL
60 proc = NULL
61 load = NULL
62 from = 0
63 to = SL_MAX_VERSION
64 cat = SC_ADVANCED
68 [SDTG_GENERAL]
69 name = ""diff_custom""
70 sdt_cmd = SDT_INTLIST
71 sle_cmd = SL_ARR
72 type = SLE_FILE_I16 | SLE_VAR_U16
73 flags = SLF_NOT_IN_CONFIG
74 var = _old_diff_custom
75 length = 17
76 def = 0
77 min = 0
78 max = 0
79 full = NULL
80 to = 3
82 [SDTG_GENERAL]
83 name = ""diff_custom""
84 sdt_cmd = SDT_INTLIST
85 sle_cmd = SL_ARR
86 type = SLE_UINT16
87 flags = SLF_NOT_IN_CONFIG
88 var = _old_diff_custom
89 length = 18
90 def = 0
91 min = 0
92 max = 0
93 full = NULL
94 from = 4
97 [SDTG_VAR]
98 name = ""diff_level""
99 var = _old_diff_level
100 type = SLE_UINT8
101 flags = SLF_NOT_IN_CONFIG
102 def = SP_CUSTOM
103 min = SP_EASY
104 max = SP_CUSTOM
105 cat = SC_BASIC
107 [SDT_OMANY]
108 base = GameSettings
109 var = locale.currency
110 type = SLE_UINT8
111 flags = SLF_NO_NETWORK_SYNC
112 def = 0
113 max = CURRENCY_END - 1
114 full = _locale_currencies
115 cat = SC_BASIC
117 [SDTG_OMANY]
118 name = ""units""
119 var = _old_units
120 type = SLE_UINT8
121 flags = SLF_NOT_IN_CONFIG
122 def = 1
123 max = 2
124 full = _locale_units
125 cat = SC_BASIC
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.
129 [SDT_OMANY]
130 base = GameSettings
131 var = game_creation.town_name
132 type = SLE_UINT8
133 def = 0
134 max = 255
135 full = _town_names
136 cat = SC_BASIC
138 [SDT_OMANY]
139 base = GameSettings
140 var = game_creation.landscape
141 type = SLE_UINT8
142 def = 0
143 max = 3
144 full = _climates
145 load = ConvertLandscape
146 cat = SC_BASIC
148 [SDT_VAR]
149 base = GameSettings
150 var = game_creation.snow_line_height
151 type = SLE_UINT8
152 def = DEF_SNOWLINE_HEIGHT * TILE_HEIGHT
153 min = MIN_SNOWLINE_HEIGHT * TILE_HEIGHT
154 max = MAX_SNOWLINE_HEIGHT * TILE_HEIGHT
155 to = 21
157 [SDT_VAR]
158 base = GameSettings
159 var = game_creation.desert_amount
160 from = SL_PATCH_PACK_1_2
161 type = SLE_UINT8
162 def = DEF_DESERT_AMOUNT
163 min = MIN_DESERT_AMOUNT
164 max = MAX_DESERT_AMOUNT
167 [SDT_VAR]
168 base = GameSettings
169 var = game_creation.desert_amount
170 from = 193
171 type = SLE_UINT8
172 def = DEF_DESERT_AMOUNT
173 min = MIN_DESERT_AMOUNT
174 max = MAX_DESERT_AMOUNT
176 [SDT_NULL]
177 length = 1
178 from = 22
179 to = 164
181 [SDT_NULL]
182 length = 1
183 to = 22
185 [SDTC_OMANY]
186 var = gui.autosave
187 type = SLE_UINT8
188 from = 23
189 flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
190 def = 1
191 max = 4
192 full = _autosave_interval
193 cat = SC_BASIC
195 [SDT_OMANY]
196 base = GameSettings
197 var = vehicle.road_side
198 type = SLE_UINT8
199 def = 1
200 max = 1
201 full = _roadsides
202 cat = SC_BASIC
204 [SDT_END]