OpenTTD
rail_type.h
Go to the documentation of this file.
1 /* $Id: rail_type.h 23595 2011-12-19 17:48:04Z rubidium $ */
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 RAIL_TYPE_H
13 #define RAIL_TYPE_H
14 
15 #include "core/enum_type.hpp"
16 
17 typedef uint32 RailTypeLabel;
18 
19 static const RailTypeLabel RAILTYPE_RAIL_LABEL = 'RAIL';
20 static const RailTypeLabel RAILTYPE_ELECTRIC_LABEL = 'ELRL';
21 static const RailTypeLabel RAILTYPE_MONO_LABEL = 'MONO';
22 static const RailTypeLabel RAILTYPE_MAGLEV_LABEL = 'MGLV';
23 
29 enum RailType {
35  RAILTYPE_END = 16,
37 
41 };
42 
48 
52 enum RailTypes {
58  INVALID_RAILTYPES = UINT_MAX,
59 };
61 
62 #endif /* RAIL_TYPE_H */
Used for iterations.
Definition: rail_type.h:35
Helper template class that makes basic properties of given enumeration type visible from outsize...
Definition: enum_type.hpp:66
DECLARE_ENUM_AS_BIT_SET(GenderEthnicity) enum CompanyManagerFaceVariable
Bitgroups of the CompanyManagerFace variable.
Invalid railtypes.
Definition: rail_type.h:58
RailTypes
The different roadtypes we support, but then a bitmask of them.
Definition: rail_type.h:52
Monorail.
Definition: rail_type.h:33
Ever fast maglev.
Definition: rail_type.h:57
RailType
Enumeration for all possible railtypes.
Definition: rail_type.h:29
Maglev.
Definition: rail_type.h:34
Standard non-electric rails.
Definition: rail_type.h:31
Type (helpers) for enums.
Electrified rails.
Definition: rail_type.h:55
Non-electrified rails.
Definition: rail_type.h:54
Default railtype: most used.
Definition: rail_type.h:40
Default railtype: first available.
Definition: rail_type.h:38
Monorail!
Definition: rail_type.h:56
Informative template class exposing basic enumeration properties used by several other templates belo...
Definition: enum_type.hpp:52
Electric rails.
Definition: rail_type.h:32
No rail types.
Definition: rail_type.h:53
Default railtype: last available.
Definition: rail_type.h:39
Used for iterations.
Definition: rail_type.h:30
Flag for invalid railtype.
Definition: rail_type.h:36
#define DECLARE_POSTFIX_INCREMENT(type)
Some enums need to have allowed incrementing (i.e.
Definition: enum_type.hpp:16