mirror of https://github.com/OpenRCT2/OpenRCT2.git
Make CoordsXYZ derive from CoordsXY
This commit is contained in:
parent
bc12618d46
commit
cd81c1b45b
|
@ -179,23 +179,19 @@ struct TileCoordsXY
|
|||
int32_t x = 0, y = 0;
|
||||
};
|
||||
|
||||
struct CoordsXYZ
|
||||
struct CoordsXYZ : public CoordsXY
|
||||
{
|
||||
int32_t x = 0;
|
||||
int32_t y = 0;
|
||||
int32_t z = 0;
|
||||
|
||||
CoordsXYZ() = default;
|
||||
constexpr CoordsXYZ(int32_t _x, int32_t _y, int32_t _z)
|
||||
: x(_x)
|
||||
, y(_y)
|
||||
: CoordsXY(_x, _y)
|
||||
, z(_z)
|
||||
{
|
||||
}
|
||||
|
||||
constexpr CoordsXYZ(CoordsXY c, int32_t _z)
|
||||
: x(c.x)
|
||||
, y(c.y)
|
||||
: CoordsXY(c)
|
||||
, z(_z)
|
||||
{
|
||||
}
|
||||
|
@ -272,10 +268,16 @@ typedef uint8_t Direction;
|
|||
return dir < 4;
|
||||
}
|
||||
|
||||
struct CoordsXYZD
|
||||
struct CoordsXYZD : public CoordsXYZ
|
||||
{
|
||||
int32_t x, y, z;
|
||||
Direction direction;
|
||||
Direction direction = 0;
|
||||
|
||||
CoordsXYZD() = default;
|
||||
constexpr CoordsXYZD(int32_t _x, int32_t _y, int32_t _z, Direction _d)
|
||||
: CoordsXYZ(_x, _y, _z)
|
||||
, direction(_d)
|
||||
{
|
||||
}
|
||||
|
||||
bool isNull() const
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue