Clean up PaintAddImageAsChildRotated() (#19394)

This commit is contained in:
Michael Steenbeek 2023-02-14 09:13:56 +01:00 committed by GitHub
parent 4f00fbcea2
commit bd84d626c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 1849 additions and 1843 deletions

View File

@ -322,7 +322,7 @@ PaintStruct* PaintAddImageAsChild(
PaintStruct* PaintAddImageAsChildRotated(
PaintSession& session, const uint8_t direction, const ImageId image_id, const CoordsXYZ& offset,
const CoordsXYZ& boundBoxSize, const CoordsXYZ& boundBoxOffset);
const BoundBoxXYZ& boundBox);
PaintStruct* PaintAddImageAsParentRotated(
PaintSession& session, const uint8_t direction, const ImageId imageId, const CoordsXYZ& offset,

View File

@ -27,16 +27,17 @@ PaintStruct* PaintAddImageAsParentRotated(
PaintStruct* PaintAddImageAsChildRotated(
PaintSession& session, const uint8_t direction, const ImageId image_id, const CoordsXYZ& offset,
const CoordsXYZ& boundBoxSize, const CoordsXYZ& boundBoxOffset)
const BoundBoxXYZ& boundBox)
{
if (direction & 1)
{
return PaintAddImageAsChild(
session, image_id, { offset.y, offset.x, offset.z },
{ { boundBoxOffset.y, boundBoxOffset.x, boundBoxOffset.z }, { boundBoxSize.y, boundBoxSize.x, boundBoxSize.z } });
{ { boundBox.offset.y, boundBox.offset.x, boundBox.offset.z },
{ boundBox.length.y, boundBox.length.x, boundBox.length.z } });
}
return PaintAddImageAsChild(session, image_id, offset, { boundBoxOffset, boundBoxSize });
return PaintAddImageAsChild(session, image_id, offset, boundBox);
}
void PaintUtilPushTunnelRotated(PaintSession& session, uint8_t direction, uint16_t height, uint8_t type)

View File

@ -214,7 +214,7 @@ static void AirPoweredVerticalRCTrackStation(
{ { 0, 2, height }, { 32, 28, 1 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height },
{ 32, 20, 1 }, { 0, 6, height });
{ { 0, 6, height }, { 32, 20, 1 } });
WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
@ -660,7 +660,7 @@ static void AirPoweredVerticalRCTrackVerticalSlopeUp(
PaintAddImageAsParentRotated(
session, direction, supportsImageId, { 0, 0, height }, { { 0, 6, height }, { 20, 32, bbHeight } });
PaintAddImageAsChildRotated(
session, direction, trackImageId, { 0, 0, height }, { 20, 32, bbHeight }, { 0, 6, height });
session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height }, { 20, 32, bbHeight } });
WoodenASupportsPaintSetup(session, 0, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
@ -679,7 +679,7 @@ static void AirPoweredVerticalRCTrackVerticalSlopeUp(
PaintAddImageAsParentRotated(
session, direction, supportsImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } });
PaintAddImageAsChildRotated(
session, direction, trackImageId, { 0, 0, height }, { 32, 20, bbHeight }, { 0, 6, height });
session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } });
}
else
{
@ -687,7 +687,7 @@ static void AirPoweredVerticalRCTrackVerticalSlopeUp(
PaintAddImageAsParentRotated(
session, direction, supportsImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } });
PaintAddImageAsChildRotated(
session, direction, trackImageId, { 0, 0, height }, { 32, 20, bbHeight }, { 0, 6, height });
session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } });
}
WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
@ -707,7 +707,7 @@ static void AirPoweredVerticalRCTrackVerticalSlopeUp(
PaintAddImageAsParentRotated(
session, direction, supportsImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } });
PaintAddImageAsChildRotated(
session, direction, trackImageId, { 0, 0, height }, { 32, 20, bbHeight }, { 0, 6, height });
session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } });
}
else
{
@ -715,7 +715,7 @@ static void AirPoweredVerticalRCTrackVerticalSlopeUp(
PaintAddImageAsParentRotated(
session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } });
PaintAddImageAsChildRotated(
session, direction, supportsImageId, { 0, 0, height }, { 32, 20, bbHeight }, { 0, 6, height });
session, direction, supportsImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } });
}
WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
@ -736,7 +736,7 @@ static void AirPoweredVerticalRCTrackVerticalSlopeUp(
}
PaintAddImageAsParent(session, floorImageId, { 0, 0, height }, { { 3, 3, height }, { 26, 26, 126 } });
PaintAddImageAsChildRotated(
session, direction, supportsImageId, { 0, 0, height }, { 26, 26, 126 }, { 3, 3, height });
session, direction, supportsImageId, { 0, 0, height }, { { 3, 3, height }, { 26, 26, 126 } });
}
else
{
@ -752,14 +752,14 @@ static void AirPoweredVerticalRCTrackVerticalSlopeUp(
PaintAddImageAsParentRotated(
session, direction, supportsImageId, { 0, 0, height }, { { 0, 6, height + 128 }, { 5, 20, 79 } });
PaintAddImageAsChildRotated(
session, direction, trackImageId, { 0, 0, height }, { 5, 20, 79 }, { 0, 6, height + 128 });
session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height + 128 }, { 5, 20, 79 } });
}
else
{
PaintAddImageAsParentRotated(
session, direction, trackImageId, { 0, 0, height }, { { 27, 6, height }, { 1, 20, 126 } });
PaintAddImageAsChildRotated(
session, direction, supportsImageId, { 0, 0, height }, { 1, 20, 126 }, { 27, 6, height });
session, direction, supportsImageId, { 0, 0, height }, { { 27, 6, height }, { 1, 20, 126 } });
}
WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
@ -849,13 +849,15 @@ static void AirPoweredVerticalRCTrackVerticalTop(
{
PaintAddImageAsParentRotated(
session, direction, imageIdS, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 15 } });
PaintAddImageAsChildRotated(session, direction, imageIdT, { 0, 0, height }, { 31, 20, 15 }, { 1, 6, height });
PaintAddImageAsChildRotated(
session, direction, imageIdT, { 0, 0, height }, { { 1, 6, height }, { 31, 20, 15 } });
}
else
{
PaintAddImageAsParentRotated(
session, direction, imageIdS, { 0, 0, height }, { { 24, 6, height }, { 5, 20, 1 } });
PaintAddImageAsChildRotated(session, direction, imageIdT, { 0, 0, height }, { 5, 20, 1 }, { 24, 6, height });
PaintAddImageAsChildRotated(
session, direction, imageIdT, { 0, 0, height }, { { 24, 6, height }, { 5, 20, 1 } });
}
break;
case 1:
@ -893,13 +895,15 @@ static void AirPoweredVerticalRCTrackVerticalTop(
{
PaintAddImageAsParentRotated(
session, direction, imageIdS, { 0, 0, height }, { { 24, 6, height }, { 5, 20, 1 } });
PaintAddImageAsChildRotated(session, direction, imageIdT, { 0, 0, height }, { 5, 20, 1 }, { 24, 6, height });
PaintAddImageAsChildRotated(
session, direction, imageIdT, { 0, 0, height }, { { 24, 6, height }, { 5, 20, 1 } });
}
else
{
PaintAddImageAsParentRotated(
session, direction, imageIdS, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 15 } });
PaintAddImageAsChildRotated(session, direction, imageIdT, { 0, 0, height }, { 32, 20, 15 }, { 0, 6, height });
PaintAddImageAsChildRotated(
session, direction, imageIdT, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 15 } });
}
break;
}

