All types related to tracks.
Different types to 'show' directions.
TrackBits GetReservedTrackbits(TileIndex t)
Get the reserved trackbits for any tile, regardless of type.
Trackdir
Enumeration for tracks and directions.
bool IsSafeWaitingPosition(const Train *v, TileIndex tile, Trackdir trackdir, bool include_line_end, bool forbid_90deg=false)
Determine whether a certain track on a tile is a safe position to end a path.
Train * GetTrainForReservation(TileIndex tile, Track track)
Find the train which has reserved a specific path.
bool TryReserveRailTrack(TileIndex tile, Track t, bool trigger_stations=true)
Try to reserve a specific track on a tile.
PBSTileInfo(TileIndex _t, Trackdir _td, bool _okay)
Create a PBSTileInfo with given tile, track direction and safe waiting position information.
bool IsWaitingPositionFree(const Train *v, TileIndex tile, Trackdir trackdir, bool forbid_90deg=false)
Check if a safe position is free.
PBSTileInfo()
Create an empty PBSTileInfo.
PBSTileInfo FollowTrainReservation(const Train *v, Vehicle **train_on_res=nullptr)
Follow a train reservation to the last tile.
void SetRailStationPlatformReservation(TileIndex start, DiagDirection dir, bool b)
Set the reservation for a complete station platform.
Flag for an invalid trackdir.
TrackBits
Bitfield corresponding to Track.
bool okay
True if tile is a safe waiting position, false otherwise.
TileIndex tile
Tile the path ends, INVALID_TILE if no valid path was found.
'Train' is either a loco or a wagon.
This struct contains information about the end of a reserved path.
uint32 TileIndex
The index/ID of a Tile.
Track
These are used to specify a single track.
Types related to vehicles.
Trackdir trackdir
The reserved trackdir on the tile.
static bool HasReservedTracks(TileIndex tile, TrackBits tracks)
Check whether some of tracks is reserved on a tile.
DiagDirection
Enumeration for diagonal directions.
static const TileIndex INVALID_TILE
The very nice invalid tile marker.
void UnreserveRailTrack(TileIndex tile, Track t)
Lift the reservation of a specific track on a tile.