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 };
30 template <> struct EnumPropsT<RoadType> : MakeEnumPropsT<RoadType, byte, ROADTYPE_BEGIN, ROADTYPE_END, INVALID_ROADTYPE, 2> {};
31 
36 enum RoadTypes {
43 };
45 template <> struct EnumPropsT<RoadTypes> : MakeEnumPropsT<RoadTypes, byte, ROADTYPES_NONE, ROADTYPES_END, INVALID_ROADTYPES, 2> {};
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 */