17 VARDEF uint16 _price_frac[NUM_PRICES]; |
17 VARDEF uint16 _price_frac[NUM_PRICES]; |
18 |
18 |
19 VARDEF uint32 _cargo_payment_rates[NUM_CARGO]; |
19 VARDEF uint32 _cargo_payment_rates[NUM_CARGO]; |
20 VARDEF uint16 _cargo_payment_rates_frac[NUM_CARGO]; |
20 VARDEF uint16 _cargo_payment_rates_frac[NUM_CARGO]; |
21 |
21 |
22 typedef struct { |
22 struct GameOptions { |
23 GameDifficulty diff; |
23 GameDifficulty diff; |
24 byte diff_level; |
24 byte diff_level; |
25 byte currency; |
25 byte currency; |
26 byte units; |
26 byte units; |
27 byte town_name; |
27 byte town_name; |
28 byte landscape; |
28 byte landscape; |
29 byte snow_line; |
29 byte snow_line; |
30 byte autosave; |
30 byte autosave; |
31 byte road_side; |
31 byte road_side; |
32 } GameOptions; |
32 }; |
33 |
33 |
34 /* These are the options for the current game |
34 /* These are the options for the current game |
35 * either ingame, or loaded. Also used for networking games */ |
35 * either ingame, or loaded. Also used for networking games */ |
36 VARDEF GameOptions _opt; |
36 VARDEF GameOptions _opt; |
37 |
37 |
78 VARDEF int _saved_scrollpos_y; |
78 VARDEF int _saved_scrollpos_y; |
79 VARDEF byte _saved_scrollpos_zoom; |
79 VARDEF byte _saved_scrollpos_zoom; |
80 |
80 |
81 // ********* END OF SAVE REGION |
81 // ********* END OF SAVE REGION |
82 |
82 |
83 typedef struct Patches { |
83 struct Patches { |
84 bool modified_catchment; // different-size catchment areas |
84 bool modified_catchment; // different-size catchment areas |
85 bool vehicle_speed; // show vehicle speed |
85 bool vehicle_speed; // show vehicle speed |
86 bool build_on_slopes; // allow building on slopes |
86 bool build_on_slopes; // allow building on slopes |
87 bool mammoth_trains; // allow very long trains |
87 bool mammoth_trains; // allow very long trains |
88 bool join_stations; // allow joining of train stations |
88 bool join_stations; // allow joining of train stations |
219 uint8 freight_trains; ///< Value to multiply the weight of cargo by |
219 uint8 freight_trains; ///< Value to multiply the weight of cargo by |
220 |
220 |
221 /** YAPF settings */ |
221 /** YAPF settings */ |
222 YapfSettings yapf; |
222 YapfSettings yapf; |
223 |
223 |
224 } Patches; |
224 uint8 scrollwheel_scrolling; |
|
225 uint8 scrollwheel_multiplier; |
|
226 }; |
225 |
227 |
226 VARDEF Patches _patches; |
228 VARDEF Patches _patches; |
227 |
229 |
228 |
230 |
229 typedef struct Cheat { |
231 struct Cheat { |
230 bool been_used; // has this cheat been used before? |
232 bool been_used; // has this cheat been used before? |
231 bool value; // tells if the bool cheat is active or not |
233 bool value; // tells if the bool cheat is active or not |
232 } Cheat; |
234 }; |
233 |
235 |
234 |
236 |
235 // WARNING! Do _not_ remove entries in Cheats struct or change the order |
237 // WARNING! Do _not_ remove entries in Cheats struct or change the order |
236 // of the existing ones! Would break downward compatibility. |
238 // of the existing ones! Would break downward compatibility. |
237 // Only add new entries at the end of the struct! |
239 // Only add new entries at the end of the struct! |
238 |
240 |
239 typedef struct Cheats { |
241 struct Cheats { |
240 Cheat magic_bulldozer; // dynamite industries, unmovables |
242 Cheat magic_bulldozer; // dynamite industries, unmovables |
241 Cheat switch_player; // change to another player |
243 Cheat switch_player; // change to another player |
242 Cheat money; // get rich |
244 Cheat money; // get rich |
243 Cheat crossing_tunnels; // allow tunnels that cross each other |
245 Cheat crossing_tunnels; // allow tunnels that cross each other |
244 Cheat build_in_pause; // build while in pause mode |
246 Cheat build_in_pause; // build while in pause mode |
245 Cheat no_jetcrash; // no jet will crash on small airports anymore |
247 Cheat no_jetcrash; // no jet will crash on small airports anymore |
246 Cheat switch_climate; |
248 Cheat switch_climate; |
247 Cheat change_date; // changes date ingame |
249 Cheat change_date; // changes date ingame |
248 Cheat setup_prod; // setup raw-material production in game |
250 Cheat setup_prod; // setup raw-material production in game |
249 Cheat dummy; // empty cheat (enable running el-engines on normal rail) |
251 Cheat dummy; // empty cheat (enable running el-engines on normal rail) |
250 } Cheats; |
252 }; |
251 |
253 |
252 VARDEF Cheats _cheats; |
254 VARDEF Cheats _cheats; |
253 |
255 |
254 typedef struct Paths { |
256 struct Paths { |
255 char *personal_dir; // includes cfg file and save folder |
257 char *personal_dir; // includes cfg file and save folder |
256 char *game_data_dir; // includes data, gm, lang |
258 char *game_data_dir; // includes data, gm, lang |
257 char *data_dir; |
259 char *data_dir; |
258 char *gm_dir; |
260 char *gm_dir; |
259 char *lang_dir; |
261 char *lang_dir; |
260 char *save_dir; |
262 char *save_dir; |
261 char *autosave_dir; |
263 char *autosave_dir; |
262 char *scenario_dir; |
264 char *scenario_dir; |
263 char *heightmap_dir; |
265 char *heightmap_dir; |
264 char *second_data_dir; |
266 char *second_data_dir; |
265 } Paths; |
267 }; |
266 |
268 |
267 VARDEF Paths _paths; |
269 VARDEF Paths _paths; |
268 |
270 |
269 // NOSAVE: Used in palette animations only, not really important. |
271 // NOSAVE: Used in palette animations only, not really important. |
270 VARDEF int _timer_counter; |
272 VARDEF int _timer_counter; |
294 VARDEF TileIndex _terraform_err_tile; |
296 VARDEF TileIndex _terraform_err_tile; |
295 VARDEF TileIndex _build_tunnel_endtile; |
297 VARDEF TileIndex _build_tunnel_endtile; |
296 VARDEF bool _generating_world; |
298 VARDEF bool _generating_world; |
297 |
299 |
298 // Deals with the type of the savegame, independent of extension |
300 // Deals with the type of the savegame, independent of extension |
299 typedef struct { |
301 struct SmallFiosItem { |
300 int mode; // savegame/scenario type (old, new) |
302 int mode; // savegame/scenario type (old, new) |
301 char name[MAX_PATH]; // name |
303 char name[MAX_PATH]; // name |
302 char title[255]; // internal name of the game |
304 char title[255]; // internal name of the game |
303 } SmallFiosItem; |
305 }; |
304 |
306 |
305 // Used when switching from the intro menu. |
307 // Used when switching from the intro menu. |
306 VARDEF byte _switch_mode; |
308 VARDEF byte _switch_mode; |
307 VARDEF StringID _switch_mode_errorstr; |
309 VARDEF StringID _switch_mode_errorstr; |
308 VARDEF SmallFiosItem _file_to_saveload; |
310 VARDEF SmallFiosItem _file_to_saveload; |
311 |
313 |
312 VARDEF Vehicle *_place_clicked_vehicle; |
314 VARDEF Vehicle *_place_clicked_vehicle; |
313 |
315 |
314 VARDEF char _ini_videodriver[32], _ini_musicdriver[32], _ini_sounddriver[32]; |
316 VARDEF char _ini_videodriver[32], _ini_musicdriver[32], _ini_sounddriver[32]; |
315 |
317 |
316 // Used for dynamic language support |
318 /** Information about a language */ |
317 typedef struct { |
319 struct Language { |
318 int num; // number of languages |
320 char *name; ///< The internal name of the language |
319 int curr; // currently selected language index |
321 char *file; ///< The name of the language as it appears on disk |
320 char curr_file[MAX_LANG]; // currently selected language file |
322 }; |
321 StringID dropdown[MAX_LANG + 1]; // used in settings dialog |
323 |
322 struct { |
324 /** Used for dynamic language support */ |
323 char *name; |
325 struct DynamicLanguages { |
324 char *file; |
326 int num; ///< Number of languages |
325 } ent[MAX_LANG]; |
327 int curr; ///< Currently selected language index |
326 } DynamicLanguages; |
328 char curr_file[MAX_PATH]; ///< Currently selected language file (needed for saving the filename of the loaded language |
327 |
329 StringID dropdown[MAX_LANG + 1]; ///< List of languages in the settings gui |
328 VARDEF DynamicLanguages _dynlang; |
330 Language ent[MAX_LANG]; ///< Information about the languages |
|
331 }; |
|
332 |
|
333 extern DynamicLanguages _dynlang; // defined in strings.cpp |
329 |
334 |
330 VARDEF int _num_resolutions; |
335 VARDEF int _num_resolutions; |
331 VARDEF uint16 _resolutions[32][2]; |
336 VARDEF uint16 _resolutions[32][2]; |
332 VARDEF uint16 _cur_resolution[2]; |
337 VARDEF uint16 _cur_resolution[2]; |
333 |
338 |