diff options
author | frosch <frosch@openttd.org> | 2010-04-11 15:44:16 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-04-11 15:44:16 +0000 |
commit | 0d4e6c46ff4af97205823014e0b4300c7a2c3044 (patch) | |
tree | be9825c3e22820b5a09cc8d31daa9be6b9127979 /src/direction_type.h | |
parent | 03c609f019f437f4fb7e252a2345d4b62ab930e8 (diff) | |
download | openttd-0d4e6c46ff4af97205823014e0b4300c7a2c3044.tar.xz |
(svn r19605) -Codechange: Merge ExtractBits into EnumPropsT.
Diffstat (limited to 'src/direction_type.h')
-rw-r--r-- | src/direction_type.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/direction_type.h b/src/direction_type.h index 1a6ab996c..4cc6d1b24 100644 --- a/src/direction_type.h +++ b/src/direction_type.h @@ -41,7 +41,7 @@ enum Direction { DECLARE_POSTFIX_INCREMENT(Direction) /** Define basic enum properties */ -template <> struct EnumPropsT<Direction> : MakeEnumPropsT<Direction, byte, DIR_BEGIN, DIR_END, INVALID_DIR> {}; +template <> struct EnumPropsT<Direction> : MakeEnumPropsT<Direction, byte, DIR_BEGIN, DIR_END, INVALID_DIR, 3> {}; typedef TinyEnumT<Direction> DirectionByte; // typedefing-enumification of Direction @@ -91,7 +91,7 @@ enum DiagDirection { DECLARE_POSTFIX_INCREMENT(DiagDirection) /** Define basic enum properties */ -template <> struct EnumPropsT<DiagDirection> : MakeEnumPropsT<DiagDirection, byte, DIAGDIR_BEGIN, DIAGDIR_END, INVALID_DIAGDIR> {}; +template <> struct EnumPropsT<DiagDirection> : MakeEnumPropsT<DiagDirection, byte, DIAGDIR_BEGIN, DIAGDIR_END, INVALID_DIAGDIR, 2> {}; typedef TinyEnumT<DiagDirection> DiagDirectionByte; // typedefing-enumification of DiagDirection @@ -130,5 +130,6 @@ enum Axis { AXIS_END, ///< Used for iterations INVALID_AXIS = 0xFF, ///< Flag for an invalid Axis }; +template <> struct EnumPropsT<Axis> : MakeEnumPropsT<Axis, byte, AXIS_X, AXIS_END, INVALID_AXIS, 1> {}; #endif /* DIRECTION_TYPE_H */ |