diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index 715daaf105b6..9534596bf26c 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -2821,7 +2821,10 @@ void Peep::Paint(PaintSession& session, int32_t imageDirection) const // bound_box_offset_z to make sure peeps are drawn on top of railways uint32_t baseImageId = (imageDirection >> 3) + GetPeepAnimation(SpriteType, actionSpriteType).base_image + imageOffset * 4; auto imageId = ImageId(baseImageId, TshirtColour, TrousersColour); - PaintAddImageAsParent(session, imageId, { 0, 0, z }, { 1, 1, 11 }, { 0, 0, z + 5 }); + + auto bb = BoundBoxXYZ{ { 0, 0, z + 5 }, { 1, 1, 11 } }; + auto offset = CoordsXYZ{ 0, 0, z }; + PaintAddImageAsParent(session, imageId, { 0, 0, z }, bb); auto* guest = As(); if (guest != nullptr) @@ -2829,21 +2832,21 @@ void Peep::Paint(PaintSession& session, int32_t imageDirection) const if (baseImageId >= 10717 && baseImageId < 10749) { imageId = ImageId(baseImageId + 32, guest->HatColour); - PaintAddImageAsChild(session, imageId, { 0, 0, z }, { 1, 1, 11 }, { 0, 0, z + 5 }); + PaintAddImageAsChild(session, imageId, offset, bb); return; } if (baseImageId >= 10781 && baseImageId < 10813) { imageId = ImageId(baseImageId + 32, guest->BalloonColour); - PaintAddImageAsChild(session, imageId, { 0, 0, z }, { 1, 1, 11 }, { 0, 0, z + 5 }); + PaintAddImageAsChild(session, imageId, offset, bb); return; } if (baseImageId >= 11197 && baseImageId < 11229) { imageId = ImageId(baseImageId + 32, guest->UmbrellaColour); - PaintAddImageAsChild(session, imageId, { 0, 0, z }, { 1, 1, 11 }, { 0, 0, z + 5 }); + PaintAddImageAsChild(session, imageId, offset, bb); return; } } diff --git a/src/openrct2/paint/Paint.cpp b/src/openrct2/paint/Paint.cpp index 094eed875225..e80a1303e8b6 100644 --- a/src/openrct2/paint/Paint.cpp +++ b/src/openrct2/paint/Paint.cpp @@ -757,13 +757,6 @@ PaintStruct* PaintAddImageAsParent( return CreateNormalPaintStruct(session, imageId, offset, boundBox); } -PaintStruct* PaintAddImageAsChild( - PaintSession& session, const ImageId imageId, const CoordsXYZ& offset, const CoordsXYZ& boundBoxLength, - const CoordsXYZ& boundBoxOffset) -{ - return PaintAddImageAsChild(session, imageId, offset, { boundBoxOffset, boundBoxLength }); -} - /** * * rct2: 0x006874B0, 0x00687618, 0x0068778C, 0x00687902, 0x0098199C diff --git a/src/openrct2/paint/Paint.h b/src/openrct2/paint/Paint.h index 62898f9235e3..c77b4d968cfe 100644 --- a/src/openrct2/paint/Paint.h +++ b/src/openrct2/paint/Paint.h @@ -303,9 +303,6 @@ PaintStruct* PaintAddImageAsParent( PaintSession& session, const ImageId image_id, const CoordsXYZ& offset, const BoundBoxXYZ& boundBox); [[nodiscard]] PaintStruct* PaintAddImageAsOrphan( PaintSession& session, const ImageId image_id, const CoordsXYZ& offset, const BoundBoxXYZ& boundBox); -PaintStruct* PaintAddImageAsChild( - PaintSession& session, const ImageId image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxLength, - const CoordsXYZ& boundBoxOffset); PaintStruct* PaintAddImageAsChild( PaintSession& session, const ImageId image_id, const CoordsXYZ& offset, const BoundBoxXYZ& boundBox); diff --git a/src/openrct2/paint/PaintHelpers.cpp b/src/openrct2/paint/PaintHelpers.cpp index 538cc32a1f9e..9fe75da7d8b0 100644 --- a/src/openrct2/paint/PaintHelpers.cpp +++ b/src/openrct2/paint/PaintHelpers.cpp @@ -45,11 +45,11 @@ PaintStruct* PaintAddImageAsChildRotated( if (direction & 1) { return PaintAddImageAsChild( - session, image_id, { offset.y, offset.x, offset.z }, { boundBoxSize.y, boundBoxSize.x, boundBoxSize.z }, - { boundBoxOffset.y, boundBoxOffset.x, boundBoxOffset.z }); + session, image_id, { offset.y, offset.x, offset.z }, + { { boundBoxOffset.y, boundBoxOffset.x, boundBoxOffset.z }, { boundBoxSize.y, boundBoxSize.x, boundBoxSize.z } }); } - return PaintAddImageAsChild(session, image_id, offset, boundBoxSize, boundBoxOffset); + return PaintAddImageAsChild(session, image_id, offset, { boundBoxOffset, boundBoxSize }); } void PaintUtilPushTunnelRotated(PaintSession& session, uint8_t direction, uint16_t height, uint8_t type) diff --git a/src/openrct2/paint/tile_element/Paint.Banner.cpp b/src/openrct2/paint/tile_element/Paint.Banner.cpp index 3b84c7a0a2d4..23457850ccfd 100644 --- a/src/openrct2/paint/tile_element/Paint.Banner.cpp +++ b/src/openrct2/paint/tile_element/Paint.Banner.cpp @@ -64,7 +64,7 @@ static void PaintBannerScrollingText( auto stringWidth = gfx_get_string_width(text, FontStyle::Tiny); auto scroll = (gCurrentTicks / 2) % stringWidth; auto imageId = scrolling_text_setup(session, STR_BANNER_TEXT_FORMAT, ft, scroll, scrollingMode, COLOUR_BLACK); - PaintAddImageAsChild(session, imageId, { 0, 0, height + 22 }, { 1, 1, 21 }, bbOffset); + PaintAddImageAsChild(session, imageId, { 0, 0, height + 22 }, { bbOffset, { 1, 1, 21 } }); } void PaintBanner(PaintSession& session, uint8_t direction, int32_t height, const BannerElement& bannerElement) diff --git a/src/openrct2/paint/tile_element/Paint.Entrance.cpp b/src/openrct2/paint/tile_element/Paint.Entrance.cpp index de66bc0d88e6..b1e6483cd305 100644 --- a/src/openrct2/paint/tile_element/Paint.Entrance.cpp +++ b/src/openrct2/paint/tile_element/Paint.Entrance.cpp @@ -74,7 +74,7 @@ static void PaintRideEntranceExitScrollingText( PaintAddImageAsChild( session, scrolling_text_setup(session, STR_BANNER_TEXT_FORMAT, ft, scroll, stationObj.ScrollingMode, COLOUR_BLACK), - { 0, 0, height + stationObj.Height }, { 28, 28, 51 }, { 2, 2, height + stationObj.Height }); + { 0, 0, height + stationObj.Height }, { { 2, 2, height + stationObj.Height }, { 28, 28, 51 } }); } static void PaintRideEntranceExitLightEffects(PaintSession& session, int32_t height, const EntranceElement& entranceEl) diff --git a/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp b/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp index db23a1f8005e..ac9f6c149b1f 100644 --- a/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp +++ b/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp @@ -324,7 +324,7 @@ static void PaintLargeSceneryScrollingText( auto stringWidth = gfx_get_string_width(text, FontStyle::Tiny); auto scroll = stringWidth > 0 ? (gCurrentTicks / 2) % stringWidth : 0; auto imageId = scrolling_text_setup(session, STR_SCROLLING_SIGN_TEXT, ft, scroll, scrollMode, textPaletteIndex); - PaintAddImageAsChild(session, imageId, { 0, 0, height + 25 }, { 1, 1, 21 }, bbOffset); + PaintAddImageAsChild(session, imageId, { 0, 0, height + 25 }, { bbOffset, { 1, 1, 21 } }); } void PaintLargeScenery(PaintSession& session, uint8_t direction, uint16_t height, const LargeSceneryElement& tileElement) diff --git a/src/openrct2/paint/tile_element/Paint.Path.cpp b/src/openrct2/paint/tile_element/Paint.Path.cpp index 60af734f4a9f..88135429556e 100644 --- a/src/openrct2/paint/tile_element/Paint.Path.cpp +++ b/src/openrct2/paint/tile_element/Paint.Path.cpp @@ -471,7 +471,7 @@ static void PathPaintFencesAndQueueBanners( PaintAddImageAsChild( session, scrolling_text_setup(session, STR_BANNER_TEXT_FORMAT, ft, scroll, scrollingMode, COLOUR_BLACK), - { 0, 0, height + 7 }, { 1, 1, 21 }, boundBoxOffsets); + { 0, 0, height + 7 }, { boundBoxOffsets, { 1, 1, 21 } }); } session.InteractionType = ViewportInteractionItem::Footpath; diff --git a/src/openrct2/paint/tile_element/Paint.Wall.cpp b/src/openrct2/paint/tile_element/Paint.Wall.cpp index ccd17fd1e1d0..4e445867ab62 100644 --- a/src/openrct2/paint/tile_element/Paint.Wall.cpp +++ b/src/openrct2/paint/tile_element/Paint.Wall.cpp @@ -184,7 +184,7 @@ static void PaintWallScrollingText( auto stringWidth = gfx_get_string_width(signString, FontStyle::Tiny); auto scroll = stringWidth > 0 ? (gCurrentTicks / 2) % stringWidth : 0; auto imageId = scrolling_text_setup(session, STR_SCROLLING_SIGN_TEXT, ft, scroll, scrollingMode, textPaletteIndex); - PaintAddImageAsChild(session, imageId, { 0, 0, height + 8 }, { 1, 1, 13 }, boundsOffset); + PaintAddImageAsChild(session, imageId, { 0, 0, height + 8 }, { boundsOffset, { 1, 1, 13 } }); } static void PaintWallWall( diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index 3a48abff4f7d..4ef11136919a 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -298,17 +298,17 @@ void track_paint_util_paint_fences( if (edges & EDGE_NW && track_paint_util_has_fence(EDGE_NW, position, trackElement, ride, rotation)) { PaintAddImageAsChild( - session, colourFlags.WithIndex(fenceSprites[3]), { 0, 0, height }, { 32, 1, 7 }, { 0, 2, height + 2 }); + session, colourFlags.WithIndex(fenceSprites[3]), { 0, 0, height }, { { 0, 2, height + 2 }, { 32, 1, 7 } }); } if (edges & EDGE_NE && track_paint_util_has_fence(EDGE_NE, position, trackElement, ride, rotation)) { PaintAddImageAsChild( - session, colourFlags.WithIndex(fenceSprites[0]), { 0, 0, height }, { 1, 32, 7 }, { 2, 0, height + 2 }); + session, colourFlags.WithIndex(fenceSprites[0]), { 0, 0, height }, { { 2, 0, height + 2 }, { 1, 32, 7 } }); } if (edges & EDGE_SE && track_paint_util_has_fence(EDGE_SE, position, trackElement, ride, rotation)) { PaintAddImageAsParent( - session, colourFlags.WithIndex(fenceSprites[1]), { 0, 0, height }, { 32, 1, 7 }, { 0, 30, height + 2 }); + session, colourFlags.WithIndex(fenceSprites[1]), { 0, 0, height }, { { 0, 30, height + 2 }, { 32, 1, 7 } }); } if (edges & EDGE_SW && track_paint_util_has_fence(EDGE_SW, position, trackElement, ride, rotation)) { @@ -2031,11 +2031,11 @@ void track_paint_util_spinning_tunnel_paint(PaintSession& session, int8_t thickn auto imageId = colourFlags.WithIndex(trackSpritesGhostTrainSpinningTunnel[direction & 1][0][frame]); if (direction == 0 || direction == 2) { - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 28, 20, thickness }, { 2, 6, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 2, 6, height }, { 28, 20, thickness } }); } else { - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 20, 28, thickness }, { 6, 2, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 6, 2, height }, { 20, 28, thickness } }); } imageId = colourFlags.WithIndex(trackSpritesGhostTrainSpinningTunnel[direction & 1][1][frame]); diff --git a/src/openrct2/ride/VehiclePaint.cpp b/src/openrct2/ride/VehiclePaint.cpp index 50561b6a96f2..d7a51caac8f4 100644 --- a/src/openrct2/ride/VehiclePaint.cpp +++ b/src/openrct2/ride/VehiclePaint.cpp @@ -3520,7 +3520,7 @@ static void vehicle_visual_splash1_effect(PaintSession& session, int32_t z, cons } int32_t image_id = SPR_SPLASH_EFFECT_1_NE_0 + ((((vehicle->sprite_direction / 8) + session.CurrentRotation) & 3) * 8) + ((gCurrentTicks / 2) & 7); - PaintAddImageAsChild(session, ImageId(image_id), { 0, 0, z }, { 0, 0, 0 }, { 0, 0, z }); + PaintAddImageAsChild(session, ImageId(image_id), { 0, 0, z }, { { 0, 0, z }, { 0, 0, 0 } }); } /** @@ -3543,7 +3543,7 @@ static void vehicle_visual_splash2_effect(PaintSession& session, int32_t z, cons } int32_t image_id = SPR_SPLASH_EFFECT_3_NE_0 + ((((vehicle->sprite_direction / 8) + session.CurrentRotation) & 3) * 8) + ((gCurrentTicks / 2) & 7); - PaintAddImageAsChild(session, ImageId(image_id), { 0, 0, z }, { 0, 0, 0 }, { 0, 0, z }); + PaintAddImageAsChild(session, ImageId(image_id), { 0, 0, z }, { { 0, 0, z }, { 0, 0, 0 } }); } /** @@ -3566,7 +3566,7 @@ static void vehicle_visual_splash3_effect(PaintSession& session, int32_t z, cons } int32_t image_id = SPR_SPLASH_EFFECT_1_NE_0 + ((((vehicle->sprite_direction / 8) + session.CurrentRotation) & 3) * 8) + ((gCurrentTicks / 2) & 7); - PaintAddImageAsChild(session, ImageId(image_id), { 0, 0, z }, { 0, 0, 0 }, { 0, 0, z }); + PaintAddImageAsChild(session, ImageId(image_id), { 0, 0, z }, { { 0, 0, z }, { 0, 0, 0 } }); } /** @@ -3594,7 +3594,7 @@ static void vehicle_visual_splash4_effect(PaintSession& session, int32_t z, cons } int32_t image_id = SPR_SPLASH_EFFECT_5_NE_0 + ((((vehicle->sprite_direction / 8) + session.CurrentRotation) & 3) * 8) + ((gCurrentTicks / 2) & 7); - PaintAddImageAsChild(session, ImageId(image_id), { 0, 0, z }, { 1, 1, 0 }, { 0, 0, z }); + PaintAddImageAsChild(session, ImageId(image_id), { 0, 0, z }, { { 0, 0, z }, { 1, 1, 0 } }); } /** @@ -3626,7 +3626,7 @@ static void vehicle_visual_splash5_effect(PaintSession& session, int32_t z, cons } int32_t image_id = SPR_SPLASH_EFFECT_5_NE_0 + ((((vehicle->sprite_direction / 8) + session.CurrentRotation) & 3) * 8) + ((gCurrentTicks / 2) & 7); - PaintAddImageAsChild(session, ImageId(image_id), { 0, 0, z }, { 1, 1, 0 }, { 0, 0, z }); + PaintAddImageAsChild(session, ImageId(image_id), { 0, 0, z }, { { 0, 0, z }, { 1, 1, 0 } }); } void vehicle_visual_splash_effect(PaintSession& session, int32_t z, const Vehicle* vehicle, const CarEntry* carEntry) diff --git a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp index 7d9dc233692c..8206532bb328 100644 --- a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp @@ -1855,7 +1855,7 @@ void junior_rc_paint_station( { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(junior_rc_track_pieces_station[false][direction]); } - PaintAddImageAsChild(session, imageId, { 0, 6, height }, { 32, 20, 1 }, { 0, 0, height }); + PaintAddImageAsChild(session, imageId, { 0, 6, height }, { { 0, 0, height }, { 32, 20, 1 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -1877,7 +1877,7 @@ void junior_rc_paint_station( { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(junior_rc_track_pieces_station[false][direction]); } - PaintAddImageAsChild(session, imageId, { 6, 0, height }, { 20, 32, 1 }, { 0, 0, height }); + PaintAddImageAsChild(session, imageId, { 6, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); diff --git a/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp b/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp index 026f55d6f215..4a697eabcd34 100644 --- a/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp +++ b/src/openrct2/ride/coaster/ReverseFreefallCoaster.cpp @@ -231,7 +231,7 @@ static void paint_reverse_freefall_rc_station( // height += 2 (height) imageId = session.TrackColours[SCHEME_TRACK].WithIndex(reverse_freefall_rc_track_pieces_station[direction]); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 32, 20, 1 }, { 0, 6, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); WoodenASupportsPaintSetup(session, (direction & 1) ? 1 : 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); @@ -244,7 +244,7 @@ static void paint_reverse_freefall_rc_station( // height += 2 (height) imageId = session.TrackColours[SCHEME_TRACK].WithIndex(reverse_freefall_rc_track_pieces_station[direction]); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 20, 32, 1 }, { 6, 0, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); WoodenASupportsPaintSetup(session, (direction & 1) ? 1 : 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); diff --git a/src/openrct2/ride/coaster/VirginiaReel.cpp b/src/openrct2/ride/coaster/VirginiaReel.cpp index e7f34b49fa37..911767fd18f9 100644 --- a/src/openrct2/ride/coaster/VirginiaReel.cpp +++ b/src/openrct2/ride/coaster/VirginiaReel.cpp @@ -186,7 +186,9 @@ void vehicle_visual_virginia_reel( } }(); baseImage_id += ecx & 7; - const vehicle_boundbox* bb = &_virginiaReelBoundbox[baseImage_id >> 3]; + const auto& vehicleBb = _virginiaReelBoundbox[baseImage_id >> 3]; + auto bb = BoundBoxXYZ{ { vehicleBb.offset_x, vehicleBb.offset_y, vehicleBb.offset_z + z }, + { vehicleBb.length_x, vehicleBb.length_y, vehicleBb.length_z } }; baseImage_id += carEntry->base_image_id; auto image_id = ImageId(baseImage_id, vehicle->colours.Body, vehicle->colours.Trim); @@ -194,9 +196,7 @@ void vehicle_visual_virginia_reel( { image_id = ConstructionMarker.WithIndex(image_id.GetIndex()); } - PaintAddImageAsParent( - session, image_id, { 0, 0, z }, { bb->length_x, bb->length_y, bb->length_z }, - { bb->offset_x, bb->offset_y, bb->offset_z + z }); + PaintAddImageAsParent(session, image_id, { 0, 0, z }, bb); if (session.DPI.zoom_level < ZoomLevel{ 2 } && vehicle->num_peeps > 0 && !vehicle->IsGhost()) { @@ -211,9 +211,7 @@ void vehicle_visual_virginia_reel( if (riding_peep_sprites[i] != 0xFF) { image_id = ImageId(baseImage_id + ((i + 1) * 72), riding_peep_sprites[i]); - PaintAddImageAsChild( - session, image_id, { 0, 0, z }, { bb->length_x, bb->length_y, bb->length_z }, - { bb->offset_x, bb->offset_y, bb->offset_z + z }); + PaintAddImageAsChild(session, image_id, { 0, 0, z }, bb); } } } @@ -438,7 +436,7 @@ static void paint_virginia_reel_station( PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 32, 28, 2 }, { 0, 2, height }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_VIRGINIA_REEL_FLAT_SW_NE); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 32, 20, 2 }, { 0, 0, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 20, 2 } }); PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); } @@ -448,7 +446,7 @@ static void paint_virginia_reel_station( PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 28, 32, 2 }, { 2, 0, height }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_VIRGINIA_REEL_FLAT_NW_SE); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 20, 32, 2 }, { 0, 0, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 20, 32, 2 } }); PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); } diff --git a/src/openrct2/ride/coaster/WoodenRollerCoaster.h b/src/openrct2/ride/coaster/WoodenRollerCoaster.h index 2a244ec82866..e9f5eca76ec0 100644 --- a/src/openrct2/ride/coaster/WoodenRollerCoaster.h +++ b/src/openrct2/ride/coaster/WoodenRollerCoaster.h @@ -68,8 +68,8 @@ template void wooden_rc_track_paint_bb(PaintSession& session, co { ImageId railsImageId = wooden_rc_get_rails_colour(session).WithIndex(bb->sprite_id_b); PaintAddImageAsChild( - session, railsImageId, { bb->offset.x, bb->offset.y, height + bb->offset.z }, bb->bb_size, - { bb->bb_offset.x, bb->bb_offset.y, height + bb->bb_offset.z }); + session, railsImageId, { bb->offset.x, bb->offset.y, height + bb->offset.z }, + { { bb->bb_offset, height + bb->bb_offset.z }, bb->bb_size }); } } diff --git a/src/openrct2/ride/gentle/CarRide.cpp b/src/openrct2/ride/gentle/CarRide.cpp index 8fd33d537456..9a7484dcb420 100644 --- a/src/openrct2/ride/gentle/CarRide.cpp +++ b/src/openrct2/ride/gentle/CarRide.cpp @@ -345,11 +345,11 @@ static void PaintCarRideStation( imageId = session.TrackColours[SCHEME_TRACK].WithIndex(CarRideTrackPiecesFlat[direction]); if (direction == 0 || direction == 2) { - PaintAddImageAsChild(session, imageId, { 0, 6, height }, { 32, 20, 1 }, { 0, 0, height }); + PaintAddImageAsChild(session, imageId, { 0, 6, height }, { { 0, 0, height }, { 32, 20, 1 } }); } else { - PaintAddImageAsChild(session, imageId, { 6, 0, height }, { 20, 32, 1 }, { 0, 0, height }); + PaintAddImageAsChild(session, imageId, { 6, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); } if (direction == 0 || direction == 2) diff --git a/src/openrct2/ride/gentle/FerrisWheel.cpp b/src/openrct2/ride/gentle/FerrisWheel.cpp index b9d228a1e452..629522c5b934 100644 --- a/src/openrct2/ride/gentle/FerrisWheel.cpp +++ b/src/openrct2/ride/gentle/FerrisWheel.cpp @@ -130,12 +130,12 @@ static void PaintFerrisWheel( if (edges & EDGE_NW && track_paint_util_has_fence(EDGE_NW, session.MapPosition, trackElement, ride, rotation)) { imageId = colourFlags.WithIndex(SPR_FENCE_ROPE_NW); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 32, 1, 7 }, { 0, 2, height + 2 }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 2, height + 2 }, { 32, 1, 7 } }); } if (edges & EDGE_NE && track_paint_util_has_fence(EDGE_NE, session.MapPosition, trackElement, ride, rotation)) { imageId = colourFlags.WithIndex(SPR_FENCE_ROPE_NE); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 1, 32, 7 }, { 2, 0, height + 2 }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 2, 0, height + 2 }, { 1, 32, 7 } }); } if (edges & EDGE_SE && track_paint_util_has_fence(EDGE_SE, session.MapPosition, trackElement, ride, rotation)) { diff --git a/src/openrct2/ride/gentle/MiniGolf.cpp b/src/openrct2/ride/gentle/MiniGolf.cpp index 79941120439f..87f925ef2217 100644 --- a/src/openrct2/ride/gentle/MiniGolf.cpp +++ b/src/openrct2/ride/gentle/MiniGolf.cpp @@ -758,7 +758,7 @@ static void PaintMiniGolfTrackLeftQuarterTurn1Tile( break; imageId = session.TrackColours[SCHEME_MISC].WithIndex(SprMiniGolfQuarterTurn1TileFenceBackSwNw); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 26, 24, 1 }, { 6, 2, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 6, 2, height }, { 26, 24, 1 } }); break; @@ -767,7 +767,7 @@ static void PaintMiniGolfTrackLeftQuarterTurn1Tile( break; imageId = session.TrackColours[SCHEME_MISC].WithIndex(SprMiniGolfQuarterTurn1TileFenceBackNwNe); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 26, 26, 1 }, { 0, 0, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 26, 26, 1 } }); break; case 2: @@ -776,7 +776,7 @@ static void PaintMiniGolfTrackLeftQuarterTurn1Tile( break; imageId = session.TrackColours[SCHEME_MISC].WithIndex(SprMiniGolfQuarterTurn1TileFenceBackNeSe); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 24, 26, 1 }, { 2, 6, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 2, 6, height }, { 24, 26, 1 } }); break; case 3: @@ -786,7 +786,7 @@ static void PaintMiniGolfTrackLeftQuarterTurn1Tile( break; imageId = session.TrackColours[SCHEME_MISC].WithIndex(SprMiniGolfQuarterTurn1TileFenceBackSeSw); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 24, 24, 1 }, { 6, 6, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 6, 6, height }, { 24, 24, 1 } }); break; } @@ -852,26 +852,27 @@ static void PaintMiniGolfHoleAb( boundBoxOffset = { 0, 3 }; } + auto bb = BoundBoxXYZ{ { boundBoxOffset, height + 24 }, { boundBox, 0 } }; + imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][trackSequence][1]); - PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 0 }, { boundBoxOffset.x, boundBoxOffset.y, height + 24 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, bb); + + bb.offset.z = height; + bb.length.z = 1; if (drewSupports) { imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex( ((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS)); - PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, bb); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][trackSequence][0]); - PaintAddImageAsChild( - session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, bb); } else { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][trackSequence][0]); - PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, bb); } } @@ -943,22 +944,20 @@ static void PaintMiniGolfHoleC( break; } + auto bb = BoundBoxXYZ{ { boundBoxOffset, height }, { boundBox.x, boundBox.y, 1 } }; if (drewSupports) { imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex( ((direction & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS)); - PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, bb); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(MiniGolfTrackSpritesHoleC[direction][trackSequence][0]); - PaintAddImageAsChild( - session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, bb); } else { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(MiniGolfTrackSpritesHoleC[direction][trackSequence][0]); - PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, bb); } } @@ -1037,22 +1036,21 @@ static void PaintMiniGolfHoleD( break; } + auto bb = BoundBoxXYZ{ { boundBoxOffset, height }, { boundBox.x, boundBox.y, 1 } }; + auto offset = CoordsXYZ{ 0, 0, height }; if (drewSupports) { imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex( ((supportType & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS)); - PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height }); + PaintAddImageAsParent(session, imageId, offset, bb); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(MiniGolfTrackSpritesHoleD[direction][trackSequence][0]); - PaintAddImageAsChild( - session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height }); + PaintAddImageAsChild(session, imageId, offset, bb); } else { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(MiniGolfTrackSpritesHoleD[direction][trackSequence][0]); - PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height }); + PaintAddImageAsParent(session, imageId, offset, bb); } } @@ -1131,22 +1129,21 @@ static void PaintMiniGolfHoleE( break; } + auto bb = BoundBoxXYZ{ { boundBoxOffset, height }, { boundBox.x, boundBox.y, 1 } }; + auto offset = CoordsXYZ{ 0, 0, height }; if (drewSupports) { imageId = session.TrackColours[SCHEME_SUPPORTS].WithIndex( ((supportType & 1) ? SPR_FLOOR_PLANKS_90_DEG : SPR_FLOOR_PLANKS)); - PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height }); + PaintAddImageAsParent(session, imageId, offset, bb); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(MiniGolfTrackSpritesHoleE[direction][trackSequence][0]); - PaintAddImageAsChild( - session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height }); + PaintAddImageAsChild(session, imageId, offset, bb); } else { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(MiniGolfTrackSpritesHoleE[direction][trackSequence][0]); - PaintAddImageAsParent( - session, imageId, { 0, 0, height }, { boundBox.x, boundBox.y, 1 }, { boundBoxOffset.x, boundBoxOffset.y, height }); + PaintAddImageAsParent(session, imageId, offset, bb); } } diff --git a/src/openrct2/ride/gentle/MiniHelicopters.cpp b/src/openrct2/ride/gentle/MiniHelicopters.cpp index ce9bc0594aaf..c4948019ab21 100644 --- a/src/openrct2/ride/gentle/MiniHelicopters.cpp +++ b/src/openrct2/ride/gentle/MiniHelicopters.cpp @@ -29,7 +29,7 @@ static void PaintMiniHelicoptersTrackStation( PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 32, 28, 1 }, { 0, 2, height }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 32, 20, 1 }, { 0, 0, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 20, 1 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -41,7 +41,7 @@ static void PaintMiniHelicoptersTrackStation( PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 28, 32, 1 }, { 2, 0, height }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 20, 32, 1 }, { 0, 0, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); diff --git a/src/openrct2/ride/gentle/MonorailCycles.cpp b/src/openrct2/ride/gentle/MonorailCycles.cpp index 5dc45f28615c..d54d3d59375a 100644 --- a/src/openrct2/ride/gentle/MonorailCycles.cpp +++ b/src/openrct2/ride/gentle/MonorailCycles.cpp @@ -216,7 +216,7 @@ static void PaintMonorailCyclesStation( PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 32, 28, 1 }, { 0, 2, height }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SprMonorailCyclesFlatSwNe); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 32, 20, 1 }, { 0, 0, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 20, 1 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 5, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 8, 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -228,7 +228,7 @@ static void PaintMonorailCyclesStation( PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { 28, 32, 1 }, { 2, 0, height }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SprMonorailCyclesFlatNwSe); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 20, 32, 1 }, { 0, 0, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 6, 0, height, session.TrackColours[SCHEME_SUPPORTS]); MetalASupportsPaintSetup(session, METAL_SUPPORTS_BOXED, 7, 0, height, session.TrackColours[SCHEME_SUPPORTS]); diff --git a/src/openrct2/ride/gentle/ObservationTower.cpp b/src/openrct2/ride/gentle/ObservationTower.cpp index f5c5c6ae5f80..25342647a42d 100644 --- a/src/openrct2/ride/gentle/ObservationTower.cpp +++ b/src/openrct2/ride/gentle/ObservationTower.cpp @@ -168,7 +168,7 @@ static void PaintObservationTowerSection( if (trackElement.IsLastForTile() || trackElement.GetClearanceZ() != nextTileElement->GetBaseZ()) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SprObservationTowerSegmentTop); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 2, 2, 30 }, { 8, 8, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 8, 8, height }, { 2, 2, 30 } }); } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/openrct2/ride/gentle/SpaceRings.cpp b/src/openrct2/ride/gentle/SpaceRings.cpp index af1ef8285dd0..2996a08f4b27 100644 --- a/src/openrct2/ride/gentle/SpaceRings.cpp +++ b/src/openrct2/ride/gentle/SpaceRings.cpp @@ -74,7 +74,7 @@ static void PaintSpaceRingsStructure( { imageColourFlags = ImageId(0, rider->TshirtColour, rider->TrousersColour); imageId = imageColourFlags.WithIndex(baseImageId + 352 + frameNum); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 20, 20, 23 }, { -10, -10, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { -10, -10, height }, { 20, 20, 23 } }); } } } diff --git a/src/openrct2/ride/gentle/SpiralSlide.cpp b/src/openrct2/ride/gentle/SpiralSlide.cpp index 2d2854bc6ea7..fdf9916d6f72 100644 --- a/src/openrct2/ride/gentle/SpiralSlide.cpp +++ b/src/openrct2/ride/gentle/SpiralSlide.cpp @@ -185,7 +185,7 @@ static void SpiralSlidePaintTileFront( imageId = ImageId(offset + slide_progress, ride.slide_peep_t_shirt_colour, COLOUR_GREY); - PaintAddImageAsChild(session, imageId, { 16, 16, height }, boundingBox, boundingBoxOffset); + PaintAddImageAsChild(session, imageId, { 16, 16, height }, { boundingBoxOffset, boundingBox }); } } } diff --git a/src/openrct2/ride/thrill/LaunchedFreefall.cpp b/src/openrct2/ride/thrill/LaunchedFreefall.cpp index f3d8d62513ac..d48b3576a77f 100644 --- a/src/openrct2/ride/thrill/LaunchedFreefall.cpp +++ b/src/openrct2/ride/thrill/LaunchedFreefall.cpp @@ -59,27 +59,27 @@ void vehicle_visual_launched_freefall( auto directionOffset = OpenRCT2::Entity::Yaw::YawTo4(imageDirection); image_id = ImageId( baseImage_id + (((directionOffset + 0) & 3) * 3), vehicle->peep_tshirt_colours[0], vehicle->peep_tshirt_colours[1]); - PaintAddImageAsChild(session, image_id, { 0, 0, z }, { 16, 16, 41 }, { -5, -5, z + 1 }); + PaintAddImageAsChild(session, image_id, { 0, 0, z }, { { -5, -5, z + 1 }, { 16, 16, 41 } }); if (vehicle->num_peeps > 2) { image_id = ImageId( baseImage_id + (((directionOffset + 1) & 3) * 3), vehicle->peep_tshirt_colours[2], vehicle->peep_tshirt_colours[3]); - PaintAddImageAsChild(session, image_id, { 0, 0, z }, { 16, 16, 41 }, { -5, -5, z + 1 }); + PaintAddImageAsChild(session, image_id, { 0, 0, z }, { { -5, -5, z + 1 }, { 16, 16, 41 } }); } if (vehicle->num_peeps > 4) { image_id = ImageId( baseImage_id + (((directionOffset + 2) & 3) * 3), vehicle->peep_tshirt_colours[4], vehicle->peep_tshirt_colours[5]); - PaintAddImageAsChild(session, image_id, { 0, 0, z }, { 16, 16, 41 }, { -5, -5, z + 1 }); + PaintAddImageAsChild(session, image_id, { 0, 0, z }, { { -5, -5, z + 1 }, { 16, 16, 41 } }); } if (vehicle->num_peeps > 6) { image_id = ImageId( baseImage_id + (((directionOffset + 3) & 3) * 3), vehicle->peep_tshirt_colours[6], vehicle->peep_tshirt_colours[7]); - PaintAddImageAsChild(session, image_id, { 0, 0, z }, { 16, 16, 41 }, { -5, -5, z + 1 }); + PaintAddImageAsChild(session, image_id, { 0, 0, z }, { { -5, -5, z + 1 }, { 16, 16, 41 } }); } } @@ -177,7 +177,7 @@ static void paint_launched_freefall_tower_section( if (trackElement.IsLastForTile() || trackElement.GetClearanceZ() != nextTileElement->GetBaseZ()) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_LAUNCHED_FREEFALL_TOWER_SEGMENT_TOP); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 2, 2, 30 }, { 8, 8, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 8, 8, height }, { 2, 2, 30 } }); } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/openrct2/ride/thrill/RotoDrop.cpp b/src/openrct2/ride/thrill/RotoDrop.cpp index 307bb8026435..f08e662b7902 100644 --- a/src/openrct2/ride/thrill/RotoDrop.cpp +++ b/src/openrct2/ride/thrill/RotoDrop.cpp @@ -88,7 +88,7 @@ void vehicle_visual_roto_drop( baseImage_id += vehicle->restraints_position / 64; } image_id = ImageId(baseImage_id, riding_peep_sprites[i]); - PaintAddImageAsChild(session, image_id, { 0, 0, z }, { 16, 16, 41 }, { -5, -5, z + 1 }); + PaintAddImageAsChild(session, image_id, { 0, 0, z }, { { -5, -5, z + 1 }, { 16, 16, 41 } }); } } } @@ -190,7 +190,7 @@ static void paint_roto_drop_tower_section( if (trackElement.IsLastForTile() || trackElement.GetClearanceZ() != nextTileElement->GetBaseZ()) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_ROTO_DROP_TOWER_SEGMENT_TOP); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 2, 2, 30 }, { 8, 8, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 8, 8, height }, { 2, 2, 30 } }); } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/openrct2/ride/thrill/SwingingInverterShip.cpp b/src/openrct2/ride/thrill/SwingingInverterShip.cpp index 0f345377e954..6abe1ecaaafc 100644 --- a/src/openrct2/ride/thrill/SwingingInverterShip.cpp +++ b/src/openrct2/ride/thrill/SwingingInverterShip.cpp @@ -163,11 +163,11 @@ static void PaintSwingingInverterShip( break; case 2: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_STATION_PLATFORM_SW_NE); - PaintAddImageAsChild(session, imageId, { 0, 0, height + 9 }, { 32, 8, 1 }, { -2, 0, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height + 9 }, { { -2, 0, height }, { 32, 8, 1 } }); break; case 3: imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_STATION_PLATFORM_NW_SE); - PaintAddImageAsChild(session, imageId, { 0, 0, height + 9 }, { 8, 32, 1 }, { 0, -2, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height + 9 }, { { 0, -2, height }, { 8, 32, 1 } }); break; } } diff --git a/src/openrct2/ride/thrill/SwingingShip.cpp b/src/openrct2/ride/thrill/SwingingShip.cpp index 211fbb629b86..63f76e174e21 100644 --- a/src/openrct2/ride/thrill/SwingingShip.cpp +++ b/src/openrct2/ride/thrill/SwingingShip.cpp @@ -208,7 +208,7 @@ static void PaintSwingingShip( imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (hasFence ? SPR_STATION_PLATFORM_FENCED_NW_SE : SPR_STATION_PLATFORM_NW_SE)); } - PaintAddImageAsChild(session, imageId, { 0, 0, height + 9 }, { 8, 32, 1 }, { 0, -2, height + 9 }); + PaintAddImageAsChild(session, imageId, { 0, 0, height + 9 }, { { 0, -2, height + 9 }, { 8, 32, 1 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (relativeTrackSequence == 2 ? SPR_STATION_PLATFORM_BEGIN_NW_SE : SPR_STATION_PLATFORM_NW_SE)); @@ -255,7 +255,7 @@ static void PaintSwingingShip( imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (hasFence ? SPR_STATION_PLATFORM_FENCED_SW_NE : SPR_STATION_PLATFORM_SW_NE)); } - PaintAddImageAsChild(session, imageId, { 0, 0, height + 9 }, { 32, 8, 1 }, { -2, 0, height + 9 }); + PaintAddImageAsChild(session, imageId, { 0, 0, height + 9 }, { { -2, 0, height + 9 }, { 32, 8, 1 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (relativeTrackSequence == 2 ? SPR_STATION_PLATFORM_BEGIN_SW_NE : SPR_STATION_PLATFORM_SW_NE)); diff --git a/src/openrct2/ride/transport/Chairlift.cpp b/src/openrct2/ride/transport/Chairlift.cpp index 4587e8414f3f..cd84c159f66f 100644 --- a/src/openrct2/ride/transport/Chairlift.cpp +++ b/src/openrct2/ride/transport/Chairlift.cpp @@ -205,14 +205,14 @@ static void chairlift_paint_station_ne_sw( if (hasFence) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_FENCE_METAL_NW); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 32, 1, 7 }, { 0, 2, height + 2 }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 2, height + 2 }, { 32, 1, 7 } }); } track_paint_util_draw_station_covers(session, EDGE_NW, hasFence, stationObj, height); if ((direction == 2 && isStart) || (direction == 0 && isEnd)) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_FENCE_METAL_NE); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 1, 28, 7 }, { 2, 2, height + 4 }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 2, 2, height + 4 }, { 1, 28, 7 } }); } hasFence = track_paint_util_has_fence(EDGE_SE, pos, trackElement, ride, session.CurrentRotation); @@ -235,7 +235,7 @@ static void chairlift_paint_station_ne_sw( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 4, 4, 26 }, { 14, 14, height + 4 }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_CHAIRLIFT_STATION_END_CAP_NE); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 4, 4, 26 }, { 14, 14, height + 4 }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 26 } }); drawFrontColumn = false; } @@ -246,7 +246,7 @@ static void chairlift_paint_station_ne_sw( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 4, 4, 26 }, { 14, 14, height + 4 }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_CHAIRLIFT_STATION_END_CAP_SW); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 4, 4, 26 }, { 14, 14, height + 4 }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 26 } }); drawBackColumn = false; } @@ -297,14 +297,14 @@ static void chairlift_paint_station_se_nw( if (hasFence) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_FENCE_METAL_NE); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 1, 32, 7 }, { 2, 0, height + 2 }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 2, 0, height + 2 }, { 1, 32, 7 } }); } track_paint_util_draw_station_covers(session, EDGE_NE, hasFence, stationObj, height); if ((direction == 1 && isStart) || (direction == 3 && isEnd)) { imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_FENCE_METAL_NW); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 28, 1, 7 }, { 2, 2, height + 4 }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 2, 2, height + 4 }, { 28, 1, 7 } }); } hasFence = track_paint_util_has_fence(EDGE_SW, pos, trackElement, ride, session.CurrentRotation); @@ -324,7 +324,7 @@ static void chairlift_paint_station_se_nw( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 4, 4, 26 }, { 14, 14, height + 4 }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_CHAIRLIFT_STATION_END_CAP_SE); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 4, 4, 26 }, { 14, 14, height + 4 }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 26 } }); drawLeftColumn = false; } @@ -338,7 +338,7 @@ static void chairlift_paint_station_se_nw( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 4, 4, 26 }, { 14, 14, height + 4 }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_CHAIRLIFT_STATION_END_CAP_NW); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 4, 4, 26 }, { 14, 14, height + 4 }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 26 } }); drawRightColumn = false; } diff --git a/src/openrct2/ride/transport/MiniatureRailway.cpp b/src/openrct2/ride/transport/MiniatureRailway.cpp index 5fc83354b526..8a85cf2c927f 100644 --- a/src/openrct2/ride/transport/MiniatureRailway.cpp +++ b/src/openrct2/ride/transport/MiniatureRailway.cpp @@ -1006,7 +1006,7 @@ static void paint_miniature_railway_track_right_quarter_turn_5_tiles( CoordsXYZ boundsOffset = CoordsXYZ(offset, 0); PaintAddImageAsChild( - session, imageId, { offset, height }, { boundsLength, 2 }, boundsOffset + CoordsXYZ{ 0, 0, height }); + session, imageId, { offset, height }, { boundsOffset + CoordsXYZ{ 0, 0, height }, { boundsLength, 2 } }); } } if (direction == 0 && trackSequence == 0) @@ -1380,7 +1380,7 @@ static void paint_miniature_railway_track_right_quarter_turn_3_tiles( CoordsXYZ boundsOffset(offset, 0); PaintAddImageAsChild( - session, imageId, { offset, height }, { boundsLength, 3 }, boundsOffset + CoordsXYZ{ 0, 0, height }); + session, imageId, { offset, height }, { boundsOffset + CoordsXYZ{ 0, 0, height }, { boundsLength, 3 } }); } track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); @@ -1563,7 +1563,7 @@ static void paint_miniature_railway_track_left_eighth_to_diag( miniature_railway_track_pieces_left_eight_to_diag[direction][index]); offset = miniature_railway_track_pieces_left_eight_to_diag_offset[direction][index]; bounds = miniature_railway_track_pieces_left_eight_to_diag_bounds[direction][index]; - PaintAddImageAsChild(session, imageId, { 0, 0, height }, bounds, { offset, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { offset, height }, bounds }); } } @@ -1728,7 +1728,7 @@ static void paint_miniature_railway_track_right_eighth_to_diag( miniature_railway_track_pieces_right_eight_to_diag[direction][index]); offset = miniature_railway_track_pieces_right_eight_to_diag_offset[direction][index]; bounds = miniature_railway_track_pieces_right_eight_to_diag_bounds[direction][index]; - PaintAddImageAsChild(session, imageId, { 0, 0, height }, bounds, { offset, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { offset, height }, bounds }); } } @@ -1839,15 +1839,15 @@ static void miniature_railway_track_diag_flat( if (drawRail) { PaintAddImageAsChild( - session, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { -16, -16, height }, { 32, 32, 2 }, - { -16, -16, height }); + session, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); } } else if (drawRail) { PaintAddImageAsParent( - session, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { -16, -16, height }, { 32, 32, 2 }, - { -16, -16, height }); + session, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -1940,8 +1940,8 @@ static void miniature_railway_track_diag_25_deg_up( if (drawRail) { PaintAddImageAsChild( - session, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { -16, -16, height }, { 32, 32, 2 }, - { -16, -16, height + offsetB[direction] }); + session, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { -16, -16, height }, + { { -16, -16, height + offsetB[direction] }, { 32, 32, 2 } }); } } else if (drawRail) @@ -1991,15 +1991,15 @@ static void miniature_railway_track_diag_flat_to_25_deg_up( if (drawRail) { PaintAddImageAsChild( - session, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { -16, -16, height }, { 32, 32, 2 }, - { -16, -16, height }); + session, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); } } else if (drawRail) { PaintAddImageAsParent( - session, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { -16, -16, height }, { 32, 32, 2 }, - { -16, -16, height }); + session, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); } PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -2067,8 +2067,8 @@ static void miniature_railway_track_diag_25_deg_up_to_flat( if (drawRail) { PaintAddImageAsChild( - session, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { -16, -16, height }, { 32, 32, 2 }, - { -16, -16, height + railOffsets[direction] }); + session, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { -16, -16, height }, + { { -16, -16, height + railOffsets[direction] }, { 32, 32, 2 } }); } } else if (drawRail) @@ -2142,8 +2142,8 @@ static void miniature_railway_track_diag_25_deg_down( if (drawRail) { PaintAddImageAsChild( - session, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { -16, -16, height }, { 32, 32, 2 }, - { -16, -16, height + railOffsets[direction] }); + session, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { -16, -16, height }, + { { -16, -16, height + railOffsets[direction] }, { 32, 32, 2 } }); } } else if (drawRail) @@ -2216,8 +2216,8 @@ static void miniature_railway_track_diag_flat_to_25_deg_down( if (drawRail) { PaintAddImageAsChild( - session, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { -16, -16, height }, { 32, 32, 2 }, - { -16, -16, height + railOffsets[direction] }); + session, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { -16, -16, height }, + { { -16, -16, height + railOffsets[direction] }, { 32, 32, 2 } }); } } else if (drawRail) @@ -2265,8 +2265,8 @@ static void miniature_railway_track_diag_25_deg_down_to_flat( if (drawRail) { PaintAddImageAsChild( - session, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { -16, -16, height }, { 32, 32, 2 }, - { -16, -16, height }); + session, session.TrackColours[SCHEME_TRACK].WithIndex(imageId), { -16, -16, height }, + { { -16, -16, height }, { 32, 32, 2 } }); } } else if (drawRail) diff --git a/src/openrct2/ride/transport/Monorail.cpp b/src/openrct2/ride/transport/Monorail.cpp index 8908b1c2509a..2f7c52af6330 100644 --- a/src/openrct2/ride/transport/Monorail.cpp +++ b/src/openrct2/ride/transport/Monorail.cpp @@ -445,11 +445,11 @@ static void paint_monorail_station( imageId = session.TrackColours[SCHEME_TRACK].WithIndex(monorail_track_pieces_flat[direction]); if (direction == 0 || direction == 2) { - PaintAddImageAsChild(session, imageId, { 0, 6, height }, { 32, 20, 2 }, { 0, 0, height }); + PaintAddImageAsChild(session, imageId, { 0, 6, height }, { { 0, 0, height }, { 32, 20, 2 } }); } else { - PaintAddImageAsChild(session, imageId, { 6, 0, height }, { 20, 32, 2 }, { 0, 0, height }); + PaintAddImageAsChild(session, imageId, { 6, 0, height }, { { 0, 0, height }, { 20, 32, 2 } }); } if (direction == 0 || direction == 2) diff --git a/src/openrct2/ride/water/RiverRapids.cpp b/src/openrct2/ride/water/RiverRapids.cpp index 63d49a45c951..96ca7f43d3ea 100644 --- a/src/openrct2/ride/water/RiverRapids.cpp +++ b/src/openrct2/ride/water/RiverRapids.cpp @@ -223,15 +223,15 @@ void vehicle_visual_river_rapids( } baseImage_id += carEntry->base_image_id; - const vehicle_boundbox* bb = &_riverRapidsBoundbox[j]; + const auto& riverRapidsBb = _riverRapidsBoundbox[j]; + auto bb = BoundBoxXYZ{ { riverRapidsBb.offset_x, riverRapidsBb.offset_y, riverRapidsBb.offset_z + z }, + { riverRapidsBb.length_x, riverRapidsBb.length_y, riverRapidsBb.length_z } }; image_id = ImageId(baseImage_id, vehicle->colours.Body, vehicle->colours.Trim); if (vehicle->IsGhost()) { image_id = ConstructionMarker.WithIndex(image_id.GetIndex()); } - PaintAddImageAsParent( - session, image_id, { 0, 0, z }, { bb->length_x, bb->length_y, bb->length_z }, - { bb->offset_x, bb->offset_y, bb->offset_z + z }); + PaintAddImageAsParent(session, image_id, { 0, 0, z }, bb); if (session.DPI.zoom_level < ZoomLevel{ 2 } && vehicle->num_peeps > 0 && !vehicle->IsGhost()) { @@ -239,35 +239,27 @@ void vehicle_visual_river_rapids( // that's how the original does it...) int32_t peeps = ((ecx / 8) + 0) & 3; image_id = ImageId(baseImage_id + ((peeps + 1) * 72), vehicle->peep_tshirt_colours[0], vehicle->peep_tshirt_colours[1]); - PaintAddImageAsChild( - session, image_id, { 0, 0, z }, { bb->length_x, bb->length_y, bb->length_z }, - { bb->offset_x, bb->offset_y, bb->offset_z + z }); + PaintAddImageAsChild(session, image_id, { 0, 0, z }, bb); if (vehicle->num_peeps > 2) { peeps = ((ecx / 8) + 2) & 3; image_id = ImageId( baseImage_id + ((peeps + 1) * 72), vehicle->peep_tshirt_colours[2], vehicle->peep_tshirt_colours[3]); - PaintAddImageAsChild( - session, image_id, { 0, 0, z }, { bb->length_x, bb->length_y, bb->length_z }, - { bb->offset_x, bb->offset_y, bb->offset_z + z }); + PaintAddImageAsChild(session, image_id, { 0, 0, z }, bb); } if (vehicle->num_peeps > 4) { peeps = ((ecx / 8) + 1) & 3; image_id = ImageId( baseImage_id + ((peeps + 1) * 72), vehicle->peep_tshirt_colours[4], vehicle->peep_tshirt_colours[5]); - PaintAddImageAsChild( - session, image_id, { 0, 0, z }, { bb->length_x, bb->length_y, bb->length_z }, - { bb->offset_x, bb->offset_y, bb->offset_z + z }); + PaintAddImageAsChild(session, image_id, { 0, 0, z }, bb); } if (vehicle->num_peeps > 6) { peeps = ((ecx / 8) + 3) & 3; image_id = ImageId( baseImage_id + ((peeps + 1) * 72), vehicle->peep_tshirt_colours[6], vehicle->peep_tshirt_colours[7]); - PaintAddImageAsChild( - session, image_id, { 0, 0, z }, { bb->length_x, bb->length_y, bb->length_z }, - { bb->offset_x, bb->offset_y, bb->offset_z + z }); + PaintAddImageAsChild(session, image_id, { 0, 0, z }, bb); } } @@ -685,7 +677,7 @@ static void paint_river_rapids_track_waterfall( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex((SPR_RIVER_RAPIDS_WATERFALL_BASE_NE_FRAME_0 + frameNum)); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 4, 0, height }, { 24, 32, 11 } }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex((SPR_RIVER_RAPIDS_WATERFALL_TOP_NE_FRAME_0 + frameNum)); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 27 }, { 4, 0, height + 17 }); @@ -695,26 +687,33 @@ static void paint_river_rapids_track_waterfall( PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 32, 27 }, { 27, 0, height + 17 }); imageId = session.TrackColours[SCHEME_TRACK].WithIndex((SPR_RIVER_RAPIDS_WATERFALL_SIDE_SW_FRAME_0 + frameNum)); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 1, 32, 27 }, { 27, 0, height + 17 }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 27, 0, height + 17 }, { 1, 32, 27 } }); } else { imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction == 0 ? SPR_RIVER_RAPIDS_WATERFALL_SW_NE : SPR_RIVER_RAPIDS_WATERFALL_NE_SW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 11 }, { 0, 4, height }); + + auto bb = BoundBoxXYZ{ { 0, 4, height }, { 32, 24, 11 } }; + PaintAddImageAsParent(session, imageId, { 0, 0, height }, bb); imageId = session.TrackColours[SCHEME_TRACK].WithIndex((SPR_RIVER_RAPIDS_WATERFALL_BASE_NW_FRAME_0 + frameNum)); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 32, 24, 11 }, { 0, 4, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, bb); + + bb.offset = { 0, 4, height + 17 }; + bb.length = { 32, 1, 27 }; imageId = session.TrackColours[SCHEME_TRACK].WithIndex((SPR_RIVER_RAPIDS_WATERFALL_TOP_NW_FRAME_0 + frameNum)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 27 }, { 0, 4, height + 17 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, bb); + + bb.offset = { 0, 27, height + 17 }; imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction == 0 ? SPR_RIVER_RAPIDS_WATERFALL_FRONT_SW_NE : SPR_RIVER_RAPIDS_WATERFALL_FRONT_NE_SW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 1, 27 }, { 0, 27, height + 17 }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, bb); imageId = session.TrackColours[SCHEME_TRACK].WithIndex((SPR_RIVER_RAPIDS_WATERFALL_SIDE_SE_FRAME_0 + frameNum)); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 32, 1, 27 }, { 0, 27, height + 17 }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, bb); } WoodenASupportsPaintSetup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_SUPPORTS]); @@ -796,27 +795,37 @@ static void paint_river_rapids_track_whirlpool( { imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction == 1 ? SPR_RIVER_RAPIDS_FLAT_NW_SE : SPR_RIVER_RAPIDS_FLAT_SE_NW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height }); + + auto bb = BoundBoxXYZ{ { 4, 0, height }, { 24, 32, 11 } }; + PaintAddImageAsParent(session, imageId, { 0, 0, height }, bb); imageId = session.TrackColours[SCHEME_TRACK].WithIndex((SPR_RIVER_RAPIDS_RAPIDS_WHIRLPOOL_FRAME_0 + frameNum)); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 24, 32, 11 }, { 4, 0, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, bb); + + bb.offset = { 10, 10, height }; + bb.length = { 1, 2, 5 }; imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction == 1 ? SPR_RIVER_RAPIDS_FLAT_FRONT_NW_SE : SPR_RIVER_RAPIDS_FLAT_FRONT_SE_NW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 2, 5 }, { 10, 10, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, bb); } else { imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction == 0 ? SPR_RIVER_RAPIDS_FLAT_SW_NE : SPR_RIVER_RAPIDS_FLAT_NE_SW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 24, 11 }, { 0, 4, height }); + + auto bb = BoundBoxXYZ{ { 0, 4, height }, { 32, 24, 11 } }; + PaintAddImageAsParent(session, imageId, { 0, 0, height }, bb); imageId = session.TrackColours[SCHEME_TRACK].WithIndex((SPR_RIVER_RAPIDS_RAPIDS_WHIRLPOOL_FRAME_0 + frameNum)); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { 32, 24, 11 }, { 0, 4, height }); + PaintAddImageAsChild(session, imageId, { 0, 0, height }, bb); + + bb.offset = { 10, 10, height }; + bb.length = { 1, 2, 5 }; imageId = session.TrackColours[SCHEME_TRACK].WithIndex( (direction == 0 ? SPR_RIVER_RAPIDS_FLAT_FRONT_SW_NE : SPR_RIVER_RAPIDS_FLAT_FRONT_NE_SW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 1, 2, 5 }, { 10, 10, height }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, bb); } WoodenASupportsPaintSetup(session, (direction & 1), 0, height, session.TrackColours[SCHEME_SUPPORTS]);