author | rubidium |
Sun, 20 Aug 2006 18:40:57 +0000 | |
changeset 4326 | c2ae4dbc1074 |
parent 4323 | 78204e7c3100 |
child 4330 | 7306bda145ab |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2536
8c4e298f4886
(svn r3065) -Codechange/Add: Modified the bridge drawing code so that the basic offset is read from the RailTypeInfo struct. This is (hopefully) the last DrawTile change on the way to electrified railways. While being at it, de-mystified the function a bit and added some asserts.
celestar
parents:
2526
diff
changeset
|
2 |
/** @file openttd.h */ |
2186 | 3 |
|
2075
7f0ca01392db
(svn r2585) - Fix [Makefile]: some small cleanups, remove warnings, and add mersenne to makefile (Luca)
Darkvater
parents:
2055
diff
changeset
|
4 |
#ifndef OPENTTD_H |
7f0ca01392db
(svn r2585) - Fix [Makefile]: some small cleanups, remove warnings, and add mersenne to makefile (Luca)
Darkvater
parents:
2055
diff
changeset
|
5 |
#define OPENTTD_H |
0 | 6 |
|
7 |
#ifndef VARDEF |
|
8 |
#define VARDEF extern |
|
9 |
#endif |
|
10 |
||
11 |
typedef struct Rect { |
|
12 |
int left,top,right,bottom; |
|
13 |
} Rect; |
|
14 |
||
15 |
typedef struct Point { |
|
16 |
int x,y; |
|
17 |
} Point; |
|
18 |
||
19 |
typedef struct Pair { |
|
20 |
int a; |
|
21 |
int b; |
|
22 |
} Pair; |
|
23 |
||
2159
3b634157c3b2
(svn r2669) Shuffle some more stuff around to reduce dependencies
tron
parents:
2153
diff
changeset
|
24 |
#include "map.h" |
3636
d87b21df2944
(svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums
tron
parents:
3529
diff
changeset
|
25 |
#include "slope.h" |
0 | 26 |
|
27 |
// Forward declarations of structs. |
|
28 |
typedef struct Vehicle Vehicle; |
|
29 |
typedef struct Depot Depot; |
|
395
4c990f33dab7
(svn r587) -newgrf: Rename all /Checkpoint/i tokens to 'Waypoint's. The name actually makes some sense and is also compatible with TTDPatch (pasky).
darkvater
parents:
265
diff
changeset
|
30 |
typedef struct Waypoint Waypoint; |
0 | 31 |
typedef struct Window Window; |
32 |
typedef struct Station Station; |
|
33 |
typedef struct ViewPort ViewPort; |
|
34 |
typedef struct Town Town; |
|
35 |
typedef struct NewsItem NewsItem; |
|
36 |
typedef struct Industry Industry; |
|
37 |
typedef struct DrawPixelInfo DrawPixelInfo; |
|
38 |
typedef uint16 VehicleID; |
|
3347
d5d8ace1bb13
(svn r4131) - CodeChange: Add proper semantics for StationID for such variables instead of using the general uint16-type. StationID was added for depots, waypoints and stations where necessary. We probably need to change GetDepot(), IsDepotIndex(), IsStationIndex(), GetWaypoint() and IsWaypointIndex() as well to use StationID.
Darkvater
parents:
3346
diff
changeset
|
39 |
typedef uint16 StationID; |
3346
96c5db77aa83
(svn r4130) - CodeChange: Add proper semantics for TownID for such variables instead of using the general uint16-type. We probably need to change GetTown() and IsTownIndex() as well to use TownID.
Darkvater
parents:
3344
diff
changeset
|
40 |
typedef uint16 TownID; |
1786
a54634efeb98
(svn r2290) - CodeChange: protect the next batch of commands. This brings us to a total of 61, which is 53% :)
Darkvater
parents:
1752
diff
changeset
|
41 |
typedef byte PlayerID; |
a54634efeb98
(svn r2290) - CodeChange: protect the next batch of commands. This brings us to a total of 61, which is 53% :)
Darkvater
parents:
1752
diff
changeset
|
42 |
typedef byte OrderID; |
1802
448f187042d3
(svn r2306) - CodeChange: Check the last commands; refits. This needed an extensive rewrite and global/local-cargo ID juggling and bitmasking. However with this done it looks better as well and is compatible with newgrf handling. Big thanks to HackyKid for doing most of the work. This also closes patch "[ 1199277 ] Command checks"
Darkvater
parents:
1786
diff
changeset
|
43 |
typedef byte CargoID; |
3825 | 44 |
typedef byte LandscapeID; |
0 | 45 |
typedef uint16 StringID; |
3173
1b75b9a6ff71
(svn r3805) - [FS#62] Fix doxygen comments to refer to the correct parameter. (sulai)
peter1138
parents:
3017
diff
changeset
|
46 |
typedef uint32 SpriteID; ///< The number of a sprite, without mapping bits and colortables |
1b75b9a6ff71
(svn r3805) - [FS#62] Fix doxygen comments to refer to the correct parameter. (sulai)
peter1138
parents:
3017
diff
changeset
|
47 |
typedef uint32 PalSpriteID; ///< The number of a sprite plus all the mapping bits and colortables |
1914
5ede46fd496f
(svn r2420) - Codechange: magic number elminitation of cursorsprites.
Darkvater
parents:
1891
diff
changeset
|
48 |
typedef uint32 CursorID; |
3173
1b75b9a6ff71
(svn r3805) - [FS#62] Fix doxygen comments to refer to the correct parameter. (sulai)
peter1138
parents:
3017
diff
changeset
|
49 |
typedef uint16 EngineID; ///< All enginenumbers should be of this type |
1b75b9a6ff71
(svn r3805) - [FS#62] Fix doxygen comments to refer to the correct parameter. (sulai)
peter1138
parents:
3017
diff
changeset
|
50 |
typedef uint16 UnitID; ///< All unitnumber stuff is of this type (or anyway, should be) |
0 | 51 |
|
52 |
typedef uint32 WindowNumber; |
|
53 |
typedef byte WindowClass; |
|
54 |
||
4293
2c24234a7aec
(svn r5926) -Codechange: make _cur_year contain the full year, instead of the offset since 1920
rubidium
parents:
4268
diff
changeset
|
55 |
enum { |
2c24234a7aec
(svn r5926) -Codechange: make _cur_year contain the full year, instead of the offset since 1920
rubidium
parents:
4268
diff
changeset
|
56 |
INVALID_YEAR = -1, |
4326
c2ae4dbc1074
(svn r5999) -Feature: change the original date format to a 32 bits format based at the year 0.
rubidium
parents:
4323
diff
changeset
|
57 |
INVALID_DATE = -1, |
4293
2c24234a7aec
(svn r5926) -Codechange: make _cur_year contain the full year, instead of the offset since 1920
rubidium
parents:
4268
diff
changeset
|
58 |
}; |
2c24234a7aec
(svn r5926) -Codechange: make _cur_year contain the full year, instead of the offset since 1920
rubidium
parents:
4268
diff
changeset
|
59 |
|
4326
c2ae4dbc1074
(svn r5999) -Feature: change the original date format to a 32 bits format based at the year 0.
rubidium
parents:
4323
diff
changeset
|
60 |
typedef int32 Year; |
c2ae4dbc1074
(svn r5999) -Feature: change the original date format to a 32 bits format based at the year 0.
rubidium
parents:
4323
diff
changeset
|
61 |
typedef int32 Date; |
4261
2ec8f5a9747b
(svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
rubidium
parents:
4238
diff
changeset
|
62 |
|
0 | 63 |
|
64 |
enum GameModes { |
|
65 |
GM_MENU, |
|
66 |
GM_NORMAL, |
|
67 |
GM_EDITOR |
|
68 |
}; |
|
69 |
||
70 |
enum SwitchModes { |
|
71 |
SM_NONE = 0, |
|
72 |
SM_NEWGAME = 1, |
|
73 |
SM_EDITOR = 2, |
|
74 |
SM_LOAD = 3, |
|
75 |
SM_MENU = 4, |
|
76 |
SM_SAVE = 5, |
|
77 |
SM_GENRANDLAND = 6, |
|
78 |
SM_LOAD_SCENARIO = 9, |
|
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
513
diff
changeset
|
79 |
SM_START_SCENARIO = 10, |
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
80 |
SM_START_HEIGHTMAP = 11, |
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
81 |
SM_LOAD_HEIGHTMAP = 12, |
0 | 82 |
}; |
83 |
||
2828
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
84 |
|
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
85 |
/* Modes for GenerateWorld */ |
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
86 |
enum GenerateWorldModes { |
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
87 |
GW_NEWGAME = 0, /* Generate a map for a new game */ |
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
88 |
GW_EMPTY = 1, /* Generate an empty map (sea-level) */ |
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
89 |
GW_RANDOM = 2, /* Generate a random map for SE */ |
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
90 |
GW_HEIGHTMAP = 3, /* Generate a newgame from a heightmap */ |
2828
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
91 |
}; |
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
92 |
|
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
93 |
/* Modes for InitializeGame, those are _bits_! */ |
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
94 |
enum InitializeGameModes { |
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
95 |
IG_NONE = 0, /* Don't do anything special */ |
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
96 |
IG_DATE_RESET = 1, /* Reset the date when initializing a game */ |
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
97 |
}; |
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
98 |
|
996de8e891c7
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
99 |
|
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
100 |
typedef enum TransportTypes { |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
101 |
/* These constants are for now linked to the representation of bridges |
3333 | 102 |
* and tunnels, so they can be used by GetTileTrackStatus_TunnelBridge. |
103 |
* In an ideal world, these constants would be used everywhere when |
|
104 |
* accessing tunnels and bridges. For now, you should just not change |
|
105 |
* the values for road and rail. |
|
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
106 |
*/ |
3017
915fae59d5e0
(svn r3597) Miscellaneous (I like that word) changes: Fix some indentation, add consts, reduce indentation level by short-circuit logic, convert if cascades to switch, whitespace, bracing, plus some minor stuff
tron
parents:
2828
diff
changeset
|
107 |
TRANSPORT_RAIL = 0, |
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
108 |
TRANSPORT_ROAD = 1, |
241
e6e62a5e7f52
(svn r242) -Fix: Pathfinding bug for road vehicles introduced in r160 fixed (blathijs)
darkvater
parents:
240
diff
changeset
|
109 |
TRANSPORT_WATER, // = 2 |
1967
c57192f4c121
(svn r2473) - Add: VehicleMayEnterTile(), which checks if the tile owner of a tile is correct for a vehicle to enter it. Based upon glx's code.
matthijs
parents:
1932
diff
changeset
|
110 |
TRANSPORT_END, |
c57192f4c121
(svn r2473) - Add: VehicleMayEnterTile(), which checks if the tile owner of a tile is correct for a vehicle to enter it. Based upon glx's code.
matthijs
parents:
1932
diff
changeset
|
111 |
INVALID_TRANSPORT = 0xff, |
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
112 |
} TransportType; |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
113 |
|
0 | 114 |
typedef struct TileInfo { |
115 |
uint x; |
|
116 |
uint y; |
|
3636
d87b21df2944
(svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums
tron
parents:
3529
diff
changeset
|
117 |
Slope tileh; |
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
118 |
TileIndex tile; |
0 | 119 |
uint z; |
120 |
} TileInfo; |
|
121 |
||
122 |
||
123 |
/* Display Options */ |
|
124 |
enum { |
|
1932
275d72f700e2
(svn r2438) - Feature: New display option, 'transparent station signs', makes station signs transparent instead of using a solid bar to draw text on (peter1138)
hackykid
parents:
1914
diff
changeset
|
125 |
DO_SHOW_TOWN_NAMES = 1 << 0, |
275d72f700e2
(svn r2438) - Feature: New display option, 'transparent station signs', makes station signs transparent instead of using a solid bar to draw text on (peter1138)
hackykid
parents:
1914
diff
changeset
|
126 |
DO_SHOW_STATION_NAMES = 1 << 1, |
275d72f700e2
(svn r2438) - Feature: New display option, 'transparent station signs', makes station signs transparent instead of using a solid bar to draw text on (peter1138)
hackykid
parents:
1914
diff
changeset
|
127 |
DO_SHOW_SIGNS = 1 << 2, |
275d72f700e2
(svn r2438) - Feature: New display option, 'transparent station signs', makes station signs transparent instead of using a solid bar to draw text on (peter1138)
hackykid
parents:
1914
diff
changeset
|
128 |
DO_FULL_ANIMATION = 1 << 3, |
275d72f700e2
(svn r2438) - Feature: New display option, 'transparent station signs', makes station signs transparent instead of using a solid bar to draw text on (peter1138)
hackykid
parents:
1914
diff
changeset
|
129 |
DO_TRANS_BUILDINGS = 1 << 4, |
275d72f700e2
(svn r2438) - Feature: New display option, 'transparent station signs', makes station signs transparent instead of using a solid bar to draw text on (peter1138)
hackykid
parents:
1914
diff
changeset
|
130 |
DO_FULL_DETAIL = 1 << 5, |
275d72f700e2
(svn r2438) - Feature: New display option, 'transparent station signs', makes station signs transparent instead of using a solid bar to draw text on (peter1138)
hackykid
parents:
1914
diff
changeset
|
131 |
DO_WAYPOINTS = 1 << 6, |
275d72f700e2
(svn r2438) - Feature: New display option, 'transparent station signs', makes station signs transparent instead of using a solid bar to draw text on (peter1138)
hackykid
parents:
1914
diff
changeset
|
132 |
DO_TRANS_SIGNS = 1 << 7, |
0 | 133 |
}; |
134 |
||
135 |
/* Landscape types */ |
|
136 |
enum { |
|
137 |
LT_NORMAL = 0, |
|
138 |
LT_HILLY = 1, |
|
139 |
LT_DESERT = 2, |
|
140 |
LT_CANDY = 3, |
|
141 |
||
142 |
NUM_LANDSCAPE = 4, |
|
143 |
}; |
|
144 |
||
145 |
enum { |
|
146 |
NUM_PRICES = 49, |
|
147 |
}; |
|
148 |
||
149 |
typedef struct Prices { |
|
150 |
int32 station_value; |
|
151 |
int32 build_rail; |
|
152 |
int32 build_road; |
|
153 |
int32 build_signals; |
|
154 |
int32 build_bridge; |
|
155 |
int32 build_train_depot; |
|
156 |
int32 build_road_depot; |
|
157 |
int32 build_ship_depot; |
|
158 |
int32 build_tunnel; |
|
159 |
int32 train_station_track; |
|
160 |
int32 train_station_length; |
|
161 |
int32 build_airport; |
|
162 |
int32 build_bus_station; |
|
163 |
int32 build_truck_station; |
|
164 |
int32 build_dock; |
|
165 |
int32 build_railvehicle; |
|
166 |
int32 build_railwagon; |
|
167 |
int32 aircraft_base; |
|
168 |
int32 roadveh_base; |
|
169 |
int32 ship_base; |
|
170 |
int32 build_trees; |
|
171 |
int32 terraform; |
|
172 |
int32 clear_1; |
|
173 |
int32 purchase_land; |
|
174 |
int32 clear_2; |
|
175 |
int32 clear_3; |
|
176 |
int32 remove_trees; |
|
177 |
int32 remove_rail; |
|
178 |
int32 remove_signals; |
|
179 |
int32 clear_bridge; |
|
180 |
int32 remove_train_depot; |
|
181 |
int32 remove_road_depot; |
|
182 |
int32 remove_ship_depot; |
|
183 |
int32 clear_tunnel; |
|
184 |
int32 clear_water; |
|
185 |
int32 remove_rail_station; |
|
186 |
int32 remove_airport; |
|
187 |
int32 remove_bus_station; |
|
188 |
int32 remove_truck_station; |
|
189 |
int32 remove_dock; |
|
190 |
int32 remove_house; |
|
191 |
int32 remove_road; |
|
192 |
int32 running_rail[3]; |
|
193 |
int32 aircraft_running; |
|
194 |
int32 roadveh_running; |
|
195 |
int32 ship_running; |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
168
diff
changeset
|
196 |
int32 build_industry; |
0 | 197 |
} Prices; |
198 |
||
199 |
#define GAME_DIFFICULTY_NUM 18 |
|
200 |
||
201 |
typedef struct GameDifficulty { |
|
202 |
int max_no_competitors; |
|
203 |
int competitor_start_time; |
|
204 |
int number_towns; |
|
205 |
int number_industries; |
|
206 |
int max_loan; |
|
207 |
int initial_interest; |
|
208 |
int vehicle_costs; |
|
209 |
int competitor_speed; |
|
2395
19b4da30806b
(svn r2921) -Codechange: moved all AI-code to 1 central place (ai/ai.c)
truelight
parents:
2380
diff
changeset
|
210 |
int competitor_intelligence; // no longer in use |
0 | 211 |
int vehicle_breakdowns; |
212 |
int subsidy_multiplier; |
|
213 |
int construction_cost; |
|
214 |
int terrain_type; |
|
215 |
int quantity_sea_lakes; |
|
216 |
int economy; |
|
217 |
int line_reverse_mode; |
|
218 |
int disasters; |
|
219 |
int town_council_tolerance; // minimum required town ratings to be allowed to demolish stuff |
|
220 |
} GameDifficulty; |
|
221 |
||
473
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
222 |
enum { |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
223 |
// Temperate |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
224 |
CT_PASSENGERS = 0, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
225 |
CT_COAL = 1, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
226 |
CT_MAIL = 2, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
227 |
CT_OIL = 3, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
228 |
CT_LIVESTOCK = 4, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
229 |
CT_GOODS = 5, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
230 |
CT_GRAIN = 6, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
231 |
CT_WOOD = 7, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
232 |
CT_IRON_ORE = 8, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
233 |
CT_STEEL = 9, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
234 |
CT_VALUABLES = 10, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
235 |
CT_FOOD = 11, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
236 |
|
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
237 |
// Arctic |
924
433faaf547c1
(svn r1412) -Feature/Fix: Aircraft refit options have been restricted to "sane"
celestar
parents:
849
diff
changeset
|
238 |
CT_WHEAT = 6, |
473
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
239 |
CT_HILLY_UNUSED = 8, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
240 |
CT_PAPER = 9, |
924
433faaf547c1
(svn r1412) -Feature/Fix: Aircraft refit options have been restricted to "sane"
celestar
parents:
849
diff
changeset
|
241 |
CT_GOLD = 10, |
473
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
242 |
|
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
243 |
// Tropic |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
244 |
CT_RUBBER = 1, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
245 |
CT_FRUIT = 4, |
924
433faaf547c1
(svn r1412) -Feature/Fix: Aircraft refit options have been restricted to "sane"
celestar
parents:
849
diff
changeset
|
246 |
CT_MAIZE = 6, |
473
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
247 |
CT_COPPER_ORE = 8, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
248 |
CT_WATER = 9, |
924
433faaf547c1
(svn r1412) -Feature/Fix: Aircraft refit options have been restricted to "sane"
celestar
parents:
849
diff
changeset
|
249 |
CT_DIAMONDS = 10, |
473
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
250 |
|
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
251 |
// Toyland |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
252 |
CT_SUGAR = 1, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
253 |
CT_TOYS = 3, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
254 |
CT_BATTERIES = 4, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
255 |
CT_CANDY = 5, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
256 |
CT_TOFFEE = 6, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
257 |
CT_COLA = 7, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
258 |
CT_COTTON_CANDY = 8, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
259 |
CT_BUBBLES = 9, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
260 |
CT_PLASTIC = 10, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
261 |
CT_FIZZY_DRINKS = 11, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
262 |
|
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
263 |
NUM_CARGO = 12, |
1004 | 264 |
|
265 |
CT_INVALID = 0xFF |
|
473
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
266 |
}; |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
267 |
|
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
268 |
typedef uint AcceptedCargo[NUM_CARGO]; |
0 | 269 |
|
270 |
typedef struct TileDesc { |
|
271 |
StringID str; |
|
272 |
byte owner; |
|
4297
47ce9665b4af
(svn r5934) -Cleanup: forgot some conversions to Year and to Date
rubidium
parents:
4293
diff
changeset
|
273 |
Date build_date; |
0 | 274 |
uint32 dparam[2]; |
275 |
} TileDesc; |
|
276 |
||
277 |
typedef struct { |
|
849
c6223dbdb202
(svn r1330) Increase size of some vars from int16 to int32 to guard against future overflows
tron
parents:
842
diff
changeset
|
278 |
int32 left; |
c6223dbdb202
(svn r1330) Increase size of some vars from int16 to int32 to guard against future overflows
tron
parents:
842
diff
changeset
|
279 |
int32 top; |
0 | 280 |
byte width_1, width_2; |
281 |
} ViewportSign; |
|
282 |
||
283 |
||
284 |
typedef void DrawTileProc(TileInfo *ti); |
|
4231
dea6a63dd058
(svn r5794) Pass the TileIndex plus x and y coordinates into GetSlopeZ_* instead of a TileInfo
tron
parents:
4143
diff
changeset
|
285 |
typedef uint GetSlopeZProc(TileIndex tile, uint x, uint y); |
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
286 |
typedef int32 ClearTileProc(TileIndex tile, byte flags); |
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
287 |
typedef void GetAcceptedCargoProc(TileIndex tile, AcceptedCargo res); |
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
288 |
typedef void GetTileDescProc(TileIndex tile, TileDesc *td); |
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
289 |
/* GetTileTrackStatusProcs return a value that contains the possible tracks |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
290 |
* that can be taken on a given tile by a given transport. The return value is |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
291 |
* composed as follows: 0xaabbccdd. ccdd and aabb are bitmasks of trackdirs, |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
292 |
* where bit n corresponds to trackdir n. ccdd are the trackdirs that are |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
293 |
* present in the tile (1==present, 0==not present), aabb is the signal |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
294 |
* status, if applicable (0==green/no signal, 1==red, note that this is |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
295 |
* reversed from map3/2[tile] for railway signals). |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
296 |
* |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
297 |
* The result (let's call it ts) is often used as follows: |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
298 |
* tracks = (byte)(ts | ts >>8) |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
299 |
* This effectively converts the present part of the result (ccdd) to a |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
300 |
* track bitmask, which disregards directions. Normally, this is the same as just |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
168
diff
changeset
|
301 |
* doing (byte)ts I think, although I am not really sure |
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
302 |
* |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
303 |
* A trackdir is combination of a track and a dir, where the lower three bits |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
304 |
* are a track, the fourth bit is the direction. these give 12 (or 14) |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
305 |
* possible options: 0-5 and 8-13, so we need 14 bits for a trackdir bitmask |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
168
diff
changeset
|
306 |
* above. |
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
307 |
*/ |
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
308 |
typedef uint32 GetTileTrackStatusProc(TileIndex tile, TransportType mode); |
3344
d86c852715fa
(svn r4128) - CodeChange: Add proper semantics for CargoID for such variables instead of using the general byte-type.
Darkvater
parents:
3333
diff
changeset
|
309 |
typedef void GetProducedCargoProc(TileIndex tile, CargoID *b); |
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
310 |
typedef void ClickTileProc(TileIndex tile); |
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
311 |
typedef void AnimateTileProc(TileIndex tile); |
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
312 |
typedef void TileLoopProc(TileIndex tile); |
2436
177cb6a8339f
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents:
2431
diff
changeset
|
313 |
typedef void ChangeTileOwnerProc(TileIndex tile, PlayerID old_player, PlayerID new_player); |
22 | 314 |
/* Return value has bit 0x2 set, when the vehicle enters a station. Then, |
315 |
* result << 8 contains the id of the station entered. If the return value has |
|
316 |
* bit 0x8 set, the vehicle could not and did not enter the tile. Are there |
|
317 |
* other bits that can be set? */ |
|
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
318 |
typedef uint32 VehicleEnterTileProc(Vehicle *v, TileIndex tile, int x, int y); |
3636
d87b21df2944
(svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums
tron
parents:
3529
diff
changeset
|
319 |
typedef Slope GetSlopeTilehProc(TileIndex, Slope tileh); |
0 | 320 |
|
321 |
typedef struct { |
|
322 |
DrawTileProc *draw_tile_proc; |
|
323 |
GetSlopeZProc *get_slope_z_proc; |
|
324 |
ClearTileProc *clear_tile_proc; |
|
325 |
GetAcceptedCargoProc *get_accepted_cargo_proc; |
|
326 |
GetTileDescProc *get_tile_desc_proc; |
|
327 |
GetTileTrackStatusProc *get_tile_track_status_proc; |
|
328 |
ClickTileProc *click_tile_proc; |
|
329 |
AnimateTileProc *animate_tile_proc; |
|
330 |
TileLoopProc *tile_loop_proc; |
|
331 |
ChangeTileOwnerProc *change_tile_owner_proc; |
|
332 |
GetProducedCargoProc *get_produced_cargo_proc; |
|
333 |
VehicleEnterTileProc *vehicle_enter_tile_proc; |
|
39 | 334 |
GetSlopeTilehProc *get_slope_tileh_proc; |
0 | 335 |
} TileTypeProcs; |
336 |
||
337 |
||
338 |
enum { |
|
339 |
WC_MAIN_WINDOW = 0x0, |
|
340 |
WC_MAIN_TOOLBAR = 0x1, |
|
341 |
WC_STATUS_BAR = 0x2, |
|
342 |
WC_BUILD_TOOLBAR = 0x3, |
|
343 |
WC_NEWS_WINDOW = 0x4, |
|
344 |
WC_TOWN_DIRECTORY = 0x5, |
|
345 |
WC_STATION_LIST = 0x6, |
|
346 |
WC_TOWN_VIEW = 0x7, |
|
347 |
WC_SMALLMAP = 0x8, |
|
348 |
WC_TRAINS_LIST = 0x9, |
|
349 |
WC_ROADVEH_LIST = 0xA, |
|
350 |
WC_SHIPS_LIST = 0xB, |
|
351 |
WC_AIRCRAFT_LIST = 0xC, |
|
352 |
WC_VEHICLE_VIEW = 0xD, |
|
353 |
WC_VEHICLE_DETAILS = 0xE, |
|
354 |
WC_VEHICLE_REFIT = 0xF, |
|
355 |
WC_VEHICLE_ORDERS = 0x10, |
|
356 |
WC_STATION_VIEW = 0x11, |
|
357 |
WC_VEHICLE_DEPOT = 0x12, |
|
358 |
WC_BUILD_VEHICLE = 0x13, |
|
359 |
WC_BUILD_BRIDGE = 0x14, |
|
360 |
WC_ERRMSG = 0x15, |
|
361 |
WC_ASK_ABANDON_GAME = 0x16, |
|
362 |
WC_QUIT_GAME = 0x17, |
|
363 |
WC_BUILD_STATION = 0x18, |
|
364 |
WC_BUS_STATION = 0x19, |
|
365 |
WC_TRUCK_STATION = 0x1A, |
|
366 |
WC_BUILD_DEPOT = 0x1B, |
|
367 |
WC_COMPANY = 0x1D, |
|
368 |
WC_FINANCES = 0x1E, |
|
369 |
WC_PLAYER_COLOR = 0x1F, |
|
370 |
WC_QUERY_STRING = 0x20, |
|
371 |
WC_SAVELOAD = 0x21, |
|
372 |
WC_SELECT_GAME = 0x22, |
|
373 |
WC_TOOLBAR_MENU = 0x24, |
|
374 |
WC_INCOME_GRAPH = 0x25, |
|
375 |
WC_OPERATING_PROFIT = 0x26, |
|
376 |
WC_TOOLTIPS = 0x27, |
|
377 |
WC_INDUSTRY_VIEW = 0x28, |
|
378 |
WC_PLAYER_FACE = 0x29, |
|
379 |
WC_LAND_INFO = 0x2A, |
|
380 |
WC_TOWN_AUTHORITY = 0x2B, |
|
381 |
WC_SUBSIDIES_LIST = 0x2C, |
|
382 |
WC_GRAPH_LEGEND = 0x2D, |
|
383 |
WC_DELIVERED_CARGO = 0x2E, |
|
384 |
WC_PERFORMANCE_HISTORY = 0x2F, |
|
385 |
WC_COMPANY_VALUE = 0x30, |
|
386 |
WC_COMPANY_LEAGUE = 0x31, |
|
387 |
WC_BUY_COMPANY = 0x32, |
|
388 |
WC_PAYMENT_RATES = 0x33, |
|
389 |
WC_ENGINE_PREVIEW = 0x35, |
|
390 |
WC_MUSIC_WINDOW = 0x36, |
|
391 |
WC_MUSIC_TRACK_SELECTION = 0x37, |
|
606
0e507bb0f63a
(svn r1030) Some toolbar icons are arranged differently:
dominik
parents:
543
diff
changeset
|
392 |
WC_SCEN_LAND_GEN = 0x38, // also used for landscaping toolbar |
0 | 393 |
WC_ASK_RESET_LANDSCAPE = 0x39, |
394 |
WC_SCEN_TOWN_GEN = 0x3A, |
|
395 |
WC_SCEN_INDUSTRY = 0x3B, |
|
396 |
WC_SCEN_BUILD_ROAD = 0x3C, |
|
606
0e507bb0f63a
(svn r1030) Some toolbar icons are arranged differently:
dominik
parents:
543
diff
changeset
|
397 |
WC_BUILD_TREES = 0x3D, |
0 | 398 |
WC_SEND_NETWORK_MSG = 0x3E, |
399 |
WC_DROPDOWN_MENU = 0x3F, |
|
400 |
WC_BUILD_INDUSTRY = 0x40, |
|
401 |
WC_GAME_OPTIONS = 0x41, |
|
402 |
WC_NETWORK_WINDOW = 0x42, |
|
403 |
WC_INDUSTRY_DIRECTORY = 0x43, |
|
404 |
WC_MESSAGE_HISTORY = 0x44, |
|
405 |
WC_CHEATS = 0x45, |
|
152
c3964b43943e
(svn r153) -Feature: [1009710] Extra Viewport. In the minimap dropdown menu, open a new viewport to have a quick look at your favorite map-positions. Independent zoom and quick jump to/from viewport (Dribbel)
darkvater
parents:
126
diff
changeset
|
406 |
WC_PERFORMANCE_DETAIL = 0x46, |
126 | 407 |
WC_CONSOLE = 0x47, |
152
c3964b43943e
(svn r153) -Feature: [1009710] Extra Viewport. In the minimap dropdown menu, open a new viewport to have a quick look at your favorite map-positions. Independent zoom and quick jump to/from viewport (Dribbel)
darkvater
parents:
126
diff
changeset
|
408 |
WC_EXTRA_VIEW_PORT = 0x48, |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
513
diff
changeset
|
409 |
WC_CLIENT_LIST = 0x49, |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
513
diff
changeset
|
410 |
WC_NETWORK_STATUS_WINDOW = 0x4A, |
759
6d087784a08a
(svn r1215) Feature: You can now make a custom currency by chosing "Custom..."
dominik
parents:
663
diff
changeset
|
411 |
WC_CUSTOM_CURRENCY = 0x4B, |
842 | 412 |
WC_REPLACE_VEHICLE = 0x4C, |
1875
3a1dba8ed6ea
(svn r2381) - Fix: [ 1210610 ] Endgame window on easy difficulty results in infinite loop. Oops. Seperated the window classes of endgame and highscreen.
Darkvater
parents:
1843
diff
changeset
|
413 |
WC_HIGHSCORE = 0x4D, |
3a1dba8ed6ea
(svn r2381) - Fix: [ 1210610 ] Endgame window on easy difficulty results in infinite loop. Oops. Seperated the window classes of endgame and highscreen.
Darkvater
parents:
1843
diff
changeset
|
414 |
WC_ENDSCREEN = 0x4E, |
3a1dba8ed6ea
(svn r2381) - Fix: [ 1210610 ] Endgame window on easy difficulty results in infinite loop. Oops. Seperated the window classes of endgame and highscreen.
Darkvater
parents:
1843
diff
changeset
|
415 |
WC_SIGN_LIST = 0x4F, |
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
416 |
WC_GENERATE_LANDSCAPE = 0x50, |
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
417 |
WC_GENERATE_PROGRESS_WINDOW = 0x51, |
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
418 |
WC_OK_CANCEL_QUERY = 0x52, |
0 | 419 |
}; |
420 |
||
421 |
||
422 |
enum { |
|
423 |
EXPENSES_CONSTRUCTION = 0, |
|
424 |
EXPENSES_NEW_VEHICLES = 1, |
|
425 |
EXPENSES_TRAIN_RUN = 2, |
|
426 |
EXPENSES_ROADVEH_RUN = 3, |
|
427 |
EXPENSES_AIRCRAFT_RUN = 4, |
|
428 |
EXPENSES_SHIP_RUN = 5, |
|
429 |
EXPENSES_PROPERTY = 6, |
|
430 |
EXPENSES_TRAIN_INC = 7, |
|
431 |
EXPENSES_ROADVEH_INC = 8, |
|
432 |
EXPENSES_AIRCRAFT_INC = 9, |
|
433 |
EXPENSES_SHIP_INC = 10, |
|
434 |
EXPENSES_LOAN_INT = 11, |
|
435 |
EXPENSES_OTHER = 12, |
|
436 |
}; |
|
437 |
||
438 |
// special string constants |
|
439 |
enum SpecialStrings { |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
168
diff
changeset
|
440 |
|
0 | 441 |
// special strings for town names. the town name is generated dynamically on request. |
442 |
SPECSTR_TOWNNAME_START = 0x20C0, |
|
443 |
SPECSTR_TOWNNAME_ENGLISH = SPECSTR_TOWNNAME_START, |
|
444 |
SPECSTR_TOWNNAME_FRENCH, |
|
445 |
SPECSTR_TOWNNAME_GERMAN, |
|
446 |
SPECSTR_TOWNNAME_AMERICAN, |
|
447 |
SPECSTR_TOWNNAME_LATIN, |
|
448 |
SPECSTR_TOWNNAME_SILLY, |
|
449 |
SPECSTR_TOWNNAME_SWEDISH, |
|
450 |
SPECSTR_TOWNNAME_DUTCH, |
|
451 |
SPECSTR_TOWNNAME_FINNISH, |
|
452 |
SPECSTR_TOWNNAME_POLISH, |
|
453 |
SPECSTR_TOWNNAME_SLOVAKISH, |
|
948 | 454 |
SPECSTR_TOWNNAME_NORWEGIAN, |
0 | 455 |
SPECSTR_TOWNNAME_HUNGARIAN, |
265 | 456 |
SPECSTR_TOWNNAME_AUSTRIAN, |
457 |
SPECSTR_TOWNNAME_ROMANIAN, |
|
458 |
SPECSTR_TOWNNAME_CZECH, |
|
1030
a5e4705a738c
(svn r1531) -Feature: [1039061] Swiss town-names (vulvulune)
darkvater
parents:
1004
diff
changeset
|
459 |
SPECSTR_TOWNNAME_SWISS, |
2431
c720f620253e
(svn r2957) - Feature: [ 1263280 ] Danish town names (fey_dk)
Darkvater
parents:
2395
diff
changeset
|
460 |
SPECSTR_TOWNNAME_DANISH, |
3698 | 461 |
SPECSTR_TOWNNAME_TURKISH, |
4143
5e6c2cfa6baa
(svn r5504) Feature : Added Italian town name generator. (sidew)
belugas
parents:
3825
diff
changeset
|
462 |
SPECSTR_TOWNNAME_ITALIAN, |
4312
b5867bca34c1
(svn r5965) -Feature: FS#261 Catalan Town Names generator (arnau)
bjarni
parents:
4300
diff
changeset
|
463 |
SPECSTR_TOWNNAME_CATALAN, |
b5867bca34c1
(svn r5965) -Feature: FS#261 Catalan Town Names generator (arnau)
bjarni
parents:
4300
diff
changeset
|
464 |
SPECSTR_TOWNNAME_LAST = SPECSTR_TOWNNAME_CATALAN, |
0 | 465 |
|
466 |
// special strings for player names on the form "TownName transport". |
|
467 |
SPECSTR_PLAYERNAME_START = 0x70EA, |
|
468 |
SPECSTR_PLAYERNAME_ENGLISH = SPECSTR_PLAYERNAME_START, |
|
469 |
SPECSTR_PLAYERNAME_FRENCH, |
|
470 |
SPECSTR_PLAYERNAME_GERMAN, |
|
471 |
SPECSTR_PLAYERNAME_AMERICAN, |
|
472 |
SPECSTR_PLAYERNAME_LATIN, |
|
473 |
SPECSTR_PLAYERNAME_SILLY, |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
168
diff
changeset
|
474 |
SPECSTR_PLAYERNAME_LAST = SPECSTR_PLAYERNAME_SILLY, |
0 | 475 |
|
476 |
SPECSTR_ANDCO_NAME = 0x70E6, |
|
477 |
SPECSTR_PRESIDENT_NAME = 0x70E7, |
|
478 |
SPECSTR_SONGNAME = 0x70E8, |
|
479 |
||
480 |
// reserve 32 strings for the *.lng files |
|
481 |
SPECSTR_LANGUAGE_START = 0x7100, |
|
482 |
SPECSTR_LANGUAGE_END = 0x711f, |
|
483 |
||
484 |
// reserve 32 strings for various screen resolutions |
|
485 |
SPECSTR_RESOLUTION_START = 0x7120, |
|
486 |
SPECSTR_RESOLUTION_END = 0x713f, |
|
487 |
||
488 |
// reserve 32 strings for screenshot formats |
|
489 |
SPECSTR_SCREENSHOT_START = 0x7140, |
|
490 |
SPECSTR_SCREENSHOT_END = 0x715F, |
|
491 |
||
2055
9361b56db8ba
(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:
1977
diff
changeset
|
492 |
// Used to implement SetDParamStr |
9361b56db8ba
(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:
1977
diff
changeset
|
493 |
STR_SPEC_DYNSTRING = 0xF800, |
9361b56db8ba
(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:
1977
diff
changeset
|
494 |
STR_SPEC_USERSTRING = 0xF808, |
0 | 495 |
}; |
496 |
||
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
497 |
typedef void PlaceProc(TileIndex tile); |
0 | 498 |
|
2526
cae4842086a9
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
499 |
enum { |
cae4842086a9
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
500 |
SORT_ASCENDING = 0, |
cae4842086a9
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
501 |
SORT_DESCENDING = 1, |
cae4842086a9
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
502 |
SORT_BY_DATE = 0, |
cae4842086a9
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
503 |
SORT_BY_NAME = 2 |
cae4842086a9
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
504 |
}; |
cae4842086a9
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
505 |
|
0 | 506 |
VARDEF byte _savegame_sort_order; |
507 |
||
508 |
#define INVALID_STRING_ID 0xFFFF |
|
509 |
||
510 |
enum { |
|
511 |
MAX_SCREEN_WIDTH = 2048, |
|
512 |
MAX_SCREEN_HEIGHT = 1200, |
|
513 |
}; |
|
514 |
||
1397
b04402b901cd
(svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
Darkvater
parents:
1363
diff
changeset
|
515 |
/* In certain windows you navigate with the arrow keys. Do not scroll the |
b04402b901cd
(svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
Darkvater
parents:
1363
diff
changeset
|
516 |
* gameview when here. Bitencoded variable that only allows scrolling if all |
b04402b901cd
(svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
Darkvater
parents:
1363
diff
changeset
|
517 |
* elements are zero */ |
b04402b901cd
(svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
Darkvater
parents:
1363
diff
changeset
|
518 |
enum { |
b04402b901cd
(svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
Darkvater
parents:
1363
diff
changeset
|
519 |
SCROLL_CON = 0, |
b04402b901cd
(svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
Darkvater
parents:
1363
diff
changeset
|
520 |
SCROLL_EDIT = 1, |
b04402b901cd
(svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
Darkvater
parents:
1363
diff
changeset
|
521 |
SCROLL_SAVE = 2, |
1843
733f83b6483a
(svn r2348) - Fix: Do not scroll the game with the arrow keys when the chatbox is open
Darkvater
parents:
1802
diff
changeset
|
522 |
SCROLL_CHAT = 4, |
1397
b04402b901cd
(svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
Darkvater
parents:
1363
diff
changeset
|
523 |
}; |
b04402b901cd
(svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
Darkvater
parents:
1363
diff
changeset
|
524 |
VARDEF byte _no_scroll; |
b04402b901cd
(svn r1901) - Fix: unwanted behaviour of the savegame dialog, as well as a bug with a sloppy termination of a string. When any editbox is open, scrolling is disabled. If any new types of editboxes come up, please use SET/CLRBIT of _no_scroll with its unique identifier (ttd.h)
Darkvater
parents:
1363
diff
changeset
|
525 |
|
2380
3b26659b4a9a
(svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop.
Darkvater
parents:
2254
diff
changeset
|
526 |
/** To have a concurrently running thread interface with the main program, use |
3b26659b4a9a
(svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop.
Darkvater
parents:
2254
diff
changeset
|
527 |
* the OTTD_SendThreadMessage() function. Actions to perform upon the message are handled |
3b26659b4a9a
(svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop.
Darkvater
parents:
2254
diff
changeset
|
528 |
* in the ProcessSentMessage() function */ |
3b26659b4a9a
(svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop.
Darkvater
parents:
2254
diff
changeset
|
529 |
typedef enum ThreadMsgs { |
4323
78204e7c3100
(svn r5977) -Fix [FS#78]: never set I-am-a-thread bool to true IN the thread. Machines with
truelight
parents:
4312
diff
changeset
|
530 |
MSG_OTTD_NO_MESSAGE, |
78204e7c3100
(svn r5977) -Fix [FS#78]: never set I-am-a-thread bool to true IN the thread. Machines with
truelight
parents:
4312
diff
changeset
|
531 |
MSG_OTTD_SAVETHREAD_DONE, |
78204e7c3100
(svn r5977) -Fix [FS#78]: never set I-am-a-thread bool to true IN the thread. Machines with
truelight
parents:
4312
diff
changeset
|
532 |
MSG_OTTD_SAVETHREAD_ERROR, |
2380
3b26659b4a9a
(svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop.
Darkvater
parents:
2254
diff
changeset
|
533 |
} ThreadMsg; |
3b26659b4a9a
(svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop.
Darkvater
parents:
2254
diff
changeset
|
534 |
|
3b26659b4a9a
(svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop.
Darkvater
parents:
2254
diff
changeset
|
535 |
void OTTD_SendThreadMessage(ThreadMsg msg); |
3b26659b4a9a
(svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop.
Darkvater
parents:
2254
diff
changeset
|
536 |
|
2075
7f0ca01392db
(svn r2585) - Fix [Makefile]: some small cleanups, remove warnings, and add mersenne to makefile (Luca)
Darkvater
parents:
2055
diff
changeset
|
537 |
#endif /* OPENTTD_H */ |