|
OpenTTD Source 20260621-master-g720d10536d
|
Types and classes related to signals. More...
#include "core/enum_type.hpp"Go to the source code of this file.
Enumerations | |
| enum class | SignalVariant : uint8_t { Electric = 0 , Semaphore = 1 , End } |
| Variant of the signal, i.e. More... | |
| enum class | SignalType : uint8_t { Block = 0 , Entry = 1 , Exit = 2 , Combo = 3 , Path = 4 , PathOneWay = 5 , End } |
| Type of signal, i.e. More... | |
| enum class | SignalState : uint8_t { Red = 0 , Green = 1 , End } |
| These are states in which a signal can be. More... | |
Types and classes related to signals.
Definition in file signal_type.h.
|
strong |
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 | |
|---|---|
| Red | The signal is red. |
| Green | The signal is green. |
| End | End marker. |
Definition at line 40 of file signal_type.h.
|
strong |
Type of signal, i.e.
how does the signal behave?
| Enumerator | |
|---|---|
| Block | block signal. |
| Entry | presignal block entry. |
| Exit | presignal block exit. |
| Combo | presignal inter-block. |
| Path | normal path signal. |
| PathOneWay | no-entry path signal. |
| End | End marker. |
Definition at line 24 of file signal_type.h.
|
strong |
Variant of the signal, i.e.
how does the signal look?
| Enumerator | |
|---|---|
| Electric | Light signal. |
| Semaphore | Old-fashioned semaphore signal. |
| End | End marker. |
Definition at line 16 of file signal_type.h.