Mercurial > hg > openttd
comparison src/pbs.h @ 17639:3cd4f18cdbc1 draft
(svn r22410) -Document: some more bits ;)
author | rubidium <rubidium@openttd.org> |
---|---|
date | Mon, 02 May 2011 16:14:23 +0000 |
parents | e4f2ba58a34f |
children | f8c0e108128c |
comparison
equal
deleted
inserted
replaced
17638:7f017140fa5b | 17639:3cd4f18cdbc1 |
---|---|
28 struct PBSTileInfo { | 28 struct PBSTileInfo { |
29 TileIndex tile; ///< Tile the path ends, INVALID_TILE if no valid path was found. | 29 TileIndex tile; ///< Tile the path ends, INVALID_TILE if no valid path was found. |
30 Trackdir trackdir; ///< The reserved trackdir on the tile. | 30 Trackdir trackdir; ///< The reserved trackdir on the tile. |
31 bool okay; ///< True if tile is a safe waiting position, false otherwise. | 31 bool okay; ///< True if tile is a safe waiting position, false otherwise. |
32 | 32 |
33 /** | |
34 * Create an empty PBSTileInfo. | |
35 */ | |
33 PBSTileInfo() : tile(INVALID_TILE), trackdir(INVALID_TRACKDIR), okay(false) {} | 36 PBSTileInfo() : tile(INVALID_TILE), trackdir(INVALID_TRACKDIR), okay(false) {} |
37 | |
38 /** | |
39 * Create a PBSTileInfo with given tile, track direction and safe waiting position information. | |
40 * @param _t The tile where the path ends. | |
41 * @param _td The reserved track dir on the tile. | |
42 * @param _okay Whether the tile is a safe waiting point or not. | |
43 */ | |
34 PBSTileInfo(TileIndex _t, Trackdir _td, bool _okay) : tile(_t), trackdir(_td), okay(_okay) {} | 44 PBSTileInfo(TileIndex _t, Trackdir _td, bool _okay) : tile(_t), trackdir(_td), okay(_okay) {} |
35 }; | 45 }; |
36 | 46 |
37 PBSTileInfo FollowTrainReservation(const Train *v, Vehicle **train_on_res = NULL); | 47 PBSTileInfo FollowTrainReservation(const Train *v, Vehicle **train_on_res = NULL); |
38 bool IsSafeWaitingPosition(const Train *v, TileIndex tile, Trackdir trackdir, bool include_line_end, bool forbid_90deg = false); | 48 bool IsSafeWaitingPosition(const Train *v, TileIndex tile, Trackdir trackdir, bool include_line_end, bool forbid_90deg = false); |