OpenTTD Source 20241224-master-gf74b0cf984
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 <http://www.gnu.org/licenses/>.
6 */
7
10#ifndef SIGNAL_TYPE_H
11#define SIGNAL_TYPE_H
12
13#include "core/enum_type.hpp"
14
16enum SignalVariant : uint8_t {
19};
20
21
23enum SignalType : uint8_t {
30
31 SIGTYPE_END,
32 SIGTYPE_LAST = SIGTYPE_PBS_ONEWAY,
33 SIGTYPE_LAST_NOPBS = SIGTYPE_COMBO,
34};
36
37
46
47#endif /* SIGNAL_TYPE_H */
Type (helpers) for enums.
#define DECLARE_ENUM_AS_ADDABLE(EnumType)
Operator that allows this enumeration to be added to any other enumeration.
Definition enum_type.hpp:45
SignalType
Type of signal, i.e.
Definition signal_type.h:23
@ SIGTYPE_PBS_ONEWAY
no-entry signal
Definition signal_type.h:29
@ SIGTYPE_PBS
normal pbs signal
Definition signal_type.h:28
@ SIGTYPE_ENTRY
presignal block entry
Definition signal_type.h:25
@ SIGTYPE_COMBO
presignal inter-block
Definition signal_type.h:27
@ SIGTYPE_EXIT
presignal block exit
Definition signal_type.h:26
@ SIGTYPE_BLOCK
block signal
Definition signal_type.h:24
SignalState
These are states in which a signal can be.
Definition signal_type.h:42
@ SIGNAL_STATE_RED
The signal is red.
Definition signal_type.h:43
@ SIGNAL_STATE_GREEN
The signal is green.
Definition signal_type.h:44
SignalVariant
Variant of the signal, i.e.
Definition signal_type.h:16
@ SIG_SEMAPHORE
Old-fashioned semaphore signal.
Definition signal_type.h:18
@ SIG_ELECTRIC
Light signal.
Definition signal_type.h:17