Merge branch 'master' into jgrpp

Remove 'byte' typedef
This commit is contained in:
Jonathan G Rennison
2024-05-07 17:21:50 +01:00
376 changed files with 2220 additions and 2152 deletions

View File

@@ -21,7 +21,7 @@
* your viewport and not rotated by 45 degrees left or right to get
* a "north" used in you games.
*/
enum Direction : byte {
enum Direction : uint8_t {
DIR_BEGIN = 0, ///< Used to iterate
DIR_N = 0, ///< North
DIR_NE = 1, ///< Northeast
@@ -39,7 +39,7 @@ enum Direction : byte {
DECLARE_POSTFIX_INCREMENT(Direction)
/** Define basic enum properties */
template <> struct EnumPropsT<Direction> : MakeEnumPropsT<Direction, byte, DIR_BEGIN, DIR_END, INVALID_DIR, 3> {};
template <> struct EnumPropsT<Direction> : MakeEnumPropsT<Direction, uint8_t, DIR_BEGIN, DIR_END, INVALID_DIR, 3> {};
/**
@@ -59,7 +59,7 @@ template <> struct EnumPropsT<Direction> : MakeEnumPropsT<Direction, byte, DIR_B
* modulo DIR_END or use the #ChangeDirDiff(DirDiff, DirDiff) function.
* @see ChangeDirDiff(DirDiff, DirDiff)
*/
enum DirDiff : byte {
enum DirDiff : uint8_t {
DIRDIFF_SAME = 0, ///< Both directions faces to the same direction
DIRDIFF_45RIGHT = 1, ///< Angle of 45 degrees right
DIRDIFF_90RIGHT = 2, ///< Angle of 90 degrees right
@@ -74,7 +74,7 @@ enum DirDiff : byte {
*
* This enumeration is used for the 4 direction of the tile-edges.
*/
enum DiagDirection : byte {
enum DiagDirection : uint8_t {
DIAGDIR_BEGIN = 0, ///< Used for iterations
DIAGDIR_NE = 0, ///< Northeast, upper right on your monitor
DIAGDIR_SE = 1, ///< Southeast
@@ -87,7 +87,7 @@ DECLARE_POSTFIX_INCREMENT(DiagDirection)
DECLARE_ENUM_AS_ADDABLE(DiagDirection)
/** Define basic enum properties */
template <> struct EnumPropsT<DiagDirection> : MakeEnumPropsT<DiagDirection, byte, DIAGDIR_BEGIN, DIAGDIR_END, INVALID_DIAGDIR, 2> {};
template <> struct EnumPropsT<DiagDirection> : MakeEnumPropsT<DiagDirection, uint8_t, DIAGDIR_BEGIN, DIAGDIR_END, INVALID_DIAGDIR, 2> {};
/**
@@ -119,14 +119,14 @@ DECLARE_POSTFIX_INCREMENT(DiagDirDiff)
* (and south-east edge). The Y axis must be so the one which goes
* align the north-east edge (and south-west) edge.
*/
enum Axis : byte {
enum Axis : uint8_t {
AXIS_X = 0, ///< The X axis
AXIS_Y = 1, ///< The y axis
AXIS_END, ///< Used for iterations
INVALID_AXIS = 0xFF, ///< Flag for an invalid Axis
};
/** Helper information for extract tool. */
template <> struct EnumPropsT<Axis> : MakeEnumPropsT<Axis, byte, AXIS_X, AXIS_END, INVALID_AXIS, 1> {};
template <> struct EnumPropsT<Axis> : MakeEnumPropsT<Axis, uint8_t, AXIS_X, AXIS_END, INVALID_AXIS, 1> {};
DECLARE_ENUM_AS_ADDABLE(Axis)
#endif /* DIRECTION_TYPE_H */