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
commit998d7644f6a1b58de0b06d539c0436808b1f1e95 (patch)
tree6b9fc11a0135e1ccdb74151dd8962e4fd5264843 /src/road_type.h
parent82fe2885abb359c813908b0c844533bfec2c2b22 (diff)
downloadopenttd-998d7644f6a1b58de0b06d539c0436808b1f1e95.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;
/**