From 6c233ac802bdbdd602af01f6d9eece8b225decb9 Mon Sep 17 00:00:00 2001 From: ZehMatt Date: Fri, 20 Aug 2021 20:59:32 +0300 Subject: [PATCH] Remove first overload of PaintAddImageAsParent --- src/openrct2/paint/Paint.cpp | 8 --- src/openrct2/paint/Paint.h | 3 -- src/openrct2/paint/Supports.cpp | 49 ++++++++++--------- .../paint/tile_element/Paint.Path.cpp | 2 +- .../paint/tile_element/Paint.Surface.cpp | 4 +- src/openrct2/ride/TrackPaint.cpp | 14 +++--- .../ride/coaster/JuniorRollerCoaster.cpp | 16 +++--- src/openrct2/ride/coaster/WildMouse.cpp | 13 +++-- src/openrct2/ride/coaster/WoodenWildMouse.cpp | 4 +- src/openrct2/ride/gentle/Dodgems.cpp | 2 +- src/openrct2/ride/thrill/MagicCarpet.cpp | 2 +- .../ride/thrill/SwingingInverterShip.cpp | 6 +-- src/openrct2/ride/thrill/SwingingShip.cpp | 24 ++++----- src/openrct2/ride/transport/Monorail.cpp | 12 ++--- src/openrct2/ride/water/LogFlume.cpp | 4 +- src/openrct2/ride/water/SplashBoats.cpp | 4 +- 16 files changed, 74 insertions(+), 93 deletions(-) diff --git a/src/openrct2/paint/Paint.cpp b/src/openrct2/paint/Paint.cpp index f4d9913b37..fdd116504f 100644 --- a/src/openrct2/paint/Paint.cpp +++ b/src/openrct2/paint/Paint.cpp @@ -727,14 +727,6 @@ paint_struct* PaintAddImageAsParent( return PaintAddImageAsParent(session, image_id, offset, boundBoxSize, offset); } -paint_struct* PaintAddImageAsParent( - paint_session* session, uint32_t image_id, int32_t x_offset, int32_t y_offset, int32_t bound_box_length_x, - int32_t bound_box_length_y, int32_t bound_box_length_z, int32_t z_offset) -{ - return PaintAddImageAsParent( - session, image_id, { x_offset, y_offset, z_offset }, { bound_box_length_x, bound_box_length_y, bound_box_length_z }); -} - /** * rct2: 0x00686806, 0x006869B2, 0x00686B6F, 0x00686D31, 0x0098197C * diff --git a/src/openrct2/paint/Paint.h b/src/openrct2/paint/Paint.h index 9fbd29d124..6f1c2554eb 100644 --- a/src/openrct2/paint/Paint.h +++ b/src/openrct2/paint/Paint.h @@ -267,9 +267,6 @@ extern bool gPaintBoundingBoxes; extern bool gPaintBlockedTiles; extern bool gPaintWidePathsAsGhost; -paint_struct* PaintAddImageAsParent( - paint_session* session, uint32_t image_id, int32_t x_offset, int32_t y_offset, int32_t bound_box_length_x, - int32_t bound_box_length_y, int32_t bound_box_length_z, int32_t z_offset); paint_struct* PaintAddImageAsParent( paint_session* session, uint32_t image_id, const CoordsXYZ& offset, const CoordsXYZ& boundBoxSize); paint_struct* PaintAddImageAsParent( diff --git a/src/openrct2/paint/Supports.cpp b/src/openrct2/paint/Supports.cpp index d42d93c05e..8f40666645 100644 --- a/src/openrct2/paint/Supports.cpp +++ b/src/openrct2/paint/Supports.cpp @@ -757,8 +757,8 @@ bool wooden_b_supports_paint_setup( if (baseHeight & 0x10 || heightSteps == 1 || baseHeight + 16 == session->WaterHeight) { PaintAddImageAsParent( - session, WoodenSupportImageIds[supportType].half | imageColourFlags, 0, 0, 32, 32, - ((heightSteps == 1) ? 7 : 12), baseHeight); + session, WoodenSupportImageIds[supportType].half | imageColourFlags, { 0, 0, baseHeight }, + { 32, 32, ((heightSteps == 1) ? 7 : 12) }); heightSteps -= 1; baseHeight += 16; _9E32B1 = true; @@ -766,8 +766,8 @@ bool wooden_b_supports_paint_setup( else { PaintAddImageAsParent( - session, WoodenSupportImageIds[supportType].full | imageColourFlags, 0, 0, 32, 32, - ((heightSteps == 2) ? 23 : 28), baseHeight); + session, WoodenSupportImageIds[supportType].full | imageColourFlags, { 0, 0, baseHeight }, + { 32, 32, ((heightSteps == 2) ? 23 : 28) }); heightSteps -= 2; baseHeight += 32; _9E32B1 = true; @@ -1082,8 +1082,9 @@ bool metal_b_supports_paint_setup( PaintAddImageAsParent( session, _metalSupportTypeToCrossbeamImages[supportType][ebp] | imageColourFlags, - SupportBoundBoxes[originalSegment].x + loc_97B052[ebp].x, SupportBoundBoxes[originalSegment].y + loc_97B052[ebp].y, - _97B062[ebp].x, _97B062[ebp].y, 1, baseHeight); + { SupportBoundBoxes[originalSegment].x + loc_97B052[ebp].x, + SupportBoundBoxes[originalSegment].y + loc_97B052[ebp].y, baseHeight }, + { _97B062[ebp].x, _97B062[ebp].y, 1 }); } int32_t si = baseHeight; @@ -1099,8 +1100,8 @@ bool metal_b_supports_paint_setup( uint32_t imageId = _97B15C[supportType].base_id + imageOffset; PaintAddImageAsParent( - session, imageId | imageColourFlags, SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, 0, 0, 5, - supportSegments[segment].height); + session, imageId | imageColourFlags, + { SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, supportSegments[segment].height }, { 0, 0, 5 }); baseHeight = supportSegments[segment].height + 6; } @@ -1115,8 +1116,8 @@ bool metal_b_supports_paint_setup( if (heightDiff > 0) { PaintAddImageAsParent( - session, (_97B15C[supportType].beam_id + (heightDiff - 1)) | imageColourFlags, SupportBoundBoxes[segment].x, - SupportBoundBoxes[segment].y, 0, 0, heightDiff - 1, baseHeight); + session, (_97B15C[supportType].beam_id + (heightDiff - 1)) | imageColourFlags, + { SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, baseHeight }, { 0, 0, heightDiff - 1 }); } baseHeight += heightDiff; @@ -1151,8 +1152,8 @@ bool metal_b_supports_paint_setup( } PaintAddImageAsParent( - session, imageId | imageColourFlags, SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, 0, 0, - beamLength - 1, baseHeight); + session, imageId | imageColourFlags, { SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, baseHeight }, + { 0, 0, beamLength - 1 }); baseHeight += beamLength; i++; @@ -1237,7 +1238,8 @@ bool path_a_supports_paint_setup( if (session->Support.slope & 0x20) { // save dx2 - PaintAddImageAsParent(session, (railingEntry->bridge_image + 48) | imageColourFlags, 0, 0, 32, 32, 0, baseHeight - 2); + PaintAddImageAsParent( + session, (railingEntry->bridge_image + 48) | imageColourFlags, { 0, 0, baseHeight - 2 }, { 32, 32, 0 }); hasSupports = true; } else if (session->Support.slope & 0x10) @@ -1287,7 +1289,8 @@ bool path_a_supports_paint_setup( { uint32_t imageId = (supportType * 24) + railingEntry->bridge_image + 23; - PaintAddImageAsParent(session, imageId | imageColourFlags, 0, 0, 32, 32, ((heightSteps == 1) ? 7 : 12), baseHeight); + PaintAddImageAsParent( + session, imageId | imageColourFlags, { 0, 0, baseHeight }, { 32, 32, ((heightSteps == 1) ? 7 : 12) }); heightSteps -= 1; baseHeight += 16; hasSupports = true; @@ -1297,7 +1300,7 @@ bool path_a_supports_paint_setup( uint32_t imageId = (supportType * 24) + railingEntry->bridge_image + 22; PaintAddImageAsParent( - session, imageId | imageColourFlags, 0, 0, 32, 32, ((heightSteps == 2) ? 23 : 28), baseHeight); + session, imageId | imageColourFlags, { 0, 0, baseHeight }, { 32, 32, ((heightSteps == 2) ? 23 : 28) }); heightSteps -= 2; baseHeight += 32; hasSupports = true; @@ -1385,8 +1388,8 @@ bool path_b_supports_paint_setup( baseHeight = supportSegments[segment].height; PaintAddImageAsParent( - session, (railingEntry->bridge_image + 37 + imageOffset) | imageColourFlags, SupportBoundBoxes[segment].x, - SupportBoundBoxes[segment].y, 0, 0, 5, baseHeight); + session, (railingEntry->bridge_image + 37 + imageOffset) | imageColourFlags, + { SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, baseHeight }, { 0, 0, 5 }); baseHeight += 6; } @@ -1404,8 +1407,8 @@ bool path_b_supports_paint_setup( if (heightDiff > 0) { PaintAddImageAsParent( - session, (railingEntry->bridge_image + 20 + (heightDiff - 1)) | imageColourFlags, SupportBoundBoxes[segment].x, - SupportBoundBoxes[segment].y, 0, 0, heightDiff - 1, baseHeight); + session, (railingEntry->bridge_image + 20 + (heightDiff - 1)) | imageColourFlags, + { SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, baseHeight }, { 0, 0, heightDiff - 1 }); } baseHeight += heightDiff; @@ -1437,8 +1440,8 @@ bool path_b_supports_paint_setup( } PaintAddImageAsParent( - session, (railingEntry->bridge_image + 20 + (z - 1)) | imageColourFlags, SupportBoundBoxes[segment].x, - SupportBoundBoxes[segment].y, 0, 0, (z - 1), baseHeight); + session, (railingEntry->bridge_image + 20 + (z - 1)) | imageColourFlags, + { SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, baseHeight }, { 0, 0, (z - 1) }); baseHeight += z; } @@ -1455,8 +1458,8 @@ bool path_b_supports_paint_setup( } PaintAddImageAsParent( - session, imageId | imageColourFlags, SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, 0, 0, (z - 1), - baseHeight); + session, imageId | imageColourFlags, { SupportBoundBoxes[segment].x, SupportBoundBoxes[segment].y, baseHeight }, + { 0, 0, (z - 1) }); baseHeight += z; } diff --git a/src/openrct2/paint/tile_element/Paint.Path.cpp b/src/openrct2/paint/tile_element/Paint.Path.cpp index 1ce3286ba4..7a4c00666a 100644 --- a/src/openrct2/paint/tile_element/Paint.Path.cpp +++ b/src/openrct2/paint/tile_element/Paint.Path.cpp @@ -928,7 +928,7 @@ void PaintPath(paint_session* session, uint16_t height, const PathElement& tileE } PaintAddImageAsParent( - session, imageId | patrolColour << 19 | IMAGE_TYPE_REMAP, 16, 16, 1, 1, 0, patrolAreaBaseZ + 2); + session, imageId | patrolColour << 19 | IMAGE_TYPE_REMAP, { 16, 16, patrolAreaBaseZ + 2 }, { 1, 1, 0 }); } } diff --git a/src/openrct2/paint/tile_element/Paint.Surface.cpp b/src/openrct2/paint/tile_element/Paint.Surface.cpp index ee89107d53..fb6f601787 100644 --- a/src/openrct2/paint/tile_element/Paint.Surface.cpp +++ b/src/openrct2/paint/tile_element/Paint.Surface.cpp @@ -1037,7 +1037,7 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co image_id += get_height_marker_offset(); image_id -= gMapBaseZ; - PaintAddImageAsParent(session, image_id, 16, 16, 1, 1, 0, height); + PaintAddImageAsParent(session, image_id, { 16, 16, height }, { 1, 1, 0 }); } bool has_surface = false; @@ -1137,7 +1137,7 @@ void PaintSurface(paint_session* session, uint8_t direction, uint16_t height, co { if ((spawn.x & 0xFFE0) == pos.x && (spawn.y & 0xFFE0) == pos.y) { - PaintAddImageAsParent(session, SPR_TERRAIN_SELECTION_SQUARE_SIMPLE, 0, 0, 32, 32, 16, spawn.z); + PaintAddImageAsParent(session, SPR_TERRAIN_SELECTION_SQUARE_SIMPLE, { 0, 0, spawn.z }, { 32, 32, 16 }); const int32_t offset = (direction_reverse(spawn.direction) + rotation) & 3; const uint32_t image_id = (PEEP_SPAWN_ARROW_0 + offset) | 0x20380000; diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index bde96b1845..77389bf673 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -1501,10 +1501,9 @@ void track_paint_util_right_quarter_turn_5_tiles_paint_3( } const sprite_bb* spriteBB = &sprites[direction][sprite]; - uint32_t imageId = spriteBB->sprite_id | colourFlags; - PaintAddImageAsParent( - session, imageId, static_cast(spriteBB->offset.x), static_cast(spriteBB->offset.y), spriteBB->bb_size.x, - spriteBB->bb_size.y, static_cast(spriteBB->bb_size.z), height + spriteBB->offset.z); + const uint32_t imageId = spriteBB->sprite_id | colourFlags; + const auto& offset = spriteBB->offset; + PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height + offset.z }, spriteBB->bb_size); } void track_paint_util_right_quarter_turn_5_tiles_tunnel( @@ -1772,10 +1771,9 @@ void track_paint_util_right_quarter_turn_3_tiles_paint_4( } const sprite_bb* spriteBB = &sprites[direction][sprite]; - uint32_t imageId = spriteBB->sprite_id | colourFlags; - PaintAddImageAsParent( - session, imageId, static_cast(spriteBB->offset.x), static_cast(spriteBB->offset.y), spriteBB->bb_size.x, - spriteBB->bb_size.y, static_cast(spriteBB->bb_size.z), height + spriteBB->offset.z); + const uint32_t imageId = spriteBB->sprite_id | colourFlags; + const auto& offset = spriteBB->offset; + PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height + offset.z }, spriteBB->bb_size); } void track_paint_util_right_quarter_turn_3_tiles_tunnel( diff --git a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp index 9f86c51f2d..3b21211da5 100644 --- a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp @@ -2732,13 +2732,11 @@ static void junior_rc_s_bend_left_paint_setup( CoordsXY bounds = boundsList[trackSequence]; if (direction == 0 || direction == 2) { - PaintAddImageAsParent( - session, imageId, static_cast(offset.x), static_cast(offset.y), bounds.x, bounds.y, 1, height); + PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height }, { bounds.x, bounds.y, 1 }); } else { - PaintAddImageAsParent( - session, imageId, static_cast(offset.y), static_cast(offset.x), bounds.y, bounds.x, 1, height); + PaintAddImageAsParent(session, imageId, { offset.y, offset.x, height }, { bounds.y, bounds.x, 1 }); } if (direction == 0 || direction == 2) @@ -2838,13 +2836,11 @@ static void junior_rc_s_bend_right_paint_setup( CoordsXY bounds = boundsList[trackSequence]; if (direction == 0 || direction == 2) { - PaintAddImageAsParent( - session, imageId, static_cast(offset.x), static_cast(offset.y), bounds.x, bounds.y, 1, height); + PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height }, { bounds.x, bounds.y, 1 }); } else { - PaintAddImageAsParent( - session, imageId, static_cast(offset.y), static_cast(offset.x), bounds.y, bounds.x, 1, height); + PaintAddImageAsParent(session, imageId, { offset.y, offset.x, height }, { bounds.y, bounds.x, 1 }); } if (direction == 0 || direction == 2) @@ -5643,14 +5639,14 @@ static void junior_rc_booster_paint_setup( if (direction & 1) { PaintAddImageAsParent( - session, SPR_JUNIOR_RC_BOOSTER_NE_SW | session->TrackColours[SCHEME_TRACK], 0, 0, 20, 32, 1, height); + session, SPR_JUNIOR_RC_BOOSTER_NE_SW | session->TrackColours[SCHEME_TRACK], { 0, 0, height }, { 20, 32, 1 }); paint_util_push_tunnel_right(session, height, TUNNEL_0); } else { PaintAddImageAsParent( - session, SPR_JUNIOR_RC_BOOSTER_NW_SE | session->TrackColours[SCHEME_TRACK], 0, 0, 32, 20, 1, height); + session, SPR_JUNIOR_RC_BOOSTER_NW_SE | session->TrackColours[SCHEME_TRACK], { 0, 0, height }, { 32, 20, 1 }); paint_util_push_tunnel_left(session, height, TUNNEL_0); } diff --git a/src/openrct2/ride/coaster/WildMouse.cpp b/src/openrct2/ride/coaster/WildMouse.cpp index 2549271f94..5f92eb6482 100644 --- a/src/openrct2/ride/coaster/WildMouse.cpp +++ b/src/openrct2/ride/coaster/WildMouse.cpp @@ -591,10 +591,10 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_down( { int32_t part = trackSequence == 0 ? 0 : 1; const sprite_bb* sbb = &imageIds[direction][part]; + const auto& offset = sbb->offset; PaintAddImageAsParent( - session, sbb->sprite_id | session->TrackColours[SCHEME_TRACK], static_cast(sbb->offset.x), - static_cast(sbb->offset.y), sbb->bb_size.x, sbb->bb_size.y, static_cast(sbb->bb_size.z), - height + static_cast(sbb->offset.z)); + session, sbb->sprite_id | session->TrackColours[SCHEME_TRACK], { offset.x, offset.y, height + offset.z }, + sbb->bb_size); } track_paint_util_right_quarter_turn_3_tiles_25_deg_down_tunnel( @@ -660,9 +660,8 @@ static void wild_mouse_track_right_quarter_turn_3_25_deg_up( int32_t part = trackSequence == 0 ? 0 : 1; const sprite_bb* sbb = &imageIds[direction][part]; PaintAddImageAsParent( - session, sbb->sprite_id | session->TrackColours[SCHEME_TRACK], static_cast(sbb->offset.x), - static_cast(sbb->offset.y), sbb->bb_size.x, sbb->bb_size.y, static_cast(sbb->bb_size.z), - height + static_cast(sbb->offset.z)); + session, sbb->sprite_id | session->TrackColours[SCHEME_TRACK], + { sbb->offset.x, sbb->offset.y, height + sbb->offset.z }, sbb->bb_size); } track_paint_util_right_quarter_turn_3_tiles_25_deg_up_tunnel(session, height, direction, trackSequence, TUNNEL_1, TUNNEL_2); @@ -736,7 +735,7 @@ static void wild_mouse_track_left_quarter_turn_1( PaintAddImageAsParent(session, imageId, 0, 0, 26, 24, 2, height, 6, 2, height); break; case 1: - PaintAddImageAsParent(session, imageId, 0, 0, 26, 26, 2, height); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 26, 2 }); break; case 2: PaintAddImageAsParent(session, imageId, 0, 0, 24, 26, 2, height, 2, 6, height); diff --git a/src/openrct2/ride/coaster/WoodenWildMouse.cpp b/src/openrct2/ride/coaster/WoodenWildMouse.cpp index dc54c46659..9887a15241 100644 --- a/src/openrct2/ride/coaster/WoodenWildMouse.cpp +++ b/src/openrct2/ride/coaster/WoodenWildMouse.cpp @@ -573,13 +573,13 @@ static void wooden_wild_mouse_track_left_quarter_turn_1( PaintAddImageAsParent(session, imageId, 6, 0, 26, 24, 1, height, 6, 2, height); break; case 1: - PaintAddImageAsParent(session, imageId, 0, 0, 26, 26, 1, height); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 26, 26, 1 }); break; case 2: PaintAddImageAsParent(session, imageId, 0, 6, 24, 26, 1, height, 2, 6, height); break; case 3: - PaintAddImageAsParent(session, imageId, 6, 6, 24, 24, 1, height); + PaintAddImageAsParent(session, imageId, { 6, 6, height }, { 24, 24, 1 }); break; } wooden_a_supports_paint_setup(session, supportType[direction], 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr); diff --git a/src/openrct2/ride/gentle/Dodgems.cpp b/src/openrct2/ride/gentle/Dodgems.cpp index 1860010dbe..024dd0c15f 100644 --- a/src/openrct2/ride/gentle/Dodgems.cpp +++ b/src/openrct2/ride/gentle/Dodgems.cpp @@ -31,7 +31,7 @@ static constexpr const uint32_t dodgems_fence_sprites[] = { SPR_DODGEMS_FENCE_TO static void paint_dodgems_roof(paint_session* session, int32_t height, int32_t offset) { uint32_t image_id = (SPR_DODGEMS_ROOF_FRAME + offset) | session->TrackColours[SCHEME_TRACK]; - PaintAddImageAsParent(session, image_id, 0, 0, 32, 32, 2, height); + PaintAddImageAsParent(session, image_id, { 0, 0, height }, { 32, 32, 2 }); image_id = (SPR_DODGEMS_ROOF_GLASS + offset) | (EnumValue(FilterPaletteID::PaletteDarken3) << 19) | IMAGE_TYPE_TRANSPARENT; PaintAttachToPreviousPS(session, image_id, 0, 0); diff --git a/src/openrct2/ride/thrill/MagicCarpet.cpp b/src/openrct2/ride/thrill/MagicCarpet.cpp index 3e717b963d..2504d31723 100644 --- a/src/openrct2/ride/thrill/MagicCarpet.cpp +++ b/src/openrct2/ride/thrill/MagicCarpet.cpp @@ -241,7 +241,7 @@ static void paint_magic_carpet( } uint32_t imageId = SPR_STATION_BASE_D | session->TrackColours[SCHEME_SUPPORTS]; - PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); break; } diff --git a/src/openrct2/ride/thrill/SwingingInverterShip.cpp b/src/openrct2/ride/thrill/SwingingInverterShip.cpp index 7e543f57b0..e8ef655a0d 100644 --- a/src/openrct2/ride/thrill/SwingingInverterShip.cpp +++ b/src/openrct2/ride/thrill/SwingingInverterShip.cpp @@ -143,17 +143,17 @@ static void paint_swinging_inverter_ship( } imageId = SPR_STATION_BASE_D | session->TrackColours[SCHEME_SUPPORTS]; - PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); switch (direction) { case 0: imageId = SPR_STATION_PLATFORM_SW_NE | session->TrackColours[SCHEME_TRACK]; - PaintAddImageAsParent(session, imageId, 0, 24, 32, 8, 1, height + 9); + PaintAddImageAsParent(session, imageId, { 0, 24, height + 9 }, { 32, 8, 1 }); break; case 1: imageId = SPR_STATION_PLATFORM_NW_SE | session->TrackColours[SCHEME_TRACK]; - PaintAddImageAsParent(session, imageId, 24, 0, 8, 32, 1, height + 9); + PaintAddImageAsParent(session, imageId, { 24, 0, height + 9 }, { 8, 32, 1 }); break; case 2: imageId = SPR_STATION_PLATFORM_SW_NE | session->TrackColours[SCHEME_TRACK]; diff --git a/src/openrct2/ride/thrill/SwingingShip.cpp b/src/openrct2/ride/thrill/SwingingShip.cpp index 94d0a48909..ebc1cb3a7c 100644 --- a/src/openrct2/ride/thrill/SwingingShip.cpp +++ b/src/openrct2/ride/thrill/SwingingShip.cpp @@ -194,7 +194,7 @@ static void paint_swinging_ship( metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 7, 0, height, session->TrackColours[SCHEME_SUPPORTS]); imageId = SPR_STATION_BASE_A_NW_SE | session->TrackColours[SCHEME_SUPPORTS]; - PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); } else { @@ -202,7 +202,7 @@ static void paint_swinging_ship( metal_a_supports_paint_setup(session, METAL_SUPPORTS_TUBES, 8, 0, height, session->TrackColours[SCHEME_SUPPORTS]); imageId = SPR_STATION_BASE_A_SW_NE | session->TrackColours[SCHEME_SUPPORTS]; - PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); } paint_util_set_segment_support_height(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -226,7 +226,7 @@ static void paint_swinging_ship( imageId = (relativeTrackSequence == 2 ? SPR_STATION_PLATFORM_BEGIN_NW_SE : SPR_STATION_PLATFORM_NW_SE) | session->TrackColours[SCHEME_TRACK]; - PaintAddImageAsParent(session, imageId, 24, 0, 8, 32, 1, height + 9); + PaintAddImageAsParent(session, imageId, { 24, 0, height + 9 }, { 8, 32, 1 }); hasFence = track_paint_util_has_fence(EDGE_SW, session->MapPosition, trackElement, ride, session->CurrentRotation); if (relativeTrackSequence == 3) @@ -234,21 +234,21 @@ static void paint_swinging_ship( if (hasFence) { imageId = SPR_STATION_BEGIN_ANGLE_FENCE_NW_SE | session->TrackColours[SCHEME_TRACK]; - PaintAddImageAsParent(session, imageId, 31, 0, 1, 32, 7, height + 11); + PaintAddImageAsParent(session, imageId, { 31, 0, height + 11 }, { 1, 32, 7 }); } else { imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_TRACK]; - PaintAddImageAsParent(session, imageId, 23, 31, 8, 1, 7, height + 11); + PaintAddImageAsParent(session, imageId, { 23, 31, height + 11 }, { 8, 1, 7 }); } imageId = SPR_STATION_FENCE_SMALL_SW_NE | session->TrackColours[SCHEME_TRACK]; - PaintAddImageAsParent(session, imageId, 0, 31, 8, 1, 7, height + 11); + PaintAddImageAsParent(session, imageId, { 0, 31, height + 11 }, { 8, 1, 7 }); } else if (hasFence) { imageId = SPR_STATION_FENCE_NW_SE | session->TrackColours[SCHEME_TRACK]; - PaintAddImageAsParent(session, imageId, 31, 0, 1, 32, 7, height + 11); + PaintAddImageAsParent(session, imageId, { 31, 0, height + 11 }, { 1, 32, 7 }); } } } @@ -271,7 +271,7 @@ static void paint_swinging_ship( imageId = (relativeTrackSequence == 2 ? SPR_STATION_PLATFORM_BEGIN_SW_NE : SPR_STATION_PLATFORM_SW_NE) | session->TrackColours[SCHEME_TRACK]; - PaintAddImageAsParent(session, imageId, 0, 24, 32, 8, 1, height + 9); + PaintAddImageAsParent(session, imageId, { 0, 24, height + 9 }, { 32, 8, 1 }); hasFence = track_paint_util_has_fence(EDGE_SE, session->MapPosition, trackElement, ride, session->CurrentRotation); if (relativeTrackSequence == 3) @@ -279,21 +279,21 @@ static void paint_swinging_ship( if (hasFence) { imageId = SPR_STATION_BEGIN_ANGLE_FENCE_SW_NE | session->TrackColours[SCHEME_TRACK]; - PaintAddImageAsParent(session, imageId, 0, 31, 32, 1, 7, height + 11); + PaintAddImageAsParent(session, imageId, { 0, 31, height + 11 }, { 32, 1, 7 }); } else { imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_TRACK]; - PaintAddImageAsParent(session, imageId, 31, 23, 1, 8, 7, height + 11); + PaintAddImageAsParent(session, imageId, { 31, 23, height + 11 }, { 1, 8, 7 }); } imageId = SPR_STATION_FENCE_SMALL_NW_SE | session->TrackColours[SCHEME_TRACK]; - PaintAddImageAsParent(session, imageId, 31, 0, 1, 8, 7, height + 11); + PaintAddImageAsParent(session, imageId, { 31, 0, height + 11 }, { 1, 8, 7 }); } else if (hasFence) { imageId = SPR_STATION_FENCE_SW_NE | session->TrackColours[SCHEME_TRACK]; - PaintAddImageAsParent(session, imageId, 0, 31, 32, 1, 7, height + 11); + PaintAddImageAsParent(session, imageId, { 0, 31, height + 11 }, { 32, 1, 7 }); } } } diff --git a/src/openrct2/ride/transport/Monorail.cpp b/src/openrct2/ride/transport/Monorail.cpp index 27c1e858b3..ab49c14d16 100644 --- a/src/openrct2/ride/transport/Monorail.cpp +++ b/src/openrct2/ride/transport/Monorail.cpp @@ -765,13 +765,11 @@ static void paint_monorail_track_s_bend_left( CoordsXY bounds = boundsList[trackSequence]; if (direction == 0 || direction == 2) { - PaintAddImageAsParent( - session, imageId, static_cast(offset.x), static_cast(offset.y), bounds.x, bounds.y, 3, height); + PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height }, { bounds.x, bounds.y, 3 }); } else { - PaintAddImageAsParent( - session, imageId, static_cast(offset.y), static_cast(offset.x), bounds.y, bounds.x, 3, height); + PaintAddImageAsParent(session, imageId, { offset.y, offset.x, height }, { bounds.y, bounds.x, 3 }); } if (direction == 0 || direction == 2) @@ -871,13 +869,11 @@ static void paint_monorail_track_s_bend_right( CoordsXY bounds = boundsList[trackSequence]; if (direction == 0 || direction == 2) { - PaintAddImageAsParent( - session, imageId, static_cast(offset.x), static_cast(offset.y), bounds.x, bounds.y, 3, height); + PaintAddImageAsParent(session, imageId, { offset.x, offset.y, height }, { bounds.x, bounds.y, 3 }); } else { - PaintAddImageAsParent( - session, imageId, static_cast(offset.y), static_cast(offset.x), bounds.y, bounds.x, 3, height); + PaintAddImageAsParent(session, imageId, { offset.y, offset.x, height }, { bounds.y, bounds.x, 3 }); } if (direction == 0 || direction == 2) diff --git a/src/openrct2/ride/water/LogFlume.cpp b/src/openrct2/ride/water/LogFlume.cpp index 0d73303c22..94130ba46f 100644 --- a/src/openrct2/ride/water/LogFlume.cpp +++ b/src/openrct2/ride/water/LogFlume.cpp @@ -196,7 +196,7 @@ static void paint_log_flume_track_station( { imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC]; } - PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); if (direction & 1) { @@ -755,7 +755,7 @@ static void paint_log_flume_track_on_ride_photo( const TrackElement& trackElement) { uint32_t imageId = SPR_STATION_BASE_D | IMAGE_TYPE_REMAP; - PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); if (direction & 1) { diff --git a/src/openrct2/ride/water/SplashBoats.cpp b/src/openrct2/ride/water/SplashBoats.cpp index e85581cb5d..fae611eba4 100644 --- a/src/openrct2/ride/water/SplashBoats.cpp +++ b/src/openrct2/ride/water/SplashBoats.cpp @@ -793,7 +793,7 @@ static void paint_splash_boats_station( PaintAddImageAsParent(session, imageId, 0, 0, 20, 32, 1, height, 6, 0, height + 3); imageId = SPR_STATION_BASE_B_NW_SE | session->TrackColours[SCHEME_MISC]; - PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); } else { @@ -802,7 +802,7 @@ static void paint_splash_boats_station( PaintAddImageAsParent(session, imageId, 0, 0, 32, 20, 1, height, 0, 6, height + 3); imageId = SPR_STATION_BASE_B_SW_NE | session->TrackColours[SCHEME_MISC]; - PaintAddImageAsParent(session, imageId, 0, 0, 32, 32, 1, height); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); } wooden_a_supports_paint_setup(session, (direction & 1), 0, height, session->TrackColours[SCHEME_SUPPORTS], nullptr);