61 typedef uint16 IndustryID; |
62 typedef uint16 IndustryID; |
62 typedef uint16 DepotID; |
63 typedef uint16 DepotID; |
63 typedef uint16 WaypointID; |
64 typedef uint16 WaypointID; |
64 typedef uint16 OrderID; |
65 typedef uint16 OrderID; |
65 typedef uint16 SignID; |
66 typedef uint16 SignID; |
|
67 typedef uint16 GroupID; |
66 typedef uint16 EngineRenewID; |
68 typedef uint16 EngineRenewID; |
67 typedef uint16 DestinationID; |
69 typedef uint16 DestinationID; |
68 |
70 |
69 /* DestinationID must be at least as large as every these below, because it can |
71 /* DestinationID must be at least as large as every these below, because it can |
70 * be any of them |
72 * be any of them |
169 }; |
171 }; |
170 |
172 |
171 |
173 |
172 /* Display Options */ |
174 /* Display Options */ |
173 enum { |
175 enum { |
174 DO_SHOW_TOWN_NAMES = 1 << 0, |
176 DO_SHOW_TOWN_NAMES = 0, |
175 DO_SHOW_STATION_NAMES = 1 << 1, |
177 DO_SHOW_STATION_NAMES = 1, |
176 DO_SHOW_SIGNS = 1 << 2, |
178 DO_SHOW_SIGNS = 2, |
177 DO_FULL_ANIMATION = 1 << 3, |
179 DO_FULL_ANIMATION = 3, |
178 DO_TRANS_BUILDINGS = 1 << 4, |
180 DO_FULL_DETAIL = 5, |
179 DO_FULL_DETAIL = 1 << 5, |
181 DO_WAYPOINTS = 6, |
180 DO_WAYPOINTS = 1 << 6, |
182 }; |
181 DO_TRANS_SIGNS = 1 << 7, |
183 |
|
184 enum { |
|
185 TO_SIGNS, |
|
186 TO_TREES, |
|
187 TO_HOUSES, |
|
188 TO_INDUSTRIES, |
|
189 TO_BUILDINGS, |
|
190 TO_BRIDGES, |
|
191 TO_STRUCTURES, |
182 }; |
192 }; |
183 |
193 |
184 /* Landscape types */ |
194 /* Landscape types */ |
185 enum { |
195 enum { |
186 LT_TEMPERATE = 0, |
196 LT_TEMPERATE = 0, |
188 LT_TROPIC = 2, |
198 LT_TROPIC = 2, |
189 LT_TOYLAND = 3, |
199 LT_TOYLAND = 3, |
190 |
200 |
191 NUM_LANDSCAPE = 4, |
201 NUM_LANDSCAPE = 4, |
192 }; |
202 }; |
|
203 |
|
204 /** |
|
205 * Town Layouts |
|
206 */ |
|
207 enum TownLayout { |
|
208 TL_NO_ROADS = 0, ///< Build no more roads, but still build houses |
|
209 TL_ORIGINAL, ///< Original algorithm (min. 1 distance between roads) |
|
210 TL_BETTER_ROADS, ///< Extended original algorithm (min. 2 distance between roads) |
|
211 TL_2X2_GRID, ///< Geometric 2x2 grid algorithm |
|
212 TL_3X3_GRID, ///< Geometric 3x3 grid algorithm |
|
213 |
|
214 NUM_TLS, ///< Number of town layouts |
|
215 }; |
|
216 |
|
217 /* It needs to be 8bits, because we save and load it as such */ |
|
218 /** Define basic enum properties */ |
|
219 template <> struct EnumPropsT<TownLayout> : MakeEnumPropsT<TownLayout, byte, TL_NO_ROADS, NUM_TLS, NUM_TLS> {}; |
|
220 typedef TinyEnumT<TownLayout> TownLayoutByte; //typedefing-enumification of TownLayout |
193 |
221 |
194 enum { |
222 enum { |
195 NUM_PRICES = 49, |
223 NUM_PRICES = 49, |
196 }; |
224 }; |
197 |
225 |
334 typedef void DrawTileProc(TileInfo *ti); |
362 typedef void DrawTileProc(TileInfo *ti); |
335 typedef uint GetSlopeZProc(TileIndex tile, uint x, uint y); |
363 typedef uint GetSlopeZProc(TileIndex tile, uint x, uint y); |
336 typedef int32 ClearTileProc(TileIndex tile, byte flags); |
364 typedef int32 ClearTileProc(TileIndex tile, byte flags); |
337 typedef void GetAcceptedCargoProc(TileIndex tile, AcceptedCargo res); |
365 typedef void GetAcceptedCargoProc(TileIndex tile, AcceptedCargo res); |
338 typedef void GetTileDescProc(TileIndex tile, TileDesc *td); |
366 typedef void GetTileDescProc(TileIndex tile, TileDesc *td); |
339 /* GetTileTrackStatusProcs return a value that contains the possible tracks |
367 /** |
|
368 * GetTileTrackStatusProcs return a value that contains the possible tracks |
340 * that can be taken on a given tile by a given transport. The return value is |
369 * that can be taken on a given tile by a given transport. The return value is |
341 * composed as follows: 0xaabbccdd. ccdd and aabb are bitmasks of trackdirs, |
370 * composed as follows: 0xaabbccdd. ccdd and aabb are bitmasks of trackdirs, |
342 * where bit n corresponds to trackdir n. ccdd are the trackdirs that are |
371 * where bit n corresponds to trackdir n. ccdd are the trackdirs that are |
343 * present in the tile (1==present, 0==not present), aabb is the signal |
372 * present in the tile (1==present, 0==not present), aabb is the signal |
344 * status, if applicable (0==green/no signal, 1==red, note that this is |
373 * status, if applicable (0==green/no signal, 1==red, note that this is |
352 * |
381 * |
353 * A trackdir is combination of a track and a dir, where the lower three bits |
382 * A trackdir is combination of a track and a dir, where the lower three bits |
354 * are a track, the fourth bit is the direction. these give 12 (or 14) |
383 * are a track, the fourth bit is the direction. these give 12 (or 14) |
355 * possible options: 0-5 and 8-13, so we need 14 bits for a trackdir bitmask |
384 * possible options: 0-5 and 8-13, so we need 14 bits for a trackdir bitmask |
356 * above. |
385 * above. |
|
386 * @param tile the tile to get the track status from |
|
387 * @param mode the mode of transportation |
|
388 * @param sub_mode used to differentiate between different kinds within the mode |
|
389 * @return the above mentions track status information |
357 */ |
390 */ |
358 typedef uint32 GetTileTrackStatusProc(TileIndex tile, TransportType mode); |
391 typedef uint32 GetTileTrackStatusProc(TileIndex tile, TransportType mode, uint sub_mode); |
359 typedef void GetProducedCargoProc(TileIndex tile, CargoID *b); |
392 typedef void GetProducedCargoProc(TileIndex tile, CargoID *b); |
360 typedef void ClickTileProc(TileIndex tile); |
393 typedef void ClickTileProc(TileIndex tile); |
361 typedef void AnimateTileProc(TileIndex tile); |
394 typedef void AnimateTileProc(TileIndex tile); |
362 typedef void TileLoopProc(TileIndex tile); |
395 typedef void TileLoopProc(TileIndex tile); |
363 typedef void ChangeTileOwnerProc(TileIndex tile, PlayerID old_player, PlayerID new_player); |
396 typedef void ChangeTileOwnerProc(TileIndex tile, PlayerID old_player, PlayerID new_player); |
459 WC_ENDSCREEN, |
492 WC_ENDSCREEN, |
460 WC_SIGN_LIST, |
493 WC_SIGN_LIST, |
461 WC_GENERATE_LANDSCAPE, |
494 WC_GENERATE_LANDSCAPE, |
462 WC_GENERATE_PROGRESS_WINDOW, |
495 WC_GENERATE_PROGRESS_WINDOW, |
463 WC_CONFIRM_POPUP_QUERY, |
496 WC_CONFIRM_POPUP_QUERY, |
464 }; |
497 WC_TRANSPARENCY_TOOLBAR, |
465 |
498 }; |
466 |
499 |
467 enum { |
500 |
|
501 enum ExpensesType { |
468 EXPENSES_CONSTRUCTION = 0, |
502 EXPENSES_CONSTRUCTION = 0, |
469 EXPENSES_NEW_VEHICLES = 1, |
503 EXPENSES_NEW_VEHICLES = 1, |
470 EXPENSES_TRAIN_RUN = 2, |
504 EXPENSES_TRAIN_RUN = 2, |
471 EXPENSES_ROADVEH_RUN = 3, |
505 EXPENSES_ROADVEH_RUN = 3, |
472 EXPENSES_AIRCRAFT_RUN = 4, |
506 EXPENSES_AIRCRAFT_RUN = 4, |