View File

@ -92,7 +92,7 @@ static void CompactInvertedRCTrackStation(
{ { 0, 6, height + 29 }, { 32, 20, 3 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 29 },
{ 32, 20, 3 }, { 0, 6, height + 29 });
{ { 0, 6, height + 29 }, { 32, 20, 3 } });
TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11);
TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL);
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9);

View File

@ -158,7 +158,7 @@ static void FlyingRCTrackStation(
{ { 0, 6, height + 24 }, { 32, 20, 3 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 24 },
{ 32, 20, 1 }, { 0, 6, height + 24 });
{ { 0, 6, height + 24 }, { 32, 20, 1 } });
TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11);
TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1);
}

View File

@ -841,13 +841,13 @@ static void HeartlineTwisterRCTrackHeartlineTransferUp(
{ { 0, 6, height + 8 }, { 32, 20, 2 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21308), { 0, 0, height + 16 },
{ 32, 20, 2 }, { 0, 6, height + 16 });
{ { 0, 6, height + 16 }, { 32, 20, 2 } });
PaintAddImageAsParentRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21318), { 0, 0, height + 8 },
{ { 0, 27, height + 8 }, { 32, 1, 34 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21312), { 0, 0, height + 16 },
{ 32, 1, 34 }, { 0, 27, height + 16 });
{ { 0, 27, height + 16 }, { 32, 1, 34 } });
WoodenASupportsPaintSetup(session, 6, 5, height + 8, session.TrackColours[SCHEME_SUPPORTS]);
break;
case 1:
@ -856,13 +856,13 @@ static void HeartlineTwisterRCTrackHeartlineTransferUp(
{ { 0, 6, height + 8 }, { 32, 20, 2 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21309), { 0, 0, height + 16 },
{ 32, 20, 2 }, { 0, 6, height + 16 });
{ { 0, 6, height + 16 }, { 32, 20, 2 } });
PaintAddImageAsParentRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21319), { 0, 0, height + 8 },
{ { 0, 27, height + 8 }, { 32, 1, 34 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21313), { 0, 0, height + 16 },
{ 32, 1, 34 }, { 0, 27, height + 16 });
{ { 0, 27, height + 16 }, { 32, 1, 34 } });
WoodenASupportsPaintSetup(session, 7, 6, height + 8, session.TrackColours[SCHEME_SUPPORTS]);
break;
case 2:
@ -871,13 +871,13 @@ static void HeartlineTwisterRCTrackHeartlineTransferUp(
{ { 0, 6, height + 8 }, { 32, 20, 2 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21306), { 0, 0, height + 16 },
{ 32, 20, 2 }, { 0, 6, height + 16 });
{ { 0, 6, height + 16 }, { 32, 20, 2 } });
PaintAddImageAsParentRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21320), { 0, 0, height + 8 },
{ { 0, 27, height + 8 }, { 32, 1, 34 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21310), { 0, 0, height + 16 },
{ 32, 1, 34 }, { 0, 27, height + 16 });
{ { 0, 27, height + 16 }, { 32, 1, 34 } });
WoodenASupportsPaintSetup(session, 6, 7, height + 8, session.TrackColours[SCHEME_SUPPORTS]);
break;
case 3:
@ -886,13 +886,13 @@ static void HeartlineTwisterRCTrackHeartlineTransferUp(
{ { 0, 6, height + 8 }, { 32, 20, 2 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21307), { 0, 0, height + 16 },
{ 32, 20, 2 }, { 0, 6, height + 16 });
{ { 0, 6, height + 16 }, { 32, 20, 2 } });
PaintAddImageAsParentRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21321), { 0, 0, height + 8 },
{ { 0, 27, height + 8 }, { 32, 1, 34 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21311), { 0, 0, height + 16 },
{ 32, 1, 34 }, { 0, 27, height + 16 });
{ { 0, 27, height + 16 }, { 32, 1, 34 } });
WoodenASupportsPaintSetup(session, 7, 8, height + 8, session.TrackColours[SCHEME_SUPPORTS]);
break;
}
@ -1055,13 +1055,13 @@ static void HeartlineTwisterRCTrackHeartlineTransferDown(
{ { 0, 6, height + 8 }, { 32, 20, 2 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21308), { 0, 0, height + 16 },
{ 32, 20, 2 }, { 0, 6, height + 16 });
{ { 0, 6, height + 16 }, { 32, 20, 2 } });
PaintAddImageAsParentRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21318), { 0, 0, height + 8 },
{ { 0, 27, height + 8 }, { 32, 1, 34 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21312), { 0, 0, height + 16 },
{ 32, 1, 34 }, { 0, 27, height + 16 });
{ { 0, 27, height + 16 }, { 32, 1, 34 } });
WoodenASupportsPaintSetup(session, 6, 5, height + 8, session.TrackColours[SCHEME_SUPPORTS]);
break;
case 1:
@ -1070,13 +1070,13 @@ static void HeartlineTwisterRCTrackHeartlineTransferDown(
{ { 0, 6, height + 8 }, { 32, 20, 2 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21309), { 0, 0, height + 16 },
{ 32, 20, 2 }, { 0, 6, height + 16 });
{ { 0, 6, height + 16 }, { 32, 20, 2 } });
PaintAddImageAsParentRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21319), { 0, 0, height + 8 },
{ { 0, 27, height + 8 }, { 32, 1, 34 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21313), { 0, 0, height + 16 },
{ 32, 1, 34 }, { 0, 27, height + 16 });
{ { 0, 27, height + 16 }, { 32, 1, 34 } });
WoodenASupportsPaintSetup(session, 7, 6, height + 8, session.TrackColours[SCHEME_SUPPORTS]);
break;
case 2:
@ -1085,13 +1085,13 @@ static void HeartlineTwisterRCTrackHeartlineTransferDown(
{ { 0, 6, height + 8 }, { 32, 20, 2 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21306), { 0, 0, height + 16 },
{ 32, 20, 2 }, { 0, 6, height + 16 });
{ { 0, 6, height + 16 }, { 32, 20, 2 } });
PaintAddImageAsParentRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21320), { 0, 0, height + 8 },
{ { 0, 27, height + 8 }, { 32, 1, 34 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21310), { 0, 0, height + 16 },
{ 32, 1, 34 }, { 0, 27, height + 16 });
{ { 0, 27, height + 16 }, { 32, 1, 34 } });
WoodenASupportsPaintSetup(session, 6, 7, height + 8, session.TrackColours[SCHEME_SUPPORTS]);
break;
case 3:
@ -1100,13 +1100,13 @@ static void HeartlineTwisterRCTrackHeartlineTransferDown(
{ { 0, 6, height + 8 }, { 32, 20, 2 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21307), { 0, 0, height + 16 },
{ 32, 20, 2 }, { 0, 6, height + 16 });
{ { 0, 6, height + 16 }, { 32, 20, 2 } });
PaintAddImageAsParentRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21321), { 0, 0, height + 8 },
{ { 0, 27, height + 8 }, { 32, 1, 34 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(21311), { 0, 0, height + 16 },
{ 32, 1, 34 }, { 0, 27, height + 16 });
{ { 0, 27, height + 16 }, { 32, 1, 34 } });
WoodenASupportsPaintSetup(session, 7, 8, height + 8, session.TrackColours[SCHEME_SUPPORTS]);
break;
}

