OpenTTD Source 20241224-master-gf74b0cf984
|
Types and classes related to signals. More...
#include "core/enum_type.hpp"
Go to the source code of this file.
Enumerations | |
enum | SignalVariant : uint8_t { SIG_ELECTRIC = 0 , SIG_SEMAPHORE = 1 } |
Variant of the signal, i.e. More... | |
enum | SignalType : uint8_t { SIGTYPE_BLOCK = 0 , SIGTYPE_ENTRY = 1 , SIGTYPE_EXIT = 2 , SIGTYPE_COMBO = 3 , SIGTYPE_PBS = 4 , SIGTYPE_PBS_ONEWAY = 5 , SIGTYPE_END , SIGTYPE_LAST = SIGTYPE_PBS_ONEWAY , SIGTYPE_LAST_NOPBS = SIGTYPE_COMBO } |
Type of signal, i.e. More... | |
enum | SignalState { SIGNAL_STATE_RED = 0 , SIGNAL_STATE_GREEN = 1 } |
These are states in which a signal can be. More... | |
Types and classes related to signals.
Definition in file signal_type.h.
enum SignalState |
These are states in which a signal can be.
Currently these are only two, so simple boolean logic will do. But do try to compare to this enum instead of normal boolean evaluation, since that will make future additions easier.
Enumerator | |
---|---|
SIGNAL_STATE_RED | The signal is red. |
SIGNAL_STATE_GREEN | The signal is green. |
Definition at line 42 of file signal_type.h.
enum SignalType : uint8_t |
Type of signal, i.e.
how does the signal behave?
Definition at line 23 of file signal_type.h.
enum SignalVariant : uint8_t |
Variant of the signal, i.e.
how does the signal look?
Enumerator | |
---|---|
SIG_ELECTRIC | Light signal. |
SIG_SEMAPHORE | Old-fashioned semaphore signal. |
Definition at line 16 of file signal_type.h.