OpenTTD Source 20260621-master-g720d10536d
signal_type.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#ifndef SIGNAL_TYPE_H
11#define SIGNAL_TYPE_H
12
13#include "core/enum_type.hpp"
14
16enum class SignalVariant : uint8_t {
20};
21
22
24enum class SignalType : uint8_t {
25 Block = 0,
26 Entry = 1,
27 Exit = 2,
28 Combo = 3,
29 Path = 4,
32};
33
34
40enum class SignalState : uint8_t {
41 Red = 0,
42 Green = 1,
44};
45
46#endif /* SIGNAL_TYPE_H */
A leg of a path in the link graph.
Type (helpers) for enums.
SignalType
Type of signal, i.e.
Definition signal_type.h:24
@ Entry
presignal block entry.
Definition signal_type.h:26
@ PathOneWay
no-entry path signal.
Definition signal_type.h:30
@ Combo
presignal inter-block.
Definition signal_type.h:28
@ Block
block signal.
Definition signal_type.h:25
@ Exit
presignal block exit.
Definition signal_type.h:27
SignalState
These are states in which a signal can be.
Definition signal_type.h:40
@ Green
The signal is green.
Definition signal_type.h:42
@ Red
The signal is red.
Definition signal_type.h:41
SignalVariant
Variant of the signal, i.e.
Definition signal_type.h:16
@ End
End marker.
Definition signal_type.h:19
@ Electric
Light signal.
Definition signal_type.h:17
@ Semaphore
Old-fashioned semaphore signal.
Definition signal_type.h:18