View File

@ -100,7 +100,7 @@ static void InvertedHairpinRCTrackStation(
{ { 0, 6, height + 24 }, { 32, 20, 3 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 24 },
{ 32, 20, 1 }, { 0, 6, height + 24 });
{ { 0, 6, height + 24 }, { 32, 20, 1 } });
TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11);
TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1);
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT);

View File

@ -71,7 +71,7 @@ static void InvertedImpulseRCTrackStation(
{ { 0, 6, height + 29 }, { 32, 20, 3 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 29 },
{ 32, 20, 3 }, { 0, 6, height + 29 });
{ { 0, 6, height + 29 }, { 32, 20, 3 } });
TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11);
TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL);
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9);

View File

@ -91,7 +91,7 @@ static void InvertedRCTrackStation(
{ { 0, 6, height + 29 }, { 32, 20, 3 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 29 },
{ 32, 20, 3 }, { 0, 6, height + 29 });
{ { 0, 6, height + 29 }, { 32, 20, 3 } });
TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 3);
TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL);
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9);

View File

@ -158,7 +158,7 @@ static void LayDownRCTrackStation(
{ { 0, 6, height + 24 }, { 32, 20, 3 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 24 },
{ 32, 20, 1 }, { 0, 6, height + 24 });
{ { 0, 6, height + 24 }, { 32, 20, 1 } });
TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 11);
TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1);
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9);

