OpenTTD Source
20240917-master-g9ab0a47812
|
Go to the documentation of this file.
24 extern const uint8_t _signal_along_trackdir[
TRACKDIR_END];
25 return _signal_along_trackdir[trackdir];
34 extern const uint8_t _signal_against_trackdir[
TRACKDIR_END];
35 return _signal_against_trackdir[trackdir];
44 extern const uint8_t _signal_on_track[
TRACK_END];
45 return _signal_on_track[track];
uint8_t SignalAgainstTrackdir(Trackdir trackdir)
Maps a trackdir to the bit that stores its status in the map arrays, in the direction against the tra...
Owner
Enum for all companies/owners.
DiagDirection
Enumeration for diagonal directions.
uint8_t SignalOnTrack(Track track)
Maps a Track to the bits that store the status of the two signals that can be present on the given tr...
@ TRACK_END
Used for iterations.
SigSegState UpdateSignalsOnSegment(TileIndex tile, DiagDirection side, Owner owner)
Update signals, starting at one side of a tile Will check tile next to this at opposite side too.
@ SIGSEG_PBS
Segment is a PBS segment.
SigSegState
State of the signal segment.
Track
These are used to specify a single track.
Trackdir
Enumeration for tracks and directions.
void AddTrackToSignalBuffer(TileIndex tile, Track track, Owner owner)
Add track to signal update buffer.
uint8_t SignalAlongTrackdir(Trackdir trackdir)
Maps a trackdir to the bit that stores its status in the map arrays, in the direction along with the ...
void SetSignalsOnBothDir(TileIndex tile, Track track, Owner owner)
Update signals at segments that are at both ends of given (existent or non-existent) track.
@ TRACKDIR_END
Used for iterations.
@ SIGSEG_FULL
Occupied by a train.
void UpdateSignalsInBuffer()
Update signals in buffer Called from 'outside'.
void AddSideToSignalBuffer(TileIndex tile, DiagDirection side, Owner owner)
Add side of tile to signal update buffer.
@ SIGSEG_FREE
Free and has no pre-signal exits or at least one green exit.