summaryrefslogtreecommitdiff
path: root/src/road_type.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-01-09 21:05:03 +0000
committerrubidium <rubidium@openttd.org>2008-01-09 21:05:03 +0000
commit2d2e1e386315db0c83f508c19387e9f2e0c9cee1 (patch)
tree6b9fc11a0135e1ccdb74151dd8962e4fd5264843 /src/road_type.h
parenta5101fb403bc7220884236426c38bdafc2cd17cf (diff)
downloadopenttd-2d2e1e386315db0c83f508c19387e9f2e0c9cee1.tar.xz
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
Diffstat (limited to 'src/road_type.h')
-rw-r--r--src/road_type.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/road_type.h b/src/road_type.h
index 36c01eec6..407ab894b 100644
--- a/src/road_type.h
+++ b/src/road_type.h
@@ -34,8 +34,12 @@ enum RoadTypes {
ROADTYPES_ROADHWAY = ROADTYPES_ROAD | ROADTYPES_HWAY, ///< Road + highway (or whatever substitute)
ROADTYPES_TRAMHWAY = ROADTYPES_TRAM | ROADTYPES_HWAY, ///< Trams + highway (or whatever substitute)
ROADTYPES_ALL = ROADTYPES_ROAD | ROADTYPES_TRAM | ROADTYPES_HWAY, ///< Road + trams + highway (or whatever substitute)
+ ROADTYPES_END, ///< Used for iterations?
+ INVALID_ROADTYPES = 0xFF ///< Invalid roadtypes
};
DECLARE_ENUM_AS_BIT_SET(RoadTypes);
+template <> struct EnumPropsT<RoadTypes> : MakeEnumPropsT<RoadTypes, byte, ROADTYPES_NONE, ROADTYPES_END, INVALID_ROADTYPES> {};
+typedef TinyEnumT<RoadTypes> RoadTypesByte;
/**