OpenTTD
rail_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 RAIL_TYPE_H
11 #define RAIL_TYPE_H
12 
13 #include "core/enum_type.hpp"
14 
15 typedef uint32 RailTypeLabel;
16 
17 static const RailTypeLabel RAILTYPE_RAIL_LABEL = 'RAIL';
18 static const RailTypeLabel RAILTYPE_ELECTRIC_LABEL = 'ELRL';
19 static const RailTypeLabel RAILTYPE_MONO_LABEL = 'MONO';
20 static const RailTypeLabel RAILTYPE_MAGLEV_LABEL = 'MGLV';
21 
27 enum RailType : byte {
33  RAILTYPE_END = 64,
35 };
36 
41 
46 enum RailTypes : uint64 {
52  INVALID_RAILTYPES = UINT64_MAX,
53 };
55 
56 #endif /* RAIL_TYPE_H */
Monorail.
Definition: rail_type.h:31
Helper template class that makes basic properties of given enumeration type visible from outsize...
Definition: enum_type.hpp:62
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
Electrified rails.
Definition: rail_type.h:49
Flag for invalid railtype.
Definition: rail_type.h:34
Type (helpers) for enums.
Non-electrified rails.
Definition: rail_type.h:48
No rail types.
Definition: rail_type.h:47
Electric rails.
Definition: rail_type.h:30
Invalid railtypes.
Definition: rail_type.h:52
Standard non-electric rails.
Definition: rail_type.h:29
Informative template class exposing basic enumeration properties used by several other templates belo...
Definition: enum_type.hpp:48
RailTypes
The different railtypes we support, but then a bitmask of them.
Definition: rail_type.h:46
Monorail!
Definition: rail_type.h:50
RailType
Enumeration for all possible railtypes.
Definition: rail_type.h:27
Ever fast maglev.
Definition: rail_type.h:51
Used for iterations.
Definition: rail_type.h:33
#define DECLARE_POSTFIX_INCREMENT(enum_type)
Some enums need to have allowed incrementing (i.e.
Definition: enum_type.hpp:14
Used for iterations.
Definition: rail_type.h:28
Maglev.
Definition: rail_type.h:32