OpenTTD Source 20260311-master-g511d3794ce
signal_data.h File Reference

Data related to rail signals. More...

Go to the source code of this file.

Variables

const uint8_t _signal_along_trackdir [TRACKDIR_END]
 Maps a trackdir to the bit that stores its status in the map arrays, in the direction along with the trackdir.
const uint8_t _signal_against_trackdir [TRACKDIR_END]
 Maps a trackdir to the bit that stores its status in the map arrays, in the direction against the trackdir.
const uint8_t _signal_on_track []
 Maps a Track to the bits that store the status of the two signals that can be present on the given track.

Detailed Description

Data related to rail signals.

Definition in file signal_data.h.

Variable Documentation

◆ _signal_against_trackdir

const uint8_t _signal_against_trackdir[TRACKDIR_END]
extern
Initial value:
= {
0x4, 0x4, 0x4, 0x1, 0x8, 0x2, 0, 0,
0x8, 0x8, 0x8, 0x2, 0x4, 0x1
}

Maps a trackdir to the bit that stores its status in the map arrays, in the direction against the trackdir.

Referenced by SignalAgainstTrackdir().

◆ _signal_along_trackdir

const uint8_t _signal_along_trackdir[TRACKDIR_END]
extern
Initial value:
= {
0x8, 0x8, 0x8, 0x2, 0x4, 0x1, 0, 0,
0x4, 0x4, 0x4, 0x1, 0x8, 0x2
}

Maps a trackdir to the bit that stores its status in the map arrays, in the direction along with the trackdir.

Referenced by SignalAlongTrackdir().

◆ _signal_on_track

const uint8_t _signal_on_track[]
extern
Initial value:
= {
0xC, 0xC, 0xC, 0x3, 0xC, 0x3
}

Maps a Track to the bits that store the status of the two signals that can be present on the given track.

Referenced by SignalOnTrack().