diff --git a/src/openrct2/paint/Supports.cpp b/src/openrct2/paint/Supports.cpp index 1fb10c294b..1da900e662 100644 --- a/src/openrct2/paint/Supports.cpp +++ b/src/openrct2/paint/Supports.cpp @@ -1539,3 +1539,39 @@ bool PathBSupportsPaintSetup( return false; // AND } + +constexpr uint8_t MetalSupportTypeCount = 13; +constexpr MetalSupportType RotatedMetalSupports[MetalSupportTypeCount][NumOrthogonalDirections] = { + { MetalSupportType::Tubes, MetalSupportType::Tubes, MetalSupportType::Tubes, MetalSupportType::Tubes }, + { MetalSupportType::Fork, MetalSupportType::ForkAlt, MetalSupportType::Fork, MetalSupportType::ForkAlt }, + { MetalSupportType::ForkAlt, MetalSupportType::Fork, MetalSupportType::ForkAlt, MetalSupportType::Fork }, + { MetalSupportType::Boxed, MetalSupportType::Boxed, MetalSupportType::Boxed, MetalSupportType::Boxed }, + { MetalSupportType::Stick, MetalSupportType::StickAlt, MetalSupportType::Stick, MetalSupportType::StickAlt }, + { MetalSupportType::StickAlt, MetalSupportType::Stick, MetalSupportType::StickAlt, MetalSupportType::Stick }, + { MetalSupportType::ThickCentred, MetalSupportType::ThickAltCentred, MetalSupportType::Thick, MetalSupportType::ThickAlt }, + { MetalSupportType::Thick, MetalSupportType::ThickAlt, MetalSupportType::ThickCentred, MetalSupportType::ThickAltCentred }, + { MetalSupportType::ThickAlt, MetalSupportType::ThickCentred, MetalSupportType::ThickAltCentred, MetalSupportType::Thick }, + { MetalSupportType::ThickAltCentred, MetalSupportType::Thick, MetalSupportType::ThickAlt, MetalSupportType::ThickCentred }, + { MetalSupportType::Truss, MetalSupportType::Truss, MetalSupportType::Truss, MetalSupportType::Truss }, + { MetalSupportType::TubesInverted, MetalSupportType::TubesInverted, MetalSupportType::TubesInverted, + MetalSupportType::TubesInverted }, + { MetalSupportType::BoxedCoated, MetalSupportType::BoxedCoated, MetalSupportType::BoxedCoated, + MetalSupportType::BoxedCoated }, +}; + +void DrawSupportsSideBySide( + PaintSession& session, Direction direction, uint16_t height, ImageId colour, MetalSupportType type, int32_t special) +{ + type = RotatedMetalSupports[EnumValue(type)][direction]; + + if (direction & 1) + { + MetalASupportsPaintSetup(session, type, MetalSupportPlace::TopRightSide, special, height, colour); + MetalASupportsPaintSetup(session, type, MetalSupportPlace::BottomLeftSide, special, height, colour); + } + else + { + MetalASupportsPaintSetup(session, type, MetalSupportPlace::TopLeftSide, special, height, colour); + MetalASupportsPaintSetup(session, type, MetalSupportPlace::BottomRightSide, special, height, colour); + } +} diff --git a/src/openrct2/paint/Supports.h b/src/openrct2/paint/Supports.h index 705faaf6ea..54ee612f1c 100644 --- a/src/openrct2/paint/Supports.h +++ b/src/openrct2/paint/Supports.h @@ -147,6 +147,8 @@ bool PathASupportsPaintSetup( bool PathBSupportsPaintSetup( PaintSession& session, int32_t supportType, int32_t special, int32_t height, ImageId imageTemplate, const FootpathPaintInfo& pathPaintInfo); +void DrawSupportsSideBySide( + PaintSession& session, Direction direction, uint16_t height, ImageId colour, MetalSupportType type, int32_t special = 0); enum { diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index 48b5e1523d..fc85e54edd 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -943,26 +943,6 @@ void TrackPaintUtilDrawPier( } } -void TrackPaintUtilDrawStationMetalSupports(PaintSession& session, Direction direction, uint16_t height, ImageId colour) -{ - TrackPaintUtilDrawStationMetalSupports2(session, direction, height, colour, MetalSupportType::Boxed); -} - -void TrackPaintUtilDrawStationMetalSupports2( - PaintSession& session, Direction direction, uint16_t height, ImageId colour, MetalSupportType type) -{ - if (direction & 1) - { - MetalASupportsPaintSetup(session, type, MetalSupportPlace::TopRightSide, 0, height, colour); - MetalASupportsPaintSetup(session, type, MetalSupportPlace::BottomLeftSide, 0, height, colour); - } - else - { - MetalASupportsPaintSetup(session, type, MetalSupportPlace::TopLeftSide, 0, height, colour); - MetalASupportsPaintSetup(session, type, MetalSupportPlace::BottomRightSide, 0, height, colour); - } -} - constexpr CoordsXY defaultRightHelixUpSmallQuarterBoundLengths[4][3][2] = { { { { 32, 20 }, { 0, 0 } }, @@ -2063,6 +2043,13 @@ void TrackPaintUtilSpinningTunnelPaint(PaintSession& session, int8_t thickness, } } +void TrackPaintUtilOnridePhotoPlatformPaint( + PaintSession& session, Direction direction, int32_t height, MetalSupportType supportType) +{ + PaintAddImageAsParent(session, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], supportType); +} + void TrackPaintUtilOnridePhotoSmallPaint( PaintSession& session, Direction direction, int32_t height, const TrackElement& trackElement) { diff --git a/src/openrct2/ride/TrackPaint.h b/src/openrct2/ride/TrackPaint.h index 8c7617bbdf..0e9d6f8126 100644 --- a/src/openrct2/ride/TrackPaint.h +++ b/src/openrct2/ride/TrackPaint.h @@ -314,9 +314,6 @@ bool TrackPaintUtilShouldPaintSupports(const CoordsXY& position); void TrackPaintUtilDrawPier( PaintSession& session, const Ride& ride, const StationObject* stationObject, const CoordsXY& position, Direction direction, int32_t height, const TrackElement& trackElement, uint8_t rotation); -void TrackPaintUtilDrawStationMetalSupports(PaintSession& session, Direction direction, uint16_t height, ImageId colour); -void TrackPaintUtilDrawStationMetalSupports2( - PaintSession& session, Direction direction, uint16_t height, ImageId colour, MetalSupportType type); void TrackPaintUtilRightQuarterTurn5TilesPaint( PaintSession& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, @@ -368,6 +365,18 @@ void TrackPaintUtilLeftQuarterTurn1TilePaint( PaintSession& session, int8_t thickness, int16_t height, int16_t boundBoxZOffset, Direction direction, const ImageId colourFlags, const uint32_t* sprites); void TrackPaintUtilSpinningTunnelPaint(PaintSession& session, int8_t thickness, int16_t height, Direction direction); + +/** + * Renders the black metal platform and the supports of the on-ride photo section. + * + * @param session + * @param direction + * @param height + * @param supportType + */ +void TrackPaintUtilOnridePhotoPlatformPaint( + PaintSession& session, Direction direction, int32_t height, MetalSupportType supportType); + void TrackPaintUtilOnridePhotoSmallPaint( PaintSession& session, Direction direction, int32_t height, const TrackElement& trackElement); void TrackPaintUtilOnridePhotoPaint( diff --git a/src/openrct2/ride/coaster/AlpineCoaster.cpp b/src/openrct2/ride/coaster/AlpineCoaster.cpp index 1415ed0e1c..713e0f0c21 100644 --- a/src/openrct2/ride/coaster/AlpineCoaster.cpp +++ b/src/openrct2/ride/coaster/AlpineCoaster.cpp @@ -118,7 +118,7 @@ namespace AlpineRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][2]), { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 2 } }); - TrackPaintUtilDrawStationMetalSupports(session, direction, height, session.TrackColours[SCHEME_SUPPORTS]); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 4, 7); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/openrct2/ride/coaster/BobsleighCoaster.cpp b/src/openrct2/ride/coaster/BobsleighCoaster.cpp index 9276475573..bd182de052 100644 --- a/src/openrct2/ride/coaster/BobsleighCoaster.cpp +++ b/src/openrct2/ride/coaster/BobsleighCoaster.cpp @@ -116,8 +116,7 @@ static void BobsleighRCTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -3864,17 +3863,11 @@ static void BobsleighRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Tubes); + switch (direction) { case 0: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14572), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); @@ -3883,14 +3876,6 @@ static void BobsleighRCTrackOnRidePhoto( { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14573), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); @@ -3899,14 +3884,6 @@ static void BobsleighRCTrackOnRidePhoto( { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14572), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); @@ -3916,14 +3893,6 @@ static void BobsleighRCTrackOnRidePhoto( break; case 3: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(14573), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); diff --git a/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp b/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp index 4641e69e85..4157ef5a5e 100644 --- a/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp +++ b/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp @@ -131,7 +131,7 @@ static void BolligerMabillardTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], supportType); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], supportType); TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 9, trackElement); @@ -4743,48 +4743,26 @@ static void BolligerMabillardTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, supportType); + switch (direction) { case 0: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, supportType, MetalSupportPlace::TopLeftSide, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, supportType, MetalSupportPlace::BottomRightSide, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17146), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, supportType, MetalSupportPlace::TopRightSide, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, supportType, MetalSupportPlace::BottomLeftSide, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17147), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, supportType, MetalSupportPlace::TopLeftSide, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, supportType, MetalSupportPlace::BottomRightSide, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17146), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, supportType, MetalSupportPlace::TopRightSide, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, supportType, MetalSupportPlace::BottomLeftSide, 0, height, session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17147), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); diff --git a/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp b/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp index 7721c341c9..44a395c7b8 100644 --- a/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp +++ b/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp @@ -116,8 +116,7 @@ static void CompactInvertedRCTrackStation( PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 29 }, { { 0, 6, height + 29 }, { 32, 20, 3 } }); - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -5295,56 +5294,26 @@ static void CompactInvertedRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::TubesInverted); + switch (direction) { case 0: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26555), { 0, 0, height + 29 }, { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26556), { 0, 0, height + 29 }, { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26555), { 0, 0, height + 29 }, { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26556), { 0, 0, height + 29 }, { { 0, 6, height + 29 }, { 32, 20, 3 } }); diff --git a/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp b/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp index 73f0d2162f..2e0c6a4fe7 100644 --- a/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp @@ -145,8 +145,7 @@ static void CorkscrewRCTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -5053,56 +5052,26 @@ static void CorkscrewRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Tubes); + switch (direction) { case 0: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16224), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16225), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16224), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(16225), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); diff --git a/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp b/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp index 36945c0272..653cbbff7a 100644 --- a/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp @@ -169,7 +169,7 @@ static void FlyingRCTrackStation( PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 1 } }); - TrackPaintUtilDrawStationMetalSupports2( + DrawSupportsSideBySide( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); } @@ -197,7 +197,7 @@ static void FlyingRCTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][2]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + DrawSupportsSideBySide( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); } @@ -7666,56 +7666,26 @@ static void FlyingRCTrackOnRidePhoto( { if (!trackElement.IsInverted()) { + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::TubesInverted); + switch (direction) { case 0: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17146), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17147), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17146), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(17147), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); @@ -7728,56 +7698,26 @@ static void FlyingRCTrackOnRidePhoto( } else { + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::TubesInverted); + switch (direction) { case 0: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27129), { 0, 0, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27130), { 0, 0, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 2: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27129), { 0, 0, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 3: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27130), { 0, 0, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); diff --git a/src/openrct2/ride/coaster/GigaCoaster.cpp b/src/openrct2/ride/coaster/GigaCoaster.cpp index d17359f97a..816683c89c 100644 --- a/src/openrct2/ride/coaster/GigaCoaster.cpp +++ b/src/openrct2/ride/coaster/GigaCoaster.cpp @@ -195,8 +195,7 @@ static void GigaRCTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -4337,56 +4336,26 @@ static void GigaRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Tubes); + switch (direction) { case 0: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18074), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18075), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18074), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18075), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); diff --git a/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp b/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp index 062a673ed5..f69927ee43 100644 --- a/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp +++ b/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp @@ -113,8 +113,7 @@ static void HeartlineTwisterRCTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp b/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp index 3a15a148b9..992cb3fd49 100644 --- a/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp +++ b/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp @@ -102,8 +102,7 @@ static void InvertedHairpinRCTrackStation( PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 1 } }); - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp b/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp index 6774697956..1b20346cbd 100644 --- a/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp +++ b/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp @@ -73,8 +73,7 @@ static void InvertedImpulseRCTrackStation( PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 29 }, { { 0, 6, height + 29 }, { 32, 20, 3 } }); - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp b/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp index 35b1b68dbe..896a681af1 100644 --- a/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp @@ -100,8 +100,7 @@ static void InvertedRCTrackStation( PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 29 }, { { 0, 6, height + 29 }, { 32, 20, 3 } }); - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -5308,56 +5307,26 @@ static void InvertedRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Boxed); + switch (direction) { case 0: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27129), { 0, 0, height + 29 }, { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27130), { 0, 0, height + 29 }, { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27129), { 0, 0, height + 29 }, { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(27130), { 0, 0, height + 29 }, { { 0, 6, height + 29 }, { 32, 20, 3 } }); diff --git a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp index 8a031d0016..a80d186927 100644 --- a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp @@ -1889,14 +1889,6 @@ void JuniorRCPaintStation( imageId = session.TrackColours[SCHEME_TRACK].WithIndex(junior_rc_track_pieces_station[false][direction]); } PaintAddImageAsChild(session, imageId, { 0, 6, height }, { { 0, 0, height }, { 32, 20, 1 } }); - - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); } else if (direction == 1 || direction == 3) { @@ -1917,16 +1909,11 @@ void JuniorRCPaintStation( imageId = session.TrackColours[SCHEME_TRACK].WithIndex(junior_rc_track_pieces_station[false][direction]); } PaintAddImageAsChild(session, imageId, { 6, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); - - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); } + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -5972,62 +5959,13 @@ static void JuniorRCTrackOnRidePhoto( { auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(junior_rc_track_pieces_flat[0][direction]); constexpr int8_t photoCameraOffset = -1; + PaintAddImageAsParentRotated( + session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height + photoCameraOffset }, { 32, 32, 1 }); + DrawSupportsSideBySide( + session, direction, height + photoCameraOffset, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Fork, 6); + + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); - switch (direction) - { - case 0: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height + photoCameraOffset }, - { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopLeftSide, 6, height + photoCameraOffset, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomRightSide, 6, height + photoCameraOffset, - session.TrackColours[SCHEME_SUPPORTS]); - PaintAddImageAsParentRotated( - session, direction, imageId, { 0, 6, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); - break; - case 1: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height + photoCameraOffset }, - { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::TopRightSide, 6, height + photoCameraOffset, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::BottomLeftSide, 6, height + photoCameraOffset, - session.TrackColours[SCHEME_SUPPORTS]); - PaintAddImageAsParentRotated( - session, direction, imageId, { 0, 6, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); - break; - case 2: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height + photoCameraOffset }, - { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopLeftSide, 6, height + photoCameraOffset, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomRightSide, 6, height + photoCameraOffset, - session.TrackColours[SCHEME_SUPPORTS]); - PaintAddImageAsParentRotated( - session, direction, imageId, { 0, 6, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); - break; - case 3: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height + photoCameraOffset }, - { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::TopRightSide, 6, height + photoCameraOffset, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::BottomLeftSide, 6, height + photoCameraOffset, - session.TrackColours[SCHEME_SUPPORTS]); - PaintAddImageAsParentRotated( - session, direction, imageId, { 0, 6, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); - break; - } TrackPaintUtilOnridePhotoPaint(session, direction, height + 3 + photoCameraOffset, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp b/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp index 9859250e11..b2b10d72df 100644 --- a/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp @@ -150,7 +150,7 @@ static void LayDownRCTrackStation( PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 1 } }); - TrackPaintUtilDrawStationMetalSupports2( + DrawSupportsSideBySide( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); @@ -3630,56 +3630,26 @@ static void LayDownRCTrackOnRidePhoto( } else { + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::TubesInverted); + switch (direction) { case 0: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26555), { 0, 0, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 1: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26556), { 0, 0, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 2: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26555), { 0, 0, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); break; case 3: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(26556), { 0, 0, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); diff --git a/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp b/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp index 1cb1006fee..5fbf1f7caa 100644 --- a/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp @@ -58,8 +58,7 @@ static void LimLaunchedRCTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp b/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp index ccfe6404e2..118dcc4738 100644 --- a/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp @@ -119,8 +119,7 @@ static void LoopingRCTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -4748,60 +4747,26 @@ static void LoopingRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Tubes); + switch (direction) { case 0: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_D), { 0, 0, height }, - { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15004), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_D), { 0, 0, height }, - { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15005), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_D), { 0, 0, height }, - { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15004), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: - PaintAddImageAsParentRotated( - session, direction, session.TrackColours[SCHEME_MISC].WithIndex(SPR_STATION_BASE_D), { 0, 0, height }, - { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15005), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); diff --git a/src/openrct2/ride/coaster/MineRide.cpp b/src/openrct2/ride/coaster/MineRide.cpp index eae50363e4..70e277ec09 100644 --- a/src/openrct2/ride/coaster/MineRide.cpp +++ b/src/openrct2/ride/coaster/MineRide.cpp @@ -73,8 +73,7 @@ static void MineRideTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -3407,56 +3406,28 @@ static void MineRideTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { + PaintAddImageAsParentRotated( + session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Fork, 6); + switch (direction) { case 0: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopLeftSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomRightSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19338), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::TopRightSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::BottomLeftSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19339), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopLeftSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomRightSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19338), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::TopRightSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::BottomLeftSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(19339), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); diff --git a/src/openrct2/ride/coaster/MineTrainCoaster.cpp b/src/openrct2/ride/coaster/MineTrainCoaster.cpp index 862bbcf3d1..98a9974b9b 100644 --- a/src/openrct2/ride/coaster/MineTrainCoaster.cpp +++ b/src/openrct2/ride/coaster/MineTrainCoaster.cpp @@ -160,8 +160,7 @@ static void MineTrainRCTrackStation( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, { { 0, 0, height }, { 32, 20, 1 } }); } - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/openrct2/ride/coaster/MiniRollerCoaster.cpp b/src/openrct2/ride/coaster/MiniRollerCoaster.cpp index 1a85183db9..142dff5dbd 100644 --- a/src/openrct2/ride/coaster/MiniRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/MiniRollerCoaster.cpp @@ -148,8 +148,7 @@ static void MiniRCTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -4794,56 +4793,28 @@ static void MiniRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { + PaintAddImageAsParentRotated( + session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Fork, 6); + switch (direction) { case 0: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopLeftSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomRightSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18738), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::TopRightSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::BottomLeftSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18739), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopLeftSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomRightSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18738), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::TopRightSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::BottomLeftSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(18739), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); diff --git a/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp b/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp index b9089bfdf9..93bee4b479 100644 --- a/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp +++ b/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp @@ -106,8 +106,7 @@ static void MiniSuspendedRCTrackStation( PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 24 }, { { 0, 2, height }, { 32, 20, 1 } }); - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp b/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp index 05630dbede..717d2aff8e 100644 --- a/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp @@ -196,8 +196,7 @@ static void MultiDimensionRCTrackStation( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 0, height }, { { 0, 3, height + 3 }, { 32, 26, 1 } }); } - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); const auto* stationObj = ride.GetStationObject(); bool hasFence; @@ -5212,56 +5211,26 @@ static void MultiDimensionRCTrackOnRidePhoto( { if (!trackElement.IsInverted()) { + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::TubesInverted); + switch (direction) { case 0: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15806), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15807), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15806), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::TubesInverted, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(15807), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); diff --git a/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp b/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp index e79603da47..fe23230751 100644 --- a/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp @@ -122,8 +122,7 @@ namespace SingleRailRC PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][2]), { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 2 } }); - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 4, 7); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -11050,56 +11049,26 @@ namespace SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Tubes); + switch (direction) { case 0: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT + 0)), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 1: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT + 1)), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 2: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT + 0)), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); break; case 3: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex((SPR_G2_SINGLE_RAIL_TRACK_FLAT + 1)), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } }); diff --git a/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp b/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp index a2f6cf30e7..2b2a44b7c4 100644 --- a/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp @@ -139,8 +139,7 @@ static void StandUpRCTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); @@ -5245,56 +5244,26 @@ static void StandUpRCTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Tubes); + switch (direction) { case 0: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25229), { 0, 6, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); break; case 1: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25230), { 0, 6, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); break; case 2: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25229), { 0, 6, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); break; case 3: - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Tubes, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(25230), { 0, 6, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); diff --git a/src/openrct2/ride/coaster/Steeplechase.cpp b/src/openrct2/ride/coaster/Steeplechase.cpp index fafa3bec6b..d64124682d 100644 --- a/src/openrct2/ride/coaster/Steeplechase.cpp +++ b/src/openrct2/ride/coaster/Steeplechase.cpp @@ -97,8 +97,7 @@ static void SteeplechaseTrackStation( PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(imageIds[direction][0]), { 0, 6, height }, { { 0, 0, height }, { 32, 20, 3 } }); - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp b/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp index 15e2d8dbe0..73cad7fb4c 100644 --- a/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp +++ b/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp @@ -93,8 +93,7 @@ static void SuspendedSwingingRCTrackStation( PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 29 }, { { 0, 6, height + 29 }, { 32, 20, 3 } }); - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/openrct2/ride/coaster/WildMouse.cpp b/src/openrct2/ride/coaster/WildMouse.cpp index 540598c360..1245040a19 100644 --- a/src/openrct2/ride/coaster/WildMouse.cpp +++ b/src/openrct2/ride/coaster/WildMouse.cpp @@ -218,7 +218,7 @@ static void WildMouseTrackStation( session, direction, session.TrackColours[SCHEME_TRACK].WithIndex(_wild_mouse_brakes_image_ids[direction]), { 0, 0, height }, { { 0, 0, height }, { 32, 20, 2 } }); } - TrackPaintUtilDrawStationMetalSupports(session, direction, height, session.TrackColours[SCHEME_SUPPORTS]); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/openrct2/ride/gentle/CarRide.cpp b/src/openrct2/ride/gentle/CarRide.cpp index c7b5f91b40..50567d5c1a 100644 --- a/src/openrct2/ride/gentle/CarRide.cpp +++ b/src/openrct2/ride/gentle/CarRide.cpp @@ -365,23 +365,7 @@ static void PaintCarRideStation( PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); } - if (direction == 0 || direction == 2) - { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - } - else - { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - } + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); diff --git a/src/openrct2/ride/gentle/GhostTrain.cpp b/src/openrct2/ride/gentle/GhostTrain.cpp index b1c308594f..7e25896951 100644 --- a/src/openrct2/ride/gentle/GhostTrain.cpp +++ b/src/openrct2/ride/gentle/GhostTrain.cpp @@ -392,23 +392,7 @@ static void PaintGhostTrainStation( PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - if (direction == 0 || direction == 2) - { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - } - else - { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - } + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); diff --git a/src/openrct2/ride/gentle/MiniHelicopters.cpp b/src/openrct2/ride/gentle/MiniHelicopters.cpp index 69749c8144..c04670e60e 100644 --- a/src/openrct2/ride/gentle/MiniHelicopters.cpp +++ b/src/openrct2/ride/gentle/MiniHelicopters.cpp @@ -30,13 +30,6 @@ static void PaintMiniHelicoptersTrackStation( imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 20, 1 } }); - - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); } else if (direction == 1 || direction == 3) { @@ -45,16 +38,11 @@ static void PaintMiniHelicoptersTrackStation( imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); - - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); } + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/openrct2/ride/gentle/MonorailCycles.cpp b/src/openrct2/ride/gentle/MonorailCycles.cpp index 3e7b455409..feb6e114d0 100644 --- a/src/openrct2/ride/gentle/MonorailCycles.cpp +++ b/src/openrct2/ride/gentle/MonorailCycles.cpp @@ -199,13 +199,6 @@ static void PaintMonorailCyclesStation( imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SprMonorailCyclesFlatSwNe); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 20, 1 } }); - - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - PaintUtilPushTunnelLeft(session, height, TUNNEL_SQUARE_FLAT); } else if (direction == 1 || direction == 3) { @@ -214,16 +207,11 @@ static void PaintMonorailCyclesStation( imageId = session.TrackColours[SCHEME_TRACK].WithIndex(SprMonorailCyclesFlatNwSe); PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); - - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); } + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); + PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/openrct2/ride/transport/Monorail.cpp b/src/openrct2/ride/transport/Monorail.cpp index b073a254e3..f79b78bbdc 100644 --- a/src/openrct2/ride/transport/Monorail.cpp +++ b/src/openrct2/ride/transport/Monorail.cpp @@ -462,23 +462,7 @@ static void PaintMonorailStation( PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); } - if (direction == 0 || direction == 2) - { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - } - else - { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - } + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); diff --git a/src/openrct2/ride/transport/SuspendedMonorail.cpp b/src/openrct2/ride/transport/SuspendedMonorail.cpp index 09a2186cb1..15686c28c8 100644 --- a/src/openrct2/ride/transport/SuspendedMonorail.cpp +++ b/src/openrct2/ride/transport/SuspendedMonorail.cpp @@ -73,8 +73,7 @@ static void SuspendedMonorailTrackStation( PaintAddImageAsChildRotated( session, direction, session.TrackColours[SCHEME_SUPPORTS].WithIndex(imageIds[direction][2]), { 0, 6, height + 32 }, { { 0, 6, height + 32 }, { 32, 20, 3 } }); - TrackPaintUtilDrawStationMetalSupports2( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_INVERTED_9); PaintUtilSetSegmentSupportHeight(session, SEGMENTS_ALL, 0xFFFF, 0); diff --git a/src/openrct2/ride/water/DingySlide.cpp b/src/openrct2/ride/water/DingySlide.cpp index 0072ac76c5..9dddc2a7cb 100644 --- a/src/openrct2/ride/water/DingySlide.cpp +++ b/src/openrct2/ride/water/DingySlide.cpp @@ -405,10 +405,7 @@ static void DinghySlideTrackStation( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - const auto support1Place = (direction & 1) ? MetalSupportPlace::TopRightSide : MetalSupportPlace::TopLeftSide; - const auto support2Place = (direction & 1) ? MetalSupportPlace::BottomLeftSide : MetalSupportPlace::BottomRightSide; - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, support1Place, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup(session, MetalSupportType::Tubes, support2Place, 0, height, session.TrackColours[SCHEME_SUPPORTS]); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); diff --git a/src/openrct2/ride/water/LogFlume.cpp b/src/openrct2/ride/water/LogFlume.cpp index d6a0c9ccad..12a63e80f5 100644 --- a/src/openrct2/ride/water/LogFlume.cpp +++ b/src/openrct2/ride/water/LogFlume.cpp @@ -200,23 +200,7 @@ static void PaintLogFlumeTrackStation( } PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); - if (direction & 1) - { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomLeftSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - } - else - { - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::TopLeftSide, 0, height, session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Boxed, MetalSupportPlace::BottomRightSide, 0, height, - session.TrackColours[SCHEME_SUPPORTS]); - } + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); TrackPaintUtilDrawStation3(session, ride, direction, height + 2, height, trackElement); // Covers shouldn't be offset by +2 @@ -825,25 +809,7 @@ static void PaintLogFlumeTrackOnRidePhoto( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement) { - PaintAddImageAsParent(session, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - - if (direction & 1) - { - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::TopRightSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::ForkAlt, MetalSupportPlace::BottomLeftSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); - } - else - { - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::TopLeftSide, 6, height, session.TrackColours[SCHEME_SUPPORTS]); - MetalASupportsPaintSetup( - session, MetalSupportType::Fork, MetalSupportPlace::BottomRightSide, 6, height, - session.TrackColours[SCHEME_SUPPORTS]); - } + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Boxed); auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(LogFlumeTrackFlatImageIds[direction][0]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 0 } });