View File

@ -2238,7 +2238,7 @@ static void LoopingRCTrackLeftVerticalLoop(
session, METAL_SUPPORTS_THICK_CENTRED, 1, 0, height - 8, session.TrackColours[SCHEME_TRACK]);
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15364), { 16, 0, height },
{ 3, 16, 119 }, { 16, 0, height });
{ { 16, 0, height }, { 3, 16, 119 } });
break;
case 1:
PaintAddImageAsParentRotated(
@ -2248,7 +2248,7 @@ static void LoopingRCTrackLeftVerticalLoop(
session, METAL_SUPPORTS_THICK_ALT_CENTRED, 0, 0, height - 8, session.TrackColours[SCHEME_TRACK]);
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15366), { 12, 0, height },
{ 3, 16, 119 }, { 12, 0, height });
{ { 12, 0, height }, { 3, 16, 119 } });
break;
case 2:
PaintAddImageAsParentRotated(
@ -2258,7 +2258,7 @@ static void LoopingRCTrackLeftVerticalLoop(
session, METAL_SUPPORTS_THICK, 2, 0, height - 8, session.TrackColours[SCHEME_TRACK]);
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15365), { 10, 16, height },
{ 4, 16, 119 }, { 10, 16, height });
{ { 10, 16, height }, { 4, 16, 119 } });
break;
case 3:
PaintAddImageAsParentRotated(
@ -2268,7 +2268,7 @@ static void LoopingRCTrackLeftVerticalLoop(
session, METAL_SUPPORTS_THICK_ALT, 3, 0, height - 8, session.TrackColours[SCHEME_TRACK]);
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15367), { 16, 16, height },
{ 2, 16, 119 }, { 16, 16, height });
{ { 16, 16, height }, { 2, 16, 119 } });
break;
}
PaintUtilSetSegmentSupportHeight(
@ -2352,7 +2352,7 @@ static void LoopingRCTrackLeftVerticalLoop(
session, METAL_SUPPORTS_THICK, 2, 0, height - 8, session.TrackColours[SCHEME_TRACK]);
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15365), { 10, 16, height },
{ 4, 16, 119 }, { 10, 16, height });
{ { 10, 16, height }, { 4, 16, 119 } });
break;
case 1:
PaintAddImageAsParentRotated(
@ -2362,7 +2362,7 @@ static void LoopingRCTrackLeftVerticalLoop(
session, METAL_SUPPORTS_THICK_ALT, 3, 0, height - 8, session.TrackColours[SCHEME_TRACK]);
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15367), { 16, 16, height },
{ 2, 16, 119 }, { 16, 16, height });
{ { 16, 16, height }, { 2, 16, 119 } });
break;
case 2:
PaintAddImageAsParentRotated(
@ -2372,7 +2372,7 @@ static void LoopingRCTrackLeftVerticalLoop(
session, METAL_SUPPORTS_THICK_CENTRED, 1, 0, height - 8, session.TrackColours[SCHEME_TRACK]);
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15364), { 16, 0, height },
{ 3, 16, 119 }, { 16, 0, height });
{ { 16, 0, height }, { 3, 16, 119 } });
break;
case 3:
PaintAddImageAsParentRotated(
@ -2382,7 +2382,7 @@ static void LoopingRCTrackLeftVerticalLoop(
session, METAL_SUPPORTS_THICK_ALT_CENTRED, 0, 0, height - 8, session.TrackColours[SCHEME_TRACK]);
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15366), { 12, 0, height },
{ 3, 16, 119 }, { 12, 0, height });
{ { 12, 0, height }, { 3, 16, 119 } });
break;
}
PaintUtilSetSegmentSupportHeight(
@ -2535,7 +2535,7 @@ static void LoopingRCTrackRightVerticalLoop(
session, METAL_SUPPORTS_THICK, 3, 0, height - 8, session.TrackColours[SCHEME_TRACK]);
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15384), { 16, 16, height },
{ 2, 16, 119 }, { 16, 16, height });
{ { 16, 16, height }, { 2, 16, 119 } });
break;
case 1:
PaintAddImageAsParentRotated(
@ -2545,7 +2545,7 @@ static void LoopingRCTrackRightVerticalLoop(
session, METAL_SUPPORTS_THICK_ALT, 1, 0, height - 8, session.TrackColours[SCHEME_TRACK]);
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15386), { 10, 16, height },
{ 4, 16, 119 }, { 10, 16, height });
{ { 10, 16, height }, { 4, 16, 119 } });
break;
case 2:
PaintAddImageAsParentRotated(
@ -2555,7 +2555,7 @@ static void LoopingRCTrackRightVerticalLoop(
session, METAL_SUPPORTS_THICK_CENTRED, 0, 0, height - 8, session.TrackColours[SCHEME_TRACK]);
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15385), { 12, 0, height },
{ 3, 16, 119 }, { 12, 0, height });
{ { 12, 0, height }, { 3, 16, 119 } });
break;
case 3:
PaintAddImageAsParentRotated(
@ -2565,7 +2565,7 @@ static void LoopingRCTrackRightVerticalLoop(
session, METAL_SUPPORTS_THICK_ALT_CENTRED, 2, 0, height - 8, session.TrackColours[SCHEME_TRACK]);
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15387), { 16, 0, height },
{ 2, 16, 119 }, { 16, 0, height });
{ { 16, 0, height }, { 2, 16, 119 } });
break;
}
PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20);
@ -2639,7 +2639,7 @@ static void LoopingRCTrackRightVerticalLoop(
session, METAL_SUPPORTS_THICK_CENTRED, 0, 0, height - 8, session.TrackColours[SCHEME_TRACK]);
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15385), { 12, 0, height },
{ 3, 16, 119 }, { 12, 0, height });
{ { 12, 0, height }, { 3, 16, 119 } });
break;
case 1:
PaintAddImageAsParentRotated(
@ -2649,7 +2649,7 @@ static void LoopingRCTrackRightVerticalLoop(
session, METAL_SUPPORTS_THICK_ALT_CENTRED, 2, 0, height - 8, session.TrackColours[SCHEME_TRACK]);
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15387), { 16, 0, height },
{ 2, 16, 119 }, { 16, 0, height });
{ { 16, 0, height }, { 2, 16, 119 } });
break;
case 2:
PaintAddImageAsParentRotated(
@ -2659,7 +2659,7 @@ static void LoopingRCTrackRightVerticalLoop(
session, METAL_SUPPORTS_THICK, 3, 0, height - 8, session.TrackColours[SCHEME_TRACK]);
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15384), { 16, 16, height },
{ 2, 16, 119 }, { 16, 16, height });
{ { 16, 16, height }, { 2, 16, 119 } });
break;
case 3:
PaintAddImageAsParentRotated(
@ -2669,7 +2669,7 @@ static void LoopingRCTrackRightVerticalLoop(
session, METAL_SUPPORTS_THICK_ALT, 1, 0, height - 8, session.TrackColours[SCHEME_TRACK]);
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15386), { 10, 16, height },
{ 4, 16, 119 }, { 10, 16, height });
{ { 10, 16, height }, { 4, 16, 119 } });
break;
}
PaintUtilSetGeneralSupportHeight(session, height + 168, 0x20);

