OpenTTD Source: src/table/signal_data.h Source File

OpenTTD Source 15.0-RC2

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
10/* XXX: Below 3 tables store duplicate data. Maybe remove some? */
11/* Maps a trackdir to the bit that stores its status in the map arrays, in the
12 * direction along with the trackdir */
13extern const uint8_t _signal_along_trackdir[TRACKDIR_END] = {
14 0x8, 0x8, 0x8, 0x2, 0x4, 0x1, 0, 0,
15 0x4, 0x4, 0x4, 0x1, 0x8, 0x2
16};
17
18/* Maps a trackdir to the bit that stores its status in the map arrays, in the
19 * direction against the trackdir */
20extern const uint8_t _signal_against_trackdir[TRACKDIR_END] = {
21 0x4, 0x4, 0x4, 0x1, 0x8, 0x2, 0, 0,
22 0x8, 0x8, 0x8, 0x2, 0x4, 0x1
23};
24
25/* Maps a Track to the bits that store the status of the two signals that can
26 * be present on the given track */
27extern const uint8_t _signal_on_track[] = {
28 0xC, 0xC, 0xC, 0x3, 0xC, 0x3
29};
TRACKDIR_END
@ TRACKDIR_END
Used for iterations.
Definition track_type.h:84