author | miham |
Wed, 17 Aug 2005 12:30:07 +0000 | |
changeset 2349 | df02d0ffb588 |
parent 2254 | 72f8883ff3ac |
child 2380 | 3b26659b4a9a |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
2075
7f0ca01392db
(svn r2585) - Fix [Makefile]: some small cleanups, remove warnings, and add mersenne to makefile (Luca)
Darkvater
parents:
2055
diff
changeset
|
3 |
#ifndef OPENTTD_H |
7f0ca01392db
(svn r2585) - Fix [Makefile]: some small cleanups, remove warnings, and add mersenne to makefile (Luca)
Darkvater
parents:
2055
diff
changeset
|
4 |
#define OPENTTD_H |
0 | 5 |
|
6 |
#ifndef VARDEF |
|
7 |
#define VARDEF extern |
|
8 |
#endif |
|
9 |
||
10 |
// use this on non static functions |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
168
diff
changeset
|
11 |
#define PUBLIC |
0 | 12 |
|
13 |
typedef struct Rect { |
|
14 |
int left,top,right,bottom; |
|
15 |
} Rect; |
|
16 |
||
17 |
typedef struct SmallPoint { |
|
18 |
int16 x,y; |
|
19 |
} SmallPoint; |
|
20 |
||
21 |
typedef struct Point { |
|
22 |
int x,y; |
|
23 |
} Point; |
|
24 |
||
25 |
typedef struct Pair { |
|
26 |
int a; |
|
27 |
int b; |
|
28 |
} Pair; |
|
29 |
||
1752
cdbfb2f23e72
(svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx)
matthijs
parents:
1594
diff
changeset
|
30 |
/** |
cdbfb2f23e72
(svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx)
matthijs
parents:
1594
diff
changeset
|
31 |
* Is used as a general sortable struct (using qsort and friends). Is used for |
cdbfb2f23e72
(svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx)
matthijs
parents:
1594
diff
changeset
|
32 |
* sorting vehicles and stations at the moment |
cdbfb2f23e72
(svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx)
matthijs
parents:
1594
diff
changeset
|
33 |
*/ |
cdbfb2f23e72
(svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx)
matthijs
parents:
1594
diff
changeset
|
34 |
typedef struct SortStruct { |
cdbfb2f23e72
(svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx)
matthijs
parents:
1594
diff
changeset
|
35 |
uint32 index; |
cdbfb2f23e72
(svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx)
matthijs
parents:
1594
diff
changeset
|
36 |
byte owner; |
cdbfb2f23e72
(svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx)
matthijs
parents:
1594
diff
changeset
|
37 |
} SortStruct; |
cdbfb2f23e72
(svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx)
matthijs
parents:
1594
diff
changeset
|
38 |
|
0 | 39 |
typedef struct YearMonthDay { |
40 |
int year, month, day; |
|
41 |
} YearMonthDay; |
|
42 |
||
164
0cbdf3c9bde1
(svn r165) -Feature: Option to sort vehicles in vehicle-list window by different criteria. Total independent sort for all types and players. Periodic resort of list every 10 TTD days. Thank you for your graphical inspiration follow and buxo (since none of you provided any code).
darkvater
parents:
159
diff
changeset
|
43 |
/* --- 1 Day is 74 ticks --- |
0cbdf3c9bde1
(svn r165) -Feature: Option to sort vehicles in vehicle-list window by different criteria. Total independent sort for all types and players. Periodic resort of list every 10 TTD days. Thank you for your graphical inspiration follow and buxo (since none of you provided any code).
darkvater
parents:
159
diff
changeset
|
44 |
* The game's internal structure is dictated by ticks. The date counter (date_fract) is an integer of |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
168
diff
changeset
|
45 |
* uint16 type, so it can have a max value of 65536. Every tick this variable (date_fract) is |
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
168
diff
changeset
|
46 |
* increased by 885. When it overflows, the new day loop is called. |
164
0cbdf3c9bde1
(svn r165) -Feature: Option to sort vehicles in vehicle-list window by different criteria. Total independent sort for all types and players. Periodic resort of list every 10 TTD days. Thank you for your graphical inspiration follow and buxo (since none of you provided any code).
darkvater
parents:
159
diff
changeset
|
47 |
* * this that means 1 day is : 65536 / 885 = 74 ticks |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
168
diff
changeset
|
48 |
* * 1 tick is approximately 27ms. |
164
0cbdf3c9bde1
(svn r165) -Feature: Option to sort vehicles in vehicle-list window by different criteria. Total independent sort for all types and players. Periodic resort of list every 10 TTD days. Thank you for your graphical inspiration follow and buxo (since none of you provided any code).
darkvater
parents:
159
diff
changeset
|
49 |
* * 1 day is thus about 2 seconds (74*27 = 1998) on a machine that can run OpenTTD normally |
0cbdf3c9bde1
(svn r165) -Feature: Option to sort vehicles in vehicle-list window by different criteria. Total independent sort for all types and players. Periodic resort of list every 10 TTD days. Thank you for your graphical inspiration follow and buxo (since none of you provided any code).
darkvater
parents:
159
diff
changeset
|
50 |
*/ |
0cbdf3c9bde1
(svn r165) -Feature: Option to sort vehicles in vehicle-list window by different criteria. Total independent sort for all types and players. Periodic resort of list every 10 TTD days. Thank you for your graphical inspiration follow and buxo (since none of you provided any code).
darkvater
parents:
159
diff
changeset
|
51 |
#define DAY_TICKS 74 |
970
492ca84ecc6c
(svn r1465) -Fix: [1099101] starting year patch goes out of range. Clamped year between 1920-2090 as wel as adding defines for it.
darkvater
parents:
948
diff
changeset
|
52 |
#define MAX_YEAR_BEGIN_REAL 1920 |
492ca84ecc6c
(svn r1465) -Fix: [1099101] starting year patch goes out of range. Clamped year between 1920-2090 as wel as adding defines for it.
darkvater
parents:
948
diff
changeset
|
53 |
#define MAX_YEAR_END_REAL 2090 |
492ca84ecc6c
(svn r1465) -Fix: [1099101] starting year patch goes out of range. Clamped year between 1920-2090 as wel as adding defines for it.
darkvater
parents:
948
diff
changeset
|
54 |
#define MAX_YEAR_END 170 |
164
0cbdf3c9bde1
(svn r165) -Feature: Option to sort vehicles in vehicle-list window by different criteria. Total independent sort for all types and players. Periodic resort of list every 10 TTD days. Thank you for your graphical inspiration follow and buxo (since none of you provided any code).
darkvater
parents:
159
diff
changeset
|
55 |
|
2159
3b634157c3b2
(svn r2669) Shuffle some more stuff around to reduce dependencies
tron
parents:
2153
diff
changeset
|
56 |
#include "map.h" |
0 | 57 |
|
58 |
// Forward declarations of structs. |
|
59 |
typedef struct Vehicle Vehicle; |
|
60 |
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
|
61 |
typedef struct Waypoint Waypoint; |
0 | 62 |
typedef struct Window Window; |
63 |
typedef struct Station Station; |
|
64 |
typedef struct ViewPort ViewPort; |
|
65 |
typedef struct Town Town; |
|
66 |
typedef struct NewsItem NewsItem; |
|
67 |
typedef struct Industry Industry; |
|
68 |
typedef struct DrawPixelInfo DrawPixelInfo; |
|
69 |
typedef uint16 VehicleID; |
|
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
|
70 |
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
|
71 |
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
|
72 |
typedef byte CargoID; |
0 | 73 |
typedef uint16 StringID; |
2187
2a51f8925eeb
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
celestar
parents:
2186
diff
changeset
|
74 |
typedef uint32 SpriteID; |
0 | 75 |
typedef uint32 PalSpriteID; |
1914
5ede46fd496f
(svn r2420) - Codechange: magic number elminitation of cursorsprites.
Darkvater
parents:
1891
diff
changeset
|
76 |
typedef uint32 CursorID; |
2153
91e89aa8c299
(svn r2663) Include variables.h only in these files which need it, not globally via openttd.h
tron
parents:
2075
diff
changeset
|
77 |
typedef uint16 EngineID; //! All enginenumbers should be of this type |
91e89aa8c299
(svn r2663) Include variables.h only in these files which need it, not globally via openttd.h
tron
parents:
2075
diff
changeset
|
78 |
typedef uint16 UnitID; //! All unitnumber stuff is of this type (or anyway, should be) |
0 | 79 |
|
80 |
typedef uint32 WindowNumber; |
|
81 |
typedef byte WindowClass; |
|
82 |
||
83 |
||
84 |
enum GameModes { |
|
85 |
GM_MENU, |
|
86 |
GM_NORMAL, |
|
87 |
GM_EDITOR |
|
88 |
}; |
|
89 |
||
90 |
enum SwitchModes { |
|
91 |
SM_NONE = 0, |
|
92 |
SM_NEWGAME = 1, |
|
93 |
SM_EDITOR = 2, |
|
94 |
SM_LOAD = 3, |
|
95 |
SM_MENU = 4, |
|
96 |
SM_SAVE = 5, |
|
97 |
SM_GENRANDLAND = 6, |
|
98 |
SM_LOAD_SCENARIO = 9, |
|
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
513
diff
changeset
|
99 |
SM_START_SCENARIO = 10, |
0 | 100 |
}; |
101 |
||
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
102 |
typedef enum TransportTypes { |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
103 |
/* These constants are for now linked to the representation of bridges |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
104 |
* and tunnels, so they can be used by GetTileTrackStatus_TunnelBridge |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
105 |
* to compare against the map5 array. In an ideal world, these |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
106 |
* constants would be used everywhere when accessing tunnels and |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
107 |
* bridges. For now, you should just not change the values for road |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
108 |
* and rail. |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
109 |
*/ |
241
e6e62a5e7f52
(svn r242) -Fix: Pathfinding bug for road vehicles introduced in r160 fixed (blathijs)
darkvater
parents:
240
diff
changeset
|
110 |
TRANSPORT_RAIL = 0, |
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
111 |
TRANSPORT_ROAD = 1, |
241
e6e62a5e7f52
(svn r242) -Fix: Pathfinding bug for road vehicles introduced in r160 fixed (blathijs)
darkvater
parents:
240
diff
changeset
|
112 |
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
|
113 |
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
|
114 |
INVALID_TRANSPORT = 0xff, |
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
115 |
} TransportType; |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
116 |
|
0 | 117 |
typedef struct TileInfo { |
118 |
uint x; |
|
119 |
uint y; |
|
120 |
uint tileh; |
|
121 |
uint type; |
|
122 |
uint map5; |
|
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
123 |
TileIndex tile; |
0 | 124 |
uint z; |
125 |
} TileInfo; |
|
126 |
||
127 |
enum { |
|
128 |
NG_EDGE = 1, |
|
129 |
}; |
|
130 |
||
131 |
/* Display Options */ |
|
132 |
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
|
133 |
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
|
134 |
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
|
135 |
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
|
136 |
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
|
137 |
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
|
138 |
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
|
139 |
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
|
140 |
DO_TRANS_SIGNS = 1 << 7, |
0 | 141 |
}; |
142 |
||
143 |
/* Landscape types */ |
|
144 |
enum { |
|
145 |
LT_NORMAL = 0, |
|
146 |
LT_HILLY = 1, |
|
147 |
LT_DESERT = 2, |
|
148 |
LT_CANDY = 3, |
|
149 |
||
150 |
NUM_LANDSCAPE = 4, |
|
151 |
}; |
|
152 |
||
153 |
enum { |
|
154 |
NUM_PRICES = 49, |
|
155 |
}; |
|
156 |
||
157 |
typedef struct Prices { |
|
158 |
int32 station_value; |
|
159 |
int32 build_rail; |
|
160 |
int32 build_road; |
|
161 |
int32 build_signals; |
|
162 |
int32 build_bridge; |
|
163 |
int32 build_train_depot; |
|
164 |
int32 build_road_depot; |
|
165 |
int32 build_ship_depot; |
|
166 |
int32 build_tunnel; |
|
167 |
int32 train_station_track; |
|
168 |
int32 train_station_length; |
|
169 |
int32 build_airport; |
|
170 |
int32 build_bus_station; |
|
171 |
int32 build_truck_station; |
|
172 |
int32 build_dock; |
|
173 |
int32 build_railvehicle; |
|
174 |
int32 build_railwagon; |
|
175 |
int32 aircraft_base; |
|
176 |
int32 roadveh_base; |
|
177 |
int32 ship_base; |
|
178 |
int32 build_trees; |
|
179 |
int32 terraform; |
|
180 |
int32 clear_1; |
|
181 |
int32 purchase_land; |
|
182 |
int32 clear_2; |
|
183 |
int32 clear_3; |
|
184 |
int32 remove_trees; |
|
185 |
int32 remove_rail; |
|
186 |
int32 remove_signals; |
|
187 |
int32 clear_bridge; |
|
188 |
int32 remove_train_depot; |
|
189 |
int32 remove_road_depot; |
|
190 |
int32 remove_ship_depot; |
|
191 |
int32 clear_tunnel; |
|
192 |
int32 clear_water; |
|
193 |
int32 remove_rail_station; |
|
194 |
int32 remove_airport; |
|
195 |
int32 remove_bus_station; |
|
196 |
int32 remove_truck_station; |
|
197 |
int32 remove_dock; |
|
198 |
int32 remove_house; |
|
199 |
int32 remove_road; |
|
200 |
int32 running_rail[3]; |
|
201 |
int32 aircraft_running; |
|
202 |
int32 roadveh_running; |
|
203 |
int32 ship_running; |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
168
diff
changeset
|
204 |
int32 build_industry; |
0 | 205 |
} Prices; |
206 |
||
207 |
#define GAME_DIFFICULTY_NUM 18 |
|
208 |
||
209 |
typedef struct GameDifficulty { |
|
210 |
int max_no_competitors; |
|
211 |
int competitor_start_time; |
|
212 |
int number_towns; |
|
213 |
int number_industries; |
|
214 |
int max_loan; |
|
215 |
int initial_interest; |
|
216 |
int vehicle_costs; |
|
217 |
int competitor_speed; |
|
218 |
int competitor_intelligence; |
|
219 |
int vehicle_breakdowns; |
|
220 |
int subsidy_multiplier; |
|
221 |
int construction_cost; |
|
222 |
int terrain_type; |
|
223 |
int quantity_sea_lakes; |
|
224 |
int economy; |
|
225 |
int line_reverse_mode; |
|
226 |
int disasters; |
|
227 |
int town_council_tolerance; // minimum required town ratings to be allowed to demolish stuff |
|
228 |
} GameDifficulty; |
|
229 |
||
473
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
230 |
enum { |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
231 |
// Temperate |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
232 |
CT_PASSENGERS = 0, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
233 |
CT_COAL = 1, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
234 |
CT_MAIL = 2, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
235 |
CT_OIL = 3, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
236 |
CT_LIVESTOCK = 4, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
237 |
CT_GOODS = 5, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
238 |
CT_GRAIN = 6, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
239 |
CT_WOOD = 7, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
240 |
CT_IRON_ORE = 8, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
241 |
CT_STEEL = 9, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
242 |
CT_VALUABLES = 10, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
243 |
CT_FOOD = 11, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
244 |
|
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
245 |
// Arctic |
924
433faaf547c1
(svn r1412) -Feature/Fix: Aircraft refit options have been restricted to "sane"
celestar
parents:
849
diff
changeset
|
246 |
CT_WHEAT = 6, |
473
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
247 |
CT_HILLY_UNUSED = 8, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
248 |
CT_PAPER = 9, |
924
433faaf547c1
(svn r1412) -Feature/Fix: Aircraft refit options have been restricted to "sane"
celestar
parents:
849
diff
changeset
|
249 |
CT_GOLD = 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 |
// Tropic |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
252 |
CT_RUBBER = 1, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
253 |
CT_FRUIT = 4, |
924
433faaf547c1
(svn r1412) -Feature/Fix: Aircraft refit options have been restricted to "sane"
celestar
parents:
849
diff
changeset
|
254 |
CT_MAIZE = 6, |
473
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
255 |
CT_COPPER_ORE = 8, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
256 |
CT_WATER = 9, |
924
433faaf547c1
(svn r1412) -Feature/Fix: Aircraft refit options have been restricted to "sane"
celestar
parents:
849
diff
changeset
|
257 |
CT_DIAMONDS = 10, |
473
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
258 |
|
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
259 |
// Toyland |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
260 |
CT_SUGAR = 1, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
261 |
CT_TOYS = 3, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
262 |
CT_BATTERIES = 4, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
263 |
CT_CANDY = 5, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
264 |
CT_TOFFEE = 6, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
265 |
CT_COLA = 7, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
266 |
CT_COTTON_CANDY = 8, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
267 |
CT_BUBBLES = 9, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
268 |
CT_PLASTIC = 10, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
269 |
CT_FIZZY_DRINKS = 11, |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
270 |
|
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
271 |
NUM_CARGO = 12, |
1004 | 272 |
|
273 |
CT_INVALID = 0xFF |
|
473
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
274 |
}; |
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
275 |
|
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
395
diff
changeset
|
276 |
typedef uint AcceptedCargo[NUM_CARGO]; |
0 | 277 |
|
278 |
typedef struct TileDesc { |
|
279 |
StringID str; |
|
280 |
byte owner; |
|
71
1b8e15a10515
(svn r72) -Add: build_date of station (viewable with Query tool)
truelight
parents:
39
diff
changeset
|
281 |
uint16 build_date; |
0 | 282 |
uint32 dparam[2]; |
283 |
} TileDesc; |
|
284 |
||
285 |
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
|
286 |
int32 left; |
c6223dbdb202
(svn r1330) Increase size of some vars from int16 to int32 to guard against future overflows
tron
parents:
842
diff
changeset
|
287 |
int32 top; |
0 | 288 |
byte width_1, width_2; |
289 |
} ViewportSign; |
|
290 |
||
291 |
typedef int32 CommandProc(int x, int y, uint32 flags, uint32 p1, uint32 p2); |
|
292 |
||
293 |
typedef void DrawTileProc(TileInfo *ti); |
|
294 |
typedef uint GetSlopeZProc(TileInfo *ti); |
|
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
295 |
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
|
296 |
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
|
297 |
typedef void GetTileDescProc(TileIndex tile, TileDesc *td); |
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
298 |
/* GetTileTrackStatusProcs return a value that contains the possible tracks |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
299 |
* 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
|
300 |
* 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
|
301 |
* 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
|
302 |
* 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
|
303 |
* 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
|
304 |
* reversed from map3/2[tile] for railway signals). |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
305 |
* |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
306 |
* 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
|
307 |
* tracks = (byte)(ts | ts >>8) |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
308 |
* 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
|
309 |
* 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
|
310 |
* 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
|
311 |
* |
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
312 |
* 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
|
313 |
* 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
|
314 |
* 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
|
315 |
* above. |
159
139cf78bfb28
(svn r160) -Codechange: made GetTileTrackStatus more readable (blathijs)
truelight
parents:
152
diff
changeset
|
316 |
*/ |
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
317 |
typedef uint32 GetTileTrackStatusProc(TileIndex tile, TransportType mode); |
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
318 |
typedef void GetProducedCargoProc(TileIndex tile, byte *b); |
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
319 |
typedef void ClickTileProc(TileIndex tile); |
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
320 |
typedef void AnimateTileProc(TileIndex tile); |
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
321 |
typedef void TileLoopProc(TileIndex tile); |
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
322 |
typedef void ChangeTileOwnerProc(TileIndex tile, byte old_player, byte new_player); |
22 | 323 |
/* Return value has bit 0x2 set, when the vehicle enters a station. Then, |
324 |
* result << 8 contains the id of the station entered. If the return value has |
|
325 |
* bit 0x8 set, the vehicle could not and did not enter the tile. Are there |
|
326 |
* 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
|
327 |
typedef uint32 VehicleEnterTileProc(Vehicle *v, TileIndex tile, int x, int y); |
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
328 |
typedef void VehicleLeaveTileProc(Vehicle *v, TileIndex tile, int x, int y); |
39 | 329 |
typedef uint GetSlopeTilehProc(TileInfo *ti); |
0 | 330 |
|
331 |
typedef struct { |
|
332 |
DrawTileProc *draw_tile_proc; |
|
333 |
GetSlopeZProc *get_slope_z_proc; |
|
334 |
ClearTileProc *clear_tile_proc; |
|
335 |
GetAcceptedCargoProc *get_accepted_cargo_proc; |
|
336 |
GetTileDescProc *get_tile_desc_proc; |
|
337 |
GetTileTrackStatusProc *get_tile_track_status_proc; |
|
338 |
ClickTileProc *click_tile_proc; |
|
339 |
AnimateTileProc *animate_tile_proc; |
|
340 |
TileLoopProc *tile_loop_proc; |
|
341 |
ChangeTileOwnerProc *change_tile_owner_proc; |
|
342 |
GetProducedCargoProc *get_produced_cargo_proc; |
|
343 |
VehicleEnterTileProc *vehicle_enter_tile_proc; |
|
344 |
VehicleLeaveTileProc *vehicle_leave_tile_proc; |
|
39 | 345 |
GetSlopeTilehProc *get_slope_tileh_proc; |
0 | 346 |
} TileTypeProcs; |
347 |
||
348 |
||
349 |
||
350 |
#define MP_SETTYPE(x) ((x+1) << 8) |
|
351 |
||
352 |
enum { |
|
353 |
MP_MAP2 = 1<<0, |
|
354 |
MP_MAP3LO = 1<<1, |
|
355 |
MP_MAP3HI = 1<<2, |
|
356 |
MP_MAP5 = 1<<3, |
|
357 |
MP_MAPOWNER_CURRENT = 1<<4, |
|
358 |
MP_MAPOWNER = 1<<5, |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
168
diff
changeset
|
359 |
|
0 | 360 |
MP_TYPE_MASK = 0xF << 8, |
361 |
||
362 |
MP_MAP2_CLEAR = 1 << 12, |
|
363 |
MP_MAP3LO_CLEAR = 1 << 13, |
|
364 |
MP_MAP3HI_CLEAR = 1 << 14, |
|
365 |
||
366 |
MP_NODIRTY = 1<<15, |
|
367 |
}; |
|
368 |
||
369 |
enum { |
|
370 |
WC_MAIN_WINDOW = 0x0, |
|
371 |
WC_MAIN_TOOLBAR = 0x1, |
|
372 |
WC_STATUS_BAR = 0x2, |
|
373 |
WC_BUILD_TOOLBAR = 0x3, |
|
374 |
WC_NEWS_WINDOW = 0x4, |
|
375 |
WC_TOWN_DIRECTORY = 0x5, |
|
376 |
WC_STATION_LIST = 0x6, |
|
377 |
WC_TOWN_VIEW = 0x7, |
|
378 |
WC_SMALLMAP = 0x8, |
|
379 |
WC_TRAINS_LIST = 0x9, |
|
380 |
WC_ROADVEH_LIST = 0xA, |
|
381 |
WC_SHIPS_LIST = 0xB, |
|
382 |
WC_AIRCRAFT_LIST = 0xC, |
|
383 |
WC_VEHICLE_VIEW = 0xD, |
|
384 |
WC_VEHICLE_DETAILS = 0xE, |
|
385 |
WC_VEHICLE_REFIT = 0xF, |
|
386 |
WC_VEHICLE_ORDERS = 0x10, |
|
387 |
WC_STATION_VIEW = 0x11, |
|
388 |
WC_VEHICLE_DEPOT = 0x12, |
|
389 |
WC_BUILD_VEHICLE = 0x13, |
|
390 |
WC_BUILD_BRIDGE = 0x14, |
|
391 |
WC_ERRMSG = 0x15, |
|
392 |
WC_ASK_ABANDON_GAME = 0x16, |
|
393 |
WC_QUIT_GAME = 0x17, |
|
394 |
WC_BUILD_STATION = 0x18, |
|
395 |
WC_BUS_STATION = 0x19, |
|
396 |
WC_TRUCK_STATION = 0x1A, |
|
397 |
WC_BUILD_DEPOT = 0x1B, |
|
398 |
WC_DEBUGGER = 0x1C, |
|
399 |
WC_COMPANY = 0x1D, |
|
400 |
WC_FINANCES = 0x1E, |
|
401 |
WC_PLAYER_COLOR = 0x1F, |
|
402 |
WC_QUERY_STRING = 0x20, |
|
403 |
WC_SAVELOAD = 0x21, |
|
404 |
WC_SELECT_GAME = 0x22, |
|
405 |
WC_TOOLBAR_MENU = 0x24, |
|
406 |
WC_INCOME_GRAPH = 0x25, |
|
407 |
WC_OPERATING_PROFIT = 0x26, |
|
408 |
WC_TOOLTIPS = 0x27, |
|
409 |
WC_INDUSTRY_VIEW = 0x28, |
|
410 |
WC_PLAYER_FACE = 0x29, |
|
411 |
WC_LAND_INFO = 0x2A, |
|
412 |
WC_TOWN_AUTHORITY = 0x2B, |
|
413 |
WC_SUBSIDIES_LIST = 0x2C, |
|
414 |
WC_GRAPH_LEGEND = 0x2D, |
|
415 |
WC_DELIVERED_CARGO = 0x2E, |
|
416 |
WC_PERFORMANCE_HISTORY = 0x2F, |
|
417 |
WC_COMPANY_VALUE = 0x30, |
|
418 |
WC_COMPANY_LEAGUE = 0x31, |
|
419 |
WC_BUY_COMPANY = 0x32, |
|
420 |
WC_PAYMENT_RATES = 0x33, |
|
421 |
WC_SELECT_TUTORIAL = 0x34, |
|
422 |
WC_ENGINE_PREVIEW = 0x35, |
|
423 |
WC_MUSIC_WINDOW = 0x36, |
|
424 |
WC_MUSIC_TRACK_SELECTION = 0x37, |
|
606
0e507bb0f63a
(svn r1030) Some toolbar icons are arranged differently:
dominik
parents:
543
diff
changeset
|
425 |
WC_SCEN_LAND_GEN = 0x38, // also used for landscaping toolbar |
0 | 426 |
WC_ASK_RESET_LANDSCAPE = 0x39, |
427 |
WC_SCEN_TOWN_GEN = 0x3A, |
|
428 |
WC_SCEN_INDUSTRY = 0x3B, |
|
429 |
WC_SCEN_BUILD_ROAD = 0x3C, |
|
606
0e507bb0f63a
(svn r1030) Some toolbar icons are arranged differently:
dominik
parents:
543
diff
changeset
|
430 |
WC_BUILD_TREES = 0x3D, |
0 | 431 |
WC_SEND_NETWORK_MSG = 0x3E, |
432 |
WC_DROPDOWN_MENU = 0x3F, |
|
433 |
WC_BUILD_INDUSTRY = 0x40, |
|
434 |
WC_GAME_OPTIONS = 0x41, |
|
435 |
WC_NETWORK_WINDOW = 0x42, |
|
436 |
WC_INDUSTRY_DIRECTORY = 0x43, |
|
437 |
WC_MESSAGE_HISTORY = 0x44, |
|
438 |
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
|
439 |
WC_PERFORMANCE_DETAIL = 0x46, |
126 | 440 |
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
|
441 |
WC_EXTRA_VIEW_PORT = 0x48, |
543
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
513
diff
changeset
|
442 |
WC_CLIENT_LIST = 0x49, |
e3b43338096b
(svn r942) -Merged branch/network back into the trunk
truelight
parents:
513
diff
changeset
|
443 |
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
|
444 |
WC_CUSTOM_CURRENCY = 0x4B, |
842 | 445 |
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
|
446 |
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
|
447 |
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
|
448 |
WC_SIGN_LIST = 0x4F, |
0 | 449 |
}; |
450 |
||
451 |
||
452 |
enum { |
|
453 |
EXPENSES_CONSTRUCTION = 0, |
|
454 |
EXPENSES_NEW_VEHICLES = 1, |
|
455 |
EXPENSES_TRAIN_RUN = 2, |
|
456 |
EXPENSES_ROADVEH_RUN = 3, |
|
457 |
EXPENSES_AIRCRAFT_RUN = 4, |
|
458 |
EXPENSES_SHIP_RUN = 5, |
|
459 |
EXPENSES_PROPERTY = 6, |
|
460 |
EXPENSES_TRAIN_INC = 7, |
|
461 |
EXPENSES_ROADVEH_INC = 8, |
|
462 |
EXPENSES_AIRCRAFT_INC = 9, |
|
463 |
EXPENSES_SHIP_INC = 10, |
|
464 |
EXPENSES_LOAN_INT = 11, |
|
465 |
EXPENSES_OTHER = 12, |
|
466 |
}; |
|
467 |
||
468 |
// special string constants |
|
469 |
enum SpecialStrings { |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
168
diff
changeset
|
470 |
|
0 | 471 |
// special strings for town names. the town name is generated dynamically on request. |
472 |
SPECSTR_TOWNNAME_START = 0x20C0, |
|
473 |
SPECSTR_TOWNNAME_ENGLISH = SPECSTR_TOWNNAME_START, |
|
474 |
SPECSTR_TOWNNAME_FRENCH, |
|
475 |
SPECSTR_TOWNNAME_GERMAN, |
|
476 |
SPECSTR_TOWNNAME_AMERICAN, |
|
477 |
SPECSTR_TOWNNAME_LATIN, |
|
478 |
SPECSTR_TOWNNAME_SILLY, |
|
479 |
SPECSTR_TOWNNAME_SWEDISH, |
|
480 |
SPECSTR_TOWNNAME_DUTCH, |
|
481 |
SPECSTR_TOWNNAME_FINNISH, |
|
482 |
SPECSTR_TOWNNAME_POLISH, |
|
483 |
SPECSTR_TOWNNAME_SLOVAKISH, |
|
948 | 484 |
SPECSTR_TOWNNAME_NORWEGIAN, |
0 | 485 |
SPECSTR_TOWNNAME_HUNGARIAN, |
265 | 486 |
SPECSTR_TOWNNAME_AUSTRIAN, |
487 |
SPECSTR_TOWNNAME_ROMANIAN, |
|
488 |
SPECSTR_TOWNNAME_CZECH, |
|
1030
a5e4705a738c
(svn r1531) -Feature: [1039061] Swiss town-names (vulvulune)
darkvater
parents:
1004
diff
changeset
|
489 |
SPECSTR_TOWNNAME_SWISS, |
a5e4705a738c
(svn r1531) -Feature: [1039061] Swiss town-names (vulvulune)
darkvater
parents:
1004
diff
changeset
|
490 |
SPECSTR_TOWNNAME_LAST = SPECSTR_TOWNNAME_SWISS, |
0 | 491 |
|
492 |
// special strings for player names on the form "TownName transport". |
|
493 |
SPECSTR_PLAYERNAME_START = 0x70EA, |
|
494 |
SPECSTR_PLAYERNAME_ENGLISH = SPECSTR_PLAYERNAME_START, |
|
495 |
SPECSTR_PLAYERNAME_FRENCH, |
|
496 |
SPECSTR_PLAYERNAME_GERMAN, |
|
497 |
SPECSTR_PLAYERNAME_AMERICAN, |
|
498 |
SPECSTR_PLAYERNAME_LATIN, |
|
499 |
SPECSTR_PLAYERNAME_SILLY, |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
168
diff
changeset
|
500 |
SPECSTR_PLAYERNAME_LAST = SPECSTR_PLAYERNAME_SILLY, |
0 | 501 |
|
502 |
SPECSTR_ANDCO_NAME = 0x70E6, |
|
503 |
SPECSTR_PRESIDENT_NAME = 0x70E7, |
|
504 |
SPECSTR_SONGNAME = 0x70E8, |
|
505 |
||
506 |
// reserve 32 strings for the *.lng files |
|
507 |
SPECSTR_LANGUAGE_START = 0x7100, |
|
508 |
SPECSTR_LANGUAGE_END = 0x711f, |
|
509 |
||
510 |
// reserve 32 strings for various screen resolutions |
|
511 |
SPECSTR_RESOLUTION_START = 0x7120, |
|
512 |
SPECSTR_RESOLUTION_END = 0x713f, |
|
513 |
||
514 |
// reserve 32 strings for screenshot formats |
|
515 |
SPECSTR_SCREENSHOT_START = 0x7140, |
|
516 |
SPECSTR_SCREENSHOT_END = 0x715F, |
|
517 |
||
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
|
518 |
// 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
|
519 |
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
|
520 |
STR_SPEC_USERSTRING = 0xF808, |
0 | 521 |
}; |
522 |
||
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1967
diff
changeset
|
523 |
typedef void PlaceProc(TileIndex tile); |
0 | 524 |
|
525 |
VARDEF byte _savegame_sort_order; |
|
526 |
||
527 |
#define INVALID_UINT_TILE (uint)0xFFFFFFFF |
|
528 |
#define INVALID_STRING_ID 0xFFFF |
|
529 |
||
530 |
enum { |
|
531 |
MAX_SCREEN_WIDTH = 2048, |
|
532 |
MAX_SCREEN_HEIGHT = 1200, |
|
533 |
}; |
|
534 |
||
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
|
535 |
/* 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
|
536 |
* 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
|
537 |
* 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
|
538 |
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
|
539 |
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
|
540 |
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
|
541 |
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
|
542 |
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
|
543 |
}; |
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
|
544 |
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
|
545 |
|
2075
7f0ca01392db
(svn r2585) - Fix [Makefile]: some small cleanups, remove warnings, and add mersenne to makefile (Luca)
Darkvater
parents:
2055
diff
changeset
|
546 |
#endif /* OPENTTD_H */ |