From 7cf75ab11dce78e935da106ac4d0edd22f288555 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Mon, 16 Oct 2023 23:49:35 +0200 Subject: [PATCH 1/6] Use common method for station/on-ride supports --- src/openrct2/paint/Supports.cpp | 16 ++++ src/openrct2/paint/Supports.h | 7 ++ src/openrct2/ride/TrackPaint.cpp | 12 +-- src/openrct2/ride/TrackPaint.h | 2 +- .../ride/coaster/BobsleighCoaster.cpp | 37 ++------- .../ride/coaster/BolligerMabillardTrack.hpp | 28 +------ .../ride/coaster/CompactInvertedCoaster.cpp | 37 ++------- .../ride/coaster/CorkscrewRollerCoaster.cpp | 37 ++------- .../ride/coaster/FlyingRollerCoaster.cpp | 72 ++--------------- src/openrct2/ride/coaster/GigaCoaster.cpp | 37 ++------- .../ride/coaster/InvertedRollerCoaster.cpp | 37 ++------- .../ride/coaster/JuniorRollerCoaster.cpp | 81 +++---------------- .../ride/coaster/LayDownRollerCoaster.cpp | 37 ++------- .../ride/coaster/LoopingRollerCoaster.cpp | 41 ++-------- src/openrct2/ride/coaster/MineRide.cpp | 37 ++------- .../ride/coaster/MiniRollerCoaster.cpp | 37 ++------- .../coaster/MultiDimensionRollerCoaster.cpp | 37 ++------- .../ride/coaster/SingleRailRollerCoaster.cpp | 37 ++------- .../ride/coaster/StandUpRollerCoaster.cpp | 37 ++------- src/openrct2/ride/gentle/CarRide.cpp | 19 +---- src/openrct2/ride/gentle/GhostTrain.cpp | 19 +---- src/openrct2/ride/gentle/MiniHelicopters.cpp | 19 +---- src/openrct2/ride/gentle/MonorailCycles.cpp | 19 +---- src/openrct2/ride/transport/Monorail.cpp | 19 +---- src/openrct2/ride/water/DingySlide.cpp | 6 +- src/openrct2/ride/water/LogFlume.cpp | 38 +-------- 26 files changed, 133 insertions(+), 672 deletions(-) diff --git a/src/openrct2/paint/Supports.cpp b/src/openrct2/paint/Supports.cpp index 1fb10c294b..5ee320a0be 100644 --- a/src/openrct2/paint/Supports.cpp +++ b/src/openrct2/paint/Supports.cpp @@ -1539,3 +1539,19 @@ bool PathBSupportsPaintSetup( return false; // AND } + +MetalSupportType RotatedMetalSupports[MetalSupportTypeCount][2] = { + { MetalSupportType::Tubes, MetalSupportType::Tubes }, + { MetalSupportType::Fork, MetalSupportType::ForkAlt }, + { MetalSupportType::ForkAlt, MetalSupportType::Fork }, + { MetalSupportType::Boxed, MetalSupportType::Boxed }, + { MetalSupportType::Stick, MetalSupportType::StickAlt }, + { MetalSupportType::StickAlt, MetalSupportType::Stick }, + { MetalSupportType::ThickCentred, MetalSupportType::ThickAltCentred }, + { MetalSupportType::Thick, MetalSupportType::ThickAlt }, + { MetalSupportType::ThickAlt, MetalSupportType::Thick }, + { MetalSupportType::ThickAltCentred, MetalSupportType::ThickCentred }, + { MetalSupportType::Truss, MetalSupportType::Truss }, + { MetalSupportType::TubesInverted, MetalSupportType::TubesInverted }, + { MetalSupportType::BoxedCoated, MetalSupportType::BoxedCoated }, +}; diff --git a/src/openrct2/paint/Supports.h b/src/openrct2/paint/Supports.h index 705faaf6ea..8cf7c7d897 100644 --- a/src/openrct2/paint/Supports.h +++ b/src/openrct2/paint/Supports.h @@ -93,6 +93,13 @@ enum class MetalSupportType : uint8_t */ BoxedCoated, }; +constexpr uint8_t MetalSupportTypeCount = 13; + +/** + * Each pair corresponds with a type of metal support. The first entry is for even rotations (0 and 2), + * the second entry is for odd rotations (1 and 3). + */ +extern MetalSupportType RotatedMetalSupports[MetalSupportTypeCount][2]; /** * Tiles are rendered at a 45 degree angle, with the corners on the top, bottom, left and right. diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index 48b5e1523d..1e11c3ffcc 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -949,17 +949,19 @@ void TrackPaintUtilDrawStationMetalSupports(PaintSession& session, Direction dir } void TrackPaintUtilDrawStationMetalSupports2( - PaintSession& session, Direction direction, uint16_t height, ImageId colour, MetalSupportType type) + PaintSession& session, Direction direction, uint16_t height, ImageId colour, MetalSupportType type, int32_t special) { if (direction & 1) { - MetalASupportsPaintSetup(session, type, MetalSupportPlace::TopRightSide, 0, height, colour); - MetalASupportsPaintSetup(session, type, MetalSupportPlace::BottomLeftSide, 0, height, colour); + type = RotatedMetalSupports[EnumValue(type)][1]; + + MetalASupportsPaintSetup(session, type, MetalSupportPlace::TopRightSide, special, height, colour); + MetalASupportsPaintSetup(session, type, MetalSupportPlace::BottomLeftSide, special, height, colour); } else { - MetalASupportsPaintSetup(session, type, MetalSupportPlace::TopLeftSide, 0, height, colour); - MetalASupportsPaintSetup(session, type, MetalSupportPlace::BottomRightSide, 0, height, colour); + MetalASupportsPaintSetup(session, type, MetalSupportPlace::TopLeftSide, special, height, colour); + MetalASupportsPaintSetup(session, type, MetalSupportPlace::BottomRightSide, special, height, colour); } } diff --git a/src/openrct2/ride/TrackPaint.h b/src/openrct2/ride/TrackPaint.h index 8c7617bbdf..e384279bcd 100644 --- a/src/openrct2/ride/TrackPaint.h +++ b/src/openrct2/ride/TrackPaint.h @@ -316,7 +316,7 @@ void TrackPaintUtilDrawPier( 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); + PaintSession& session, Direction direction, uint16_t height, ImageId colour, MetalSupportType type, int32_t special = 0); void TrackPaintUtilRightQuarterTurn5TilesPaint( PaintSession& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, diff --git a/src/openrct2/ride/coaster/BobsleighCoaster.cpp b/src/openrct2/ride/coaster/BobsleighCoaster.cpp index 9276475573..2d50df1e86 100644 --- a/src/openrct2/ride/coaster/BobsleighCoaster.cpp +++ b/src/openrct2/ride/coaster/BobsleighCoaster.cpp @@ -3864,17 +3864,14 @@ 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 }); + TrackPaintUtilDrawStationMetalSupports2( + session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 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 +3880,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 +3888,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 +3897,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..21f5016e00 100644 --- a/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp +++ b/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp @@ -4743,48 +4743,28 @@ 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 }); + TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 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..2d52728255 100644 --- a/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp +++ b/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp @@ -5295,56 +5295,29 @@ 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 }); + TrackPaintUtilDrawStationMetalSupports2( + session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 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..0ed656e52f 100644 --- a/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp @@ -5053,56 +5053,29 @@ 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 }); + TrackPaintUtilDrawStationMetalSupports2( + session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 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..48b95dfb11 100644 --- a/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp @@ -7666,56 +7666,28 @@ static void FlyingRCTrackOnRidePhoto( { if (!trackElement.IsInverted()) { + PaintAddImageAsParentRotated( + session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); + TrackPaintUtilDrawStationMetalSupports2( + session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 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 +7700,28 @@ static void FlyingRCTrackOnRidePhoto( } else { + PaintAddImageAsParentRotated( + session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); + TrackPaintUtilDrawStationMetalSupports2( + session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 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..5868b5a17c 100644 --- a/src/openrct2/ride/coaster/GigaCoaster.cpp +++ b/src/openrct2/ride/coaster/GigaCoaster.cpp @@ -4337,56 +4337,29 @@ 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 }); + TrackPaintUtilDrawStationMetalSupports2( + session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 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/InvertedRollerCoaster.cpp b/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp index 35b1b68dbe..049d5488f1 100644 --- a/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp @@ -5308,56 +5308,29 @@ 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 }); + TrackPaintUtilDrawStationMetalSupports2( + session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 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..514b65c4b7 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,12 @@ 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); } + TrackPaintUtilDrawStationMetalSupports2( + 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 +5960,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 }); + TrackPaintUtilDrawStationMetalSupports2( + 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..49db12971a 100644 --- a/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp @@ -3630,56 +3630,29 @@ static void LayDownRCTrackOnRidePhoto( } else { + PaintAddImageAsParentRotated( + session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); + TrackPaintUtilDrawStationMetalSupports2( + session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 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/LoopingRollerCoaster.cpp b/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp index ccfe6404e2..0e32f851c8 100644 --- a/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp @@ -4748,60 +4748,29 @@ 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 }); + TrackPaintUtilDrawStationMetalSupports2( + session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 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..28f3e842d0 100644 --- a/src/openrct2/ride/coaster/MineRide.cpp +++ b/src/openrct2/ride/coaster/MineRide.cpp @@ -3407,56 +3407,29 @@ 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 }); + TrackPaintUtilDrawStationMetalSupports2( + 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/MiniRollerCoaster.cpp b/src/openrct2/ride/coaster/MiniRollerCoaster.cpp index 1a85183db9..1855555039 100644 --- a/src/openrct2/ride/coaster/MiniRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/MiniRollerCoaster.cpp @@ -4794,56 +4794,29 @@ 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 }); + TrackPaintUtilDrawStationMetalSupports2( + 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/MultiDimensionRollerCoaster.cpp b/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp index 05630dbede..73e79a6736 100644 --- a/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp @@ -5212,56 +5212,29 @@ static void MultiDimensionRCTrackOnRidePhoto( { if (!trackElement.IsInverted()) { + PaintAddImageAsParentRotated( + session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); + TrackPaintUtilDrawStationMetalSupports2( + session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 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..8c8da51da4 100644 --- a/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp @@ -11050,56 +11050,29 @@ 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 }); + TrackPaintUtilDrawStationMetalSupports2( + session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 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..8c7e8d94e8 100644 --- a/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp @@ -5245,56 +5245,29 @@ 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 }); + TrackPaintUtilDrawStationMetalSupports2( + session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 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/gentle/CarRide.cpp b/src/openrct2/ride/gentle/CarRide.cpp index c7b5f91b40..c5045879f0 100644 --- a/src/openrct2/ride/gentle/CarRide.cpp +++ b/src/openrct2/ride/gentle/CarRide.cpp @@ -365,23 +365,8 @@ 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]); - } + TrackPaintUtilDrawStationMetalSupports2( + 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..bda2b3d207 100644 --- a/src/openrct2/ride/gentle/GhostTrain.cpp +++ b/src/openrct2/ride/gentle/GhostTrain.cpp @@ -392,23 +392,8 @@ 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]); - } + TrackPaintUtilDrawStationMetalSupports2( + 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..90cc3e8802 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,12 @@ 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); } + TrackPaintUtilDrawStationMetalSupports2( + 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..f01eb35049 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,12 @@ 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); } + TrackPaintUtilDrawStationMetalSupports2( + 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..4b2f831c00 100644 --- a/src/openrct2/ride/transport/Monorail.cpp +++ b/src/openrct2/ride/transport/Monorail.cpp @@ -462,23 +462,8 @@ 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]); - } + TrackPaintUtilDrawStationMetalSupports2( + session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); diff --git a/src/openrct2/ride/water/DingySlide.cpp b/src/openrct2/ride/water/DingySlide.cpp index 0072ac76c5..7b3618759d 100644 --- a/src/openrct2/ride/water/DingySlide.cpp +++ b/src/openrct2/ride/water/DingySlide.cpp @@ -405,10 +405,8 @@ 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]); + TrackPaintUtilDrawStationMetalSupports2( + 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..449ef9437e 100644 --- a/src/openrct2/ride/water/LogFlume.cpp +++ b/src/openrct2/ride/water/LogFlume.cpp @@ -200,23 +200,8 @@ 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]); - } + TrackPaintUtilDrawStationMetalSupports2( + session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); TrackPaintUtilDrawStation3(session, ride, direction, height + 2, height, trackElement); // Covers shouldn't be offset by +2 @@ -827,23 +812,8 @@ static void PaintLogFlumeTrackOnRidePhoto( { 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]); - } + TrackPaintUtilDrawStationMetalSupports2( + session, direction, height, session.TrackColours[SCHEME_SUPPORTS], 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 } }); From 4ee088e27d3950dce077344e3095b99c09640733 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Thu, 19 Oct 2023 00:03:49 +0200 Subject: [PATCH 2/6] Also include the thick supports in RotatedMetalSupports --- src/openrct2/paint/Supports.cpp | 30 ++++++++++++++++-------------- src/openrct2/paint/Supports.h | 6 +----- src/openrct2/ride/TrackPaint.cpp | 4 ++-- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/openrct2/paint/Supports.cpp b/src/openrct2/paint/Supports.cpp index 5ee320a0be..8f56f23a4a 100644 --- a/src/openrct2/paint/Supports.cpp +++ b/src/openrct2/paint/Supports.cpp @@ -1540,18 +1540,20 @@ bool PathBSupportsPaintSetup( return false; // AND } -MetalSupportType RotatedMetalSupports[MetalSupportTypeCount][2] = { - { MetalSupportType::Tubes, MetalSupportType::Tubes }, - { MetalSupportType::Fork, MetalSupportType::ForkAlt }, - { MetalSupportType::ForkAlt, MetalSupportType::Fork }, - { MetalSupportType::Boxed, MetalSupportType::Boxed }, - { MetalSupportType::Stick, MetalSupportType::StickAlt }, - { MetalSupportType::StickAlt, MetalSupportType::Stick }, - { MetalSupportType::ThickCentred, MetalSupportType::ThickAltCentred }, - { MetalSupportType::Thick, MetalSupportType::ThickAlt }, - { MetalSupportType::ThickAlt, MetalSupportType::Thick }, - { MetalSupportType::ThickAltCentred, MetalSupportType::ThickCentred }, - { MetalSupportType::Truss, MetalSupportType::Truss }, - { MetalSupportType::TubesInverted, MetalSupportType::TubesInverted }, - { MetalSupportType::BoxedCoated, MetalSupportType::BoxedCoated }, +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 }, }; diff --git a/src/openrct2/paint/Supports.h b/src/openrct2/paint/Supports.h index 8cf7c7d897..ab9af53cbf 100644 --- a/src/openrct2/paint/Supports.h +++ b/src/openrct2/paint/Supports.h @@ -95,11 +95,7 @@ enum class MetalSupportType : uint8_t }; constexpr uint8_t MetalSupportTypeCount = 13; -/** - * Each pair corresponds with a type of metal support. The first entry is for even rotations (0 and 2), - * the second entry is for odd rotations (1 and 3). - */ -extern MetalSupportType RotatedMetalSupports[MetalSupportTypeCount][2]; +extern MetalSupportType RotatedMetalSupports[MetalSupportTypeCount][NumOrthogonalDirections]; /** * Tiles are rendered at a 45 degree angle, with the corners on the top, bottom, left and right. diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index 1e11c3ffcc..558f840314 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -951,10 +951,10 @@ void TrackPaintUtilDrawStationMetalSupports(PaintSession& session, Direction dir void TrackPaintUtilDrawStationMetalSupports2( PaintSession& session, Direction direction, uint16_t height, ImageId colour, MetalSupportType type, int32_t special) { + type = RotatedMetalSupports[EnumValue(type)][direction]; + if (direction & 1) { - type = RotatedMetalSupports[EnumValue(type)][1]; - MetalASupportsPaintSetup(session, type, MetalSupportPlace::TopRightSide, special, height, colour); MetalASupportsPaintSetup(session, type, MetalSupportPlace::BottomLeftSide, special, height, colour); } From 0e5c4133857a22bf20d7c5f30ffdbba35c0508f9 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Thu, 19 Oct 2023 00:05:36 +0200 Subject: [PATCH 3/6] Merge TrackPaintUtilDrawStationMetalSupports() and ...2() --- src/openrct2/ride/TrackPaint.cpp | 7 +------ src/openrct2/ride/TrackPaint.h | 3 +-- src/openrct2/ride/coaster/AlpineCoaster.cpp | 3 ++- src/openrct2/ride/coaster/BobsleighCoaster.cpp | 4 ++-- src/openrct2/ride/coaster/BolligerMabillardTrack.hpp | 4 ++-- src/openrct2/ride/coaster/CompactInvertedCoaster.cpp | 4 ++-- src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp | 4 ++-- src/openrct2/ride/coaster/FlyingRollerCoaster.cpp | 8 ++++---- src/openrct2/ride/coaster/GigaCoaster.cpp | 4 ++-- src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp | 2 +- src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp | 2 +- src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp | 2 +- src/openrct2/ride/coaster/InvertedRollerCoaster.cpp | 4 ++-- src/openrct2/ride/coaster/JuniorRollerCoaster.cpp | 4 ++-- src/openrct2/ride/coaster/LayDownRollerCoaster.cpp | 4 ++-- src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp | 2 +- src/openrct2/ride/coaster/LoopingRollerCoaster.cpp | 4 ++-- src/openrct2/ride/coaster/MineRide.cpp | 4 ++-- src/openrct2/ride/coaster/MineTrainCoaster.cpp | 2 +- src/openrct2/ride/coaster/MiniRollerCoaster.cpp | 4 ++-- src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp | 2 +- src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp | 4 ++-- src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp | 4 ++-- src/openrct2/ride/coaster/StandUpRollerCoaster.cpp | 4 ++-- src/openrct2/ride/coaster/Steeplechase.cpp | 2 +- src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp | 2 +- src/openrct2/ride/coaster/WildMouse.cpp | 3 ++- src/openrct2/ride/gentle/CarRide.cpp | 2 +- src/openrct2/ride/gentle/GhostTrain.cpp | 2 +- src/openrct2/ride/gentle/MiniHelicopters.cpp | 2 +- src/openrct2/ride/gentle/MonorailCycles.cpp | 2 +- src/openrct2/ride/transport/Monorail.cpp | 2 +- src/openrct2/ride/transport/SuspendedMonorail.cpp | 2 +- src/openrct2/ride/water/DingySlide.cpp | 2 +- src/openrct2/ride/water/LogFlume.cpp | 4 ++-- 35 files changed, 55 insertions(+), 59 deletions(-) diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index 558f840314..bb2c73c6f0 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -943,12 +943,7 @@ void TrackPaintUtilDrawPier( } } -void TrackPaintUtilDrawStationMetalSupports(PaintSession& session, Direction direction, uint16_t height, ImageId colour) -{ - TrackPaintUtilDrawStationMetalSupports2(session, direction, height, colour, MetalSupportType::Boxed); -} - -void TrackPaintUtilDrawStationMetalSupports2( +void TrackPaintUtilDrawStationMetalSupports( PaintSession& session, Direction direction, uint16_t height, ImageId colour, MetalSupportType type, int32_t special) { type = RotatedMetalSupports[EnumValue(type)][direction]; diff --git a/src/openrct2/ride/TrackPaint.h b/src/openrct2/ride/TrackPaint.h index e384279bcd..9381bc75ba 100644 --- a/src/openrct2/ride/TrackPaint.h +++ b/src/openrct2/ride/TrackPaint.h @@ -314,8 +314,7 @@ 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( +void TrackPaintUtilDrawStationMetalSupports( PaintSession& session, Direction direction, uint16_t height, ImageId colour, MetalSupportType type, int32_t special = 0); void TrackPaintUtilRightQuarterTurn5TilesPaint( diff --git a/src/openrct2/ride/coaster/AlpineCoaster.cpp b/src/openrct2/ride/coaster/AlpineCoaster.cpp index 1415ed0e1c..41e8e545e0 100644 --- a/src/openrct2/ride/coaster/AlpineCoaster.cpp +++ b/src/openrct2/ride/coaster/AlpineCoaster.cpp @@ -118,7 +118,8 @@ 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]); + TrackPaintUtilDrawStationMetalSupports( + 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 2d50df1e86..a01d3a246e 100644 --- a/src/openrct2/ride/coaster/BobsleighCoaster.cpp +++ b/src/openrct2/ride/coaster/BobsleighCoaster.cpp @@ -116,7 +116,7 @@ static void BobsleighRCTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -3866,7 +3866,7 @@ static void BobsleighRCTrackOnRidePhoto( { PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); switch (direction) diff --git a/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp b/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp index 21f5016e00..3d0abe08a9 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); + TrackPaintUtilDrawStationMetalSupports(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], supportType); TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 9, trackElement); @@ -4745,7 +4745,7 @@ static void BolligerMabillardTrackOnRidePhoto( { PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], supportType); + TrackPaintUtilDrawStationMetalSupports(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], supportType); switch (direction) { diff --git a/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp b/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp index 2d52728255..3db423e0b7 100644 --- a/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp +++ b/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp @@ -116,7 +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( + TrackPaintUtilDrawStationMetalSupports( 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); @@ -5297,7 +5297,7 @@ static void CompactInvertedRCTrackOnRidePhoto( { PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); switch (direction) diff --git a/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp b/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp index 0ed656e52f..54af8bd41b 100644 --- a/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp @@ -145,7 +145,7 @@ static void CorkscrewRCTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -5055,7 +5055,7 @@ static void CorkscrewRCTrackOnRidePhoto( { PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); switch (direction) diff --git a/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp b/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp index 48b95dfb11..b9d7a5f4cb 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( + TrackPaintUtilDrawStationMetalSupports( 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( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); } @@ -7668,7 +7668,7 @@ static void FlyingRCTrackOnRidePhoto( { PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); switch (direction) { @@ -7702,7 +7702,7 @@ static void FlyingRCTrackOnRidePhoto( { PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); switch (direction) { diff --git a/src/openrct2/ride/coaster/GigaCoaster.cpp b/src/openrct2/ride/coaster/GigaCoaster.cpp index 5868b5a17c..4840124ec2 100644 --- a/src/openrct2/ride/coaster/GigaCoaster.cpp +++ b/src/openrct2/ride/coaster/GigaCoaster.cpp @@ -195,7 +195,7 @@ static void GigaRCTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -4339,7 +4339,7 @@ static void GigaRCTrackOnRidePhoto( { PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); switch (direction) diff --git a/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp b/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp index 062a673ed5..313160d08c 100644 --- a/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp +++ b/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp @@ -113,7 +113,7 @@ static void HeartlineTwisterRCTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); diff --git a/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp b/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp index 3a15a148b9..ab162bd72a 100644 --- a/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp +++ b/src/openrct2/ride/coaster/InvertedHairpinCoaster.cpp @@ -102,7 +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( + TrackPaintUtilDrawStationMetalSupports( 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); diff --git a/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp b/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp index 6774697956..c9a589bdd9 100644 --- a/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp +++ b/src/openrct2/ride/coaster/InvertedImpulseCoaster.cpp @@ -73,7 +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( + TrackPaintUtilDrawStationMetalSupports( 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); diff --git a/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp b/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp index 049d5488f1..d9fc9fecb4 100644 --- a/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/InvertedRollerCoaster.cpp @@ -100,7 +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( + TrackPaintUtilDrawStationMetalSupports( 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); @@ -5310,7 +5310,7 @@ static void InvertedRCTrackOnRidePhoto( { PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); switch (direction) diff --git a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp index 514b65c4b7..cedb8f3e5d 100644 --- a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp @@ -1911,7 +1911,7 @@ void JuniorRCPaintStation( PaintAddImageAsChild(session, imageId, { 6, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); } - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -5962,7 +5962,7 @@ static void JuniorRCTrackOnRidePhoto( constexpr int8_t photoCameraOffset = -1; PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height + photoCameraOffset }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( 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 } }); diff --git a/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp b/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp index 49db12971a..1a8817e6dc 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( + TrackPaintUtilDrawStationMetalSupports( 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); @@ -3632,7 +3632,7 @@ static void LayDownRCTrackOnRidePhoto( { PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); switch (direction) diff --git a/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp b/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp index 1cb1006fee..902764cdbc 100644 --- a/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp @@ -58,7 +58,7 @@ static void LimLaunchedRCTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); diff --git a/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp b/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp index 0e32f851c8..4fd5480af9 100644 --- a/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/LoopingRollerCoaster.cpp @@ -119,7 +119,7 @@ static void LoopingRCTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -4750,7 +4750,7 @@ static void LoopingRCTrackOnRidePhoto( { PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); switch (direction) diff --git a/src/openrct2/ride/coaster/MineRide.cpp b/src/openrct2/ride/coaster/MineRide.cpp index 28f3e842d0..d8b7784f99 100644 --- a/src/openrct2/ride/coaster/MineRide.cpp +++ b/src/openrct2/ride/coaster/MineRide.cpp @@ -73,7 +73,7 @@ static void MineRideTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -3409,7 +3409,7 @@ static void MineRideTrackOnRidePhoto( { PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Fork, 6); switch (direction) diff --git a/src/openrct2/ride/coaster/MineTrainCoaster.cpp b/src/openrct2/ride/coaster/MineTrainCoaster.cpp index 862bbcf3d1..4e1a1e3c08 100644 --- a/src/openrct2/ride/coaster/MineTrainCoaster.cpp +++ b/src/openrct2/ride/coaster/MineTrainCoaster.cpp @@ -160,7 +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( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); diff --git a/src/openrct2/ride/coaster/MiniRollerCoaster.cpp b/src/openrct2/ride/coaster/MiniRollerCoaster.cpp index 1855555039..f816cbf419 100644 --- a/src/openrct2/ride/coaster/MiniRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/MiniRollerCoaster.cpp @@ -148,7 +148,7 @@ static void MiniRCTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -4796,7 +4796,7 @@ static void MiniRCTrackOnRidePhoto( { PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Fork, 6); switch (direction) diff --git a/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp b/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp index b9089bfdf9..ea3c6dcdaf 100644 --- a/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp +++ b/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp @@ -106,7 +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( + TrackPaintUtilDrawStationMetalSupports( 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); diff --git a/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp b/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp index 73e79a6736..c46916da95 100644 --- a/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/MultiDimensionRollerCoaster.cpp @@ -196,7 +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( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); const auto* stationObj = ride.GetStationObject(); @@ -5214,7 +5214,7 @@ static void MultiDimensionRCTrackOnRidePhoto( { PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); switch (direction) diff --git a/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp b/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp index 8c8da51da4..38d2fdfacb 100644 --- a/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp @@ -122,7 +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( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 4, 7); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -11052,7 +11052,7 @@ namespace SingleRailRC { PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); switch (direction) diff --git a/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp b/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp index 8c7e8d94e8..c33d6325ec 100644 --- a/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp @@ -139,7 +139,7 @@ static void StandUpRCTrackStation( PaintAddImageAsParentRotated( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); @@ -5247,7 +5247,7 @@ static void StandUpRCTrackOnRidePhoto( { PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Tubes); switch (direction) diff --git a/src/openrct2/ride/coaster/Steeplechase.cpp b/src/openrct2/ride/coaster/Steeplechase.cpp index fafa3bec6b..26e4c22501 100644 --- a/src/openrct2/ride/coaster/Steeplechase.cpp +++ b/src/openrct2/ride/coaster/Steeplechase.cpp @@ -97,7 +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( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); diff --git a/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp b/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp index 15e2d8dbe0..de04357d6b 100644 --- a/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp +++ b/src/openrct2/ride/coaster/SuspendedSwingingCoaster.cpp @@ -93,7 +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( + TrackPaintUtilDrawStationMetalSupports( 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); diff --git a/src/openrct2/ride/coaster/WildMouse.cpp b/src/openrct2/ride/coaster/WildMouse.cpp index 540598c360..6d07927b92 100644 --- a/src/openrct2/ride/coaster/WildMouse.cpp +++ b/src/openrct2/ride/coaster/WildMouse.cpp @@ -218,7 +218,8 @@ 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]); + TrackPaintUtilDrawStationMetalSupports( + 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 c5045879f0..cad01e19b5 100644 --- a/src/openrct2/ride/gentle/CarRide.cpp +++ b/src/openrct2/ride/gentle/CarRide.cpp @@ -365,7 +365,7 @@ static void PaintCarRideStation( PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); } - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( 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 bda2b3d207..522f9230cb 100644 --- a/src/openrct2/ride/gentle/GhostTrain.cpp +++ b/src/openrct2/ride/gentle/GhostTrain.cpp @@ -392,7 +392,7 @@ static void PaintGhostTrainStation( PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( 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 90cc3e8802..8229a111b0 100644 --- a/src/openrct2/ride/gentle/MiniHelicopters.cpp +++ b/src/openrct2/ride/gentle/MiniHelicopters.cpp @@ -40,7 +40,7 @@ static void PaintMiniHelicoptersTrackStation( PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); } - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); diff --git a/src/openrct2/ride/gentle/MonorailCycles.cpp b/src/openrct2/ride/gentle/MonorailCycles.cpp index f01eb35049..2e84cb1ab9 100644 --- a/src/openrct2/ride/gentle/MonorailCycles.cpp +++ b/src/openrct2/ride/gentle/MonorailCycles.cpp @@ -209,7 +209,7 @@ static void PaintMonorailCyclesStation( PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); } - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); diff --git a/src/openrct2/ride/transport/Monorail.cpp b/src/openrct2/ride/transport/Monorail.cpp index 4b2f831c00..1023497e7d 100644 --- a/src/openrct2/ride/transport/Monorail.cpp +++ b/src/openrct2/ride/transport/Monorail.cpp @@ -462,7 +462,7 @@ static void PaintMonorailStation( PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); } - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( 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..e4d93fec3d 100644 --- a/src/openrct2/ride/transport/SuspendedMonorail.cpp +++ b/src/openrct2/ride/transport/SuspendedMonorail.cpp @@ -73,7 +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( + TrackPaintUtilDrawStationMetalSupports( 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); diff --git a/src/openrct2/ride/water/DingySlide.cpp b/src/openrct2/ride/water/DingySlide.cpp index 7b3618759d..c4a81ab177 100644 --- a/src/openrct2/ride/water/DingySlide.cpp +++ b/src/openrct2/ride/water/DingySlide.cpp @@ -405,7 +405,7 @@ static void DinghySlideTrackStation( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( 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 449ef9437e..c24806fb31 100644 --- a/src/openrct2/ride/water/LogFlume.cpp +++ b/src/openrct2/ride/water/LogFlume.cpp @@ -200,7 +200,7 @@ static void PaintLogFlumeTrackStation( } PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); TrackPaintUtilDrawStation3(session, ride, direction, height + 2, height, trackElement); @@ -812,7 +812,7 @@ static void PaintLogFlumeTrackOnRidePhoto( { PaintAddImageAsParent(session, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports2( + TrackPaintUtilDrawStationMetalSupports( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); auto imageId = session.TrackColours[SCHEME_TRACK].WithIndex(LogFlumeTrackFlatImageIds[direction][0]); From 2d16df1072bb7e24410b2b9689cfaaad7f709b23 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Thu, 19 Oct 2023 00:30:21 +0200 Subject: [PATCH 4/6] Create TrackPaintUtilOnridePhotoPlatformPaint() --- src/openrct2/ride/TrackPaint.cpp | 7 +++++++ src/openrct2/ride/TrackPaint.h | 12 ++++++++++++ src/openrct2/ride/coaster/BobsleighCoaster.cpp | 5 +---- src/openrct2/ride/coaster/BolligerMabillardTrack.hpp | 4 +--- src/openrct2/ride/coaster/CompactInvertedCoaster.cpp | 5 +---- src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp | 5 +---- src/openrct2/ride/coaster/FlyingRollerCoaster.cpp | 12 ++++-------- src/openrct2/ride/coaster/GigaCoaster.cpp | 5 +---- src/openrct2/ride/coaster/InvertedRollerCoaster.cpp | 5 +---- src/openrct2/ride/coaster/LayDownRollerCoaster.cpp | 5 +---- src/openrct2/ride/coaster/LoopingRollerCoaster.cpp | 5 +---- .../ride/coaster/MultiDimensionRollerCoaster.cpp | 5 +---- .../ride/coaster/SingleRailRollerCoaster.cpp | 5 +---- src/openrct2/ride/coaster/StandUpRollerCoaster.cpp | 5 +---- src/openrct2/ride/water/LogFlume.cpp | 5 +---- 15 files changed, 35 insertions(+), 55 deletions(-) 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 } }); From 3b074be920ce5bd4659e6ce37360489ba93c152c Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sun, 22 Oct 2023 00:37:45 +0200 Subject: [PATCH 5/6] Confine RotatedMetalSupports to Supports.cpp --- src/openrct2/paint/Supports.cpp | 19 ++++++++++++++++++- src/openrct2/paint/Supports.h | 4 ++-- src/openrct2/ride/TrackPaint.cpp | 19 +------------------ src/openrct2/ride/TrackPaint.h | 2 -- src/openrct2/ride/coaster/AlpineCoaster.cpp | 3 +-- .../ride/coaster/BobsleighCoaster.cpp | 3 +-- .../ride/coaster/BolligerMabillardTrack.hpp | 2 +- .../ride/coaster/CompactInvertedCoaster.cpp | 3 +-- .../ride/coaster/CorkscrewRollerCoaster.cpp | 3 +-- .../ride/coaster/FlyingRollerCoaster.cpp | 4 ++-- src/openrct2/ride/coaster/GigaCoaster.cpp | 3 +-- .../ride/coaster/HeartlineTwisterCoaster.cpp | 3 +-- .../ride/coaster/InvertedHairpinCoaster.cpp | 3 +-- .../ride/coaster/InvertedImpulseCoaster.cpp | 3 +-- .../ride/coaster/InvertedRollerCoaster.cpp | 3 +-- .../ride/coaster/JuniorRollerCoaster.cpp | 5 ++--- .../ride/coaster/LayDownRollerCoaster.cpp | 2 +- .../ride/coaster/LimLaunchedRollerCoaster.cpp | 3 +-- .../ride/coaster/LoopingRollerCoaster.cpp | 3 +-- src/openrct2/ride/coaster/MineRide.cpp | 6 ++---- .../ride/coaster/MineTrainCoaster.cpp | 3 +-- .../ride/coaster/MiniRollerCoaster.cpp | 6 ++---- .../ride/coaster/MiniSuspendedCoaster.cpp | 3 +-- .../coaster/MultiDimensionRollerCoaster.cpp | 3 +-- .../ride/coaster/SingleRailRollerCoaster.cpp | 3 +-- .../ride/coaster/StandUpRollerCoaster.cpp | 3 +-- src/openrct2/ride/coaster/Steeplechase.cpp | 3 +-- .../ride/coaster/SuspendedSwingingCoaster.cpp | 3 +-- src/openrct2/ride/coaster/WildMouse.cpp | 3 +-- src/openrct2/ride/gentle/CarRide.cpp | 3 +-- src/openrct2/ride/gentle/GhostTrain.cpp | 3 +-- src/openrct2/ride/gentle/MiniHelicopters.cpp | 3 +-- src/openrct2/ride/gentle/MonorailCycles.cpp | 3 +-- src/openrct2/ride/transport/Monorail.cpp | 3 +-- .../ride/transport/SuspendedMonorail.cpp | 3 +-- src/openrct2/ride/water/DingySlide.cpp | 3 +-- src/openrct2/ride/water/LogFlume.cpp | 3 +-- 37 files changed, 58 insertions(+), 92 deletions(-) diff --git a/src/openrct2/paint/Supports.cpp b/src/openrct2/paint/Supports.cpp index 8f56f23a4a..8e7d82da46 100644 --- a/src/openrct2/paint/Supports.cpp +++ b/src/openrct2/paint/Supports.cpp @@ -1540,7 +1540,7 @@ bool PathBSupportsPaintSetup( return false; // AND } -MetalSupportType RotatedMetalSupports[MetalSupportTypeCount][NumOrthogonalDirections] = { +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 }, @@ -1557,3 +1557,20 @@ MetalSupportType RotatedMetalSupports[MetalSupportTypeCount][NumOrthogonalDirect { 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 ab9af53cbf..7c040607dc 100644 --- a/src/openrct2/paint/Supports.h +++ b/src/openrct2/paint/Supports.h @@ -95,8 +95,6 @@ enum class MetalSupportType : uint8_t }; constexpr uint8_t MetalSupportTypeCount = 13; -extern MetalSupportType RotatedMetalSupports[MetalSupportTypeCount][NumOrthogonalDirections]; - /** * Tiles are rendered at a 45 degree angle, with the corners on the top, bottom, left and right. * This enum controls where the supports are rendered on the screen. @@ -150,6 +148,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 a28e90bb23..fc85e54edd 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -943,23 +943,6 @@ void TrackPaintUtilDrawPier( } } -void TrackPaintUtilDrawStationMetalSupports( - 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); - } -} - constexpr CoordsXY defaultRightHelixUpSmallQuarterBoundLengths[4][3][2] = { { { { 32, 20 }, { 0, 0 } }, @@ -2064,7 +2047,7 @@ 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); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], supportType); } void TrackPaintUtilOnridePhotoSmallPaint( diff --git a/src/openrct2/ride/TrackPaint.h b/src/openrct2/ride/TrackPaint.h index a4b16ca1f9..0e9d6f8126 100644 --- a/src/openrct2/ride/TrackPaint.h +++ b/src/openrct2/ride/TrackPaint.h @@ -314,8 +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, MetalSupportType type, int32_t special = 0); void TrackPaintUtilRightQuarterTurn5TilesPaint( PaintSession& session, int8_t thickness, int16_t height, Direction direction, uint8_t trackSequence, diff --git a/src/openrct2/ride/coaster/AlpineCoaster.cpp b/src/openrct2/ride/coaster/AlpineCoaster.cpp index 41e8e545e0..713e0f0c21 100644 --- a/src/openrct2/ride/coaster/AlpineCoaster.cpp +++ b/src/openrct2/ride/coaster/AlpineCoaster.cpp @@ -118,8 +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], MetalSupportType::Boxed); + 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 022ce14ca8..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 }); - TrackPaintUtilDrawStationMetalSupports( - 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/BolligerMabillardTrack.hpp b/src/openrct2/ride/coaster/BolligerMabillardTrack.hpp index cf51729fcf..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 }); - TrackPaintUtilDrawStationMetalSupports(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], supportType); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], supportType); TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 9, trackElement); diff --git a/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp b/src/openrct2/ride/coaster/CompactInvertedCoaster.cpp index 19145a0ca6..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 } }); - TrackPaintUtilDrawStationMetalSupports( - 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/CorkscrewRollerCoaster.cpp b/src/openrct2/ride/coaster/CorkscrewRollerCoaster.cpp index 9a30a99ca1..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 }); - TrackPaintUtilDrawStationMetalSupports( - 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); diff --git a/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp b/src/openrct2/ride/coaster/FlyingRollerCoaster.cpp index f314e0a00c..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 } }); - TrackPaintUtilDrawStationMetalSupports( + 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 }); - TrackPaintUtilDrawStationMetalSupports( + DrawSupportsSideBySide( session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::TubesInverted); TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); } diff --git a/src/openrct2/ride/coaster/GigaCoaster.cpp b/src/openrct2/ride/coaster/GigaCoaster.cpp index ab55902e42..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 }); - TrackPaintUtilDrawStationMetalSupports( - 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); diff --git a/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp b/src/openrct2/ride/coaster/HeartlineTwisterCoaster.cpp index 313160d08c..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 }); - TrackPaintUtilDrawStationMetalSupports( - 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 ab162bd72a..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 } }); - TrackPaintUtilDrawStationMetalSupports( - 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 c9a589bdd9..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 } }); - TrackPaintUtilDrawStationMetalSupports( - 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 d852f5ec59..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 } }); - TrackPaintUtilDrawStationMetalSupports( - 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/coaster/JuniorRollerCoaster.cpp b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp index cedb8f3e5d..a80d186927 100644 --- a/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp +++ b/src/openrct2/ride/coaster/JuniorRollerCoaster.cpp @@ -1911,8 +1911,7 @@ void JuniorRCPaintStation( PaintAddImageAsChild(session, imageId, { 6, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); } - TrackPaintUtilDrawStationMetalSupports( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); @@ -5962,7 +5961,7 @@ static void JuniorRCTrackOnRidePhoto( constexpr int8_t photoCameraOffset = -1; PaintAddImageAsParentRotated( session, direction, ImageId(SPR_STATION_BASE_D, COLOUR_BLACK), { 0, 0, height + photoCameraOffset }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports( + 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 } }); diff --git a/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp b/src/openrct2/ride/coaster/LayDownRollerCoaster.cpp index 9f9c050f62..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 } }); - TrackPaintUtilDrawStationMetalSupports( + 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); diff --git a/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp b/src/openrct2/ride/coaster/LimLaunchedRollerCoaster.cpp index 902764cdbc..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 }); - TrackPaintUtilDrawStationMetalSupports( - 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 4b0625e05d..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 }); - TrackPaintUtilDrawStationMetalSupports( - 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/MineRide.cpp b/src/openrct2/ride/coaster/MineRide.cpp index d8b7784f99..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 }); - TrackPaintUtilDrawStationMetalSupports( - 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); @@ -3409,8 +3408,7 @@ static void MineRideTrackOnRidePhoto( { 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::Fork, 6); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Fork, 6); switch (direction) { diff --git a/src/openrct2/ride/coaster/MineTrainCoaster.cpp b/src/openrct2/ride/coaster/MineTrainCoaster.cpp index 4e1a1e3c08..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 } }); } - TrackPaintUtilDrawStationMetalSupports( - 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 f816cbf419..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 }); - TrackPaintUtilDrawStationMetalSupports( - 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); @@ -4796,8 +4795,7 @@ static void MiniRCTrackOnRidePhoto( { 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::Fork, 6); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Fork, 6); switch (direction) { diff --git a/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp b/src/openrct2/ride/coaster/MiniSuspendedCoaster.cpp index ea3c6dcdaf..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 } }); - TrackPaintUtilDrawStationMetalSupports( - 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 fe9c3c78ef..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 } }); } - TrackPaintUtilDrawStationMetalSupports( - 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; diff --git a/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp b/src/openrct2/ride/coaster/SingleRailRollerCoaster.cpp index 45c7e6ba81..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 } }); - TrackPaintUtilDrawStationMetalSupports( - 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); diff --git a/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp b/src/openrct2/ride/coaster/StandUpRollerCoaster.cpp index fc33be28da..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 }); - TrackPaintUtilDrawStationMetalSupports( - 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); diff --git a/src/openrct2/ride/coaster/Steeplechase.cpp b/src/openrct2/ride/coaster/Steeplechase.cpp index 26e4c22501..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 } }); - TrackPaintUtilDrawStationMetalSupports( - 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 de04357d6b..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 } }); - TrackPaintUtilDrawStationMetalSupports( - 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 6d07927b92..1245040a19 100644 --- a/src/openrct2/ride/coaster/WildMouse.cpp +++ b/src/openrct2/ride/coaster/WildMouse.cpp @@ -218,8 +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], 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/gentle/CarRide.cpp b/src/openrct2/ride/gentle/CarRide.cpp index cad01e19b5..50567d5c1a 100644 --- a/src/openrct2/ride/gentle/CarRide.cpp +++ b/src/openrct2/ride/gentle/CarRide.cpp @@ -365,8 +365,7 @@ static void PaintCarRideStation( PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); } - TrackPaintUtilDrawStationMetalSupports( - 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); diff --git a/src/openrct2/ride/gentle/GhostTrain.cpp b/src/openrct2/ride/gentle/GhostTrain.cpp index 522f9230cb..7e25896951 100644 --- a/src/openrct2/ride/gentle/GhostTrain.cpp +++ b/src/openrct2/ride/gentle/GhostTrain.cpp @@ -392,8 +392,7 @@ static void PaintGhostTrainStation( PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); - TrackPaintUtilDrawStationMetalSupports( - 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); diff --git a/src/openrct2/ride/gentle/MiniHelicopters.cpp b/src/openrct2/ride/gentle/MiniHelicopters.cpp index 8229a111b0..c04670e60e 100644 --- a/src/openrct2/ride/gentle/MiniHelicopters.cpp +++ b/src/openrct2/ride/gentle/MiniHelicopters.cpp @@ -40,8 +40,7 @@ static void PaintMiniHelicoptersTrackStation( PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); } - TrackPaintUtilDrawStationMetalSupports( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); diff --git a/src/openrct2/ride/gentle/MonorailCycles.cpp b/src/openrct2/ride/gentle/MonorailCycles.cpp index 2e84cb1ab9..feb6e114d0 100644 --- a/src/openrct2/ride/gentle/MonorailCycles.cpp +++ b/src/openrct2/ride/gentle/MonorailCycles.cpp @@ -209,8 +209,7 @@ static void PaintMonorailCyclesStation( PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); } - TrackPaintUtilDrawStationMetalSupports( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); + DrawSupportsSideBySide(session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); PaintUtilPushTunnelRotated(session, direction, height, TUNNEL_SQUARE_FLAT); TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); diff --git a/src/openrct2/ride/transport/Monorail.cpp b/src/openrct2/ride/transport/Monorail.cpp index 1023497e7d..f79b78bbdc 100644 --- a/src/openrct2/ride/transport/Monorail.cpp +++ b/src/openrct2/ride/transport/Monorail.cpp @@ -462,8 +462,7 @@ static void PaintMonorailStation( PaintUtilPushTunnelRight(session, height, TUNNEL_SQUARE_FLAT); } - TrackPaintUtilDrawStationMetalSupports( - 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); diff --git a/src/openrct2/ride/transport/SuspendedMonorail.cpp b/src/openrct2/ride/transport/SuspendedMonorail.cpp index e4d93fec3d..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 } }); - TrackPaintUtilDrawStationMetalSupports( - 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 c4a81ab177..9dddc2a7cb 100644 --- a/src/openrct2/ride/water/DingySlide.cpp +++ b/src/openrct2/ride/water/DingySlide.cpp @@ -405,8 +405,7 @@ static void DinghySlideTrackStation( session, direction, session.TrackColours[SCHEME_MISC].WithIndex(imageIds[direction][1]), { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports( - 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); diff --git a/src/openrct2/ride/water/LogFlume.cpp b/src/openrct2/ride/water/LogFlume.cpp index a0dea32bd9..12a63e80f5 100644 --- a/src/openrct2/ride/water/LogFlume.cpp +++ b/src/openrct2/ride/water/LogFlume.cpp @@ -200,8 +200,7 @@ static void PaintLogFlumeTrackStation( } PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); - TrackPaintUtilDrawStationMetalSupports( - session, direction, height, session.TrackColours[SCHEME_SUPPORTS], MetalSupportType::Boxed); + 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 From d88abab74b57a2a33b5784ac39d06a19d2751f41 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Wed, 25 Oct 2023 19:39:07 +0200 Subject: [PATCH 6/6] Move MetalSupportTypeCount to Supports.cpp --- src/openrct2/paint/Supports.cpp | 1 + src/openrct2/paint/Supports.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2/paint/Supports.cpp b/src/openrct2/paint/Supports.cpp index 8e7d82da46..1da900e662 100644 --- a/src/openrct2/paint/Supports.cpp +++ b/src/openrct2/paint/Supports.cpp @@ -1540,6 +1540,7 @@ 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 }, diff --git a/src/openrct2/paint/Supports.h b/src/openrct2/paint/Supports.h index 7c040607dc..54ee612f1c 100644 --- a/src/openrct2/paint/Supports.h +++ b/src/openrct2/paint/Supports.h @@ -93,7 +93,6 @@ enum class MetalSupportType : uint8_t */ BoxedCoated, }; -constexpr uint8_t MetalSupportTypeCount = 13; /** * Tiles are rendered at a 45 degree angle, with the corners on the top, bottom, left and right.