mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-27 00:34:46 +01:00
Use CoordsXYZ for sub_98199C in MiniatureRailway.cpp (#12723)
This commit is contained in:
@@ -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<int8_t>(offset.x), static_cast<int8_t>(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<int8_t>(offset.x), static_cast<int8_t>(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<int8_t>(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<int8_t>(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)
|
||||
|
||||
Reference in New Issue
Block a user