From cfc9af695737d1e4dbf8fcd30290b23b1618c231 Mon Sep 17 00:00:00 2001 From: iikorni Date: Wed, 8 Dec 2021 15:30:29 -0600 Subject: [PATCH 1/9] 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. */ From c82bca90eb4ccb3b5411f3ceebfb0bc95cc6ab2d Mon Sep 17 00:00:00 2001 From: iikorni Date: Wed, 8 Dec 2021 15:36:31 -0600 Subject: [PATCH 2/9] Add BoundBoxXYZ 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 23e0b3197f..c0ea257bab 100644 --- a/src/openrct2/world/Location.hpp +++ b/src/openrct2/world/Location.hpp @@ -721,6 +721,25 @@ struct BoundBoxXY } }; +struct BoundBoxXYZ +{ + CoordsXYZ offset{}; + CoordsXYZ length{}; + + constexpr BoundBoxXYZ() = default; + constexpr BoundBoxXYZ(CoordsXYZ _offset, CoordsXYZ _length) + : offset(_offset) + , length(_length) + { + } + + constexpr BoundBoxXYZ(int32_t _offX, int32_t _offY, int32_t _offZ, int32_t _lenX, int32_t _lenY, int32_t _lenZ) + : offset({_offX, _offY, _offZ}) + , length({_lenX, _lenY, _lenZ}) + { + } +}; + /** * Represents a range of the map using regular coordinates. */ From 4fa4e4d440095ee29a3fc480c4b3aaddeaff6aaf Mon Sep 17 00:00:00 2001 From: iikorni Date: Wed, 8 Dec 2021 16:42:14 -0600 Subject: [PATCH 3/9] Change some rides over to the BoundBoxXY struct Changes over the Crooked House, Ferris Wheel, Haunted House, Magic Carpet, Swinging Ship, Swinging Inverter Ship, Monorail, and the Supports file over to using the new BoundBoxXY(Z) struct(s). --- src/openrct2/paint/Supports.cpp | 12 +- src/openrct2/ride/gentle/CrookedHouse.cpp | 8 +- src/openrct2/ride/gentle/FerrisWheel.cpp | 16 +- src/openrct2/ride/gentle/HauntedHouse.cpp | 8 +- src/openrct2/ride/thrill/MagicCarpet.cpp | 20 +-- .../ride/thrill/SwingingInverterShip.cpp | 22 +-- src/openrct2/ride/thrill/SwingingShip.cpp | 25 +-- src/openrct2/ride/transport/Monorail.cpp | 169 ++++++------------ 8 files changed, 82 insertions(+), 198 deletions(-) diff --git a/src/openrct2/paint/Supports.cpp b/src/openrct2/paint/Supports.cpp index 45801967e4..e0ef35072f 100644 --- a/src/openrct2/paint/Supports.cpp +++ b/src/openrct2/paint/Supports.cpp @@ -306,13 +306,9 @@ static constexpr const uint16_t* WoodenCurveSupportImageIds[12] = { nullptr, }; -struct unk_supports_desc_bound_box { - CoordsXYZ offset; - CoordsXYZ length; -}; struct unk_supports_desc { - unk_supports_desc_bound_box bounding_box; + BoundBoxXYZ bounding_box; uint8_t var_6; uint8_t var_7; }; @@ -595,7 +591,7 @@ bool wooden_a_supports_paint_setup( { auto imageId = imageTemplate.WithIndex(WoodenCurveSupportImageIds[supportType][special]); - unk_supports_desc_bound_box bBox = byte_97B23C[special].bounding_box; + BoundBoxXYZ bBox = byte_97B23C[special].bounding_box; if (byte_97B23C[special].var_6 == 0 || session.WoodenSupportsPrependTo == nullptr) { @@ -768,7 +764,7 @@ bool wooden_b_supports_paint_setup( { // byte_97B23C[special].var_7 is never 0 auto imageId = imageTemplate.WithIndex(WoodenCurveSupportImageIds[supportType][specialIndex]); - const unk_supports_desc_bound_box& boundBox = supportsDesc.bounding_box; + const BoundBoxXYZ& boundBox = supportsDesc.bounding_box; if (supportsDesc.var_6 == 0 || session.WoodenSupportsPrependTo == nullptr) { @@ -1303,7 +1299,7 @@ bool path_a_supports_paint_setup( ImageIndex imageIndex = pathPaintInfo.BridgeImageId + 55 + specialIndex; const unk_supports_desc& supportsDesc = byte_98D8D4[specialIndex]; - const unk_supports_desc_bound_box& boundBox = supportsDesc.bounding_box; + const BoundBoxXYZ& boundBox = supportsDesc.bounding_box; if (supportsDesc.var_6 == 0 || session.WoodenSupportsPrependTo == nullptr) { diff --git a/src/openrct2/ride/gentle/CrookedHouse.cpp b/src/openrct2/ride/gentle/CrookedHouse.cpp index 78605715de..4748d7eda3 100644 --- a/src/openrct2/ride/gentle/CrookedHouse.cpp +++ b/src/openrct2/ride/gentle/CrookedHouse.cpp @@ -17,13 +17,7 @@ #include "../Track.h" #include "../TrackPaint.h" -struct rct_crooked_house_bound_box -{ - CoordsXY offset; - CoordsXY length; -}; - -static constexpr const rct_crooked_house_bound_box crooked_house_data[] = { +static constexpr const BoundBoxXY crooked_house_data[] = { { { 6, 0 }, { 42, 24 }, diff --git a/src/openrct2/ride/gentle/FerrisWheel.cpp b/src/openrct2/ride/gentle/FerrisWheel.cpp index 6a2230ecb1..06eac99903 100644 --- a/src/openrct2/ride/gentle/FerrisWheel.cpp +++ b/src/openrct2/ride/gentle/FerrisWheel.cpp @@ -32,18 +32,12 @@ static constexpr const uint8_t edges_1x4_nw_se[] = { EDGE_NE | EDGE_SW | EDGE_SE, }; -struct ferris_wheel_bound_box -{ - CoordsXY length; - CoordsXY offset; -}; - /** rct2: 0x008A8CA8 */ -static constexpr ferris_wheel_bound_box FerrisWheelData[] = { - { { 31, 16 }, { 1, 8 } }, - { { 16, 31 }, { 8, 1 } }, - { { 31, 16 }, { 1, 8 } }, - { { 16, 31 }, { 8, 1 } }, +static constexpr BoundBoxXY FerrisWheelData[] = { + { { 1, 8 }, { 31, 16 } }, + { { 8, 1 }, { 16, 31 } }, + { { 1, 8 }, { 31, 16 } }, + { { 8, 1 }, { 16, 31 } }, }; static void PaintFerrisWheelRiders( diff --git a/src/openrct2/ride/gentle/HauntedHouse.cpp b/src/openrct2/ride/gentle/HauntedHouse.cpp index 391ff5ef72..5a3310b513 100644 --- a/src/openrct2/ride/gentle/HauntedHouse.cpp +++ b/src/openrct2/ride/gentle/HauntedHouse.cpp @@ -17,13 +17,7 @@ #include "../TrackPaint.h" #include "../Vehicle.h" -struct haunted_house_bound_box -{ - CoordsXY offset; - CoordsXY length; -}; - -static constexpr haunted_house_bound_box haunted_house_data[] = { +static constexpr BoundBoxXY haunted_house_data[] = { { { 6, 0 }, { 42, 24 } }, { { 0, 0 }, { 0, 0 } }, { { -16, -16 }, { 32, 32 } }, { { 0, 0 }, { 0, 0 } }, { { 0, 6 }, { 24, 42 } }, { { 0, 0 }, { 0, 0 } }, }; diff --git a/src/openrct2/ride/thrill/MagicCarpet.cpp b/src/openrct2/ride/thrill/MagicCarpet.cpp index c035e85c39..32b9d2224e 100644 --- a/src/openrct2/ride/thrill/MagicCarpet.cpp +++ b/src/openrct2/ride/thrill/MagicCarpet.cpp @@ -36,14 +36,6 @@ enum SPR_MAGIC_CARPET_PENDULUM_SW = 22102, }; -struct bound_box -{ - int16_t x; - int16_t y; - int16_t width; - int16_t height; -}; - static constexpr const int16_t MagicCarpetOscillationZ[] = { -2, -1, 1, 5, 10, 16, 23, 30, 37, 45, 52, 59, 65, 70, 74, 76, 77, 76, 74, 70, 65, 59, 52, 45, 37, 30, 23, 16, 10, 5, 1, -1, }; @@ -53,7 +45,7 @@ static constexpr const int8_t MagicCarpetOscillationXY[] = { 0, -5, -11, -17, -22, -26, -29, -30, -31, -30, -29, -26, -22, -17, -11, -5, }; -static constexpr const bound_box MagicCarpetBounds[] = { +static constexpr const BoundBoxXY MagicCarpetBounds[] = { { 0, 8, 32, 16 }, { 8, 0, 16, 32 }, { 0, 8, 32, 16 }, @@ -202,16 +194,16 @@ static void PaintMagicCarpetStructure( session.CurrentlyDrawnEntity = vehicle; } - bound_box bb = MagicCarpetBounds[direction]; + BoundBoxXY bb = MagicCarpetBounds[direction]; CoordsXYZ offset, bbOffset, bbSize; offset.x = (direction & 1) ? 0 : axisOffset; offset.y = (direction & 1) ? axisOffset : 0; offset.z = height + 7; - bbOffset.x = bb.x; - bbOffset.y = bb.y; + bbOffset.x = bb.offset.x; + bbOffset.y = bb.offset.y; bbOffset.z = height + 7; - bbSize.x = bb.width; - bbSize.y = bb.height; + bbSize.x = bb.length.x; + bbSize.y = bb.offset.y; bbSize.z = 127; PaintMagicCarpetFrame(session, Plane::Back, direction, offset, bbOffset, bbSize); diff --git a/src/openrct2/ride/thrill/SwingingInverterShip.cpp b/src/openrct2/ride/thrill/SwingingInverterShip.cpp index 3e01a15287..c374b413e0 100644 --- a/src/openrct2/ride/thrill/SwingingInverterShip.cpp +++ b/src/openrct2/ride/thrill/SwingingInverterShip.cpp @@ -34,20 +34,12 @@ static constexpr const uint32_t SwingingInverterShipAnimatingBaseSpriteOffset[] 33, }; -struct swinging_inverter_ship_bound_box -{ - int16_t length_x; - int16_t length_y; - int16_t offset_x; - int16_t offset_y; -}; - /** rct2: 0x01428020 */ -static constexpr const swinging_inverter_ship_bound_box swinging_inverter_ship_bounds[] = { - { 32, 16, 0, 8 }, - { 16, 32, 8, 0 }, - { 32, 16, 0, 8 }, - { 16, 32, 8, 0 }, +static constexpr const BoundBoxXY swinging_inverter_ship_bounds[] = { + { 0, 8, 32, 16 }, + { 8, 0, 16, 32 }, + { 0, 8, 32, 16 }, + { 8, 0, 16, 32 }, }; enum @@ -74,8 +66,8 @@ static void PaintSwingingInverterShipStructure( const auto& boundBox = swinging_inverter_ship_bounds[direction]; CoordsXYZ offset((direction & 1) ? 0 : axisOffset, (direction & 1) ? axisOffset : 0, height); - CoordsXYZ bbLength(boundBox.length_x, boundBox.length_y, 127); - CoordsXYZ bbOffset(boundBox.offset_x, boundBox.offset_y, height); + CoordsXYZ bbLength(boundBox.length.x, boundBox.length.y, 127); + CoordsXYZ bbOffset(boundBox.offset.x, boundBox.offset.y, height); Vehicle* vehicle = nullptr; if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) diff --git a/src/openrct2/ride/thrill/SwingingShip.cpp b/src/openrct2/ride/thrill/SwingingShip.cpp index d8c69f267f..b3d46bae87 100644 --- a/src/openrct2/ride/thrill/SwingingShip.cpp +++ b/src/openrct2/ride/thrill/SwingingShip.cpp @@ -25,15 +25,6 @@ static constexpr const uint8_t track_map_1x5[][5] = { { 0, 4, 3, 2, 1 }, { 0, 1, 2, 3, 4 }, }; - -struct swinging_ship_bound_box -{ - int16_t length_x; - int16_t length_y; - int16_t offset_x; - int16_t offset_y; -}; - /** rct2: 0x008A83B0 */ static constexpr const uint32_t SwingingShipBaseSpriteOffset[] = { 0, @@ -43,11 +34,11 @@ static constexpr const uint32_t SwingingShipBaseSpriteOffset[] = { }; /** rct2: 0x008A83C0 */ -static constexpr const swinging_ship_bound_box SwingingShipData[] = { - { 31, 16, 1, 8 }, - { 16, 31, 8, 1 }, - { 31, 16, 1, 8 }, - { 16, 31, 8, 1 }, +static constexpr const BoundBoxXY SwingingShipData[] = { + { 1, 8, 31, 16 }, + { 8, 1, 16, 31 }, + { 1, 8, 31, 16 }, + { 8, 1, 16, 31 }, }; enum @@ -108,9 +99,9 @@ static void PaintSwingingShipStructure( const auto& bounds = SwingingShipData[direction]; CoordsXYZ offset((direction & 1) ? 0 : axisOffset, (direction & 1) ? axisOffset : 0, height + 7); - CoordsXYZ bbLength(bounds.length_x, bounds.length_y, 80); - CoordsXYZ bbOffset(bounds.offset_x, bounds.offset_y, height + 7); - + CoordsXYZ bbLength(bounds.length.x, bounds.length.y, 80); + CoordsXYZ bbOffset(bounds.offset.x, bounds.offset.y, height + 7); + auto baseImageId = rideEntry->Cars[0].base_image_id + SwingingShipBaseSpriteOffset[direction]; if (vehicle != nullptr) { diff --git a/src/openrct2/ride/transport/Monorail.cpp b/src/openrct2/ride/transport/Monorail.cpp index 6dad0de780..e87b183d4a 100644 --- a/src/openrct2/ride/transport/Monorail.cpp +++ b/src/openrct2/ride/transport/Monorail.cpp @@ -271,57 +271,32 @@ static constexpr const uint32_t ghost_train_track_pieces_right_eight_to_diag[4][ }, }; -static constexpr const CoordsXY ghost_train_track_pieces_right_eight_to_diag_bounds[4][4] = { +static constexpr const BoundBoxXY ghost_train_track_pieces_right_eight_to_diag_boxes[4][4] = { { - { 32, 20 }, - { 32, 16 }, - { 16, 16 }, - { 16, 16 }, + { { 0, 6 }, { 32, 20 } }, + { { 0, 16 }, { 32, 16 } }, + { { 0, 0 }, { 16, 16 } }, + { { 16, 0 }, { 16, 16 } }, }, { - { 20, 32 }, - { 16, 32 }, - { 16, 16 }, - { 16, 16 }, + { { 6, 0 }, { 20, 32 } }, + { { 16, 0 }, { 16, 32 } }, + { { 0, 16 }, { 16, 16 } }, + { { 0, 0 }, { 16, 16 } }, }, { - { 32, 20 }, - { 34, 16 }, - { 28, 28 }, - { 16, 18 }, - }, - { - { 20, 32 }, - { 16, 32 }, - { 16, 16 }, - { 16, 16 }, - }, -}; -static constexpr const CoordsXY ghost_train_track_pieces_right_eight_to_diag_offset[4][4] = { - { - { 0, 6 }, - { 0, 16 }, - { 0, 0 }, - { 16, 0 }, + { { 0, 6 }, { 32, 20 } }, + { { 0, 0 }, { 34, 16 } }, + { { 4, 4 }, { 28, 28 } }, + { { 0, 16 }, { 16, 18 } }, }, { - { 6, 0 }, - { 16, 0 }, - { 0, 16 }, - { 0, 0 }, - }, - { - { 0, 6 }, - { 0, 0 }, - { 4, 4 }, - { 0, 16 }, - }, - { - { 6, 0 }, - { 0, 0 }, - { 16, 0 }, - { 16, 16 }, + + { { 6, 0 }, { 20, 32 } }, + { { 0, 0 }, { 16, 32 } }, + { { 16, 0 }, { 16, 16 } }, + { { 16, 16 }, { 16, 16 } }, }, }; @@ -352,57 +327,30 @@ static constexpr const uint32_t ghost_train_track_pieces_left_eight_to_diag[4][4 }, }; -static constexpr const CoordsXY ghost_train_track_pieces_left_eight_to_diag_bounds[4][4] = { +static constexpr const BoundBoxXY ghost_train_track_pieces_left_eight_to_diag_boxes[4][4] = { { - { 32, 20 }, - { 32, 16 }, - { 16, 16 }, - { 16, 16 }, + { { 0, 6 }, { 32, 20 } }, + { { 0, 0 }, { 32, 16 } }, + { { 0, 16 }, { 16, 16 } }, + { { 16, 16 }, { 16, 16 } }, }, { - { 20, 32 }, - { 16, 34 }, - { 16, 16 }, - { 18, 16 }, + { { 6, 0 }, { 20, 32 } }, + { { 0, 0 }, { 16, 34 } }, + { { 16, 16 }, { 16, 16 } }, + { { 16, 0 }, { 18, 16 } }, }, { - { 32, 20 }, - { 32, 16 }, - { 16, 16 }, - { 16, 16 }, + { { 0, 6 }, { 32, 20 } }, + { { 0, 16 }, { 32, 16 } }, + { { 16, 0 }, { 16, 16 } }, + { { 0, 0 }, { 16, 16 } }, }, { - { 20, 32 }, - { 16, 32 }, - { 16, 16 }, - { 16, 16 }, - }, -}; - -static constexpr const CoordsXY ghost_train_track_pieces_left_eight_to_diag_offset[4][4] = { - { - { 0, 6 }, - { 0, 0 }, - { 0, 16 }, - { 16, 16 }, - }, - { - { 6, 0 }, - { 0, 0 }, - { 16, 16 }, - { 16, 0 }, - }, - { - { 0, 6 }, - { 0, 16 }, - { 16, 0 }, - { 0, 0 }, - }, - { - { 6, 0 }, - { 16, 0 }, - { 0, 0 }, - { 0, 16 }, + { { 6, 0 }, { 20, 32 } }, + { { 16, 0 }, { 16, 32 } }, + { { 0, 0 }, { 16, 16 } }, + { { 0, 16 }, { 16, 16 } }, }, }; @@ -761,23 +709,16 @@ static void paint_monorail_track_s_bend_left( trackSequence = 3 - trackSequence; } - static constexpr CoordsXY offsetList[] = { - { 0, 6 }, - { 0, 0 }, - { 0, 6 }, - { 0, 6 }, - }; - - static constexpr CoordsXY boundsList[] = { - { 32, 20 }, - { 32, 26 }, - { 32, 26 }, - { 32, 20 }, + static constexpr BoundBoxXY boxList[] = { + { { 0, 6 }, { 32, 20 } }, + { { 0, 0 }, { 32, 26 } }, + { { 0, 6 }, { 32, 26 } }, + { { 0, 6 }, { 32, 20 } }, }; uint32_t imageId = monorail_track_pieces_s_bend_left[direction & 1][trackSequence] | session.TrackColours[SCHEME_TRACK]; - CoordsXY offset = offsetList[trackSequence]; - CoordsXY bounds = boundsList[trackSequence]; + CoordsXY offset = boxList[trackSequence].offset; + CoordsXY bounds = boxList[trackSequence].length; if (direction == 0 || direction == 2) { PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height }, { bounds.x, bounds.y, 3 }); @@ -865,23 +806,13 @@ static void paint_monorail_track_s_bend_right( trackSequence = 3 - trackSequence; } - static constexpr CoordsXY offsetList[] = { - { 0, 6 }, - { 0, 6 }, - { 0, 0 }, - { 0, 6 }, - }; - - static constexpr CoordsXY boundsList[] = { - { 32, 20 }, - { 32, 26 }, - { 32, 26 }, - { 32, 20 }, + static constexpr BoundBoxXY boxList[] = { + { { 0, 6 }, { 32, 20 } }, { { 0, 6 }, { 32, 26 } }, { { 0, 0 }, { 32, 26 } }, { { 0, 6 }, { 32, 20 } } }; uint32_t imageId = monorail_track_pieces_s_bend_right[direction & 1][trackSequence] | session.TrackColours[SCHEME_TRACK]; - CoordsXY offset = offsetList[trackSequence]; - CoordsXY bounds = boundsList[trackSequence]; + CoordsXY offset = boxList[trackSequence].offset; + CoordsXY bounds = boxList[trackSequence].length; if (direction == 0 || direction == 2) { PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height }, { bounds.x, bounds.y, 3 }); @@ -1018,8 +949,8 @@ static void paint_monorail_track_left_eighth_to_diag( if (index >= 0) { uint32_t imageId = ghost_train_track_pieces_left_eight_to_diag[direction][index] | session.TrackColours[SCHEME_TRACK]; - const CoordsXY offset = ghost_train_track_pieces_left_eight_to_diag_offset[direction][index]; - const CoordsXY bounds = ghost_train_track_pieces_left_eight_to_diag_bounds[direction][index]; + const CoordsXY offset = ghost_train_track_pieces_left_eight_to_diag_boxes[direction][index].offset; + const CoordsXY bounds = ghost_train_track_pieces_left_eight_to_diag_boxes[direction][index].length; PaintAddImageAsParent(session, imageId, { 0, 0, height }, { bounds.x, bounds.y, 2 }, { offset.x, offset.y, height }); } @@ -1086,8 +1017,8 @@ static void paint_monorail_track_right_eighth_to_diag( if (index >= 0) { uint32_t imageId = ghost_train_track_pieces_right_eight_to_diag[direction][index] | session.TrackColours[SCHEME_TRACK]; - const CoordsXY offset = ghost_train_track_pieces_right_eight_to_diag_offset[direction][index]; - const CoordsXY bounds = ghost_train_track_pieces_right_eight_to_diag_bounds[direction][index]; + const CoordsXY offset = ghost_train_track_pieces_right_eight_to_diag_boxes[direction][index].offset; + const CoordsXY bounds = ghost_train_track_pieces_right_eight_to_diag_boxes[direction][index].length; PaintAddImageAsParent(session, imageId, { 0, 0, height }, { bounds.x, bounds.y, 2 }, { offset.x, offset.y, height }); } From 388387c809d135aec32dca622ec3a6d4d6ce3ed0 Mon Sep 17 00:00:00 2001 From: iikorni Date: Wed, 8 Dec 2021 16:50:23 -0600 Subject: [PATCH 4/9] Fix formatting on files --- src/openrct2/ride/gentle/FerrisWheel.cpp | 8 ++++---- src/openrct2/ride/thrill/SwingingShip.cpp | 8 ++++---- src/openrct2/world/Location.hpp | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/openrct2/ride/gentle/FerrisWheel.cpp b/src/openrct2/ride/gentle/FerrisWheel.cpp index 06eac99903..9f1378fe86 100644 --- a/src/openrct2/ride/gentle/FerrisWheel.cpp +++ b/src/openrct2/ride/gentle/FerrisWheel.cpp @@ -34,10 +34,10 @@ static constexpr const uint8_t edges_1x4_nw_se[] = { /** rct2: 0x008A8CA8 */ static constexpr BoundBoxXY FerrisWheelData[] = { - { { 1, 8 }, { 31, 16 } }, - { { 8, 1 }, { 16, 31 } }, - { { 1, 8 }, { 31, 16 } }, - { { 8, 1 }, { 16, 31 } }, + { { 1, 8 }, { 31, 16 } }, + { { 8, 1 }, { 16, 31 } }, + { { 1, 8 }, { 31, 16 } }, + { { 8, 1 }, { 16, 31 } }, }; static void PaintFerrisWheelRiders( diff --git a/src/openrct2/ride/thrill/SwingingShip.cpp b/src/openrct2/ride/thrill/SwingingShip.cpp index b3d46bae87..f47e064ca6 100644 --- a/src/openrct2/ride/thrill/SwingingShip.cpp +++ b/src/openrct2/ride/thrill/SwingingShip.cpp @@ -35,10 +35,10 @@ static constexpr const uint32_t SwingingShipBaseSpriteOffset[] = { /** rct2: 0x008A83C0 */ static constexpr const BoundBoxXY SwingingShipData[] = { - { 1, 8, 31, 16 }, - { 8, 1, 16, 31 }, - { 1, 8, 31, 16 }, - { 8, 1, 16, 31 }, + { 1, 8, 31, 16 }, + { 8, 1, 16, 31 }, + { 1, 8, 31, 16 }, + { 8, 1, 16, 31 }, }; enum diff --git a/src/openrct2/world/Location.hpp b/src/openrct2/world/Location.hpp index c0ea257bab..c39ba643c3 100644 --- a/src/openrct2/world/Location.hpp +++ b/src/openrct2/world/Location.hpp @@ -715,8 +715,8 @@ struct BoundBoxXY } constexpr BoundBoxXY(int32_t _offX, int32_t _offY, int32_t _lenX, int32_t _lenY) - : offset({_offX, _offY}) - , length({_lenX, _lenY}) + : offset({ _offX, _offY }) + , length({ _lenX, _lenY }) { } }; @@ -734,8 +734,8 @@ struct BoundBoxXYZ } constexpr BoundBoxXYZ(int32_t _offX, int32_t _offY, int32_t _offZ, int32_t _lenX, int32_t _lenY, int32_t _lenZ) - : offset({_offX, _offY, _offZ}) - , length({_lenX, _lenY, _lenZ}) + : offset({ _offX, _offY, _offZ }) + , length({ _lenX, _lenY, _lenZ }) { } }; From d70bca79809969a649676672500b0ad35c7e14e6 Mon Sep 17 00:00:00 2001 From: iikorni Date: Thu, 9 Dec 2021 22:48:11 -0600 Subject: [PATCH 5/9] Fix error with MagicCarpet BoundBox conversion --- src/openrct2/ride/thrill/MagicCarpet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2/ride/thrill/MagicCarpet.cpp b/src/openrct2/ride/thrill/MagicCarpet.cpp index 32b9d2224e..e00a9f5077 100644 --- a/src/openrct2/ride/thrill/MagicCarpet.cpp +++ b/src/openrct2/ride/thrill/MagicCarpet.cpp @@ -203,7 +203,7 @@ static void PaintMagicCarpetStructure( bbOffset.y = bb.offset.y; bbOffset.z = height + 7; bbSize.x = bb.length.x; - bbSize.y = bb.offset.y; + bbSize.y = bb.length.y; bbSize.z = 127; PaintMagicCarpetFrame(session, Plane::Back, direction, offset, bbOffset, bbSize); From b5ba892bd9e8f39954c60678281fd940a1333388 Mon Sep 17 00:00:00 2001 From: iikorni Date: Thu, 9 Dec 2021 22:51:25 -0600 Subject: [PATCH 6/9] Fix naming case errors --- src/openrct2/ride/gentle/CrookedHouse.cpp | 4 ++-- src/openrct2/ride/gentle/HauntedHouse.cpp | 4 ++-- src/openrct2/ride/thrill/SwingingInverterShip.cpp | 4 ++-- src/openrct2/ride/transport/Monorail.cpp | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/openrct2/ride/gentle/CrookedHouse.cpp b/src/openrct2/ride/gentle/CrookedHouse.cpp index 4748d7eda3..3ef01306ff 100644 --- a/src/openrct2/ride/gentle/CrookedHouse.cpp +++ b/src/openrct2/ride/gentle/CrookedHouse.cpp @@ -17,7 +17,7 @@ #include "../Track.h" #include "../TrackPaint.h" -static constexpr const BoundBoxXY crooked_house_data[] = { +static constexpr const BoundBoxXY CrookedHouseData[] = { { { 6, 0 }, { 42, 24 }, @@ -69,7 +69,7 @@ static void PaintCrookedHouseStructure( } } - const auto& boundBox = crooked_house_data[segment]; + const auto& boundBox = CrookedHouseData[segment]; auto imageTemplate = ImageId::FromUInt32(session.TrackColours[SCHEME_MISC]); auto imageIndex = rideEntry->Cars[0].base_image_id + direction; PaintAddImageAsParent( diff --git a/src/openrct2/ride/gentle/HauntedHouse.cpp b/src/openrct2/ride/gentle/HauntedHouse.cpp index 5a3310b513..e7f69ee8cb 100644 --- a/src/openrct2/ride/gentle/HauntedHouse.cpp +++ b/src/openrct2/ride/gentle/HauntedHouse.cpp @@ -17,7 +17,7 @@ #include "../TrackPaint.h" #include "../Vehicle.h" -static constexpr BoundBoxXY haunted_house_data[] = { +static constexpr BoundBoxXY HauntedHouseData[] = { { { 6, 0 }, { 42, 24 } }, { { 0, 0 }, { 0, 0 } }, { { -16, -16 }, { 32, 32 } }, { { 0, 0 }, { 0, 0 } }, { { 0, 6 }, { 24, 42 } }, { { 0, 0 }, { 0, 0 } }, }; @@ -39,7 +39,7 @@ static void PaintHauntedHouseStructure( frameNum = vehicle->Pitch; } - const auto& boundBox = haunted_house_data[part]; + const auto& boundBox = HauntedHouseData[part]; auto imageTemplate = ImageId::FromUInt32(session.TrackColours[SCHEME_MISC]); auto baseImageIndex = rideEntry->Cars[0].base_image_id; auto imageIndex = baseImageIndex + direction; diff --git a/src/openrct2/ride/thrill/SwingingInverterShip.cpp b/src/openrct2/ride/thrill/SwingingInverterShip.cpp index c374b413e0..c9be7e3d5d 100644 --- a/src/openrct2/ride/thrill/SwingingInverterShip.cpp +++ b/src/openrct2/ride/thrill/SwingingInverterShip.cpp @@ -35,7 +35,7 @@ static constexpr const uint32_t SwingingInverterShipAnimatingBaseSpriteOffset[] }; /** rct2: 0x01428020 */ -static constexpr const BoundBoxXY swinging_inverter_ship_bounds[] = { +static constexpr const BoundBoxXY SwingingInverterShipBounds[] = { { 0, 8, 32, 16 }, { 8, 0, 16, 32 }, { 0, 8, 32, 16 }, @@ -64,7 +64,7 @@ static void PaintSwingingInverterShipStructure( if (rideEntry == nullptr) return; - const auto& boundBox = swinging_inverter_ship_bounds[direction]; + const auto& boundBox = SwingingInverterShipBounds[direction]; CoordsXYZ offset((direction & 1) ? 0 : axisOffset, (direction & 1) ? axisOffset : 0, height); CoordsXYZ bbLength(boundBox.length.x, boundBox.length.y, 127); CoordsXYZ bbOffset(boundBox.offset.x, boundBox.offset.y, height); diff --git a/src/openrct2/ride/transport/Monorail.cpp b/src/openrct2/ride/transport/Monorail.cpp index e87b183d4a..744fbddcdc 100644 --- a/src/openrct2/ride/transport/Monorail.cpp +++ b/src/openrct2/ride/transport/Monorail.cpp @@ -271,7 +271,7 @@ static constexpr const uint32_t ghost_train_track_pieces_right_eight_to_diag[4][ }, }; -static constexpr const BoundBoxXY ghost_train_track_pieces_right_eight_to_diag_boxes[4][4] = { +static constexpr const BoundBoxXY GhostTrainTrackPiecesRightEightToDiagBoxes[4][4] = { { { { 0, 6 }, { 32, 20 } }, { { 0, 16 }, { 32, 16 } }, @@ -327,7 +327,7 @@ static constexpr const uint32_t ghost_train_track_pieces_left_eight_to_diag[4][4 }, }; -static constexpr const BoundBoxXY ghost_train_track_pieces_left_eight_to_diag_boxes[4][4] = { +static constexpr const BoundBoxXY GhostTrainTrackPiecesLeftEightToDiagBoxes[4][4] = { { { { 0, 6 }, { 32, 20 } }, { { 0, 0 }, { 32, 16 } }, @@ -949,8 +949,8 @@ static void paint_monorail_track_left_eighth_to_diag( if (index >= 0) { uint32_t imageId = ghost_train_track_pieces_left_eight_to_diag[direction][index] | session.TrackColours[SCHEME_TRACK]; - const CoordsXY offset = ghost_train_track_pieces_left_eight_to_diag_boxes[direction][index].offset; - const CoordsXY bounds = ghost_train_track_pieces_left_eight_to_diag_boxes[direction][index].length; + const CoordsXY offset = GhostTrainTrackPiecesLeftEightToDiagBoxes[direction][index].offset; + const CoordsXY bounds = GhostTrainTrackPiecesLeftEightToDiagBoxes[direction][index].length; PaintAddImageAsParent(session, imageId, { 0, 0, height }, { bounds.x, bounds.y, 2 }, { offset.x, offset.y, height }); } @@ -1017,8 +1017,8 @@ static void paint_monorail_track_right_eighth_to_diag( if (index >= 0) { uint32_t imageId = ghost_train_track_pieces_right_eight_to_diag[direction][index] | session.TrackColours[SCHEME_TRACK]; - const CoordsXY offset = ghost_train_track_pieces_right_eight_to_diag_boxes[direction][index].offset; - const CoordsXY bounds = ghost_train_track_pieces_right_eight_to_diag_boxes[direction][index].length; + const CoordsXY offset = GhostTrainTrackPiecesRightEightToDiagBoxes[direction][index].offset; + const CoordsXY bounds = GhostTrainTrackPiecesRightEightToDiagBoxes[direction][index].length; PaintAddImageAsParent(session, imageId, { 0, 0, height }, { bounds.x, bounds.y, 2 }, { offset.x, offset.y, height }); } From b4ab72416e1e72c6e0a638505a75de89cebfd9a4 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Wed, 7 Sep 2022 20:48:25 +0200 Subject: [PATCH 7/9] Move Boundbox to its own file, remove non-Coords constructors --- src/openrct2/libopenrct2.vcxproj | 3 +- src/openrct2/paint/Boundbox.h | 40 +++++++++++++++++++ src/openrct2/paint/Supports.cpp | 1 + src/openrct2/ride/gentle/CrookedHouse.cpp | 1 + src/openrct2/ride/gentle/FerrisWheel.cpp | 1 + src/openrct2/ride/gentle/HauntedHouse.cpp | 1 + src/openrct2/ride/thrill/MagicCarpet.cpp | 9 +++-- .../ride/thrill/SwingingInverterShip.cpp | 9 +++-- src/openrct2/ride/thrill/SwingingShip.cpp | 9 +++-- src/openrct2/ride/transport/Monorail.cpp | 1 + src/openrct2/world/Location.hpp | 38 ------------------ 11 files changed, 62 insertions(+), 51 deletions(-) create mode 100644 src/openrct2/paint/Boundbox.h diff --git a/src/openrct2/libopenrct2.vcxproj b/src/openrct2/libopenrct2.vcxproj index 6f770921b1..30268a37a8 100644 --- a/src/openrct2/libopenrct2.vcxproj +++ b/src/openrct2/libopenrct2.vcxproj @@ -315,6 +315,7 @@ + @@ -1001,4 +1002,4 @@ - \ No newline at end of file + diff --git a/src/openrct2/paint/Boundbox.h b/src/openrct2/paint/Boundbox.h new file mode 100644 index 0000000000..8d67ca42f7 --- /dev/null +++ b/src/openrct2/paint/Boundbox.h @@ -0,0 +1,40 @@ +/***************************************************************************** + * Copyright (c) 2014-2022 OpenRCT2 developers + * + * For a complete list of all authors, please refer to contributors.md + * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is licensed under the GNU General Public License version 3. + *****************************************************************************/ + +#pragma once + +#include "../world/Location.hpp" + +#include + +struct BoundBoxXY +{ + CoordsXY length{}; + CoordsXY offset{}; + + constexpr BoundBoxXY() = default; + constexpr BoundBoxXY(CoordsXY _length, CoordsXY _offset) + : length(_length) + , offset(_offset) + { + } +}; + +struct BoundBoxXYZ +{ + CoordsXYZ length{}; + CoordsXYZ offset{}; + + constexpr BoundBoxXYZ() = default; + constexpr BoundBoxXYZ(CoordsXYZ _length, CoordsXYZ _offset) + : length(_length) + , offset(_offset) + { + } +}; diff --git a/src/openrct2/paint/Supports.cpp b/src/openrct2/paint/Supports.cpp index e0ef35072f..b1626c6168 100644 --- a/src/openrct2/paint/Supports.cpp +++ b/src/openrct2/paint/Supports.cpp @@ -14,6 +14,7 @@ #include "../sprites.h" #include "../util/Math.hpp" #include "../world/Surface.h" +#include "Boundbox.h" #include "Paint.h" #include "tile_element/Paint.TileElement.h" diff --git a/src/openrct2/ride/gentle/CrookedHouse.cpp b/src/openrct2/ride/gentle/CrookedHouse.cpp index 3ef01306ff..1d2b78b308 100644 --- a/src/openrct2/ride/gentle/CrookedHouse.cpp +++ b/src/openrct2/ride/gentle/CrookedHouse.cpp @@ -9,6 +9,7 @@ #include "../../entity/EntityRegistry.h" #include "../../interface/Viewport.h" +#include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" #include "../../ride/Vehicle.h" diff --git a/src/openrct2/ride/gentle/FerrisWheel.cpp b/src/openrct2/ride/gentle/FerrisWheel.cpp index 9f1378fe86..e24523f080 100644 --- a/src/openrct2/ride/gentle/FerrisWheel.cpp +++ b/src/openrct2/ride/gentle/FerrisWheel.cpp @@ -10,6 +10,7 @@ #include "../../entity/EntityRegistry.h" #include "../../entity/Guest.h" #include "../../interface/Viewport.h" +#include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" #include "../Ride.h" diff --git a/src/openrct2/ride/gentle/HauntedHouse.cpp b/src/openrct2/ride/gentle/HauntedHouse.cpp index e7f69ee8cb..d7e9cbf55e 100644 --- a/src/openrct2/ride/gentle/HauntedHouse.cpp +++ b/src/openrct2/ride/gentle/HauntedHouse.cpp @@ -9,6 +9,7 @@ #include "../../entity/EntityRegistry.h" #include "../../interface/Viewport.h" +#include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" #include "../Ride.h" diff --git a/src/openrct2/ride/thrill/MagicCarpet.cpp b/src/openrct2/ride/thrill/MagicCarpet.cpp index e00a9f5077..20b1a412ef 100644 --- a/src/openrct2/ride/thrill/MagicCarpet.cpp +++ b/src/openrct2/ride/thrill/MagicCarpet.cpp @@ -10,6 +10,7 @@ #include "../../entity/EntityRegistry.h" #include "../../interface/Viewport.h" #include "../../object/StationObject.h" +#include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" #include "../Ride.h" @@ -46,10 +47,10 @@ static constexpr const int8_t MagicCarpetOscillationXY[] = { }; static constexpr const BoundBoxXY MagicCarpetBounds[] = { - { 0, 8, 32, 16 }, - { 8, 0, 16, 32 }, - { 0, 8, 32, 16 }, - { 8, 0, 16, 32 }, + { { 0, 8 }, { 32, 16 } }, + { { 8, 0 }, { 16, 32 } }, + { { 0, 8 }, { 32, 16 } }, + { { 8, 0 }, { 16, 32 } }, }; static ImageIndex GetMagicCarpetFrameImage(Plane plane, Direction direction) diff --git a/src/openrct2/ride/thrill/SwingingInverterShip.cpp b/src/openrct2/ride/thrill/SwingingInverterShip.cpp index c9be7e3d5d..cf7d323726 100644 --- a/src/openrct2/ride/thrill/SwingingInverterShip.cpp +++ b/src/openrct2/ride/thrill/SwingingInverterShip.cpp @@ -10,6 +10,7 @@ #include "../../entity/EntityRegistry.h" #include "../../interface/Viewport.h" #include "../../object/StationObject.h" +#include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" #include "../Ride.h" @@ -36,10 +37,10 @@ static constexpr const uint32_t SwingingInverterShipAnimatingBaseSpriteOffset[] /** rct2: 0x01428020 */ static constexpr const BoundBoxXY SwingingInverterShipBounds[] = { - { 0, 8, 32, 16 }, - { 8, 0, 16, 32 }, - { 0, 8, 32, 16 }, - { 8, 0, 16, 32 }, + { { 0, 8 }, { 32, 16 } }, + { { 8, 0 }, { 16, 32 } }, + { { 0, 8 }, { 32, 16 } }, + { { 8, 0 }, { 16, 32 } }, }; enum diff --git a/src/openrct2/ride/thrill/SwingingShip.cpp b/src/openrct2/ride/thrill/SwingingShip.cpp index f47e064ca6..73345c9eee 100644 --- a/src/openrct2/ride/thrill/SwingingShip.cpp +++ b/src/openrct2/ride/thrill/SwingingShip.cpp @@ -10,6 +10,7 @@ #include "../../entity/EntityRegistry.h" #include "../../interface/Viewport.h" #include "../../object/StationObject.h" +#include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" #include "../Ride.h" @@ -35,10 +36,10 @@ static constexpr const uint32_t SwingingShipBaseSpriteOffset[] = { /** rct2: 0x008A83C0 */ static constexpr const BoundBoxXY SwingingShipData[] = { - { 1, 8, 31, 16 }, - { 8, 1, 16, 31 }, - { 1, 8, 31, 16 }, - { 8, 1, 16, 31 }, + { { 1, 8 }, { 31, 16 } }, + { { 8, 1 }, { 16, 31 } }, + { { 1, 8 }, { 31, 16 } }, + { { 8, 1 }, { 16, 31 } }, }; enum diff --git a/src/openrct2/ride/transport/Monorail.cpp b/src/openrct2/ride/transport/Monorail.cpp index 744fbddcdc..caf51f2734 100644 --- a/src/openrct2/ride/transport/Monorail.cpp +++ b/src/openrct2/ride/transport/Monorail.cpp @@ -10,6 +10,7 @@ #include "../../common.h" #include "../../interface/Viewport.h" #include "../../object/StationObject.h" +#include "../../paint/Boundbox.h" #include "../../paint/Paint.h" #include "../../paint/Supports.h" #include "../../world/Map.h" diff --git a/src/openrct2/world/Location.hpp b/src/openrct2/world/Location.hpp index c39ba643c3..95ea7ede20 100644 --- a/src/openrct2/world/Location.hpp +++ b/src/openrct2/world/Location.hpp @@ -702,44 +702,6 @@ 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 }) - { - } -}; - -struct BoundBoxXYZ -{ - CoordsXYZ offset{}; - CoordsXYZ length{}; - - constexpr BoundBoxXYZ() = default; - constexpr BoundBoxXYZ(CoordsXYZ _offset, CoordsXYZ _length) - : offset(_offset) - , length(_length) - { - } - - constexpr BoundBoxXYZ(int32_t _offX, int32_t _offY, int32_t _offZ, int32_t _lenX, int32_t _lenY, int32_t _lenZ) - : offset({ _offX, _offY, _offZ }) - , length({ _lenX, _lenY, _lenZ }) - { - } -}; - /** * Represents a range of the map using regular coordinates. */ From 400bbbc5ed4517e467ef30e3e06687866d37338d Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Wed, 7 Sep 2022 00:41:42 +0200 Subject: [PATCH 8/9] Use constant reference --- src/openrct2/paint/Supports.cpp | 2 +- src/openrct2/ride/transport/Monorail.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/openrct2/paint/Supports.cpp b/src/openrct2/paint/Supports.cpp index b1626c6168..89b0dfb0c8 100644 --- a/src/openrct2/paint/Supports.cpp +++ b/src/openrct2/paint/Supports.cpp @@ -592,7 +592,7 @@ bool wooden_a_supports_paint_setup( { auto imageId = imageTemplate.WithIndex(WoodenCurveSupportImageIds[supportType][special]); - BoundBoxXYZ bBox = byte_97B23C[special].bounding_box; + const BoundBoxXYZ& bBox = byte_97B23C[special].bounding_box; if (byte_97B23C[special].var_6 == 0 || session.WoodenSupportsPrependTo == nullptr) { diff --git a/src/openrct2/ride/transport/Monorail.cpp b/src/openrct2/ride/transport/Monorail.cpp index caf51f2734..fe2cfadaba 100644 --- a/src/openrct2/ride/transport/Monorail.cpp +++ b/src/openrct2/ride/transport/Monorail.cpp @@ -718,8 +718,8 @@ static void paint_monorail_track_s_bend_left( }; uint32_t imageId = monorail_track_pieces_s_bend_left[direction & 1][trackSequence] | session.TrackColours[SCHEME_TRACK]; - CoordsXY offset = boxList[trackSequence].offset; - CoordsXY bounds = boxList[trackSequence].length; + const CoordsXY& offset = boxList[trackSequence].offset; + const CoordsXY& bounds = boxList[trackSequence].length; if (direction == 0 || direction == 2) { PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height }, { bounds.x, bounds.y, 3 }); @@ -812,8 +812,8 @@ static void paint_monorail_track_s_bend_right( }; uint32_t imageId = monorail_track_pieces_s_bend_right[direction & 1][trackSequence] | session.TrackColours[SCHEME_TRACK]; - CoordsXY offset = boxList[trackSequence].offset; - CoordsXY bounds = boxList[trackSequence].length; + const CoordsXY& offset = boxList[trackSequence].offset; + const CoordsXY& bounds = boxList[trackSequence].length; if (direction == 0 || direction == 2) { PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height }, { bounds.x, bounds.y, 3 }); @@ -950,8 +950,8 @@ static void paint_monorail_track_left_eighth_to_diag( if (index >= 0) { uint32_t imageId = ghost_train_track_pieces_left_eight_to_diag[direction][index] | session.TrackColours[SCHEME_TRACK]; - const CoordsXY offset = GhostTrainTrackPiecesLeftEightToDiagBoxes[direction][index].offset; - const CoordsXY bounds = GhostTrainTrackPiecesLeftEightToDiagBoxes[direction][index].length; + const CoordsXY& offset = GhostTrainTrackPiecesLeftEightToDiagBoxes[direction][index].offset; + const CoordsXY& bounds = GhostTrainTrackPiecesLeftEightToDiagBoxes[direction][index].length; PaintAddImageAsParent(session, imageId, { 0, 0, height }, { bounds.x, bounds.y, 2 }, { offset.x, offset.y, height }); } From 2a5bccb4c3be2a8df7d40cbe7a787e7367f6c483 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Wed, 7 Sep 2022 20:54:08 +0200 Subject: [PATCH 9/9] Fix whitespace --- src/openrct2/ride/thrill/SwingingShip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2/ride/thrill/SwingingShip.cpp b/src/openrct2/ride/thrill/SwingingShip.cpp index 73345c9eee..58c9fc1479 100644 --- a/src/openrct2/ride/thrill/SwingingShip.cpp +++ b/src/openrct2/ride/thrill/SwingingShip.cpp @@ -102,7 +102,7 @@ static void PaintSwingingShipStructure( CoordsXYZ offset((direction & 1) ? 0 : axisOffset, (direction & 1) ? axisOffset : 0, height + 7); CoordsXYZ bbLength(bounds.length.x, bounds.length.y, 80); CoordsXYZ bbOffset(bounds.offset.x, bounds.offset.y, height + 7); - + auto baseImageId = rideEntry->Cars[0].base_image_id + SwingingShipBaseSpriteOffset[direction]; if (vehicle != nullptr) {