View File

@ -110,13 +110,13 @@ static void MineTrainRCTrackStation(
bool isClosed = trackElement.IsBrakeClosed();
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_MineTrainBlockBrakeImages[direction][isClosed]),
{ 0, 0, height }, { 32, 20, 1 }, { 0, 0, height });
{ 0, 0, height }, { { 0, 0, height }, { 32, 20, 1 } });
}
else
{
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height },
{ 32, 20, 1 }, { 0, 0, height });
{ { 0, 0, height }, { 32, 20, 1 } });
}
TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 3);
TrackPaintUtilDrawStation(session, ride, direction, height, trackElement);

View File

@ -103,7 +103,7 @@ static void MiniSuspendedRCTrackStation(
{ 32, 20, 1 });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 24 },
{ 32, 20, 1 }, { 0, 2, height });
{ { 0, 2, height }, { 32, 20, 1 } });
TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 3);
TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1);
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT);

View File

@ -284,7 +284,7 @@ static void PaintReverseFreefallRCSlope(
PaintAddImageAsParentRotated(
session, direction, supportsImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } });
PaintAddImageAsChildRotated(
session, direction, trackImageId, { 0, 0, height }, { 32, 20, bbHeight }, { 0, 6, height });
session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } });
int32_t tunnelOffset = tunnelOffsets03[trackSequence];
if (direction & 1)
@ -302,7 +302,7 @@ static void PaintReverseFreefallRCSlope(
PaintAddImageAsParentRotated(
session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } });
PaintAddImageAsChildRotated(
session, direction, supportsImageId, { 0, 0, height }, { 32, 20, bbHeight }, { 0, 6, height });
session, direction, supportsImageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, bbHeight } });
}
WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
@ -323,8 +323,8 @@ static void PaintReverseFreefallRCSlope(
}
PaintAddImageAsParent(session, floorImageId, { 0, 0, height }, { { 3, 3, height }, { 26, 26, 126 } });
PaintAddImageAsChildRotated(
session, direction, supportsImageId, { 0, 0, height }, { isDirection03 ? 26 : 18, 26, 126 },
{ isDirection03 ? 3 : 11, 3, height });
session, direction, supportsImageId, { 0, 0, height },
{ { isDirection03 ? 3 : 11, 3, height }, { isDirection03 ? 26 : 18, 26, 126 } });
}
else
{
@ -341,14 +341,14 @@ static void PaintReverseFreefallRCSlope(
PaintAddImageAsParentRotated(
session, direction, supportsImageId, { 0, 0, height }, { { 0, 6, height + 128 }, { 5, 20, 79 } });
PaintAddImageAsChildRotated(
session, direction, trackImageId, { 0, 0, height }, { 5, 20, 79 }, { 0, 6, height + 128 });
session, direction, trackImageId, { 0, 0, height }, { { 0, 6, height + 128 }, { 5, 20, 79 } });
}
else
{
PaintAddImageAsParentRotated(
session, direction, trackImageId, { 0, 0, height }, { { 27, 6, height }, { 1, 20, 126 } });
PaintAddImageAsChildRotated(
session, direction, supportsImageId, { 0, 0, height }, { 1, 20, 126 }, { 27, 6, height });
session, direction, supportsImageId, { 0, 0, height }, { { 27, 6, height }, { 1, 20, 126 } });
}
WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0);

