From 8e60c4504f7817d12df334412323a9cc59757ba5 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Thu, 4 Sep 2025 21:27:00 +0200 Subject: [PATCH] Move CoordsXYE to Location.hpp --- src/openrct2/ride/Track.h | 3 ++- src/openrct2/world/Location.hpp | 22 ++++++++++++++++++++++ src/openrct2/world/Map.h | 17 ----------------- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/src/openrct2/ride/Track.h b/src/openrct2/ride/Track.h index d8b12f9ded..76ef9c13eb 100644 --- a/src/openrct2/ride/Track.h +++ b/src/openrct2/ride/Track.h @@ -11,7 +11,7 @@ #include "../Identifiers.h" #include "../object/Object.h" -#include "../world/Map.h" +#include "../world/Location.hpp" #include "../world/QuarterTile.h" #include @@ -28,6 +28,7 @@ namespace OpenRCT2 enum class TrackElemType : uint16_t; struct TileElement; + struct TrackElement; } // namespace OpenRCT2 struct ResultWithMessage; diff --git a/src/openrct2/world/Location.hpp b/src/openrct2/world/Location.hpp index e9a224216d..3725bd38d1 100644 --- a/src/openrct2/world/Location.hpp +++ b/src/openrct2/world/Location.hpp @@ -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{}; diff --git a/src/openrct2/world/Map.h b/src/openrct2/world/Map.h index 2d2b456021..402db03798 100644 --- a/src/openrct2/world/Map.h +++ b/src/openrct2/world/Map.h @@ -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 CoordsDirectionDelta; extern const TileCoordsXY TileDirectionDelta[];