OpenTTD Source  20241108-master-g80f628063a
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_t RailTypeLabel;
16 
17 static const RailTypeLabel RAILTYPE_LABEL_RAIL = 'RAIL';
18 static const RailTypeLabel RAILTYPE_LABEL_ELECTRIC = 'ELRL';
19 static const RailTypeLabel RAILTYPE_LABEL_MONO = 'MONO';
20 static const RailTypeLabel RAILTYPE_LABEL_MAGLEV = 'MGLV';
21 
27 enum RailType : uint8_t {
33  RAILTYPE_END = 64,
35 };
36 
39 
40 
44 enum RailTypes : uint64_t {
50  INVALID_RAILTYPES = UINT64_MAX,
51 };
53 
54 #endif /* RAIL_TYPE_H */
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
Type (helpers) for enums.
#define DECLARE_POSTFIX_INCREMENT(enum_type)
Some enums need to have allowed incrementing (i.e.
Definition: enum_type.hpp:18
RailTypes
Allow incrementing of Track variables.
Definition: rail_type.h:44
@ RAILTYPES_ELECTRIC
Electrified rails.
Definition: rail_type.h:47
@ INVALID_RAILTYPES
Invalid railtypes.
Definition: rail_type.h:50
@ RAILTYPES_MAGLEV
Ever fast maglev.
Definition: rail_type.h:49
@ RAILTYPES_RAIL
Non-electrified rails.
Definition: rail_type.h:46
@ RAILTYPES_NONE
No rail types.
Definition: rail_type.h:45
@ RAILTYPES_MONO
Monorail!
Definition: rail_type.h:48
RailType
Enumeration for all possible railtypes.
Definition: rail_type.h:27
@ RAILTYPE_BEGIN
Used for iterations.
Definition: rail_type.h:28
@ RAILTYPE_END
Used for iterations.
Definition: rail_type.h:33
@ RAILTYPE_MONO
Monorail.
Definition: rail_type.h:31
@ INVALID_RAILTYPE
Flag for invalid railtype.
Definition: rail_type.h:34
@ RAILTYPE_ELECTRIC
Electric rails.
Definition: rail_type.h:30
@ RAILTYPE_RAIL
Standard non-electric rails.
Definition: rail_type.h:29
@ RAILTYPE_MAGLEV
Maglev.
Definition: rail_type.h:32