View File

@ -111,7 +111,7 @@ static void ReverserRCTrackStation(
{ { 0, 2, height }, { 32, 27, 2 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height },
{ 32, 27, 2 }, { 0, 2, height });
{ { 0, 2, height }, { 32, 27, 2 } });
WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11);
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT);

View File

@ -83,7 +83,7 @@ static void SteeplechaseTrackStation(
{ { 0, 2, height }, { 32, 28, 3 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 6, height },
{ 32, 20, 3 }, { 0, 0, height });
{ { 0, 0, height }, { 32, 20, 3 } });
TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 3);
TrackPaintUtilDrawStation(session, ride, direction, height, trackElement);
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT);

View File

@ -91,7 +91,7 @@ static void SuspendedSwingingRCTrackStation(
{ { 0, 6, height + 29 }, { 32, 20, 3 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 29 },
{ 32, 20, 3 }, { 0, 6, height + 29 });
{ { 0, 6, height + 29 }, { 32, 20, 3 } });
TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 0);
TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL);
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9);

View File

@ -209,13 +209,13 @@ static void WildMouseTrackStation(
PaintAddImageAsChildRotated(
session, direction,
session.TrackColours[SCHEME_TRACK].WithIndex(_wild_mouse_block_brakes_image_ids[direction][isClosed]),
{ 0, 0, height }, { 32, 20, 2 }, { 0, 0, height });
{ 0, 0, height }, { { 0, 0, height }, { 32, 20, 2 } });
}
else
{
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_wild_mouse_brakes_image_ids[direction]),
{ 0, 0, height }, { 32, 20, 2 }, { 0, 0, height });
{ 0, 0, height }, { { 0, 0, height }, { 32, 20, 2 } });
}
TrackPaintUtilDrawStationMetalSupports(session, direction, height, session.TrackColours[SCHEME_SUPPORTS]);
TrackPaintUtilDrawStation(session, ride, direction, height, trackElement);

