From d61a749b70db3d54b43580e9f96dc5aa6311125e Mon Sep 17 00:00:00 2001 From: frutiemax Date: Thu, 20 Aug 2020 22:14:56 -0400 Subject: [PATCH] Use CoordsXYZ for sub_98199C in MiniatureRailway.cpp (#12723) --- .../ride/transport/MiniatureRailway.cpp | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/openrct2/ride/transport/MiniatureRailway.cpp b/src/openrct2/ride/transport/MiniatureRailway.cpp index edb9e33512..892be6a26f 100644 --- a/src/openrct2/ride/transport/MiniatureRailway.cpp +++ b/src/openrct2/ride/transport/MiniatureRailway.cpp @@ -949,9 +949,7 @@ static void paint_miniature_railway_track_right_quarter_turn_5_tiles( CoordsXY boundsLength = miniature_railway_right_quarter_turn_5_tiles_bound_lengths[direction][index]; CoordsXYZ boundsOffset = CoordsXYZ(offset, 0); - sub_98199C( - session, imageId, static_cast(offset.x), static_cast(offset.y), boundsLength.x, boundsLength.y, - 2, height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z); + sub_98199C(session, imageId, { offset, height }, { boundsLength, 2 }, boundsOffset + CoordsXYZ{ 0, 0, height }); } } if (direction == 0 && trackSequence == 0) @@ -1305,9 +1303,7 @@ static void paint_miniature_railway_track_right_quarter_turn_3_tiles( CoordsXY boundsLength = defaultRightQuarterTurn3TilesBoundLengths[direction][index]; CoordsXYZ boundsOffset(offset, 0); - sub_98199C( - session, imageId, static_cast(offset.x), static_cast(offset.y), boundsLength.x, boundsLength.y, 3, - height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z); + sub_98199C(session, imageId, { offset, height }, { boundsLength, 3 }, boundsOffset + CoordsXYZ{ 0, 0, height }); } track_paint_util_right_quarter_turn_3_tiles_tunnel(session, height, direction, trackSequence, TUNNEL_SQUARE_FLAT); @@ -1461,8 +1457,7 @@ static void paint_miniature_railway_track_left_eighth_to_diag( imageId = miniature_railway_track_pieces_left_eight_to_diag[direction][index] | session->TrackColours[SCHEME_TRACK]; offset = miniature_railway_track_pieces_left_eight_to_diag_offset[direction][index]; bounds = miniature_railway_track_pieces_left_eight_to_diag_bounds[direction][index]; - sub_98199C( - session, imageId, 0, 0, bounds.x, bounds.y, static_cast(bounds.z), height, offset.x, offset.y, height); + sub_98199C(session, imageId, { 0, 0, height }, bounds, { offset, height }); } } @@ -1603,8 +1598,7 @@ static void paint_miniature_railway_track_right_eighth_to_diag( | session->TrackColours[SCHEME_TRACK]; offset = miniature_railway_track_pieces_right_eight_to_diag_offset[direction][index]; bounds = miniature_railway_track_pieces_right_eight_to_diag_bounds[direction][index]; - sub_98199C( - session, imageId, 0, 0, bounds.x, bounds.y, static_cast(bounds.z), height, offset.x, offset.y, height); + sub_98199C(session, imageId, { 0, 0, height }, bounds, { offset, height }); } } @@ -1717,7 +1711,9 @@ static void miniature_railway_track_diag_flat( (drawRail ? 2 : 0), height, floorBoundOffset.x, floorBoundOffset.y, height); if (drawRail) { - sub_98199C(session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16, height); + sub_98199C( + session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 }, + { -16, -16, height }); } } else if (drawRail) @@ -1811,8 +1807,8 @@ static void miniature_railway_track_diag_25_deg_up( if (drawRail) { sub_98199C( - session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16, - height + offsetB[direction]); + session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 }, + { -16, -16, height + offsetB[direction] }); } } else if (drawRail) @@ -1862,7 +1858,9 @@ static void miniature_railway_track_diag_flat_to_25_deg_up( (drawRail ? 2 : 0), height, floorBoundOffset.x, floorBoundOffset.y, height); if (drawRail) { - sub_98199C(session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16, height); + sub_98199C( + session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 }, + { -16, -16, height }); } } else if (drawRail) @@ -1935,8 +1933,8 @@ static void miniature_railway_track_diag_25_deg_up_to_flat( if (drawRail) { sub_98199C( - session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16, - height + railOffsets[direction]); + session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 }, + { -16, -16, height + railOffsets[direction] }); } } else if (drawRail) @@ -2010,8 +2008,8 @@ static void miniature_railway_track_diag_25_deg_down( if (drawRail) { sub_98199C( - session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16, - height + railOffsets[direction]); + session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 }, + { -16, -16, height + railOffsets[direction] }); } } else if (drawRail) @@ -2084,8 +2082,8 @@ static void miniature_railway_track_diag_flat_to_25_deg_down( if (drawRail) { sub_98199C( - session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16, - height + railOffsets[direction]); + session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 }, + { -16, -16, height + railOffsets[direction] }); } } else if (drawRail) @@ -2133,7 +2131,9 @@ static void miniature_railway_track_diag_25_deg_down_to_flat( (drawRail ? 2 : 0), height, floorBoundOffset.x, floorBoundOffset.y, height); if (drawRail) { - sub_98199C(session, imageId | session->TrackColours[SCHEME_TRACK], -16, -16, 32, 32, 2, height, -16, -16, height); + sub_98199C( + session, imageId | session->TrackColours[SCHEME_TRACK], { -16, -16, height }, { 32, 32, 2 }, + { -16, -16, height }); } } else if (drawRail)