From cfc9af695737d1e4dbf8fcd30290b23b1618c231 Mon Sep 17 00:00:00 2001 From: iikorni Date: Wed, 8 Dec 2021 15:30:29 -0600 Subject: [PATCH] Add BoundBoxXY to Location --- src/openrct2/world/Location.hpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/openrct2/world/Location.hpp b/src/openrct2/world/Location.hpp index 95ea7ede20..23e0b3197f 100644 --- a/src/openrct2/world/Location.hpp +++ b/src/openrct2/world/Location.hpp @@ -702,6 +702,25 @@ struct TileCoordsXYZD : public TileCoordsXYZ } }; +struct BoundBoxXY +{ + CoordsXY offset{}; + CoordsXY length{}; + + constexpr BoundBoxXY() = default; + constexpr BoundBoxXY(CoordsXY _offset, CoordsXY _length) + : offset(_offset) + , length(_length) + { + } + + constexpr BoundBoxXY(int32_t _offX, int32_t _offY, int32_t _lenX, int32_t _lenY) + : offset({_offX, _offY}) + , length({_lenX, _lenY}) + { + } +}; + /** * Represents a range of the map using regular coordinates. */