1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-11 18:12:23 +01:00

Move CoordsXYE to Location.hpp

This commit is contained in:
Aaron van Geffen
2025-09-04 21:27:00 +02:00
parent 013fcb3798
commit 8e60c4504f
3 changed files with 24 additions and 18 deletions

View File

@@ -11,7 +11,7 @@
#include "../Identifiers.h"
#include "../object/Object.h"
#include "../world/Map.h"
#include "../world/Location.hpp"
#include "../world/QuarterTile.h"
#include <optional>
@@ -28,6 +28,7 @@ namespace OpenRCT2
enum class TrackElemType : uint16_t;
struct TileElement;
struct TrackElement;
} // namespace OpenRCT2
struct ResultWithMessage;

View File

@@ -338,6 +338,28 @@ struct CoordsXYRangedZ : public CoordsXY
}
};
namespace OpenRCT2
{
struct TileElement;
}
struct CoordsXYE : public CoordsXY
{
CoordsXYE() = default;
constexpr CoordsXYE(int32_t _x, int32_t _y, OpenRCT2::TileElement* _e)
: CoordsXY(_x, _y)
, element(_e)
{
}
constexpr CoordsXYE(const CoordsXY& c, OpenRCT2::TileElement* _e)
: CoordsXY(c)
, element(_e)
{
}
OpenRCT2::TileElement* element = nullptr;
};
struct TileCoordsXY
{
int32_t x{};

View File

@@ -37,23 +37,6 @@ namespace OpenRCT2
enum class TrackElemType : uint16_t;
} // namespace OpenRCT2
struct CoordsXYE : public CoordsXY
{
CoordsXYE() = default;
constexpr CoordsXYE(int32_t _x, int32_t _y, OpenRCT2::TileElement* _e)
: CoordsXY(_x, _y)
, element(_e)
{
}
constexpr CoordsXYE(const CoordsXY& c, OpenRCT2::TileElement* _e)
: CoordsXY(c)
, element(_e)
{
}
OpenRCT2::TileElement* element = nullptr;
};
extern const std::array<CoordsXY, 8> CoordsDirectionDelta;
extern const TileCoordsXY TileDirectionDelta[];