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