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