OpenTTD Source 20260311-master-g511d3794ce
signal_data.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
9
10/* XXX: Below 3 tables store duplicate data. Maybe remove some? */
12extern const uint8_t _signal_along_trackdir[TRACKDIR_END] = {
13 0x8, 0x8, 0x8, 0x2, 0x4, 0x1, 0, 0,
14 0x4, 0x4, 0x4, 0x1, 0x8, 0x2
15};
16
18extern const uint8_t _signal_against_trackdir[TRACKDIR_END] = {
19 0x4, 0x4, 0x4, 0x1, 0x8, 0x2, 0, 0,
20 0x8, 0x8, 0x8, 0x2, 0x4, 0x1
21};
22
24extern const uint8_t _signal_on_track[] = {
25 0xC, 0xC, 0xC, 0x3, 0xC, 0x3
26};
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 ...
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 tr...
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 tra...
@ TRACKDIR_END
Used for iterations.
Definition track_type.h:84