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 
46 template <> struct EnumPropsT<RailType> : MakeEnumPropsT<RailType, byte, RAILTYPE_BEGIN, RAILTYPE_END, INVALID_RAILTYPE, 4> {};
48 
52 enum RailTypes {
58  INVALID_RAILTYPES = UINT_MAX,
59 };
61 
62 #endif /* RAIL_TYPE_H */