diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index bb2c73c6f0..a28e90bb23 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -2060,6 +2060,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 }); + TrackPaintUtilDrawStationMetalSupports(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 9381bc75ba..a4b16ca1f9 100644 --- a/src/openrct2/ride/TrackPaint.h +++ b/src/openrct2/ride/TrackPaint.h @@ -367,6 +367,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/BobsleighCoaster.cpp b/src/openrct2/ride/coaster/BobsleighCoaster.cpp index a01d3a246e..022ce14ca8 100644 --- a/src/openrct2/ride/coaster/BobsleighCoaster.cpp +++ b/src/openrct2/ride/coaster/BobsleighCoaster.cpp @@ -3864,10 +3864,7 @@ static void BobsleighRCTrackOnRidePhoto( 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 }); - TrackPaintUtilDrawStationMetalSupports( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Tubes); switch (direction) { diff --git a/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp b/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp index 3d0abe08a9..cf51729fcf 100644 --- a/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp +++ b/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp @@ -4743,9 +4743,7 @@ static void BolligerMabillardTrackOnRidePhoto( 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 }); - TrackPaintUtilDrawStationMetalSupports(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], supportType); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, supportType); switch (direction) { diff --git a/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp b/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp index 3db423e0b7..19145a0ca6 100644 --- a/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp +++ b/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp @@ -5295,10 +5295,7 @@ static void CompactInvertedRCTrackOnRidePhoto( 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 }); - TrackPaintUtilDrawStationMetalSupports( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::TubesInverted); switch (direction) { diff --git a/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp b/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp index 54af8bd41b..9a30a99ca1 100644 --- a/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp @@ -5053,10 +5053,7 @@ static void CorkscrewRCTrackOnRidePhoto( 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 }); - TrackPaintUtilDrawStationMetalSupports( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Tubes); switch (direction) { diff --git a/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp b/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp index b9d7a5f4cb..f314e0a00c 100644 --- a/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp @@ -7666,10 +7666,8 @@ static void FlyingRCTrackOnRidePhoto( { if (!trackElement.IsInverted()) { - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::TubesInverted); + switch (direction) { case 0: @@ -7700,10 +7698,8 @@ static void FlyingRCTrackOnRidePhoto( } else { - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::TubesInverted); + switch (direction) { case 0: diff --git a/src/openrct2/ride/coaster/GigaCoaster.cpp b/src/openrct2/ride/coaster/GigaCoaster.cpp index 4840124ec2..ab55902e42 100644 --- a/src/openrct2/ride/coaster/GigaCoaster.cpp +++ b/src/openrct2/ride/coaster/GigaCoaster.cpp @@ -4337,10 +4337,7 @@ static void GigaRCTrackOnRidePhoto( 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 }); - TrackPaintUtilDrawStationMetalSupports( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Tubes); switch (direction) { diff --git a/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp b/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp index d9fc9fecb4..d852f5ec59 100644 --- a/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp @@ -5308,10 +5308,7 @@ static void InvertedRCTrackOnRidePhoto( 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 }); - TrackPaintUtilDrawStationMetalSupports( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Boxed); switch (direction) { diff --git a/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp b/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp index 1a8817e6dc..9f9c050f62 100644 --- a/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp @@ -3630,10 +3630,7 @@ static void LayDownRCTrackOnRidePhoto( } else { - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::TubesInverted); switch (direction) { diff --git a/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp b/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp index 4fd5480af9..4b0625e05d 100644 --- a/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp @@ -4748,10 +4748,7 @@ static void LoopingRCTrackOnRidePhoto( 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 }); - TrackPaintUtilDrawStationMetalSupports( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Tubes); switch (direction) { diff --git a/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp b/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp index c46916da95..fe9c3c78ef 100644 --- a/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp @@ -5212,10 +5212,7 @@ static void MultiDimensionRCTrackOnRidePhoto( { if (!trackElement.IsInverted()) { - PaintAddImageAsParentRotated( - session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::TubesInverted); switch (direction) { diff --git a/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp b/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp index 38d2fdfacb..45c7e6ba81 100644 --- a/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp @@ -11050,10 +11050,7 @@ namespace SingleRailRC 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 }); - TrackPaintUtilDrawStationMetalSupports( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Tubes); switch (direction) { diff --git a/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp b/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp index c33d6325ec..fc33be28da 100644 --- a/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp @@ -5245,10 +5245,7 @@ static void StandUpRCTrackOnRidePhoto( 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 }); - TrackPaintUtilDrawStationMetalSupports( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); + TrackPaintUtilOnridePhotoPlatformPaint(session, direction, height, MetalSupportType::Tubes); switch (direction) { diff --git a/src/openrct2/ride/water/LogFlume.cpp b/src/openrct2/ride/water/LogFlume.cpp index c24806fb31..a0dea32bd9 100644 --- a/src/openrct2/ride/water/LogFlume.cpp +++ b/src/openrct2/ride/water/LogFlume.cpp @@ -810,10 +810,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 }); - - TrackPaintUtilDrawStationMetalSupports( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); + 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 } });