author | Darkvater |
Tue, 31 Oct 2006 23:04:47 +0000 | |
changeset 5009 | 0ae33f104d4f |
parent 4956 | 49ecd2a36222 |
child 5108 | aeaef6fe53b7 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2536
634914d741b4
(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
21d2986569d1
(svn r2585) - Fix [Makefile]: some small cleanups, remove warnings, and add mersenne to makefile (Luca)
Darkvater
parents:
2055
diff
changeset
|
4 |
#ifndef OPENTTD_H |
21d2986569d1
(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 |
||
4956
49ecd2a36222
(svn r6955) -Codechange: Change some variable names for _textmessage_box, and replace 5 different
Darkvater
parents:
4849
diff
changeset
|
15 |
typedef struct Oblong { |
49ecd2a36222
(svn r6955) -Codechange: Change some variable names for _textmessage_box, and replace 5 different
Darkvater
parents:
4849
diff
changeset
|
16 |
int x, y; |
49ecd2a36222
(svn r6955) -Codechange: Change some variable names for _textmessage_box, and replace 5 different
Darkvater
parents:
4849
diff
changeset
|
17 |
int width, height; |
49ecd2a36222
(svn r6955) -Codechange: Change some variable names for _textmessage_box, and replace 5 different
Darkvater
parents:
4849
diff
changeset
|
18 |
} Oblong; |
49ecd2a36222
(svn r6955) -Codechange: Change some variable names for _textmessage_box, and replace 5 different
Darkvater
parents:
4849
diff
changeset
|
19 |
|
4609
954fe701062f
(svn r6462) -Codechange: Have GetStringWidth() return width as well as the height bounding
Darkvater
parents:
4554
diff
changeset
|
20 |
typedef struct BoundingRect { |
954fe701062f
(svn r6462) -Codechange: Have GetStringWidth() return width as well as the height bounding
Darkvater
parents:
4554
diff
changeset
|
21 |
int width; |
954fe701062f
(svn r6462) -Codechange: Have GetStringWidth() return width as well as the height bounding
Darkvater
parents:
4554
diff
changeset
|
22 |
int height; |
954fe701062f
(svn r6462) -Codechange: Have GetStringWidth() return width as well as the height bounding
Darkvater
parents:
4554
diff
changeset
|
23 |
} BoundingRect; |
954fe701062f
(svn r6462) -Codechange: Have GetStringWidth() return width as well as the height bounding
Darkvater
parents:
4554
diff
changeset
|
24 |
|
0 | 25 |
typedef struct Point { |
26 |
int x,y; |
|
27 |
} Point; |
|
28 |
||
29 |
typedef struct Pair { |
|
30 |
int a; |
|
31 |
int b; |
|
32 |
} Pair; |
|
33 |
||
2159
f6284cf5fab0
(svn r2669) Shuffle some more stuff around to reduce dependencies
tron
parents:
2153
diff
changeset
|
34 |
#include "map.h" |
3636
a36cc46e754d
(svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums
tron
parents:
3529
diff
changeset
|
35 |
#include "slope.h" |
0 | 36 |
|
37 |
// Forward declarations of structs. |
|
38 |
typedef struct Vehicle Vehicle; |
|
39 |
typedef struct Depot Depot; |
|
395
788a9bba0889
(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
|
40 |
typedef struct Waypoint Waypoint; |
0 | 41 |
typedef struct Window Window; |
42 |
typedef struct Station Station; |
|
43 |
typedef struct ViewPort ViewPort; |
|
44 |
typedef struct Town Town; |
|
45 |
typedef struct NewsItem NewsItem; |
|
46 |
typedef struct Industry Industry; |
|
47 |
typedef struct DrawPixelInfo DrawPixelInfo; |
|
4401
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
48 |
typedef byte PlayerID; |
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
49 |
typedef byte VehicleOrderID; ///< The index of an order within its current vehicle (not pool related) |
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
50 |
typedef byte CargoID; |
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
51 |
typedef byte LandscapeID; |
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
52 |
typedef uint32 SpriteID; ///< The number of a sprite, without mapping bits and colortables |
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
53 |
typedef uint32 PalSpriteID; ///< The number of a sprite plus all the mapping bits and colortables |
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
54 |
typedef uint32 CursorID; |
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
55 |
typedef uint16 EngineID; |
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
56 |
typedef uint16 UnitID; |
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
57 |
typedef uint16 StringID; |
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
58 |
|
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
59 |
/* IDs used in Pools */ |
0 | 60 |
typedef uint16 VehicleID; |
3347
0ddacd451b81
(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
|
61 |
typedef uint16 StationID; |
4397
4160539a3062
(svn r6150) -Codechange: introduced and used RoadStopID where needed
truelight
parents:
4394
diff
changeset
|
62 |
typedef uint16 RoadStopID; |
3346
a0d4def7d934
(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
|
63 |
typedef uint16 TownID; |
4330
cf31daa8b321
(svn r6005) -Cleanup: introduce IndustryID and use it
rubidium
parents:
4326
diff
changeset
|
64 |
typedef uint16 IndustryID; |
4388
c8a66d26e146
(svn r6141) -Codechange: introduced DepotID and used it as much as possible
truelight
parents:
4349
diff
changeset
|
65 |
typedef uint16 DepotID; |
4389
18d6ccfb5335
(svn r6142) -Codechange: added WaypointID (sorry DV, couldn't splits it anymore)
truelight
parents:
4388
diff
changeset
|
66 |
typedef uint16 WaypointID; |
4392
68ca7ef4f600
(svn r6145) -Codechange: added OrderID to indicate Order indexes out of the pool
truelight
parents:
4391
diff
changeset
|
67 |
typedef uint16 OrderID; |
4401
ca197fcb332b
(svn r6154) -Cleanup: ordered the IDs that have to do with pools from the others
truelight
parents:
4397
diff
changeset
|
68 |
typedef uint16 SignID; |
4348
d9ddb0558a48
(svn r6049) -Codechange: forgot EngineRenew in r6047
truelight
parents:
4344
diff
changeset
|
69 |
typedef uint16 EngineRenewID; |
4527
fa30d19685c2
(svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
tron
parents:
4434
diff
changeset
|
70 |
typedef uint16 DestinationID; |
4389
18d6ccfb5335
(svn r6142) -Codechange: added WaypointID (sorry DV, couldn't splits it anymore)
truelight
parents:
4388
diff
changeset
|
71 |
|
4527
fa30d19685c2
(svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
tron
parents:
4434
diff
changeset
|
72 |
/* DestinationID must be at least as large as every these below, because it can |
fa30d19685c2
(svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
tron
parents:
4434
diff
changeset
|
73 |
* be any of them |
fa30d19685c2
(svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
tron
parents:
4434
diff
changeset
|
74 |
*/ |
fa30d19685c2
(svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
tron
parents:
4434
diff
changeset
|
75 |
assert_compile(sizeof(DestinationID) == sizeof(DepotID)); |
fa30d19685c2
(svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
tron
parents:
4434
diff
changeset
|
76 |
assert_compile(sizeof(DestinationID) == sizeof(WaypointID)); |
fa30d19685c2
(svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
tron
parents:
4434
diff
changeset
|
77 |
assert_compile(sizeof(DestinationID) == sizeof(StationID)); |
0 | 78 |
|
79 |
typedef uint32 WindowNumber; |
|
80 |
typedef byte WindowClass; |
|
81 |
||
4293
4b7006c1b5eb
(svn r5926) -Codechange: make _cur_year contain the full year, instead of the offset since 1920
rubidium
parents:
4268
diff
changeset
|
82 |
enum { |
4b7006c1b5eb
(svn r5926) -Codechange: make _cur_year contain the full year, instead of the offset since 1920
rubidium
parents:
4268
diff
changeset
|
83 |
INVALID_YEAR = -1, |
4326
2e2c9d21ed96
(svn r5999) -Feature: change the original date format to a 32 bits format based at the year 0.
rubidium
parents:
4323
diff
changeset
|
84 |
INVALID_DATE = -1, |
4293
4b7006c1b5eb
(svn r5926) -Codechange: make _cur_year contain the full year, instead of the offset since 1920
rubidium
parents:
4268
diff
changeset
|
85 |
}; |
4b7006c1b5eb
(svn r5926) -Codechange: make _cur_year contain the full year, instead of the offset since 1920
rubidium
parents:
4268
diff
changeset
|
86 |
|
4326
2e2c9d21ed96
(svn r5999) -Feature: change the original date format to a 32 bits format based at the year 0.
rubidium
parents:
4323
diff
changeset
|
87 |
typedef int32 Year; |
2e2c9d21ed96
(svn r5999) -Feature: change the original date format to a 32 bits format based at the year 0.
rubidium
parents:
4323
diff
changeset
|
88 |
typedef int32 Date; |
4261
28670f743746
(svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
rubidium
parents:
4238
diff
changeset
|
89 |
|
0 | 90 |
|
91 |
enum GameModes { |
|
92 |
GM_MENU, |
|
93 |
GM_NORMAL, |
|
94 |
GM_EDITOR |
|
95 |
}; |
|
96 |
||
97 |
enum SwitchModes { |
|
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:
4330
diff
changeset
|
98 |
SM_NONE = 0, |
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:
4330
diff
changeset
|
99 |
SM_NEWGAME = 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:
4330
diff
changeset
|
100 |
SM_EDITOR = 2, |
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:
4330
diff
changeset
|
101 |
SM_LOAD = 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:
4330
diff
changeset
|
102 |
SM_MENU = 4, |
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:
4330
diff
changeset
|
103 |
SM_SAVE = 5, |
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:
4330
diff
changeset
|
104 |
SM_GENRANDLAND = 6, |
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:
4330
diff
changeset
|
105 |
SM_LOAD_SCENARIO = 9, |
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:
4330
diff
changeset
|
106 |
SM_START_SCENARIO = 10, |
4300
c7e43c47a2b9
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
107 |
SM_START_HEIGHTMAP = 11, |
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:
4330
diff
changeset
|
108 |
SM_LOAD_HEIGHTMAP = 12, |
0 | 109 |
}; |
110 |
||
2828
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
111 |
|
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
112 |
/* Modes for GenerateWorld */ |
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
113 |
enum GenerateWorldModes { |
4300
c7e43c47a2b9
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
114 |
GW_NEWGAME = 0, /* Generate a map for a new game */ |
c7e43c47a2b9
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
115 |
GW_EMPTY = 1, /* Generate an empty map (sea-level) */ |
c7e43c47a2b9
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
116 |
GW_RANDOM = 2, /* Generate a random map for SE */ |
c7e43c47a2b9
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
117 |
GW_HEIGHTMAP = 3, /* Generate a newgame from a heightmap */ |
2828
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
118 |
}; |
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
119 |
|
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
120 |
/* Modes for InitializeGame, those are _bits_! */ |
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
121 |
enum InitializeGameModes { |
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
122 |
IG_NONE = 0, /* Don't do anything special */ |
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
123 |
IG_DATE_RESET = 1, /* Reset the date when initializing a game */ |
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
124 |
}; |
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
125 |
|
342f02f7c0d4
(svn r3376) -Codechange: made enums for GenerateWorld and InitializeGame 'mode'
truelight
parents:
2794
diff
changeset
|
126 |
|
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
127 |
typedef enum TransportTypes { |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
128 |
/* These constants are for now linked to the representation of bridges |
3333 | 129 |
* and tunnels, so they can be used by GetTileTrackStatus_TunnelBridge. |
130 |
* In an ideal world, these constants would be used everywhere when |
|
131 |
* accessing tunnels and bridges. For now, you should just not change |
|
132 |
* the values for road and rail. |
|
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
133 |
*/ |
3017
a75caf4efa2d
(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
|
134 |
TRANSPORT_RAIL = 0, |
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
135 |
TRANSPORT_ROAD = 1, |
4434
a08cb4b5c179
(svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc.
rubidium
parents:
4401
diff
changeset
|
136 |
TRANSPORT_WATER, // = 2 |
1967
a01f4d5dd957
(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
|
137 |
TRANSPORT_END, |
a01f4d5dd957
(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
|
138 |
INVALID_TRANSPORT = 0xff, |
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
139 |
} TransportType; |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
140 |
|
0 | 141 |
typedef struct TileInfo { |
142 |
uint x; |
|
143 |
uint y; |
|
3636
a36cc46e754d
(svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums
tron
parents:
3529
diff
changeset
|
144 |
Slope tileh; |
1977
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
145 |
TileIndex tile; |
0 | 146 |
uint z; |
147 |
} TileInfo; |
|
148 |
||
149 |
||
150 |
/* Display Options */ |
|
151 |
enum { |
|
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:
4330
diff
changeset
|
152 |
DO_SHOW_TOWN_NAMES = 1 << 0, |
1932
c962fd53c11a
(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
|
153 |
DO_SHOW_STATION_NAMES = 1 << 1, |
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:
4330
diff
changeset
|
154 |
DO_SHOW_SIGNS = 1 << 2, |
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:
4330
diff
changeset
|
155 |
DO_FULL_ANIMATION = 1 << 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:
4330
diff
changeset
|
156 |
DO_TRANS_BUILDINGS = 1 << 4, |
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:
4330
diff
changeset
|
157 |
DO_FULL_DETAIL = 1 << 5, |
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:
4330
diff
changeset
|
158 |
DO_WAYPOINTS = 1 << 6, |
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:
4330
diff
changeset
|
159 |
DO_TRANS_SIGNS = 1 << 7, |
0 | 160 |
}; |
161 |
||
162 |
/* Landscape types */ |
|
163 |
enum { |
|
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:
4330
diff
changeset
|
164 |
LT_NORMAL = 0, |
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:
4330
diff
changeset
|
165 |
LT_HILLY = 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:
4330
diff
changeset
|
166 |
LT_DESERT = 2, |
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:
4330
diff
changeset
|
167 |
LT_CANDY = 3, |
0 | 168 |
|
169 |
NUM_LANDSCAPE = 4, |
|
170 |
}; |
|
171 |
||
172 |
enum { |
|
173 |
NUM_PRICES = 49, |
|
174 |
}; |
|
175 |
||
176 |
typedef struct Prices { |
|
177 |
int32 station_value; |
|
178 |
int32 build_rail; |
|
179 |
int32 build_road; |
|
180 |
int32 build_signals; |
|
181 |
int32 build_bridge; |
|
182 |
int32 build_train_depot; |
|
183 |
int32 build_road_depot; |
|
184 |
int32 build_ship_depot; |
|
185 |
int32 build_tunnel; |
|
186 |
int32 train_station_track; |
|
187 |
int32 train_station_length; |
|
188 |
int32 build_airport; |
|
189 |
int32 build_bus_station; |
|
190 |
int32 build_truck_station; |
|
191 |
int32 build_dock; |
|
192 |
int32 build_railvehicle; |
|
193 |
int32 build_railwagon; |
|
194 |
int32 aircraft_base; |
|
195 |
int32 roadveh_base; |
|
196 |
int32 ship_base; |
|
197 |
int32 build_trees; |
|
198 |
int32 terraform; |
|
199 |
int32 clear_1; |
|
200 |
int32 purchase_land; |
|
201 |
int32 clear_2; |
|
202 |
int32 clear_3; |
|
203 |
int32 remove_trees; |
|
204 |
int32 remove_rail; |
|
205 |
int32 remove_signals; |
|
206 |
int32 clear_bridge; |
|
207 |
int32 remove_train_depot; |
|
208 |
int32 remove_road_depot; |
|
209 |
int32 remove_ship_depot; |
|
210 |
int32 clear_tunnel; |
|
211 |
int32 clear_water; |
|
212 |
int32 remove_rail_station; |
|
213 |
int32 remove_airport; |
|
214 |
int32 remove_bus_station; |
|
215 |
int32 remove_truck_station; |
|
216 |
int32 remove_dock; |
|
217 |
int32 remove_house; |
|
218 |
int32 remove_road; |
|
219 |
int32 running_rail[3]; |
|
220 |
int32 aircraft_running; |
|
221 |
int32 roadveh_running; |
|
222 |
int32 ship_running; |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
168
diff
changeset
|
223 |
int32 build_industry; |
0 | 224 |
} Prices; |
225 |
||
226 |
#define GAME_DIFFICULTY_NUM 18 |
|
227 |
||
228 |
typedef struct GameDifficulty { |
|
229 |
int max_no_competitors; |
|
230 |
int competitor_start_time; |
|
231 |
int number_towns; |
|
232 |
int number_industries; |
|
233 |
int max_loan; |
|
234 |
int initial_interest; |
|
235 |
int vehicle_costs; |
|
236 |
int competitor_speed; |
|
2395
d1629f64d157
(svn r2921) -Codechange: moved all AI-code to 1 central place (ai/ai.c)
truelight
parents:
2380
diff
changeset
|
237 |
int competitor_intelligence; // no longer in use |
0 | 238 |
int vehicle_breakdowns; |
239 |
int subsidy_multiplier; |
|
240 |
int construction_cost; |
|
241 |
int terrain_type; |
|
242 |
int quantity_sea_lakes; |
|
243 |
int economy; |
|
244 |
int line_reverse_mode; |
|
245 |
int disasters; |
|
4434
a08cb4b5c179
(svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc.
rubidium
parents:
4401
diff
changeset
|
246 |
int town_council_tolerance; // minimum required town ratings to be allowed to demolish stuff |
0 | 247 |
} GameDifficulty; |
248 |
||
473
77f0ef57e7cf
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
249 |
enum { |
77f0ef57e7cf
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
250 |
// Temperate |
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:
4330
diff
changeset
|
251 |
CT_PASSENGERS = 0, |
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:
4330
diff
changeset
|
252 |
CT_COAL = 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:
4330
diff
changeset
|
253 |
CT_MAIL = 2, |
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:
4330
diff
changeset
|
254 |
CT_OIL = 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:
4330
diff
changeset
|
255 |
CT_LIVESTOCK = 4, |
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:
4330
diff
changeset
|
256 |
CT_GOODS = 5, |
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:
4330
diff
changeset
|
257 |
CT_GRAIN = 6, |
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:
4330
diff
changeset
|
258 |
CT_WOOD = 7, |
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:
4330
diff
changeset
|
259 |
CT_IRON_ORE = 8, |
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:
4330
diff
changeset
|
260 |
CT_STEEL = 9, |
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:
4330
diff
changeset
|
261 |
CT_VALUABLES = 10, |
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:
4330
diff
changeset
|
262 |
CT_FOOD = 11, |
473
77f0ef57e7cf
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
263 |
|
77f0ef57e7cf
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
264 |
// Arctic |
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:
4330
diff
changeset
|
265 |
CT_WHEAT = 6, |
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:
4330
diff
changeset
|
266 |
CT_HILLY_UNUSED = 8, |
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:
4330
diff
changeset
|
267 |
CT_PAPER = 9, |
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:
4330
diff
changeset
|
268 |
CT_GOLD = 10, |
473
77f0ef57e7cf
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
269 |
|
77f0ef57e7cf
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
270 |
// Tropic |
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:
4330
diff
changeset
|
271 |
CT_RUBBER = 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:
4330
diff
changeset
|
272 |
CT_FRUIT = 4, |
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:
4330
diff
changeset
|
273 |
CT_MAIZE = 6, |
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:
4330
diff
changeset
|
274 |
CT_COPPER_ORE = 8, |
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:
4330
diff
changeset
|
275 |
CT_WATER = 9, |
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:
4330
diff
changeset
|
276 |
CT_DIAMONDS = 10, |
473
77f0ef57e7cf
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
277 |
|
77f0ef57e7cf
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
278 |
// Toyland |
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:
4330
diff
changeset
|
279 |
CT_SUGAR = 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:
4330
diff
changeset
|
280 |
CT_TOYS = 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:
4330
diff
changeset
|
281 |
CT_BATTERIES = 4, |
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:
4330
diff
changeset
|
282 |
CT_CANDY = 5, |
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:
4330
diff
changeset
|
283 |
CT_TOFFEE = 6, |
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:
4330
diff
changeset
|
284 |
CT_COLA = 7, |
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:
4330
diff
changeset
|
285 |
CT_COTTON_CANDY = 8, |
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:
4330
diff
changeset
|
286 |
CT_BUBBLES = 9, |
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:
4330
diff
changeset
|
287 |
CT_PLASTIC = 10, |
473
77f0ef57e7cf
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
288 |
CT_FIZZY_DRINKS = 11, |
77f0ef57e7cf
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
289 |
|
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:
4330
diff
changeset
|
290 |
NUM_CARGO = 12, |
1004 | 291 |
|
4554
8342a6d0a366
(svn r6393) -Fix: [autoreplace] now refit costs are added to the estimated costs (could spend more than allowed when estimate and actual cost were not the same)
bjarni
parents:
4527
diff
changeset
|
292 |
CT_NO_REFIT = 0xFE, |
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:
4330
diff
changeset
|
293 |
CT_INVALID = 0xFF |
473
77f0ef57e7cf
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
294 |
}; |
77f0ef57e7cf
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
295 |
|
77f0ef57e7cf
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
296 |
typedef uint AcceptedCargo[NUM_CARGO]; |
0 | 297 |
|
298 |
typedef struct TileDesc { |
|
299 |
StringID str; |
|
4849
1c6f21eb97f2
(svn r6775) -Codechange: Use some more proper types, especially Owner and PlayerID as
Darkvater
parents:
4659
diff
changeset
|
300 |
Owner owner; |
4297
d0311b62255c
(svn r5934) -Cleanup: forgot some conversions to Year and to Date
rubidium
parents:
4293
diff
changeset
|
301 |
Date build_date; |
0 | 302 |
uint32 dparam[2]; |
303 |
} TileDesc; |
|
304 |
||
305 |
typedef struct { |
|
849
c3407041774f
(svn r1330) Increase size of some vars from int16 to int32 to guard against future overflows
tron
parents:
842
diff
changeset
|
306 |
int32 left; |
c3407041774f
(svn r1330) Increase size of some vars from int16 to int32 to guard against future overflows
tron
parents:
842
diff
changeset
|
307 |
int32 top; |
0 | 308 |
byte width_1, width_2; |
309 |
} ViewportSign; |
|
310 |
||
311 |
||
312 |
typedef void DrawTileProc(TileInfo *ti); |
|
4231
2823b3643862
(svn r5794) Pass the TileIndex plus x and y coordinates into GetSlopeZ_* instead of a TileInfo
tron
parents:
4143
diff
changeset
|
313 |
typedef uint GetSlopeZProc(TileIndex tile, uint x, uint y); |
1977
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
314 |
typedef int32 ClearTileProc(TileIndex tile, byte flags); |
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
315 |
typedef void GetAcceptedCargoProc(TileIndex tile, AcceptedCargo res); |
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
316 |
typedef void GetTileDescProc(TileIndex tile, TileDesc *td); |
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
317 |
/* GetTileTrackStatusProcs return a value that contains the possible tracks |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
318 |
* 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
|
319 |
* 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
|
320 |
* 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
|
321 |
* 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
|
322 |
* 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
|
323 |
* reversed from map3/2[tile] for railway signals). |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
324 |
* |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
325 |
* 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
|
326 |
* tracks = (byte)(ts | ts >>8) |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
327 |
* 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
|
328 |
* 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
|
329 |
* 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
|
330 |
* |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
331 |
* 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
|
332 |
* 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
|
333 |
* 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
|
334 |
* above. |
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
335 |
*/ |
1977
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
336 |
typedef uint32 GetTileTrackStatusProc(TileIndex tile, TransportType mode); |
3344
fc86351d4641
(svn r4128) - CodeChange: Add proper semantics for CargoID for such variables instead of using the general byte-type.
Darkvater
parents:
3333
diff
changeset
|
337 |
typedef void GetProducedCargoProc(TileIndex tile, CargoID *b); |
1977
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
338 |
typedef void ClickTileProc(TileIndex tile); |
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
339 |
typedef void AnimateTileProc(TileIndex tile); |
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
340 |
typedef void TileLoopProc(TileIndex tile); |
2436
7d5df545bd5d
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents:
2431
diff
changeset
|
341 |
typedef void ChangeTileOwnerProc(TileIndex tile, PlayerID old_player, PlayerID new_player); |
22 | 342 |
/* Return value has bit 0x2 set, when the vehicle enters a station. Then, |
343 |
* result << 8 contains the id of the station entered. If the return value has |
|
344 |
* bit 0x8 set, the vehicle could not and did not enter the tile. Are there |
|
345 |
* other bits that can be set? */ |
|
1977
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
346 |
typedef uint32 VehicleEnterTileProc(Vehicle *v, TileIndex tile, int x, int y); |
3636
a36cc46e754d
(svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums
tron
parents:
3529
diff
changeset
|
347 |
typedef Slope GetSlopeTilehProc(TileIndex, Slope tileh); |
0 | 348 |
|
349 |
typedef struct { |
|
350 |
DrawTileProc *draw_tile_proc; |
|
351 |
GetSlopeZProc *get_slope_z_proc; |
|
352 |
ClearTileProc *clear_tile_proc; |
|
353 |
GetAcceptedCargoProc *get_accepted_cargo_proc; |
|
354 |
GetTileDescProc *get_tile_desc_proc; |
|
355 |
GetTileTrackStatusProc *get_tile_track_status_proc; |
|
356 |
ClickTileProc *click_tile_proc; |
|
357 |
AnimateTileProc *animate_tile_proc; |
|
358 |
TileLoopProc *tile_loop_proc; |
|
359 |
ChangeTileOwnerProc *change_tile_owner_proc; |
|
360 |
GetProducedCargoProc *get_produced_cargo_proc; |
|
361 |
VehicleEnterTileProc *vehicle_enter_tile_proc; |
|
39 | 362 |
GetSlopeTilehProc *get_slope_tileh_proc; |
0 | 363 |
} TileTypeProcs; |
364 |
||
365 |
||
366 |
enum { |
|
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:
4330
diff
changeset
|
367 |
WC_MAIN_WINDOW = 0x00, |
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:
4330
diff
changeset
|
368 |
WC_MAIN_TOOLBAR = 0x01, |
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:
4330
diff
changeset
|
369 |
WC_STATUS_BAR = 0x02, |
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:
4330
diff
changeset
|
370 |
WC_BUILD_TOOLBAR = 0x03, |
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:
4330
diff
changeset
|
371 |
WC_NEWS_WINDOW = 0x04, |
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:
4330
diff
changeset
|
372 |
WC_TOWN_DIRECTORY = 0x05, |
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:
4330
diff
changeset
|
373 |
WC_STATION_LIST = 0x06, |
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:
4330
diff
changeset
|
374 |
WC_TOWN_VIEW = 0x07, |
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:
4330
diff
changeset
|
375 |
WC_SMALLMAP = 0x08, |
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:
4330
diff
changeset
|
376 |
WC_TRAINS_LIST = 0x09, |
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:
4330
diff
changeset
|
377 |
WC_ROADVEH_LIST = 0x0A, |
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:
4330
diff
changeset
|
378 |
WC_SHIPS_LIST = 0x0B, |
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:
4330
diff
changeset
|
379 |
WC_AIRCRAFT_LIST = 0x0C, |
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:
4330
diff
changeset
|
380 |
WC_VEHICLE_VIEW = 0x0D, |
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:
4330
diff
changeset
|
381 |
WC_VEHICLE_DETAILS = 0x0E, |
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:
4330
diff
changeset
|
382 |
WC_VEHICLE_REFIT = 0x0F, |
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:
4330
diff
changeset
|
383 |
WC_VEHICLE_ORDERS = 0x10, |
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:
4330
diff
changeset
|
384 |
WC_STATION_VIEW = 0x11, |
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:
4330
diff
changeset
|
385 |
WC_VEHICLE_DEPOT = 0x12, |
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:
4330
diff
changeset
|
386 |
WC_BUILD_VEHICLE = 0x13, |
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:
4330
diff
changeset
|
387 |
WC_BUILD_BRIDGE = 0x14, |
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:
4330
diff
changeset
|
388 |
WC_ERRMSG = 0x15, |
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:
4330
diff
changeset
|
389 |
WC_ASK_ABANDON_GAME = 0x16, |
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:
4330
diff
changeset
|
390 |
WC_QUIT_GAME = 0x17, |
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:
4330
diff
changeset
|
391 |
WC_BUILD_STATION = 0x18, |
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:
4330
diff
changeset
|
392 |
WC_BUS_STATION = 0x19, |
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:
4330
diff
changeset
|
393 |
WC_TRUCK_STATION = 0x1A, |
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:
4330
diff
changeset
|
394 |
WC_BUILD_DEPOT = 0x1B, |
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:
4330
diff
changeset
|
395 |
WC_COMPANY = 0x1D, |
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:
4330
diff
changeset
|
396 |
WC_FINANCES = 0x1E, |
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:
4330
diff
changeset
|
397 |
WC_PLAYER_COLOR = 0x1F, |
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:
4330
diff
changeset
|
398 |
WC_QUERY_STRING = 0x20, |
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:
4330
diff
changeset
|
399 |
WC_SAVELOAD = 0x21, |
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:
4330
diff
changeset
|
400 |
WC_SELECT_GAME = 0x22, |
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:
4330
diff
changeset
|
401 |
WC_TOOLBAR_MENU = 0x24, |
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:
4330
diff
changeset
|
402 |
WC_INCOME_GRAPH = 0x25, |
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:
4330
diff
changeset
|
403 |
WC_OPERATING_PROFIT = 0x26, |
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:
4330
diff
changeset
|
404 |
WC_TOOLTIPS = 0x27, |
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:
4330
diff
changeset
|
405 |
WC_INDUSTRY_VIEW = 0x28, |
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:
4330
diff
changeset
|
406 |
WC_PLAYER_FACE = 0x29, |
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:
4330
diff
changeset
|
407 |
WC_LAND_INFO = 0x2A, |
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:
4330
diff
changeset
|
408 |
WC_TOWN_AUTHORITY = 0x2B, |
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:
4330
diff
changeset
|
409 |
WC_SUBSIDIES_LIST = 0x2C, |
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:
4330
diff
changeset
|
410 |
WC_GRAPH_LEGEND = 0x2D, |
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:
4330
diff
changeset
|
411 |
WC_DELIVERED_CARGO = 0x2E, |
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:
4330
diff
changeset
|
412 |
WC_PERFORMANCE_HISTORY = 0x2F, |
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:
4330
diff
changeset
|
413 |
WC_COMPANY_VALUE = 0x30, |
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:
4330
diff
changeset
|
414 |
WC_COMPANY_LEAGUE = 0x31, |
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:
4330
diff
changeset
|
415 |
WC_BUY_COMPANY = 0x32, |
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:
4330
diff
changeset
|
416 |
WC_PAYMENT_RATES = 0x33, |
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:
4330
diff
changeset
|
417 |
WC_ENGINE_PREVIEW = 0x35, |
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:
4330
diff
changeset
|
418 |
WC_MUSIC_WINDOW = 0x36, |
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:
4330
diff
changeset
|
419 |
WC_MUSIC_TRACK_SELECTION = 0x37, |
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:
4330
diff
changeset
|
420 |
WC_SCEN_LAND_GEN = 0x38, // also used for landscaping toolbar |
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:
4330
diff
changeset
|
421 |
WC_ASK_RESET_LANDSCAPE = 0x39, |
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:
4330
diff
changeset
|
422 |
WC_SCEN_TOWN_GEN = 0x3A, |
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:
4330
diff
changeset
|
423 |
WC_SCEN_INDUSTRY = 0x3B, |
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:
4330
diff
changeset
|
424 |
WC_SCEN_BUILD_ROAD = 0x3C, |
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:
4330
diff
changeset
|
425 |
WC_BUILD_TREES = 0x3D, |
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:
4330
diff
changeset
|
426 |
WC_SEND_NETWORK_MSG = 0x3E, |
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:
4330
diff
changeset
|
427 |
WC_DROPDOWN_MENU = 0x3F, |
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:
4330
diff
changeset
|
428 |
WC_BUILD_INDUSTRY = 0x40, |
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:
4330
diff
changeset
|
429 |
WC_GAME_OPTIONS = 0x41, |
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:
4330
diff
changeset
|
430 |
WC_NETWORK_WINDOW = 0x42, |
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:
4330
diff
changeset
|
431 |
WC_INDUSTRY_DIRECTORY = 0x43, |
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:
4330
diff
changeset
|
432 |
WC_MESSAGE_HISTORY = 0x44, |
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:
4330
diff
changeset
|
433 |
WC_CHEATS = 0x45, |
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:
4330
diff
changeset
|
434 |
WC_PERFORMANCE_DETAIL = 0x46, |
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:
4330
diff
changeset
|
435 |
WC_CONSOLE = 0x47, |
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:
4330
diff
changeset
|
436 |
WC_EXTRA_VIEW_PORT = 0x48, |
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:
4330
diff
changeset
|
437 |
WC_CLIENT_LIST = 0x49, |
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:
4330
diff
changeset
|
438 |
WC_NETWORK_STATUS_WINDOW = 0x4A, |
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:
4330
diff
changeset
|
439 |
WC_CUSTOM_CURRENCY = 0x4B, |
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:
4330
diff
changeset
|
440 |
WC_REPLACE_VEHICLE = 0x4C, |
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:
4330
diff
changeset
|
441 |
WC_HIGHSCORE = 0x4D, |
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:
4330
diff
changeset
|
442 |
WC_ENDSCREEN = 0x4E, |
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:
4330
diff
changeset
|
443 |
WC_SIGN_LIST = 0x4F, |
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:
4330
diff
changeset
|
444 |
WC_GENERATE_LANDSCAPE = 0x50, |
4300
c7e43c47a2b9
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4297
diff
changeset
|
445 |
WC_GENERATE_PROGRESS_WINDOW = 0x51, |
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:
4330
diff
changeset
|
446 |
WC_OK_CANCEL_QUERY = 0x52, |
4659
e476c76389a8
(svn r6542) -Feature: [depot window] added a "sell all vehicles in depot" button
bjarni
parents:
4609
diff
changeset
|
447 |
WC_DEPOT_SELL_ALL = 0x53, |
0 | 448 |
}; |
449 |
||
450 |
||
451 |
enum { |
|
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:
4330
diff
changeset
|
452 |
EXPENSES_CONSTRUCTION = 0, |
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:
4330
diff
changeset
|
453 |
EXPENSES_NEW_VEHICLES = 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:
4330
diff
changeset
|
454 |
EXPENSES_TRAIN_RUN = 2, |
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:
4330
diff
changeset
|
455 |
EXPENSES_ROADVEH_RUN = 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:
4330
diff
changeset
|
456 |
EXPENSES_AIRCRAFT_RUN = 4, |
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:
4330
diff
changeset
|
457 |
EXPENSES_SHIP_RUN = 5, |
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:
4330
diff
changeset
|
458 |
EXPENSES_PROPERTY = 6, |
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:
4330
diff
changeset
|
459 |
EXPENSES_TRAIN_INC = 7, |
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:
4330
diff
changeset
|
460 |
EXPENSES_ROADVEH_INC = 8, |
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:
4330
diff
changeset
|
461 |
EXPENSES_AIRCRAFT_INC = 9, |
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:
4330
diff
changeset
|
462 |
EXPENSES_SHIP_INC = 10, |
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:
4330
diff
changeset
|
463 |
EXPENSES_LOAN_INT = 11, |
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:
4330
diff
changeset
|
464 |
EXPENSES_OTHER = 12, |
0 | 465 |
}; |
466 |
||
467 |
// special string constants |
|
468 |
enum SpecialStrings { |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
168
diff
changeset
|
469 |
|
0 | 470 |
// special strings for town names. the town name is generated dynamically on request. |
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:
4330
diff
changeset
|
471 |
SPECSTR_TOWNNAME_START = 0x20C0, |
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:
4330
diff
changeset
|
472 |
SPECSTR_TOWNNAME_ENGLISH = SPECSTR_TOWNNAME_START, |
0 | 473 |
SPECSTR_TOWNNAME_FRENCH, |
474 |
SPECSTR_TOWNNAME_GERMAN, |
|
475 |
SPECSTR_TOWNNAME_AMERICAN, |
|
476 |
SPECSTR_TOWNNAME_LATIN, |
|
477 |
SPECSTR_TOWNNAME_SILLY, |
|
478 |
SPECSTR_TOWNNAME_SWEDISH, |
|
479 |
SPECSTR_TOWNNAME_DUTCH, |
|
480 |
SPECSTR_TOWNNAME_FINNISH, |
|
481 |
SPECSTR_TOWNNAME_POLISH, |
|
482 |
SPECSTR_TOWNNAME_SLOVAKISH, |
|
948 | 483 |
SPECSTR_TOWNNAME_NORWEGIAN, |
0 | 484 |
SPECSTR_TOWNNAME_HUNGARIAN, |
265 | 485 |
SPECSTR_TOWNNAME_AUSTRIAN, |
486 |
SPECSTR_TOWNNAME_ROMANIAN, |
|
487 |
SPECSTR_TOWNNAME_CZECH, |
|
1030
24c0b0000bf0
(svn r1531) -Feature: [1039061] Swiss town-names (vulvulune)
darkvater
parents:
1004
diff
changeset
|
488 |
SPECSTR_TOWNNAME_SWISS, |
2431
447292e83ab3
(svn r2957) - Feature: [ 1263280 ] Danish town names (fey_dk)
Darkvater
parents:
2395
diff
changeset
|
489 |
SPECSTR_TOWNNAME_DANISH, |
3698 | 490 |
SPECSTR_TOWNNAME_TURKISH, |
4143
b7535e12f27b
(svn r5504) Feature : Added Italian town name generator. (sidew)
belugas
parents:
3825
diff
changeset
|
491 |
SPECSTR_TOWNNAME_ITALIAN, |
4312
9ac0363f38f5
(svn r5965) -Feature: FS#261 Catalan Town Names generator (arnau)
bjarni
parents:
4300
diff
changeset
|
492 |
SPECSTR_TOWNNAME_CATALAN, |
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:
4330
diff
changeset
|
493 |
SPECSTR_TOWNNAME_LAST = SPECSTR_TOWNNAME_CATALAN, |
0 | 494 |
|
495 |
// special strings for player names on the form "TownName transport". |
|
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:
4330
diff
changeset
|
496 |
SPECSTR_PLAYERNAME_START = 0x70EA, |
0 | 497 |
SPECSTR_PLAYERNAME_ENGLISH = SPECSTR_PLAYERNAME_START, |
498 |
SPECSTR_PLAYERNAME_FRENCH, |
|
499 |
SPECSTR_PLAYERNAME_GERMAN, |
|
500 |
SPECSTR_PLAYERNAME_AMERICAN, |
|
501 |
SPECSTR_PLAYERNAME_LATIN, |
|
502 |
SPECSTR_PLAYERNAME_SILLY, |
|
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:
4330
diff
changeset
|
503 |
SPECSTR_PLAYERNAME_LAST = SPECSTR_PLAYERNAME_SILLY, |
0 | 504 |
|
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:
4330
diff
changeset
|
505 |
SPECSTR_ANDCO_NAME = 0x70E6, |
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:
4330
diff
changeset
|
506 |
SPECSTR_PRESIDENT_NAME = 0x70E7, |
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:
4330
diff
changeset
|
507 |
SPECSTR_SONGNAME = 0x70E8, |
0 | 508 |
|
509 |
// reserve 32 strings for the *.lng files |
|
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:
4330
diff
changeset
|
510 |
SPECSTR_LANGUAGE_START = 0x7100, |
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:
4330
diff
changeset
|
511 |
SPECSTR_LANGUAGE_END = 0x711f, |
0 | 512 |
|
513 |
// reserve 32 strings for various screen resolutions |
|
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:
4330
diff
changeset
|
514 |
SPECSTR_RESOLUTION_START = 0x7120, |
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:
4330
diff
changeset
|
515 |
SPECSTR_RESOLUTION_END = 0x713f, |
0 | 516 |
|
517 |
// reserve 32 strings for screenshot formats |
|
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:
4330
diff
changeset
|
518 |
SPECSTR_SCREENSHOT_START = 0x7140, |
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:
4330
diff
changeset
|
519 |
SPECSTR_SCREENSHOT_END = 0x715F, |
0 | 520 |
|
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:
1977
diff
changeset
|
521 |
// Used to implement SetDParamStr |
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:
4330
diff
changeset
|
522 |
STR_SPEC_DYNSTRING = 0xF800, |
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:
4330
diff
changeset
|
523 |
STR_SPEC_USERSTRING = 0xF808, |
0 | 524 |
}; |
525 |
||
1977
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
526 |
typedef void PlaceProc(TileIndex tile); |
0 | 527 |
|
2526
29eef390cabb
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
528 |
enum { |
29eef390cabb
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
529 |
SORT_ASCENDING = 0, |
29eef390cabb
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
530 |
SORT_DESCENDING = 1, |
29eef390cabb
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
531 |
SORT_BY_DATE = 0, |
29eef390cabb
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
532 |
SORT_BY_NAME = 2 |
29eef390cabb
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
533 |
}; |
29eef390cabb
(svn r3055) Give the savegame/scenarion sort order flags symbolic names
tron
parents:
2436
diff
changeset
|
534 |
|
0 | 535 |
VARDEF byte _savegame_sort_order; |
536 |
||
537 |
#define INVALID_STRING_ID 0xFFFF |
|
538 |
||
539 |
enum { |
|
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:
4330
diff
changeset
|
540 |
MAX_SCREEN_WIDTH = 2048, |
0 | 541 |
MAX_SCREEN_HEIGHT = 1200, |
542 |
}; |
|
543 |
||
1397
fa8539dcab46
(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
|
544 |
/* In certain windows you navigate with the arrow keys. Do not scroll the |
fa8539dcab46
(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
|
545 |
* gameview when here. Bitencoded variable that only allows scrolling if all |
fa8539dcab46
(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
|
546 |
* elements are zero */ |
fa8539dcab46
(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
|
547 |
enum { |
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:
4330
diff
changeset
|
548 |
SCROLL_CON = 0, |
1397
fa8539dcab46
(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
|
549 |
SCROLL_EDIT = 1, |
fa8539dcab46
(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
|
550 |
SCROLL_SAVE = 2, |
1843
8e2628948b01
(svn r2348) - Fix: Do not scroll the game with the arrow keys when the chatbox is open
Darkvater
parents:
1802
diff
changeset
|
551 |
SCROLL_CHAT = 4, |
1397
fa8539dcab46
(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
|
552 |
}; |
fa8539dcab46
(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
|
553 |
VARDEF byte _no_scroll; |
fa8539dcab46
(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
|
554 |
|
2380
392bba57462d
(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
|
555 |
/** To have a concurrently running thread interface with the main program, use |
392bba57462d
(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
|
556 |
* the OTTD_SendThreadMessage() function. Actions to perform upon the message are handled |
392bba57462d
(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
|
557 |
* in the ProcessSentMessage() function */ |
392bba57462d
(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
|
558 |
typedef enum ThreadMsgs { |
4323
ae32c5fab67b
(svn r5977) -Fix [FS#78]: never set I-am-a-thread bool to true IN the thread. Machines with
truelight
parents:
4312
diff
changeset
|
559 |
MSG_OTTD_NO_MESSAGE, |
ae32c5fab67b
(svn r5977) -Fix [FS#78]: never set I-am-a-thread bool to true IN the thread. Machines with
truelight
parents:
4312
diff
changeset
|
560 |
MSG_OTTD_SAVETHREAD_DONE, |
ae32c5fab67b
(svn r5977) -Fix [FS#78]: never set I-am-a-thread bool to true IN the thread. Machines with
truelight
parents:
4312
diff
changeset
|
561 |
MSG_OTTD_SAVETHREAD_ERROR, |
2380
392bba57462d
(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
|
562 |
} ThreadMsg; |
392bba57462d
(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
|
563 |
|
392bba57462d
(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
|
564 |
void OTTD_SendThreadMessage(ThreadMsg msg); |
392bba57462d
(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
|
565 |
|
2075
21d2986569d1
(svn r2585) - Fix [Makefile]: some small cleanups, remove warnings, and add mersenne to makefile (Luca)
Darkvater
parents:
2055
diff
changeset
|
566 |
#endif /* OPENTTD_H */ |