author | peter1138 |
Tue, 07 Nov 2006 16:07:31 +0000 | |
changeset 5052 | b5f39b49be14 |
parent 5016 | abe2d67ce392 |
child 5086 | 386ba9fe0621 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
0 | 3 |
#ifndef VARIABLES_H |
4 |
#define VARIABLES_H |
|
5 |
||
3900
2c84ed52709d
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3890
diff
changeset
|
6 |
#include "yapf/yapf_settings.h" |
2c84ed52709d
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3890
diff
changeset
|
7 |
|
0 | 8 |
// ********* START OF SAVE REGION |
9 |
#if !defined(MAX_PATH) |
|
10 |
# define MAX_PATH 260 |
|
11 |
#endif |
|
12 |
||
13 |
// Prices and also the fractional part. |
|
14 |
VARDEF Prices _price; |
|
15 |
VARDEF uint16 _price_frac[NUM_PRICES]; |
|
16 |
||
17 |
VARDEF uint32 _cargo_payment_rates[NUM_CARGO]; |
|
18 |
VARDEF uint16 _cargo_payment_rates_frac[NUM_CARGO]; |
|
19 |
||
20 |
typedef struct { |
|
21 |
GameDifficulty diff; |
|
22 |
byte diff_level; |
|
23 |
byte currency; |
|
3342
cb9b5c6dd74c
(svn r4126) - Feature: A new multi-lingual multi-measuring-unit system:
peter1138
parents:
3182
diff
changeset
|
24 |
byte units; |
0 | 25 |
byte town_name; |
26 |
byte landscape; |
|
27 |
byte snow_line; |
|
28 |
byte autosave; |
|
29 |
byte road_side; |
|
30 |
} GameOptions; |
|
31 |
||
1500
a66721629bc0
(svn r2004) - Fix: [ 1149487 ] Autosave ignoring settings
Darkvater
parents:
1460
diff
changeset
|
32 |
/* These are the options for the current game |
a66721629bc0
(svn r2004) - Fix: [ 1149487 ] Autosave ignoring settings
Darkvater
parents:
1460
diff
changeset
|
33 |
* either ingame, or loaded. Also used for networking games */ |
0 | 34 |
VARDEF GameOptions _opt; |
35 |
||
1500
a66721629bc0
(svn r2004) - Fix: [ 1149487 ] Autosave ignoring settings
Darkvater
parents:
1460
diff
changeset
|
36 |
/* These are the default options for a new game */ |
a66721629bc0
(svn r2004) - Fix: [ 1149487 ] Autosave ignoring settings
Darkvater
parents:
1460
diff
changeset
|
37 |
VARDEF GameOptions _opt_newgame; |
a66721629bc0
(svn r2004) - Fix: [ 1149487 ] Autosave ignoring settings
Darkvater
parents:
1460
diff
changeset
|
38 |
|
a66721629bc0
(svn r2004) - Fix: [ 1149487 ] Autosave ignoring settings
Darkvater
parents:
1460
diff
changeset
|
39 |
// Pointer to one of the two _opt OR _opt_newgame structs |
a66721629bc0
(svn r2004) - Fix: [ 1149487 ] Autosave ignoring settings
Darkvater
parents:
1460
diff
changeset
|
40 |
VARDEF GameOptions *_opt_ptr; |
0 | 41 |
|
42 |
// Amount of game ticks |
|
43 |
VARDEF uint16 _tick_counter; |
|
44 |
||
2090
66677ed50f3c
(svn r2600) Fix: [vehicles] Fix problem with vehicle loop not distributing the calls evenly over the day.
ludde
parents:
2084
diff
changeset
|
45 |
// This one is not used anymore. |
0 | 46 |
VARDEF VehicleID _vehicle_id_ctr_day; |
47 |
||
48 |
// Skip aging of cargo? |
|
49 |
VARDEF byte _age_cargo_skip_counter; |
|
50 |
||
51 |
// Available aircraft types |
|
52 |
VARDEF byte _avail_aircraft; |
|
53 |
||
54 |
// Position in tile loop |
|
55 |
VARDEF TileIndex _cur_tileloop_tile; |
|
56 |
||
57 |
// Also save scrollpos_x, scrollpos_y and zoom |
|
58 |
VARDEF uint16 _disaster_delay; |
|
59 |
||
60 |
// Determines what station to operate on in the |
|
61 |
// tick handler. |
|
62 |
VARDEF uint16 _station_tick_ctr; |
|
63 |
||
206 | 64 |
VARDEF uint32 _random_seeds[2][2]; |
2073 | 65 |
|
0 | 66 |
// Iterator through all towns in OnTick_Town |
1517
596d52828893
(svn r2021) Fix: Enlarge _cur_town_ctr from byte to uint32 so that all the towns are considered when growing them even for big maps, where much more than 256 towns are around; reported by Tomasz Dubi?ski <uboottd@hydra.polsl.gliwice.pl>. The savegame still saves just the lowest 8 bits but that doesn't hurt so much.
pasky
parents:
1500
diff
changeset
|
67 |
VARDEF uint32 _cur_town_ctr; |
1529
3a8196d15b01
(svn r2033) - Fix: Fix some more desync by saving the town growth frequency iterator _cur_town_iter. Needed to bump a svg revision for that thanks to the braindead SlGlob thing, or at least I don't know how to do it without bumping it.
pasky
parents:
1517
diff
changeset
|
68 |
// Frequency iterator at the same place |
3a8196d15b01
(svn r2033) - Fix: Fix some more desync by saving the town growth frequency iterator _cur_town_iter. Needed to bump a svg revision for that thanks to the braindead SlGlob thing, or at least I don't know how to do it without bumping it.
pasky
parents:
1517
diff
changeset
|
69 |
VARDEF uint32 _cur_town_iter; |
0 | 70 |
|
71 |
VARDEF uint _cur_player_tick_index; |
|
72 |
VARDEF uint _next_competitor_start; |
|
73 |
||
74 |
// Determines how often to run the tree loop |
|
75 |
VARDEF byte _trees_tick_ctr; |
|
76 |
||
77 |
// Keep track of current game position |
|
78 |
VARDEF int _saved_scrollpos_x; |
|
79 |
VARDEF int _saved_scrollpos_y; |
|
80 |
VARDEF byte _saved_scrollpos_zoom; |
|
81 |
||
82 |
// ********* END OF SAVE REGION |
|
83 |
||
84 |
typedef struct Patches { |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
85 |
bool modified_catchment; // different-size catchment areas |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
86 |
bool vehicle_speed; // show vehicle speed |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
87 |
bool build_on_slopes; // allow building on slopes |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
88 |
bool mammoth_trains; // allow very long trains |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
89 |
bool join_stations; // allow joining of train stations |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
90 |
bool full_load_any; // new full load calculation, any cargo must be full |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
91 |
bool improved_load; // improved loading algorithm |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
92 |
byte station_spread; // amount a station may spread |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
93 |
bool inflation; // disable inflation |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
94 |
bool selectgoods; // only send the goods to station if a train has been there |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
95 |
bool longbridges; // allow 100 tile long bridges |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
96 |
bool gotodepot; // allow goto depot in orders |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
97 |
bool build_rawmaterial_ind; // allow building raw material industries |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
98 |
bool multiple_industry_per_town; // allow many industries of the same type per town |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
99 |
bool same_industry_close; // allow same type industries to be built close to each other |
4870
2d8c7ffbbac9
(svn r6800) -Feature change: [train is lost] message is now generated immediately when pathfinder can't find the path. (thanks MeusH, peter1138 and Brianetta for ideas and help).
KUDr
parents:
4834
diff
changeset
|
100 |
bool lost_train_warn; // if a train can't find its destination, show a warning |
55
73fae6c6568e
(svn r56) Improved order checker + patch setting for it (celestar)
dominik
parents:
26
diff
changeset
|
101 |
uint8 order_review_system; |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
102 |
bool train_income_warn; // if train is generating little income, show a warning |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
103 |
bool status_long_date; // always show long date in status bar |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
104 |
bool signal_side; // show signals on right side |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
105 |
bool show_finances; // show finances at end of year |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
106 |
bool new_nonstop; // ttdpatch compatible nonstop handling |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
107 |
bool roadveh_queue; // buggy road vehicle queueing |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
108 |
bool autoscroll; // scroll when moving mouse to the edge. |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
109 |
byte errmsg_duration; // duration of error message |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
110 |
byte land_generator; // the landscape generator |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
111 |
byte oil_refinery_limit; // distance oil refineries allowed from map edge |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
112 |
byte snow_line_height; // a number 0-15 that configured snow line height |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
113 |
byte tgen_smoothness; // how rough is the terrain from 0-3 |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
114 |
uint32 generation_seed; // noise seed for world generation |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
115 |
byte tree_placer; // the tree placer algorithm |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
116 |
byte heightmap_rotation; // rotation director for the heightmap |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
117 |
byte se_flat_world_height; // land height a flat world gets in SE |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
118 |
bool bribe; // enable bribing the local authority |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
119 |
bool nonuniform_stations; // allow nonuniform train stations |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
120 |
bool always_small_airport; // always allow small airports |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
121 |
bool realistic_acceleration; // realistic acceleration for trains |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
122 |
bool wagon_speed_limits; // enable wagon speed limits |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
123 |
bool forbid_90_deg; // forbid trains to make 90 deg turns |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
124 |
bool invisible_trees; // don't show trees when buildings are transparent |
1037
4fbbb01cf87b
(svn r1538) -Feature: [988816] Disable servicing when breakdowns set to none (jaguar7)
darkvater
parents:
998
diff
changeset
|
125 |
bool no_servicing_if_no_breakdowns; // dont send vehicles to depot when breakdowns are disabled |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
126 |
bool link_terraform_toolbar; // display terraform toolbar when displaying rail, road, water and airport toolbars |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
127 |
bool reverse_scroll; // Right-Click-Scrolling scrolls in the opposite direction |
4834
3c6e8a547174
(svn r6758) -Feature: Add a measurement tool that will show dimensions and height
Darkvater
parents:
4616
diff
changeset
|
128 |
bool measure_tooltip; // Show a permanent tooltip when dragging tools |
4616
3c22e5eb5ffe
(svn r6474) - Add a patch option to control display of liveries, allowing none, your
peter1138
parents:
4549
diff
changeset
|
129 |
byte liveries; // Options for displaying company liveries, 0=none, 1=self, 2=all |
0 | 130 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
131 |
uint8 toolbar_pos; // position of toolbars, 0=left, 1=center, 2=right |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
132 |
uint8 window_snap_radius; // Windows snap at each other if closer than this |
0 | 133 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
134 |
UnitID max_trains; // max trains in game per player (these are 16bit because the unitnumber field can't hold more) |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
135 |
UnitID max_roadveh; // max trucks in game per player |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
136 |
UnitID max_aircraft; // max planes in game per player |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
137 |
UnitID max_ships; // max ships in game per player |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
138 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
139 |
bool servint_ispercent; // service intervals are in percents |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
140 |
uint16 servint_trains; // service interval for trains |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
141 |
uint16 servint_roadveh; // service interval for road vehicles |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
142 |
uint16 servint_aircraft; // service interval for aircraft |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
143 |
uint16 servint_ships; // service interval for ships |
0 | 144 |
|
145 |
bool autorenew; |
|
26 | 146 |
int16 autorenew_months; |
147 |
int32 autorenew_money; |
|
0 | 148 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
149 |
byte pf_maxdepth; // maximum recursion depth when searching for a train route for new pathfinder |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
150 |
uint16 pf_maxlength; // maximum length when searching for a train route for new pathfinder |
0 | 151 |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
188
diff
changeset
|
152 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
153 |
bool bridge_pillars; // show bridge pillars for high bridges |
0 | 154 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
155 |
bool ai_disable_veh_train; // disable types for AI |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
156 |
bool ai_disable_veh_roadveh; // disable types for AI |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
157 |
bool ai_disable_veh_aircraft; // disable types for AI |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
158 |
bool ai_disable_veh_ship; // disable types for AI |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
159 |
Year starting_year; // starting date |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
160 |
Year ending_year; // end of the game (just show highscore) |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
161 |
Year colored_news_year; // when does newspaper become colored? |
0 | 162 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
163 |
bool keep_all_autosave; // name the autosave in a different way. |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
164 |
bool autosave_on_exit; // save an autosave when you quit the game, but do not ask "Do you really want to quit?" |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
165 |
byte max_num_autosaves; // controls how many autosavegames are made before the game starts to overwrite (names them 0 to max_num_autosaves - 1) |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
166 |
bool extra_dynamite; // extra dynamite |
0 | 167 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
168 |
bool never_expire_vehicles; // never expire vehicles |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
169 |
byte extend_vehicle_life; // extend vehicle life by this many years |
0 | 170 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
171 |
bool auto_euro; // automatically switch to euro in 2002 |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
172 |
bool serviceathelipad; // service helicopters at helipads automatically (no need to send to depot) |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
173 |
bool smooth_economy; // smooth economy |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
174 |
bool allow_shares; // allow the buying/selling of shares |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
175 |
byte dist_local_authority; // distance for town local authority, default 20 |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
176 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
177 |
byte wait_oneway_signal; // waitingtime in days before a oneway signal |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
178 |
byte wait_twoway_signal; // waitingtime in days before a twoway signal |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
179 |
|
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
180 |
uint8 map_x; // Size of map |
3126
be062e339a73
(svn r3739) -Fix: [Big endian CPUs] fixed bug introduced in rev 3720 where BE computers would read insane map sizes and crash as a result
bjarni
parents:
3051
diff
changeset
|
181 |
uint8 map_y; |
1218 | 182 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
183 |
byte drag_signals_density; // many signals density |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
184 |
bool ainew_active; // Is the new AI active? |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
185 |
bool ai_in_multiplayer; // Do we allow AIs in multiplayer |
835
f6a341f541d7
(svn r1312) -Add: Patch which is on by default: population in label of the town
truelight
parents:
788
diff
changeset
|
186 |
|
1700
e1fe3446d013
(svn r2204) - Add: [NPF] NPF now has a maximum number of nodes it will search. The default value is 5000 for now, which is an educated guess. Probably needs some finetuning. Hopefully this "feature" can be removed later on, when more sophisticated means of limiting the pathfinder have been implemented. This should make ships and larger networks playable for now, though.
matthijs
parents:
1688
diff
changeset
|
187 |
/* |
4549
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4387
diff
changeset
|
188 |
* New Path Finding |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4387
diff
changeset
|
189 |
*/ |
1247 | 190 |
bool new_pathfinding_all; /* Use the newest pathfinding algorithm for all */ |
191 |
||
1700
e1fe3446d013
(svn r2204) - Add: [NPF] NPF now has a maximum number of nodes it will search. The default value is 5000 for now, which is an educated guess. Probably needs some finetuning. Hopefully this "feature" can be removed later on, when more sophisticated means of limiting the pathfinder have been implemented. This should make ships and larger networks playable for now, though.
matthijs
parents:
1688
diff
changeset
|
192 |
/** |
4549
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4387
diff
changeset
|
193 |
* The maximum amount of search nodes a single NPF run should take. This |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4387
diff
changeset
|
194 |
* limit should make sure performance stays at acceptable levels at the cost |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4387
diff
changeset
|
195 |
* of not being perfect anymore. This will probably be fixed in a more |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4387
diff
changeset
|
196 |
* sophisticated way sometime soon |
106ed18a7675
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
rubidium
parents:
4387
diff
changeset
|
197 |
*/ |
1700
e1fe3446d013
(svn r2204) - Add: [NPF] NPF now has a maximum number of nodes it will search. The default value is 5000 for now, which is an educated guess. Probably needs some finetuning. Hopefully this "feature" can be removed later on, when more sophisticated means of limiting the pathfinder have been implemented. This should make ships and larger networks playable for now, though.
matthijs
parents:
1688
diff
changeset
|
198 |
uint32 npf_max_search_nodes; |
e1fe3446d013
(svn r2204) - Add: [NPF] NPF now has a maximum number of nodes it will search. The default value is 5000 for now, which is an educated guess. Probably needs some finetuning. Hopefully this "feature" can be removed later on, when more sophisticated means of limiting the pathfinder have been implemented. This should make ships and larger networks playable for now, though.
matthijs
parents:
1688
diff
changeset
|
199 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
200 |
uint32 npf_rail_firstred_penalty; /* The penalty for when the first signal is red (and it is not an exit or combo signal) */ |
1643
420cad9e62e4
(svn r2147) - Add: [NPF] Give red presignal exit signals a different (higher) penalty, to discourage trains from waiting at presignal exits.
matthijs
parents:
1529
diff
changeset
|
201 |
uint32 npf_rail_firstred_exit_penalty; /* The penalty for when the first signal is red (and it is an exit or combo signal) */ |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
202 |
uint32 npf_rail_lastred_penalty; /* The penalty for when the last signal is red */ |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
203 |
uint32 npf_rail_station_penalty; /* The penalty for station tiles */ |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
204 |
uint32 npf_rail_slope_penalty; /* The penalty for sloping upwards */ |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
205 |
uint32 npf_rail_curve_penalty; /* The penalty for curves */ |
1777
f703cf05b5b9
(svn r2281) - Fix: [ 1115204 ] [NPF] When pressing the goto depot button, trains will now also look behind it if there is no depot in front. If so, the train reverses immediately. This also work anywhere, not just at stations.
matthijs
parents:
1770
diff
changeset
|
206 |
uint32 npf_rail_depot_reverse_penalty; /* The penalty for reversing in depots */ |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
207 |
uint32 npf_buoy_penalty; /* The penalty for going over (through) a buoy */ |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
208 |
uint32 npf_water_curve_penalty; /* The penalty for curves */ |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
209 |
uint32 npf_road_curve_penalty; /* The penalty for curves */ |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
210 |
uint32 npf_crossing_penalty; /* The penalty for level crossings */ |
1247 | 211 |
|
835
f6a341f541d7
(svn r1312) -Add: Patch which is on by default: population in label of the town
truelight
parents:
788
diff
changeset
|
212 |
bool population_in_label; // Show the population of a town in his label? |
3900
2c84ed52709d
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3890
diff
changeset
|
213 |
|
2c84ed52709d
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3890
diff
changeset
|
214 |
/** YAPF settings */ |
2c84ed52709d
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3890
diff
changeset
|
215 |
YapfSettings yapf; |
2c84ed52709d
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
KUDr
parents:
3890
diff
changeset
|
216 |
|
0 | 217 |
} Patches; |
218 |
||
219 |
VARDEF Patches _patches; |
|
220 |
||
221 |
||
222 |
typedef struct Cheat { |
|
4237
7097574bc219
(svn r5805) -Fix: FS#189 Boolean cheats do not work
bjarni
parents:
4184
diff
changeset
|
223 |
bool been_used; // has this cheat been used before? |
7097574bc219
(svn r5805) -Fix: FS#189 Boolean cheats do not work
bjarni
parents:
4184
diff
changeset
|
224 |
bool value; // tells if the bool cheat is active or not |
0 | 225 |
} Cheat; |
226 |
||
227 |
||
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
188
diff
changeset
|
228 |
// WARNING! Do _not_ remove entries in Cheats struct or change the order |
0 | 229 |
// of the existing ones! Would break downward compatibility. |
230 |
// Only add new entries at the end of the struct! |
|
231 |
||
232 |
typedef struct Cheats { |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
233 |
Cheat magic_bulldozer; // dynamite industries, unmovables |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
234 |
Cheat switch_player; // change to another player |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
235 |
Cheat money; // get rich |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
236 |
Cheat crossing_tunnels; // allow tunnels that cross each other |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
237 |
Cheat build_in_pause; // build while in pause mode |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
238 |
Cheat no_jetcrash; // no jet will crash on small airports anymore |
100 | 239 |
Cheat switch_climate; |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
240 |
Cheat change_date; // changes date ingame |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
241 |
Cheat setup_prod; // setup raw-material production in game |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
242 |
Cheat elrail; // allow electric engines to be powered on conventional rail |
0 | 243 |
} Cheats; |
244 |
||
245 |
VARDEF Cheats _cheats; |
|
246 |
||
247 |
typedef struct Paths { |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
188
diff
changeset
|
248 |
char *personal_dir; // includes cfg file and save folder |
0 | 249 |
char *game_data_dir; // includes data, gm, lang |
250 |
char *data_dir; |
|
251 |
char *gm_dir; |
|
252 |
char *lang_dir; |
|
253 |
char *save_dir; |
|
254 |
char *autosave_dir; |
|
255 |
char *scenario_dir; |
|
4300
c7e43c47a2b9
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4293
diff
changeset
|
256 |
char *heightmap_dir; |
561
9a0c469a251c
(svn r970) Added 2nd data path for all non-windows OSes
bjarni
parents:
543
diff
changeset
|
257 |
char *second_data_dir; |
0 | 258 |
} Paths; |
259 |
||
260 |
VARDEF Paths _path; |
|
261 |
||
262 |
// NOSAVE: Used in palette animations only, not really important. |
|
263 |
VARDEF int _timer_counter; |
|
264 |
||
265 |
||
206 | 266 |
VARDEF uint32 _frame_counter; |
0 | 267 |
|
2422
897a01f7c624
(svn r2948) -Fix: the old AI needs a special flag that triggers all kind of special
truelight
parents:
2304
diff
changeset
|
268 |
VARDEF bool _is_old_ai_player; // current player is an oldAI player? (enables a lot of cheats..) |
0 | 269 |
|
270 |
VARDEF bool _do_autosave; |
|
271 |
VARDEF int _autosave_ctr; |
|
272 |
||
273 |
VARDEF byte _display_opt; |
|
274 |
VARDEF byte _pause; |
|
275 |
VARDEF int _caret_timer; |
|
1688
af2bb9bcb2ed
(svn r2192) - Add greater control to the 'message options' window. Now you can turn off the telegraphc ticker sound for summarized messages, or turn off news-messages altogether (you get a red blot to notify you though). The [<][>] set the settings in one way, while clicking on the option itself, cycles it. This commit also 'fixes' bugs [1166973], [1121484] and patch [1169930].
Darkvater
parents:
1643
diff
changeset
|
276 |
VARDEF uint32 _news_display_opt; |
af2bb9bcb2ed
(svn r2192) - Add greater control to the 'message options' window. Now you can turn off the telegraphc ticker sound for summarized messages, or turn off news-messages altogether (you get a red blot to notify you though). The [<][>] set the settings in one way, while clicking on the option itself, cycles it. This commit also 'fixes' bugs [1166973], [1121484] and patch [1169930].
Darkvater
parents:
1643
diff
changeset
|
277 |
VARDEF bool _news_ticker_sound; |
0 | 278 |
VARDEF byte _game_mode; |
279 |
||
280 |
VARDEF StringID _error_message; |
|
281 |
VARDEF int32 _additional_cash_required; |
|
282 |
||
472
ba697666956e
(svn r723) Increase size of dparam so more parameters can be passed to string output
tron
parents:
350
diff
changeset
|
283 |
VARDEF uint32 _decode_parameters[20]; |
0 | 284 |
|
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
285 |
VARDEF uint32 _pressed_key; // Low 8 bits = ASCII, High 16 bits = keycode |
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
286 |
VARDEF bool _ctrl_pressed; // Is Ctrl pressed? |
4387
3d8fe06fb594
(svn r6140) -Codechange: fix the comment of _shift_pressed. It doesn't react to ALT, but to SHIFT.
Darkvater
parents:
4344
diff
changeset
|
287 |
VARDEF bool _shift_pressed; // Is Shift pressed? |
4344
7e123fec5b0b
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
288 |
VARDEF byte _dirkeys; // 1 = left, 2 = up, 4 = right, 8 = down |
0 | 289 |
|
290 |
VARDEF bool _fullscreen; |
|
291 |
VARDEF bool _fast_forward; |
|
292 |
VARDEF bool _rightclick_emulate; |
|
293 |
||
294 |
// IN/OUT parameters to commands |
|
295 |
VARDEF byte _yearly_expenses_type; |
|
296 |
VARDEF TileIndex _terraform_err_tile; |
|
1977
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1958
diff
changeset
|
297 |
VARDEF TileIndex _build_tunnel_endtile; |
0 | 298 |
VARDEF bool _generating_world; |
299 |
||
300 |
// Deals with the type of the savegame, independent of extension |
|
301 |
typedef struct { |
|
2099
02c5a49863e9
(svn r2609) - Feature: remove extension from savegames/scenarios when browsing the folders.
Darkvater
parents:
2090
diff
changeset
|
302 |
int mode; // savegame/scenario type (old, new) |
02c5a49863e9
(svn r2609) - Feature: remove extension from savegames/scenarios when browsing the folders.
Darkvater
parents:
2090
diff
changeset
|
303 |
char name[MAX_PATH]; // name |
02c5a49863e9
(svn r2609) - Feature: remove extension from savegames/scenarios when browsing the folders.
Darkvater
parents:
2090
diff
changeset
|
304 |
char title[255]; // internal name of the game |
0 | 305 |
} SmallFiosItem; |
306 |
||
307 |
// Used when switching from the intro menu. |
|
308 |
VARDEF byte _switch_mode; |
|
172
8d8b3383470d
(svn r173) -Network: [1023231] Debug Code + ErrorBoxes + Load Game/Scenario. Added some more desync debug code and replaced some of the error() calls with some better error boxes. Hopefully find desyncs easier (sign_de)
darkvater
parents:
156
diff
changeset
|
309 |
VARDEF StringID _switch_mode_errorstr; |
0 | 310 |
VARDEF bool _exit_game; |
311 |
VARDEF SmallFiosItem _file_to_saveload; |
|
312 |
||
3977
513433ebd092
(svn r5155) - Remove the bridge branch merge (revision r5070)
tron
parents:
3933
diff
changeset
|
313 |
VARDEF byte _get_z_hint; // used as a hint to getslopez to return the right height at a bridge. |
0 | 314 |
|
315 |
VARDEF char *_newgrf_files[32]; |
|
316 |
||
317 |
||
318 |
VARDEF Vehicle *_place_clicked_vehicle; |
|
319 |
||
320 |
VARDEF char _ini_videodriver[16], _ini_musicdriver[16], _ini_sounddriver[16]; |
|
321 |
||
322 |
// Used for dynamic language support |
|
323 |
typedef struct { |
|
324 |
int num; // number of languages |
|
325 |
int curr; // currently selected language index |
|
326 |
char curr_file[32]; // currently selected language file |
|
327 |
StringID dropdown[32 + 1]; // used in settings dialog |
|
1500
a66721629bc0
(svn r2004) - Fix: [ 1149487 ] Autosave ignoring settings
Darkvater
parents:
1460
diff
changeset
|
328 |
struct { |
a66721629bc0
(svn r2004) - Fix: [ 1149487 ] Autosave ignoring settings
Darkvater
parents:
1460
diff
changeset
|
329 |
char *name; |
a66721629bc0
(svn r2004) - Fix: [ 1149487 ] Autosave ignoring settings
Darkvater
parents:
1460
diff
changeset
|
330 |
char *file; |
a66721629bc0
(svn r2004) - Fix: [ 1149487 ] Autosave ignoring settings
Darkvater
parents:
1460
diff
changeset
|
331 |
} ent[32]; |
0 | 332 |
} DynamicLanguages; |
333 |
||
334 |
VARDEF DynamicLanguages _dynlang; |
|
335 |
||
336 |
VARDEF int _num_resolutions; |
|
337 |
VARDEF uint16 _resolutions[32][2]; |
|
338 |
VARDEF uint16 _cur_resolution[2]; |
|
339 |
||
340 |
VARDEF char _savegame_format[8]; |
|
341 |
||
342 |
VARDEF char *_config_file; |
|
983
4765bf636f6b
(svn r1479) -Added highscore chart (accessible from the difficulty window) with top5 companies for a given difficulty (select the difficulty in the menu)
darkvater
parents:
930
diff
changeset
|
343 |
VARDEF char *_highscore_file; |
704
e843dd369938
(svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents:
679
diff
changeset
|
344 |
VARDEF char *_log_file; |
0 | 345 |
|
346 |
// NOSAVE: These can be recalculated from InitializeLandscapeVariables |
|
347 |
typedef struct { |
|
348 |
StringID names_s[NUM_CARGO]; |
|
2084
65639f898a50
(svn r2594) Fix: [strgen] Misc updates to the string system.
ludde
parents:
2078
diff
changeset
|
349 |
StringID names_long[NUM_CARGO]; |
0 | 350 |
StringID names_short[NUM_CARGO]; |
351 |
byte weights[NUM_CARGO]; |
|
352 |
SpriteID sprites[NUM_CARGO]; |
|
353 |
byte transit_days_1[NUM_CARGO]; |
|
354 |
byte transit_days_2[NUM_CARGO]; |
|
355 |
} CargoConst; |
|
356 |
||
357 |
VARDEF CargoConst _cargoc; |
|
358 |
||
359 |
||
534
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
360 |
static inline void SetDParamX(uint32 *s, uint n, uint32 v) |
0 | 361 |
{ |
534
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
362 |
s[n] = v; |
0 | 363 |
} |
364 |
||
534
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
365 |
static inline uint32 GetDParamX(const uint32 *s, uint n) |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
366 |
{ |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
367 |
return s[n]; |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
368 |
} |
0 | 369 |
|
534
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
370 |
static inline void SetDParam(uint n, uint32 v) |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
371 |
{ |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
372 |
assert(n < lengthof(_decode_parameters)); |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
373 |
_decode_parameters[n] = v; |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
374 |
} |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
375 |
|
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
376 |
static inline void SetDParam64(uint n, uint64 v) |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
377 |
{ |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
378 |
assert(n + 1 < lengthof(_decode_parameters)); |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
379 |
_decode_parameters[n + 0] = v & 0xffffffff; |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
380 |
_decode_parameters[n + 1] = v >> 32; |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
381 |
} |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
382 |
|
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
383 |
static inline uint32 GetDParam(uint n) |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
384 |
{ |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
385 |
assert(n < lengthof(_decode_parameters)); |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
386 |
return _decode_parameters[n]; |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
387 |
} |
306bc86eb23e
(svn r901) Small step in the process to clean up the DPARAM mess:
tron
parents:
523
diff
changeset
|
388 |
|
2055
4926ed1a7562
(svn r2564) Fix: Fixed conceptual issue in network_gui.c. AllocateName is not meant to be used by GUI-code, because it modifies the "game-state".
ludde
parents:
2044
diff
changeset
|
389 |
// Used to bind a C string name to a dparam number. |
4926ed1a7562
(svn r2564) Fix: Fixed conceptual issue in network_gui.c. AllocateName is not meant to be used by GUI-code, because it modifies the "game-state".
ludde
parents:
2044
diff
changeset
|
390 |
// NOTE: This has a short lifetime. You can't |
4926ed1a7562
(svn r2564) Fix: Fixed conceptual issue in network_gui.c. AllocateName is not meant to be used by GUI-code, because it modifies the "game-state".
ludde
parents:
2044
diff
changeset
|
391 |
// use this string much later or it will be gone. |
4926ed1a7562
(svn r2564) Fix: Fixed conceptual issue in network_gui.c. AllocateName is not meant to be used by GUI-code, because it modifies the "game-state".
ludde
parents:
2044
diff
changeset
|
392 |
void SetDParamStr(uint n, const char *str); |
4926ed1a7562
(svn r2564) Fix: Fixed conceptual issue in network_gui.c. AllocateName is not meant to be used by GUI-code, because it modifies the "game-state".
ludde
parents:
2044
diff
changeset
|
393 |
|
4926ed1a7562
(svn r2564) Fix: Fixed conceptual issue in network_gui.c. AllocateName is not meant to be used by GUI-code, because it modifies the "game-state".
ludde
parents:
2044
diff
changeset
|
394 |
// This function takes a C-string and allocates a temporary string ID. |
4926ed1a7562
(svn r2564) Fix: Fixed conceptual issue in network_gui.c. AllocateName is not meant to be used by GUI-code, because it modifies the "game-state".
ludde
parents:
2044
diff
changeset
|
395 |
// The duration of the bound string is valid only until the next acll to GetString, |
4926ed1a7562
(svn r2564) Fix: Fixed conceptual issue in network_gui.c. AllocateName is not meant to be used by GUI-code, because it modifies the "game-state".
ludde
parents:
2044
diff
changeset
|
396 |
// so be careful. |
4926ed1a7562
(svn r2564) Fix: Fixed conceptual issue in network_gui.c. AllocateName is not meant to be used by GUI-code, because it modifies the "game-state".
ludde
parents:
2044
diff
changeset
|
397 |
StringID BindCString(const char *str); |
4926ed1a7562
(svn r2564) Fix: Fixed conceptual issue in network_gui.c. AllocateName is not meant to be used by GUI-code, because it modifies the "game-state".
ludde
parents:
2044
diff
changeset
|
398 |
|
0 | 399 |
|
400 |
#define COPY_IN_DPARAM(offs,src,num) memcpy(_decode_parameters + offs, src, sizeof(uint32) * (num)) |
|
401 |
#define COPY_OUT_DPARAM(dst,offs,num) memcpy(dst,_decode_parameters + offs, sizeof(uint32) * (num)) |
|
402 |
||
403 |
||
889
64d2f7d5f02b
(svn r1375) -Fix: [1050990] Buying trains sometimes accounted for incorrectly. Was the result of the cost getting reset in a recursive call of docommand. That is fixed. In addition all cost-commands are typed explicitely. Please do not forget to do so or your costs will be credited to construction if you are unlucky.
darkvater
parents:
842
diff
changeset
|
404 |
#define SET_EXPENSES_TYPE(x) _yearly_expenses_type = x; |
0 | 405 |
|
406 |
/* landscape.c */ |
|
407 |
extern const byte _tileh_to_sprite[32]; |
|
4253
b468db807b66
(svn r5864) -Feature: Also allow horizontal and vertical rails on steep slopes
tron
parents:
4237
diff
changeset
|
408 |
extern const byte _inclined_tileh[16]; |
0 | 409 |
|
410 |
extern const TileTypeProcs * const _tile_type_procs[16]; |
|
411 |
||
412 |
/* misc */ |
|
413 |
VARDEF char _screenshot_name[128]; |
|
414 |
VARDEF byte _vehicle_design_names; |
|
415 |
||
704
e843dd369938
(svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents:
679
diff
changeset
|
416 |
/* Forking stuff */ |
e843dd369938
(svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents:
679
diff
changeset
|
417 |
VARDEF bool _dedicated_forks; |
e843dd369938
(svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents:
679
diff
changeset
|
418 |
|
0 | 419 |
#endif /* VARIABLES_H */ |