File diff suppressed because it is too large Load Diff

View File

@ -51,8 +51,8 @@ PaintStruct* WoodenRCTrackPaint(
{ bound_box_length_x, bound_box_length_y, bound_box_length_z } });
return PaintAddImageAsChildRotated(
session, direction, railsImageId, { x_offset, y_offset, z_offset },
{ bound_box_length_x, bound_box_length_y, bound_box_length_z },
{ bound_box_offset_x, bound_box_offset_y, bound_box_offset_z });
{ { bound_box_offset_x, bound_box_offset_y, bound_box_offset_z },
{ bound_box_length_x, bound_box_length_y, bound_box_length_z } });
}
template<bool isClassic> void WoodenRCTrackPaintBb(PaintSession& session, const SpriteBoundBox2* bb, int16_t height)

View File

@ -161,7 +161,7 @@ static void WoodenWildMouseTrackStation(
{ { 0, 2, height }, { 32, 28, 1 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 6, height },
{ 32, 20, 1 }, { 0, 0, height });
{ { 0, 0, height }, { 32, 20, 1 } });
WoodenASupportsPaintSetup(session, direction & 1, 0, height, session.TrackColours[SCHEME_SUPPORTS]);
TrackPaintUtilDrawStation(session, ride, direction, height, trackElement);
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT);

View File

@ -384,7 +384,7 @@ static void PaintGhostTrainStation(
PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 3 } });
imageId = session.TrackColours[SCHEME_TRACK].WithIndex(GhostTrainTrackPiecesFlat[direction]);
PaintAddImageAsChildRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 0, height });
PaintAddImageAsChildRotated(session, direction, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 20, 3 } });
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT);

View File

