OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

signal_type.h
Go to the documentation of this file.
1 /* $Id: signal_type.h 24367 2012-07-01 23:12:50Z michi_cc $ */
2
3 /*
4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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/>.
8 */
9
12 #ifndef SIGNAL_TYPE_H
13 #define SIGNAL_TYPE_H
14
15 #include "core/enum_type.hpp"
16
18 enum SignalVariant {
19 SIG_ELECTRIC = 0,
20 SIG_SEMAPHORE = 1,
21 };
22
23
25 enum SignalType {
26 SIGTYPE_NORMAL = 0,
27 SIGTYPE_ENTRY = 1,
28 SIGTYPE_EXIT = 2,
29 SIGTYPE_COMBO = 3,
30 SIGTYPE_PBS = 4,
31 SIGTYPE_PBS_ONEWAY = 5,
32
33 SIGTYPE_END,
34 SIGTYPE_LAST = SIGTYPE_PBS_ONEWAY,
35 SIGTYPE_LAST_NOPBS = SIGTYPE_COMBO,
36 };
38 template <> struct EnumPropsT<SignalType> : MakeEnumPropsT<SignalType, byte, SIGTYPE_NORMAL, SIGTYPE_END, SIGTYPE_END, 3> {};
39
40
46 enum SignalState {
47 SIGNAL_STATE_RED = 0,
48 SIGNAL_STATE_GREEN = 1,
49 };
50
51 #endif /* SIGNAL_TYPE_H */