OpenTTD
road_type.h
Go to the documentation of this file.
1 /* $Id: road_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 ROAD_TYPE_H
13 #define ROAD_TYPE_H
14 
15 #include "core/enum_type.hpp"
16 
22 enum RoadType {
28 };
31 
36 enum RoadTypes {
43 };
47 
48 
55 enum RoadBits {
56  ROAD_NONE = 0U,
57  ROAD_NW = 1U,
58  ROAD_SW = 2U,
59  ROAD_SE = 4U,
60  ROAD_NE = 8U,
63 
68 
70 
72 };
74 template <> struct EnumPropsT<RoadBits> : MakeEnumPropsT<RoadBits, byte, ROAD_NONE, ROAD_END, ROAD_NONE, 4> {};
75 
76 #endif /* ROAD_TYPE_H */
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.
Road + trams.
Definition: road_type.h:40
Basic road type.
Definition: road_type.h:24
Full road along the x-axis (south-west + north-east)
Definition: road_type.h:61
Used for iterations.
Definition: road_type.h:26
South-west part.
Definition: road_type.h:58
flag for invalid roadtype
Definition: road_type.h:27
RoadType
The different roadtypes we support.
Definition: road_type.h:22
Type (helpers) for enums.
Out-of-range roadbits, used for iterations.
Definition: road_type.h:71
Full 4-way crossing.
Definition: road_type.h:69
Road at the two southern edges.
Definition: road_type.h:66
Road at the two eastern edges.
Definition: road_type.h:65
Trams.
Definition: road_type.h:25
Informative template class exposing basic enumeration properties used by several other templates belo...
Definition: enum_type.hpp:52
RoadBits
Enumeration for the road parts on a tile.
Definition: road_type.h:55
No road-part is build.
Definition: road_type.h:56
Invalid roadtypes.
Definition: road_type.h:42
North-east part.
Definition: road_type.h:60
Trams.
Definition: road_type.h:39
Template of struct holding enum types (on most archs, enums are stored in an int32).
Definition: enum_type.hpp:139
RoadTypes
The different roadtypes we support, but then a bitmask of them.
Definition: road_type.h:36
North-west part.
Definition: road_type.h:57
South-east part.
Definition: road_type.h:59
Used for iterations.
Definition: road_type.h:23
Used for iterations?
Definition: road_type.h:41
No roadtypes.
Definition: road_type.h:37
Full road along the y-axis (north-west + south-east)
Definition: road_type.h:62
#define DECLARE_POSTFIX_INCREMENT(type)
Some enums need to have allowed incrementing (i.e.
Definition: enum_type.hpp:16
Road at the two northern edges.
Definition: road_type.h:64
Road at the two western edges.
Definition: road_type.h:67