@ -326,7 +326,7 @@ static void PaintMiniHelicoptersTrackSpinningTunnel(
ImageId underlay = session.TrackColours[SCHEME_TRACK].WithIndex(sprites[direction][1]);
PaintAddImageAsParentRotated(session, direction, underlay, { 0, 6, height - 2 }, { { 0, 6, height }, { 32, 20, 1 } });
PaintAddImageAsChildRotated(session, direction, imageId, { 0, 0, height }, { 32, 20, 3 }, { 0, 6, height });
PaintAddImageAsChildRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 3 } });
TrackPaintUtilSpinningTunnelPaint(session, 1, height, direction);
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_0);

View File

@ -648,22 +648,23 @@ static void PaintMiniatureRailwayTrackFlat(
imageId = session.TrackColours[SCHEME_TRACK].WithIndex(miniature_railway_track_pieces_flat[direction]);
if (!paintAsGravel)
{
PaintAddImageAsChildRotated(session, direction, imageId, { 0, 6, height }, { 32, 20, 2 }, { 0, 6, height });
PaintAddImageAsChildRotated(session, direction, imageId, { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } });
}
else
{
imageIdAlt = MiniatureRailwayTrackToGravel(imageId);
PaintAddImageAsChildRotated(session, direction, imageIdAlt, { 0, 6, height }, { 32, 20, 2 }, { 0, 6, height });
PaintAddImageAsChildRotated(session, direction, imageIdAlt, { 0, 6, height }, { { 0, 6, height }, { 32, 20, 2 } });
}
if (paintGrooved)
{
imageIdAlt = MiniatureRailwayTrackToGrooved(imageId);
PaintAddImageAsChildRotated(session, direction, imageIdAlt, { 0, 6, height }, { 32, 20, 2 }, { 0, 6, height + 2 });
PaintAddImageAsChildRotated(
session, direction, imageIdAlt, { 0, 6, height }, { { 0, 6, height + 2 }, { 32, 20, 2 } });
imageIdAlt = MiniatureRailwayTrackToGroovedIndent(
session.PathElementOnSameHeight, direction, session.CurrentRotation);
PaintAddImageAsChildRotated(
session, direction, imageIdAlt.WithTransparency(FilterPaletteID::PaletteDarken2), { 0, 6, height },
{ 32, 20, 2 }, { 0, 6, height + 2 });
{ { 0, 6, height + 2 }, { 32, 20, 2 } });
}
}
else
@ -710,7 +711,7 @@ static void PaintMiniatureRailwayStation(
PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 2 } });
imageId = session.TrackColours[SCHEME_TRACK].WithIndex(miniature_railway_track_pieces_flat_station[direction]);
PaintAddImageAsChildRotated(session, direction, imageId, { 0, 6, height }, { 32, 20, 2 }, { 0, 0, height });
PaintAddImageAsChildRotated(session, direction, imageId, { 0, 6, height }, { { 0, 0, height }, { 32, 20, 2 } });
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT);
@ -1141,8 +1142,8 @@ static void PaintMiniatureRailwayTrackSBendLeft(
imageId = session.TrackColours[SCHEME_TRACK].WithIndex(
miniature_railway_track_pieces_s_bend_left[direction & 1][trackSequence]);
PaintAddImageAsChildRotated(
session, direction, imageId, { offset.x, offset.y, height }, { bounds.x, bounds.y, 2 },
{ offset.x, offset.y, height });
session, direction, imageId, { offset.x, offset.y, height },
{ { offset.x, offset.y, height }, { bounds.x, bounds.y, 2 } });
}
if (direction == 0 || direction == 2)
{
@ -1249,8 +1250,8 @@ static void PaintMiniatureRailwayTrackSBendRight(
imageId = session.TrackColours[SCHEME_TRACK].WithIndex(
miniature_railway_track_pieces_s_bend_right[direction & 1][trackSequence]);
PaintAddImageAsChildRotated(
session, direction, imageId, { offset.x, offset.y, height }, { bounds.x, bounds.y, 2 },
{ offset.x, offset.y, height });
session, direction, imageId, { offset.x, offset.y, height },
{ { offset.x, offset.y, height }, { bounds.x, bounds.y, 2 } });
}
if (direction == 0 || direction == 2)

View File

@ -71,7 +71,7 @@ static void SuspendedMonorailTrackStation(
{ { 0, 6, height + 32 }, { 32, 20, 3 } });
PaintAddImageAsChildRotated(
session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 32 },
{ 32, 20, 3 }, { 0, 6, height + 32 });
{ { 0, 6, height + 32 }, { 32, 20, 3 } });
TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 3);
TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL);
PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9);